Help with zener diodes? Answered
I'm trying to get a better grasp on how to use a zener diode.
I have plenty of information about what they do (allow current to flow one way until the voltage is high enough, then reverse the flow), how they work and even how they are made, but finding basic information about how to use it is harder.
I am trying to connect a Keyboard Encoder to an Arduino. The Encoder runs on 3.5v and the Arduino runs on 5v.
When a pin on the Encoder is connected to ground it outputs a keystroke to the computer.
I have an Arduino pin set to HIGH (5v) as normal and under some conditions it changes briefly to LOW (ground) which is when I want the Encoder to output to the PC, and then back to HIGH (5v) again.
To protect the encoder from the higher voltage coming from the Arduino I think I need to use a zener diode. If my understanding is correct it should work as described in the diagram.
When the Arduino pin is High (5v) the Encoder reads as 3.5v and any voltage over 3.5v is drained to ground rather than pushing against the Encoder. No keystroke is passed.
When the Arduino pin is LOW (0v) the Encoder reads 0v, the zener diode adds resistance and voltage runs to the Arduino. The Encoder sends a keystroke to the PC.
My main concern is that once the voltage is over the 3.5v all of the power will drain to ground rather than maintaining the 3.5v before the zenner diode. I can't find anywhere which will tell me either way.
If you need more information on my set up please let me know. I'm really struggling to get my head around this!