I’m building a mini-fridge fermentation temperature controller with my Photon, and I want to ensure I get alerted in case of a power failure.
I’m a SW guy, so the HW side is not my forte! Here’s my first shot at building a circuit to do this - the Photon would interrupt on D7 going low to trigger the power loss alert and do whatever graceful shutdown is needed. Feedback please?
I’d probably add something like a 10K resistor between D7 and GND to force the pin to pull down when 5V is removed. Your design will most likely work but with 5V removed D7 could end up in some weird floating state since it will essentially have nothing connected to it.
@potatotron Thanks! I’ll definitely add the pulldown resistor. Once I get time to prototype this i’ll report back with my findings - it should be easy enough to test out.
@Allan, it would be difficult for the Photon to keep doing anything without power! So yes, you need a super capacitor or battery backup solution for the Photon to still publish when the primary power source is lost.