Powering Moteino with AA batteries - connection and range question

Started by Bugeye60, August 22, 2016, 08:04:36 PM

Bugeye60

I'm new to Moteino and microcontrollers in general but have managed to assemble a couple of cool (to me) gadgets.  However, so far these gadgets have been mostly powered by a PC-connected USB cable and now I need to make them portable.

I purchased a 5V, 2 amp, 6000 mAh USB battery pack for cell phones and connected it to a Moteino running the Gateway sketch.  I had a MoteinoMega connected to a laptop running the Node sketch and then proceed to test range.  It worked well out of the box for about a quarter mile down a tree-lined street.  I was quite pleased!

Now I'm running my own sketch which only requires intermittent transmitting and receiving - three or four short messages every five minutes or so.  When I power the Moteino running my new sketch using the USB battery pack, the battery charger turns itself off after 40 seconds.  I suspect this is because it doesn't see much load and thinks it is idle.  In contrast, with the Gateway and Node sketches the radios were always busy and the battery pack did not turn itself off.

So, my next thought is to power the Moteino with a couple of AA batteries.  From the forums I gather that I connect the batteries to the VIN and GND Moteino pins.  Am I correct so far?  Is that all that's necessary?  I read somewhere that adding a capacitor might be helpful but don't know how to size it and don't know if it's really necessary.

Next I began to worry that I may not get the same range with a couple of AA batteries that I got with the USB battery pack.  I absolutely need an outdoor range of 0.2 miles with very fast reception.  Will the AA batteries work well enough alone?  How can I tell how long they'll last?

I'm looking for advice and comments.  Thanks!

TomWS

Quote from: Bugeye60 on August 22, 2016, 08:04:36 PM
I'm new to Moteino and microcontrollers in general but have managed to assemble a couple of cool (to me) gadgets.  However, so far these gadgets have been mostly powered by a PC-connected USB cable and now I need to make them portable.

I purchased a 5V, 2 amp, 6000 mAh USB battery pack for cell phones and connected it to a Moteino running the Gateway sketch.  I had a MoteinoMega connected to a laptop running the Node sketch and then proceed to test range.  It worked well out of the box for about a quarter mile down a tree-lined street.  I was quite pleased!

Now I'm running my own sketch which only requires intermittent transmitting and receiving - three or four short messages every five minutes or so.  When I power the Moteino running my new sketch using the USB battery pack, the battery charger turns itself off after 40 seconds.  I suspect this is because it doesn't see much load and thinks it is idle.  In contrast, with the Gateway and Node sketches the radios were always busy and the battery pack did not turn itself off.

So, my next thought is to power the Moteino with a couple of AA batteries.  From the forums I gather that I connect the batteries to the VIN and GND Moteino pins.  Am I correct so far?  Is that all that's necessary?  I read somewhere that adding a capacitor might be helpful but don't know how to size it and don't know if it's really necessary.

Next I began to worry that I may not get the same range with a couple of AA batteries that I got with the USB battery pack.  I absolutely need an outdoor range of 0.2 miles with very fast reception.  Will the AA batteries work well enough alone?  How can I tell how long they'll last?

I'm looking for advice and comments.  Thanks!
If you use 2 x Lithium AA batteries (Eveready Ultimate Lithium), you'll have nominally 3.4-3.5V to supply to the Vin pin so no changes to the Moteino are necessary.  These are about 3300 mAH so with proper SW & Hardware implementation, these will last you a LONG time.  An RFM69HW can be run at full output power (20dBm) with these batteries.

There are alternatives, such as LiPo which you can get at higher mAH rating, but, for ease of design, it's tough to beat a 3300mAH primary battery.

Don't get tricked into a higher voltage - it's literally a waste of power since the key is number of mAH @ 3.3V that matters.

Tom

Bugeye60

Hi Tom,

I'll go get some lithium AA batteries and stop worrying.

I've read through many posts on the forums and noticed you always add helpful responses.  Thank you for your quick and helpful response this time too!


TomWS

FWIW, for battery operated motes, I almost always reprogram the ATMega328P fuses to clock with internal 8MHz clock, BOD=2.7V or less depending on battery, remove the VR from the Moteino, and use a primary cell battery (2.8-3.0V) or batteries (3.0-3.5V) directly wired to the Moteino '3.3V' pin.

8MHz is usually fast enough for nodes and consumes much less power than 16MHz xtal and allows the 328P to operate below 2.7V.   The radio has its own precision oscillator for comms, this precision is generally not needed in the MCU.

Tom

Felix

Quote from: TomWS on August 23, 2016, 09:37:10 AM
8MHz is usually fast enough for nodes and consumes much less power than 16MHz xtal and allows the 328P to operate below 2.7V.   The radio has its own precision oscillator for comms, this precision is generally not needed in the MCU.

Tom
Tom, you're probably one of the champions of regulator bypassing.
What are your observations with regards to the serial comms when running on internal oscillator? Say for 115200baud? Any glitches?

TomWS

Quote from: Felix on August 23, 2016, 10:25:00 AM
Quote from: TomWS on August 23, 2016, 09:37:10 AM
8MHz is usually fast enough for nodes and consumes much less power than 16MHz xtal and allows the 328P to operate below 2.7V.   The radio has its own precision oscillator for comms, this precision is generally not needed in the MCU.

