Voltage divider reverse polarity

Hi folks,

Arduino newbie here. Hoping someone can give me some friendly advice.

I have a machine with a 6-way socket that consists of 24V&GND, 12V&GND, 5V&GND that I want to read the voltages from. I'm thinking of using the following voltage divider 3 times, so I can read each different voltage - I'm just showing one of these in the diagram below.

vdiag

My question is. If the voltage is reversed, then I believe there will only be a 5V drop over r2 and thus 20V at A1, which I assume is bad? How would I protect against the wrong polarity - is it just a case of using a protection diode?

And if so, how would I add the voltage drop of the diode into my calculation for reading the voltages. Hope this makes sense.

Thanks in advance!

Make a similar drawing to explain this?

No, I think the voltage at A1 will be -5V, which will damage the Arduino. Also there could be a short circuit which could damage the Arduino and the 25V source.

Do you need to measure the voltage even when the polarity is reversed?

1 Like

Make a drawing exactly how your circuit will be wired up. Are all three grounds attached together? Are you using the Arduino like a multimeter with probes that you will touch to your voltage sources? If it is to be wired with a connector or permanently, I’m having a hard time envisioning how you could reverse the polarity.

Wow... Thx for the super speedy responses. It's funny how in your own head it seems to make sense, but yep, apologies for not elaborating too well - and apologies for my terrible drawing as per the diagram below.

Yes, I will attach all 3 grounds together.
I have a machine that has a 6 pin connector with all these voltages on - Before I connect this connector to the PCB on my machine, I would like to test each voltage and make sure it falls within its limits - for example 24V must read between 23.9V and 24.6V and so on.

So I would like instead, to first plug this connector from the machine into my arduino via a cable I will make. However there maybe a slight possibility that the wiring loom/cable on the machine under test has been pinned up wrong, so I would like to protect against this. I will be testing many machines with this.

Thanks again!

Ooops, missed out the resistor values on the diagram... :upside_down_face:

It's as per the first diagram though r1=30K and r2=7.5K, from left to right for each voltage divider.

Thanks, that’s much clearer. So, for example, one of you harnesses could have one of its voltages wired to its ground which I presume would blow some sort of circuit protector on your machine, or maybe not.

You could protect your analog inputs by putting a reverse diode across them which if you did somehow manage to reverse the polarity would heat up, smoke, catch fire, etc depending on its power rating and you could disconnect before that happened.

If it’s possible that the entire harness could be wired backwards then when you connected it to the Arduino, the diodes would conduct and save you for a while.

You could put a diode in series with each input that you would have to account for in you measurement, likely empirically.

You could build a fixture with a multimeter that you did a check with before hooking it to the Arduino but that might defeat the reason for using the Arduino altogether.

More thinking about the possible failure modes would help you decide.

1 Like

Thanks for taking the time to reply, it's much appreciated.

Ok, that helps to clear up my thinking for me - I'll source some decent schotkky diodes and give it a bash. I wasn't certain about how to calculate, but with you saying empirically, I think if I wire it up and make some measurements, i might be able to figure it.

Thx again!

1 Like

You’re welcome.

You can get dual Schottky in a 3 pin package, it will protect the pin from both under and over voltage provided the current is limited.

One pin to Vcc, one to the input, one to ground. All diodes normally reverse biased.

Another way to protect against reverse polarity connection is to use MOSFETs. If wired correctly, the MOSFET will be switched fully on when the polarity is correct and drop only a very small voltage, much less than a diode. When polarity is reversed, the MOSFET will switch off and protect the Arduino circuit.

Thanks for taking the time to message - I'm still trying to decide the best design, so I'll consider this, cheers!

Cheers for the info. I was actually just watching a YouTube video using this same idea. Seems like a good low power loss way, although power loss isn't really a consideration for me... I've never tried it before, so might give it a shot. Cheers!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.