Minimum voltage at the Vin pin of Uno

Hi all,

I just started playing around with Arduino and am making a thermostat that I'll power with a 9V battery (PP3 atm, I will likely switch to 6xAA) through the Vin pin . I will be using a DHT22 temperature/humidity sensor, a Nokia 5110 LCD (without backlight), a DS3231 RTC module and a relay. Perhaps in the future I'll swap the Uno for Nano 33 IoT for remote control.

At the moment it's just a temp sensor and LCD connected. I am measuring the battery voltage using an analog input and it's currently at around 8.9V, what should be the threshold at which I will need to change the batteries? Specification says Vin accepts 7-12V (6-20V maximum), would somewhere between 7V and 6V be my threshold then? Sorry about the simple question, I don't know much about electronics and couldn't find an answer online.

I want to display the battery level as percentage, 100% being 9V and 0% being whatever the minimum threshold I should aim for.

Any voltage input to the Vin pin should be over 7V* for the 5V to be able to regulate properly on a genuine Uno. It depends on the 5V regulator on others. Find the regulator part number and consult the data sheet. The specification to look for is drop out voltage for the regulator input.

There is a diode between the power jack and the regulator so the supply voltage through the power jack needs to be 0.6 - 0.7V higher.

*drop out on the MC33269D-5 regulator is max 1.35V (data sheet) so the it should regulate down to 6.35V but 7V gives a good margin.

Thank you for explanation and the link. It is a genuine Uno so I will set my minimum threshold to 7V. Unless there is some other/better way to determine battery life?

I use rechargeable Ni-MH batteries, Eneloop brand which is part of Panasonic. They are low self discharge so if they sit around for a while they don’t go flat and are still good to go. regular Ni-MH will self discharge I think around 1% a day. But the ones I use are still about 90% full after 1 year.

p4w31:
I want to display the battery level as percentage, 100% being 9V and 0% being whatever the minimum threshold I should aim for.

Battery voltage and charge level don't have a linear relationship. The best you can probably do is a low battery warning.

Amount of charge you can get out of a battery (especially the non-rechargeable ones) is also very much dependent on the current draw: more current means less capacity - e.g. an alkaline battery may last some 2,200 hours at 1 mA, but may be well under 1 hour at a 1A load!

Thank you for your input. I found several charts showing the voltage to Depth of Discharge relationship at different levels of current draw and for different types of batteries. Indeed, the relationship isn’t linear, however the linear approximation is good enough for my application. I ended up displaying battery voltage and a small battery icon (like on mobile phones) next to it with 6 states of charge, empty being <= 7.0V

Once I get the thermostat to work I will look into things like how to calculate the current draw of my setup and how to optimise the battery life, but first I want to get rid of the old mechanical on/off stat.

Be prepared to replace your batteries about twice a day, if you use PP9. Once every other day, if you use a pack of AA batteries.

:astonished: That's a bit shorter than I expected! I'd better stick with a socket power supply for now

An Uno draws some 40-50 mA, sleep modes barely improve on this.
A PP9 has a capacity of ~700-800 mAh. That's 15-20 hours of battery life.
An alkaline AA battery has a capacity of ~2,200 mAh. That's 44-55 hours of battery life.
If you want to go for battery power: use an 8 MHz Pro mini, remove the regulator and power LED, and use sleep modes most of the time. That way you can power your project for 1-2 years on a pair of AA batteries.
But you'll have to power your DHT22 through an Arduino pin as it draws about 2 mA, that's a serious drain on the batteries, so you power it up only when needed.

p4w31:
:astonished: That's a bit shorter than I expected! I'd better stick with a socket power supply for now

Why would you do otherwise? :roll_eyes: