| Electronics > Projects, Designs, and Technical Stuff |
| Looking for a simple way to generate a reset pulse from a switch state change |
| (1/1) |
| optoisolated:
Hi All, I've been trying to find a simple circuit to generate a pulse on the state change of a switch. High>Low or Low>High. I'm using an ESP8266EX and in deep sleep mode (which i need to get anything resembling good battery life) the only way to wake it is to reset it. Cool, no worries. The ESP8266 will be used to monitor and report on the state of a reed switch, and i only really need to know if the state has changed in order to check in. Simple enough.. However I've been ripping my hair out trying to find a really simple and elegant way to generate a reset pulse to wake up the ESP8266 when the reed switch state changes. :scared: I could use a 74HC74 to generate the pulse on a low to high, but not on a high to low transition. I thought I could use an inverter fed into the same input with an OR gate, but that didn't work as intended. Any ideas or suggestions would be appreciated. :-+ I'm working on a greenfield project so i'm open to any and all ideas. Cheers :D |
| eblc1388:
Look up the 74HC86, quad 2-input EXCLUSIVE-OR gate. You will need only one gate out of four. The remaining gates can be used as inverter if required. Wire one input of the XOR to the reed switch and wire the second input to the same point but via a resistor in series and a capacitor to ground. This is to add a RC time constant. When the reed switch changes state, a brief pulse will be produced at the gate output. |
| David Hess:
Eblc1388 suggested what I would have suggested. The RC delay can also be replaced by the other three gates in the '86 package in series if a narrower pulse width is acceptable. |
| optoisolated:
That solution is both simple and elegant. Perfect! Thanks so much :) :-+ 8) |
| Navigation |
| Message Index |