0
\$\begingroup\$

Question: Is there any way that I can change the signals from two inputs into the max signal from those inputs?

Such as,

0, 1 => 1
0, 0 => 0
1, 0 => 1
1, 1 => 1

Extra info: One input is a reed switch, the other is from an ESP8266 GPIO pin. Once the reed switch is activated, the ESP8266 is reset (the reed is connected to the reset and ground pin). During startup, power is applied to the ESP8266 GPIO pin until the ESP finished processing so that the device is being kept alive until it is done.

Current problem is, when the reed switch closes too quickly, GND is applied to RST, keeping the ESP in a state of non-deep-sleep and inability of finishing its process. So in order to solve this, I'd need to combine the MAX of those inputs.

Requirements: The "max" operation should not require extra power, so that when the ESP is in deep sleep, there is no extra power drain for this "max" operation (such as a reed switch doesn't require power to complete/open a circuit)

\$\endgroup\$
  • 4
    \$\begingroup\$ Look up "OR gate" \$\endgroup\$ – Mike Jan 27 '17 at 8:46
  • \$\begingroup\$ you need to draw a schematic of what you have so far, I'm not sure how I can guess you've got it wired up so that one input resets the 8266. \$\endgroup\$ – Neil_UK Jan 27 '17 at 8:48
  • 3
    \$\begingroup\$ I would do an OR gate with diodes. Each input has a series diode and the output of the diodes goes to a pull down. If any voltage is high the output if high, if both are low both diodes do not conduct and the input is pulled down. \$\endgroup\$ – Claudio Avi Chami Jan 27 '17 at 8:50
  • \$\begingroup\$ @ClaudioAviChami How did I miss that! Of course it's an OR lol. I think you're right, diodes seem like the right way to go. If you post an answer I will accept it. Also, do you have any idea what kind of diodes I should be using? Would a 1N4004 work? \$\endgroup\$ – Kevin Van Ryckegem Jan 27 '17 at 9:11
1
\$\begingroup\$

I would do an OR gate with diodes. Each input has a series diode and the output of the diodes goes to a pull down. If any voltage is high the output if high, if both are low both diodes do not conduct and the input is pulled down.

Regarding the type of diodes, it depends on the other parameters of the design. If possible, I would use Schottky diodes.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.