- Tue Feb 23, 2016 10:42 pm
#41773
I think I understand now, here's what I did.
Created the circuit. I left out the ESP and just used a HCT132 (actually had one on hand), and included two leds, one where GPIO14 would be and another to watch the reset line. I also pulled pin13 high to disable reset due to ESP waking up (test circuit drawing attached).
To answer my questions:
- power the circuit, pin1&2 are high, pin8 (RESET) is high, so the ESP would boot.
- When TP1 is connected to GND, pulling HCT1&2 low. Pin3 goes high and lights the LED1, usually read by GPIO14. Pin8 is now low, holding the ESP in reset.
- the 1M resistor slowly drains the 220uF cap that was charged when HCT pins1&2 were pulled to ground. Seems to take roughly 4.5 minutes. I'd guess this is to ensure the water sensor is really triggered, or does it reduce current draw, or? Once it drops to logic 0, HCT pins 4&5 are low which results in pin8 high, letting the ESP boot. Pin3 is still high, as is my LED1 and GPIO14, so the ESP can see the alarm state (different than just waking up out of sleep).
Cool.
I don't know the characteristics of the water sensor, but what happens if it bounces over a couple seconds? Again, no clue, but I'm guessing the HCT132 takes care of signal bounce in the under ms range, but if it bounces before the cap is drained, it just looks like it woke from deep sleep, right? No harm, batt check and email a little early.
BTW, I also learned a clone Saleae logic analyzer has a unfortunate feature. The test leads actually output around 3.3v around 3ma. I'm guessing its weak enough to not get in the way of I2C or TTL serial analysis, what I've successfully used the device for, but gets in the way if it charges a cap that you don't want charged...
You do not have the required permissions to view the files attached to this post.