Measure voltage on Arduino Analog Pin behaves strangely

Hello guys, i'm still newb i have a problem that i cant understand

I have battery of 12 volts, connected over "LM 2596 Step Down Adjustable Power Supply Module" to arduino and relay.

I connect 12 v from battery (Before stepdown module) to voltage divider (via resistors) to A1 pin (see the attached scheme)

When i measure current on A1 with with multimeter - i get ~ 4.0 - 4.5 volt depending on battery charge/.

When i print results to serial terminal via usb using function analogread (A1) i get something simmilar (+/- 0.3 volt)

BUT, when i disconnect USB, and connect LCD for example, i always get 5 volt (or 1023) reading!

Help me, i have no ideas what to try next!

I think you should draw simple diagram of what you have. This will probably show you the answer and will make it easier for people to help you. (maybe you meant to, think your 2 attachments are the same.)

'measure current' - you mean voltage.
'relay' - usually Arduino can't drive relay directly remove the relay and retry.

How do you power the Arduino if you don't have the USB connected?

Hi, i power arduino via arduino DC port.

Yes, i want to measure voltage.

Removed relay.

Now there is battery -> sep down converter-> arduino.

Attached general scheme drawn by hand.

I've also tried to connect gnd from R2 to arduino gnd (as shown in dotted line in scheme 2). Same effect, measures current only on USB connection.

I'm looking at your diagram.

  • put the neg of your voltmeter on one of the 0V points. Put the + on every other place that you think is 0V and check that it is 0V.

  • disconnect from power. Switch meter to ohms. Do same connections and check that all the 0V points are connected with zero resistance.

  • What value are R1,R2?

I'm wondering if the 5v from the regulator is smooth. If you measure it with AC volts on your meter what do you get? Should be zero.

Resistors are 100 r and 200 R. Voltage on Pin (measured on pin and arduino GND) is 3.9 v at the moment, although arduino measures 5v.

Can you explain what are 0V points?

Module gives 5.15 as set (module has regulation for this).

All the places on your circuit marked as negative. Think of the power part of the circuit as either 5V or 0V.

Ah, ok.

It was my suspicion as well, so i measured resistance between GND terminals. 0 all the way. Havent tried measuring voltage thou, will give it a try today after work :slight_smile:

Hi,
Why are you putting 5V into the DC jack, that needs 7volts or more to get 5V from the Arduino's onboard regulator.

I think you need to connect the 5V supply to the 5V pin on the Arduino board and the supply gnd to the Arduino gnd.

Tom... :slight_smile:

TomGeorge:
Hi,
Why are you putting 5V into the DC jack, that needs 7volts or more to get 5V from the Arduino's onboard regulator.

I think you need to connect the 5V supply to the 5V pin on the Arduino board and the supply gnd to the Arduino gnd.

Tom... :slight_smile:

Well, i told you i'm a newb :smiley: i always thought that arduino runs on 5V, not depending on input method!

I think this must be it, will try this first thing when back home!

I was planning to connect GSM modem later, so i did put this DC step down (GSM modem needs 5v for sure)

And maybe i can just connect arduino power jack directly to my battery? It gives Up to 12.5 volt or smth like that?

I think it might even be able to power up SIM 900 shield from arduino, if i would give arduino enough juice via power jack?

turns out RichardDL was right! i connected my 12v bat directly to arduino, works like a charm!

Althou SIM 900 gsm shield does not have enough current to make a call, voltage measurements are correct!

If anyone has tips how to provide SIM 900 with enough current from arduino (without using external power source) - tips highly appreciated :slight_smile:

You can't. The onboard reverse polarity protection diode is only rated for 1A, the 5V regulator for 800mA (and you won't get that with 12V at the barrel jack, the part will overheat and into thermal shutdown first), the 3.3V regulator just 150mA. You need an external supply.

So, putting it short: 12 v battery is OK for arduino, but for GSM shield i will have to go with step down module to get 5 volts that i will connect to gsm module power jack, correct?

Sounds good.

osom. You guys are the life savers! Thank you all for helping me out! :slight_smile: