How do I combine a voltage divider and a pull down resistor?

I realize the arduino does not provide an “INPUT_PULLDOWN” function but it would be handy.

I curently measure a 14 V max source with an analog input (A2) via a 3 resistor (all equal 10k) resistor volatge divider.

This setup works just fine until I need to measure an “open circuit” . When an open circuit occurs , the voltage measured goes to Vmax (12 volts) which is wrong … the voltage should be “0” . How can I combine this resistor network to accomodater a pull down resistor? I have included a diagram (see attached jpg resistor.jpg) which shows my idea how to solve this problem . Would the circuit labled “With Pull Down” bring the input to zero when a circuit break happens ? Or would tthe 10 Meg Ohm resistor just get ignored.

That should work, but normally the voltage divider is "permanently" connected to the Arduino (and the Arduino ground) so when you disconnect the external voltage the voltage divider becomes it's own "pull down".

A pullup or pulldown resistor is typically used with a DI (Digital Input) not an analog input. As drawn your voltage divider is a 3:1 divider so using an Arduino with a 5 volt reference your max voltage is 15 volts 1/3rd of which is 5 volts. Your added 10 Meg is in parallel with your 10K which will slightly (very slightly) reduce the 10K value. With 15 volts applied your divider out would be 4.9965 volts verse 5.0 volts and with the Arduino 10 bit ADC I doubt you will see any change.

With 12 volts applied to your divider string your Arduino analog in will be 4 volts.

Less any pullup or pulldown you still have 10K to common or ground so I have no idea why your open circuit would be 12 volts? Maybe you should define open circuit?

Ron

What a weird question. Why would you disconnect the voltage divider? Normally you would disconnect the 14V source if you are measuring different circuits...

I suspect there is some kind of 100% misunderstanding behind this. But I don't know what it is, because the thinking hasn't been explained.

I need to measure an "open circuit"

Please explain what this means.

The Arduino must share ground with a voltage source to be measured.

You are breaking the circuit on the ground side of the divider? WRONG! Post a drawing showing WHERE you are switching the 12V.

Jrem…

Im posting another drawing here showing where the breaks are . I just want to know if there is a better way to accurately get zero volts if the break /open occurs (an off switch could be accidently left open). I thought about the first answer (from Ron Blaine) saying I should "define " a break , but thats difficult because the floating value is not easy to define.

Thank you all for replies !

Learn to inline pictures please:


In both situations you should measure 0V if grounds are connected. If they are not you will measure nonsense even with the source connected.

Your Nano needs to share a common ground. The 10 Meg serves no purpose do just make a common ground shared by your divider and your Nano.

Ron

Hi,

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

It will show you how to put images in your post.

Thanks..Tom... :slight_smile: