Page 1 of 1

Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Thu Jan 08, 2026 9:42 pm
by Billduck1302
I have a 12.62 Volt Lithium battery (4S). The voltage goes thru a 5:1 voltage divider to AN0 on the UNO. It consistently uuder reports the voltage. (See photo) For the component, a potentiometer, I am wondering if settings for the pot need to be tweeked. From the photo, the UNO is saying the voltage is 11.18. The Voltage divider
If the attatched photo does not come thru, there are 2 connections for the Voltage to be measured. and I have connected the Signal wire to AN0 and output (-) wire to the analog input (-).
Thanks in advance.

Link to divider

https://www.ebay.com/itm/323881639189?_ ... BMiM_q-PNm

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 8:02 am
by stefan.erni
Hi Billduck1302

I suspect the link goes to the wrong module.
Perhaps you could post a schematic. Actually, you only need two resistors.

82 kΩ / 9,1 kΩ → divider 0,0999 and 0,165mA

91 kΩ / 10 kΩ → divider 0,0990 and 0,149mA

This requires a little power from the battery. You can also use higher resistance values.

910 kΩ / 100 kΩ→ divider 0,09901 14,85μA

wrong link?
2026-01-09_08-41-24.PNG
2026-01-09_08-41-24.PNG (259.63 KiB) Viewed 179 times

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 2:28 pm
by Billduck1302
Minute 2:14 in this Youtube explanation.
https://www.youtube.com/watch?v=FaoKzi7tgME&t=280s

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 3:41 pm
by stefan.erni
Hi Billduck1302



I found the modul:
2026-01-09_15-59-57.PNG
2026-01-09_15-59-57.PNG (230.76 KiB) Viewed 151 times
And what is used in the modul:
2026-01-09_16-01-59.PNG
2026-01-09_16-01-59.PNG (361.17 KiB) Viewed 151 times
There is a command "map" used in the software,
2026-01-09_16-31-10.PNG
2026-01-09_16-31-10.PNG (175.05 KiB) Viewed 151 times
I guess that's the same as the map component in Flowcode.
2026-01-09_16-20-14.PNG
2026-01-09_16-20-14.PNG (9.59 KiB) Viewed 151 times
I hope that helps a little.

I haven't used the map component yet, but I will be using it soon for my project.

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 6:07 pm
by chipfryer27
Hi

The map component is very easy to use and I think medel35 first created it years ago before it became a component.

Regards

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 7:34 pm
by medelec35
chipfryer27 wrote:
Fri Jan 09, 2026 6:07 pm
Hi
The map component is very easy to use and I think medel35 first created it years ago before it became a component.

Regards
Wow chipfryer27 , you have a good memory as that was a long time ago.
Yes, I created the map component based on the Arduino version so people moving from Arduino IDE to Flowcode will be used to the way it works.

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 8:41 pm
by chipfryer27
Hi Martin

it was such a useful component it immediately stuck in my mind, which is no small feat, especially as I firmly believe guys have a fixed amount of memory and can only remember so much. If full and we want to remember something new, then we must forget something else.....

I make a point of not remembering things, mainly because if my theory is true, I don't ever want to forget Halle Berry in a catsuit.... Greatest movie ever....

Regards

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 9:27 pm
by Billduck1302
I am not seeing the MAP function in Version 11.

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 10:20 pm
by medelec35
Hi Bill.
Within Components ribbon, make sure Show Components on the far left is set for 2D & 3D.
Then click on the magnifier next to Show Components and enter map.
The Map Function can also be found within Components > Math > Calculation.
chipfryer27 wrote:
Fri Jan 09, 2026 8:41 pm
I don't ever want to forget Halle Berry in a catsuit
Oooh, yes, we can't ever forget that in our increasing age. :lol:

Re: Reading a 12.62 Volt battery with a voltage divider on an UNO

Posted: Fri Jan 09, 2026 11:39 pm
by Billduck1302
Thank you. This interplay is what makes the Forum so great.