Go Down

Topic: Battery input to Arduino circuit (Read 164 times) previous topic - next topic

PeterTaps

Hello,

Environment: Arduino MEGA 2560 R3

My project is quite simple, The board is in sleep state all the time. It wakes up only when a low voltage is detected on the interrupt pin and writes a value to EEPROM.

The circuit is connected to a PC via USB. At any point, the PC can ask Arduino for the stored value.

The PC will be turned on only during daytime but my circuit has to work even when the PC is off. Therefore, I need an external battery power supply.

From https://www.open-electronics.org/the-power-of-arduino-this-unknown/, it appears Arduino can work fine if 6V is applied to VIN pin.

Q1. Can I use a 9V battery instead?
Q2. If I use 4 1.5V batteries in series, do you see any problem with that?
Q3. Is there a way to make Arduino draw power from USB source if it is available? Otherwise, it can fall back to battery pack. I am thinking this will increase the battery life.

Your help is truly appreciated.

Regards,
Peter



edgemoron

#1
Sep 15, 2017, 08:06 am Last Edit: Sep 15, 2017, 08:21 am by edgemoron
You need to use a 7V supply minimum to the Mega's barrel jack, it will automatically switch to USB power when it is there, I would use a 6 AA battery holder and rechargeable NiMH cells (8.4V, full charge), not a 9V "transistor" battery.
EDIT: I misspoke saying the Mega would auto switch to USB power, but there are fairly simple circuits to do that.

Wawa

#2
Sep 15, 2017, 08:33 am Last Edit: Sep 15, 2017, 08:38 am by Wawa
Many parts on a Mega can't be put to sleep.
That makes a Maga a poor choice to run on battery backup.
Not sure how much you can get it down (from 70mA), but be prepaired to recharge the 6* NiMh AA pack every two or three days.
Leo..

PeterTaps

You need to use a 7V supply minimum to the Mega's barrel jack, it will automatically switch to USB power when it is there, I would use a 6 AA battery holder and rechargeable NiMH cells (8.4V, full charge), not a 9V "transistor" battery.
EDIT: I misspoke saying the Mega would auto switch to USB power, but there are fairly simple circuits to do that.
Thank you for your help edgemoron. I could go with 7V supply on the barrel jack. However, what do you think of the possibility of using VIN pin instead? From the link that I mentioned, it seems it might work with 6V as well.

Regards,
Peter

PeterTaps

Many parts on a Mega can't be put to sleep.
That makes a Maga a poor choice to run on battery backup.
Not sure how much you can get it down (from 70mA), but be prepaired to recharge the 6* NiMh AA pack every two or three days.
Leo..
Thank you for your help. I too am worried about this. I would like that I don't have to touch the circuit for at least six months. Is there any other board that you can recommend that is more efficient and has USB connectivity on the board?

My needs are not cpu intensive. I could go with a simpler chip, if needed.

Regards,
Peter

avr_fred

Quote
My project is quite simple, The board is in sleep state all the time. It wakes up only when a low voltage is detected on the interrupt pin and writes a value to EEPROM.

The circuit is connected to a PC via USB. At any point, the PC can ask Arduino for the stored value.
Your statement raises several questions. An interrupt pin does not detect low voltage, only a logic high or low. What senses the voltage? What is the mysterious value written to eeprom? Why eeprom? If the board is battery powered, storing it in ram is just fine. No matter what the data is, it seems  pointless without a time stamp. Do the data points need to be queued until the PC downloads them?

Lastly, in order for the PC "to ask" the Arduino for the stored value, it will reqire code on both the Arduino and the PC to make this happen. I just want point out something that you appear to trivialize, not sure you understand PC communications programming is another aspect of this project.

Wawa

Is there any other board that you can recommend that is more efficient and has USB connectivity on the board?

My needs are not cpu intensive. I could go with a simpler chip, if needed.
A $2 Nano uses less power than a Mega does asleep.

So what are your needs.
Hard to give proper advice without knowing exactly what you want to do.
Leo..

Go Up