I'm in the middle of doing a redesign of a Hall Effect based non contact switch board I designed a few years ago (my very first board design, in fact!) In the original, I didn't include any protection for reverse voltage in case the power supply leads are hooked up backwards, and sure enough, the mistake has been made a number of times in the last few years. The mistake is rare enough, and the board cost low enough, that if making this fool-proof were going to be difficult or expensive, it wouldn't be worth it. It seems to me like it should be quite simple and cheap though, so I'm trying to add protection.
I've looked at adding a protection diode on either the 5V input or the ground input, and I've experimented with each by simply putting an external diode in series with the corresponding supply wire on one of our current production boards. My plan for the redesign would be to use Schottky diodes, but at the moment I'm experimenting with a 1N4001 and some 5.1V Zeners that we had lying around.
If I put a diode on the ground side, everything works as expected, but the whole board, including its outputs when they're in a low state, floats one diode-drop above the ground reference for the rest of the machine that this board connects with. It seems like things functioned properly in this case, but I still don't trust it - I'd much rather have all of my "ground" points be as close as they reasonably can be to the same voltage. I know nothing's ever perfect, but I think I'd prefer to not deliberately force the "ground" on this board to no longer match the rest of the machine's grounding.
If I put it on the 5V side, the board works perfectly when wired correctly, but if I reverse wire it, both outputs go high, passing current and activating the corresponding inputs on the main board for the rest of the machine. As first I ignored this, thinking I don't really care how the machine behaves in a mis-wired situation, as long as the board is protected. But then I started trying to make sense of where and how the leakage is happening, and it seems like it's through the comparator (MCP6542 push-pull output.) The datasheet for this part (linked here) doesn't provide an internal schematic, so I'm not sure if this is a function of built-in protection features, in which case I'm probably ok with the ~2mA that passes through. If it's getting through some unintended breakdown (not a deliberate protection feature) then I'd have to assume that any leakage is bad.
I've included a few schematic snippets - one is the current board design with the addition of a diode on the 5V supply side, the next is the input stage of our machine's main electronics board (the input that my smaller board's output will be feeding into,) and the last is a marked-up version of the first schematic, indicating voltage measurements and calculated currents.
I've tried to measure voltage and current a bunch of different ways. In the marked-up schematic below, green numbers are voltage measurements referenced to the ground of the rest of the machine. Red numbers are measurements between the two points their corresponding arrows point to, and current was calculated anywhere that I measured a voltage across a known resistance value. I've highlighted what I think is the leakage path in yellow.
So my questions to all the experts here are:
I've looked at adding a protection diode on either the 5V input or the ground input, and I've experimented with each by simply putting an external diode in series with the corresponding supply wire on one of our current production boards. My plan for the redesign would be to use Schottky diodes, but at the moment I'm experimenting with a 1N4001 and some 5.1V Zeners that we had lying around.
If I put a diode on the ground side, everything works as expected, but the whole board, including its outputs when they're in a low state, floats one diode-drop above the ground reference for the rest of the machine that this board connects with. It seems like things functioned properly in this case, but I still don't trust it - I'd much rather have all of my "ground" points be as close as they reasonably can be to the same voltage. I know nothing's ever perfect, but I think I'd prefer to not deliberately force the "ground" on this board to no longer match the rest of the machine's grounding.
If I put it on the 5V side, the board works perfectly when wired correctly, but if I reverse wire it, both outputs go high, passing current and activating the corresponding inputs on the main board for the rest of the machine. As first I ignored this, thinking I don't really care how the machine behaves in a mis-wired situation, as long as the board is protected. But then I started trying to make sense of where and how the leakage is happening, and it seems like it's through the comparator (MCP6542 push-pull output.) The datasheet for this part (linked here) doesn't provide an internal schematic, so I'm not sure if this is a function of built-in protection features, in which case I'm probably ok with the ~2mA that passes through. If it's getting through some unintended breakdown (not a deliberate protection feature) then I'd have to assume that any leakage is bad.
I've included a few schematic snippets - one is the current board design with the addition of a diode on the 5V supply side, the next is the input stage of our machine's main electronics board (the input that my smaller board's output will be feeding into,) and the last is a marked-up version of the first schematic, indicating voltage measurements and calculated currents.
I've tried to measure voltage and current a bunch of different ways. In the marked-up schematic below, green numbers are voltage measurements referenced to the ground of the rest of the machine. Red numbers are measurements between the two points their corresponding arrows point to, and current was calculated anywhere that I measured a voltage across a known resistance value. I've highlighted what I think is the leakage path in yellow.
So my questions to all the experts here are:
- Which reverse protection method I should employ?
- Diode on +5V side:
- Maintains ground referencing throughout machine.
- Allows leakage current through board when protecting against mis-wiring, maybe through comparator chip.
- Diode on "ground," or common, side:
- Local common reference on this board would be one diode drop above machine ground potential.
- This also means that outputs from this board would be one diode drop up when in their off state (it seems like this might be ok since the input stage uses a Darlington input with a correspondingly high Vf, but it still feels weird to have off not be zero.)
- This method appears to completely protect board components; no leakage is apparent.
- Diode on +5V side:
- Should I be worried about the leakage, assuming I'm right about it passing through the comparator chip?