Regarding the 1N4 diodes, I'm forgetting the diode band direction. Should the band on the diodes be facing the wires going to the 3 interfaces or toward the terminal block?
The band on the diode indicates the cathode (-) -- easy way to remember that is that the band looks like a "-", not a "+".
Ground (logic low) is coming through the controls to the encoder input that is held at logic high by a pullup resistor until ground is applied.
You want the diode to conduct (forward-bias) not block (reverse-bias) so point the band toward the lower voltage, just like the diagram in your original post.
ground----joystick/button microswitch----terminal block----(-)diode(+)----encoder input
when you say the grounds together do mean with no diode
Correct.
An extreme example of grounds being at a different electrical potential (voltage) is a monitor that requires an isolation transformer.
- If you connect chassis ground on that monitor to earth ground, you'll damage the monitor because those grounds are not at the same electrical potential.
Having three separate power supplies makes it possible for the grounds to be at different electrical potentials. (NOTE: Diagram is
not drawn to scale.
)
- All of the power supplies produce 5v
relative to ground.
- Directly connecting the grounds together with a piece of wire ensures that they are all at the same electrical potential relative to each other.
Scott