Tom
Tom, you're probably one of the champions of regulator bypassing.
What are your observations with regards to the serial comms when running on internal oscillator? Say for 115200baud? Any glitches?
Good catch, Felix.  I should have stated this as a downside.  With 8MHZ F_CPU I wouldn't and don't try any serial comms faster than 57600.  Boards.txt file needs to be updated to add an 8MHz configuration with program load set to 57600.

Thanks for keeping me honest  :D

Tom

noch

Hey everyone,

New to this forum but have been lurking all week researching my HA project.  I too want to run some form of an Atmega328P on batteries for a long time and figured I would share what I think I kinda understand :)  I was about to scrap using some regulators I bought but did some more research.  Please correct my if I am wrong as I want to learn more about this stuff. 

I purchased some step-up/step-down regulators from Polou a while back in hopes of increasing what I could get out of some AAs by regulating 3 AAs down to 3.3v and continuing to step them up to 3.3v as the pack drops down below 3.3V.  I got concerned that the regulator's overhead would not net me any gain as they seem to get inefficient once the input volts drop and I got confused about mAH vs Watt Hours when going up to 4.5V (I think Tom was saying this about getting tricked into a higher voltage and no increase in mAH).  Polou shared an equation that helped me if I am understanding it correctly.

The way I read this is, if you have the regulator's efficiency, regulator's output voltage, system current (Isys), and battery voltage you can calculate the current draw from the battery (Ibat).

eff = (Vreg × Isys) / (Vbat × Ibat)

At 4.5V input, the regulator is like 93% efficient up to like 200mA. I am just throwing a number out that my sensors, sleeping board,and radio will constantly draw at and average 1mA. So..

.93=(3.3v * .001A)/(4.5V*X)

X= 0.000789A or 0.789mA

Better than drawing 1mA

The efficiency stays right around there as you get closer to the output voltage, of course as voltage drops your current draw goes up based on the equation.  You eventually get the opposite effect as you go down in Voltage and the efficiency drops.  2.7V is the lowest input. 

.89-(3.3v *.001A)/(2.7V*X)

X= 0.001373A or 1.373mA

I may try one with a regulator and one without. 

TomWS

Your equation is using efficiency as if it was perfect, ie, the step down regulator quiescent current is continuously proportional to load (Iload*(1-0.93)). 

Unfortunately, this is not the case, the regulator has some residual current it will draw no matter what the load and then there is the conversion efficiency on top of that.

So your equation needs to include this in the battery load calculation.

Further, a reasonably well designed mote should spend most of its time sleeping in a very low power state, where total current <10uA is very feasible. 

What's your conversion efficiency at this load?

Tom

perky

Could you have a pulsed system that charges up a large capacitor just prior to going to sleep? 100uF at 10uA gives about 0.1V drop per second.
Mark.

noch

Quote from: TomWS on August 26, 2016, 03:52:14 PM
Your equation is using efficiency as if it was perfect, ie, the step down regulator quiescent current is continuously proportional to load (Iload*(1-0.93)). 

Unfortunately, this is not the case, the regulator has some residual current it will draw no matter what the load and then there is the conversion efficiency on top of that.

So your equation needs to include this in the battery load calculation.

Further, a reasonably well designed mote should spend most of its time sleeping in a very low power state, where total current <10uA is very feasible. 

What's your conversion efficiency at this load?

Tom

Hey, thanks for looking at this Tom. 

I think the conversion efficiency is about same at low loads based on the chart below, if I am understaning it correctly.

 

As far as quiescent current, this is all I have.

"power-saving feature maintains high efficiency at low currents (quiescent current is less than 0.1 mA)" and the spec sheet

The regulator has a shutdown feature by driving a pin low but it will draw 10µA per volt from the pull up resister which is more than a sleeping Moteino can get to as you pointed out. 

Here is a link to the product in case.

https://www.pololu.com/product/2122

Thanks for helping learn more about how this works. 

TomWS

Quote from: noch on August 27, 2016, 12:04:26 AM
I think the conversion efficiency is about same at low loads based on the chart below, if I am understaning it correctly.
By Moteino standards, a 'low load' would be < 10uA which isn't even resolvable on that chart.
Quote
As far as quiescent current, this is all I have.

"power-saving feature maintains high efficiency at low currents (quiescent current is less than 0.1 mA)" and the spec sheet
This puts your efficiency less than 10%.
Quote
The regulator has a shutdown feature by driving a pin low but it will draw 10µA per volt from the pull up resister which is more than a sleeping Moteino can get to as you pointed out.   
What happens to the output voltage when you 'shutdown' the regulator?

FWIW, Joe has done some interesting work using an efficient buck regulator in an on/off mode where he lets the voltage boost to 3.3V and then coast to BOD threshold while his hardware is sleeping.  With the right conditions you can run off some higher voltages but still operate at very low power, but you really need to know what you're doing. 

I'm a firm believer in the KISS principle, especially when you're first starting out learning.  I'm also a believer in experimenting on breadboards so, experiment and learn, but if you build a mote you rely on, KISS!

Tom

noch

That makes sense. I am not all that determined to use the regulator, I just wanted to make sure they were not a better solution since I have some and enjoy trying to understand more. I feel like that's pretty well exhausted now. Thanks for the help!

Felix

See this really nice project where the user focused on low power with a stock Moteino (no changes).