Go Down

Topic: Making a battery powered wireless Arduino sensor node, 3.3V, run efficiently (Read 23971 times) previous topic - next topic

arusr

-------------------
Thread Summary
-------------------

Goal:  Make a wireless sensor Arduino run on a few AA batteries for as long as possible.  Use RFM69HW wireless module which requires 150mA @ 3.3V.  With 3xAA batteries, the Arduino needs to be run between 3.8V to 4.4V.  Concerned that when battery starts to run low, 3.8V might be unstable.  Sensor will be outside, under an eave, in Ohio whether.

Plan:  Use LP3981 voltage regulator for 3.3V.  It has a enable pin, so use Arduino output to turn regulator on only when needed.  Super low idle current.

Options 1: Modify an Arduino Pro Mini by removing the voltage regulator components

Advantages:  Very small, already comes with the bootloader, super cheap.

Questions:  Will it be unstable running the Mini at 16MHz when battery voltage starts to drop below 4V?  And the Arduino Mini can actually run ok a less than 5V?


Option 2:  Build my own Arduino from parts

Advantages:  Able to select an 8MHz osciallator instead of being stuck with 16MHz.  Better stability for low voltage application.

Questions:  Can the RFM69 (which communicates with Arduino via SPI) still be compatible with an Arduino runnin gat 8MHz?

------------------
Original post
------------------

Hello,
I'm trying to use a Arduino nano, mini, or lilypad for a battery-powered wireless sensor application.  I don't have any of these yet, so I'm looking for guidance.

1)  I can't tell from the schematic whether the nano, mini, or the lilypad have LED's built in.  I would definitely not want an LED.  OK, I can remove these easily.

2)  Wireless modules like the RFM69HW or nRF24L01 need 3.3 to 3.9V.  If I use three 1.5V AA batteries (preferred battery), I get 4.5V.  That's good enough to power the nano, mini, or the lillypad.  But how do I get the 3.3V needed to power the wireless module?  I don't want to add an external voltage regulator as that would waste way too much power.  And I want to sleep the Arduino most of the time.  Is the digital output pin 3.3V?  Can I power the wireless module from the digital output pin?  That would be great because the module could be powered down when the Arduino sleeps.  Thanks for the recommendation of using the LP3981 voltage regulator w/ enable pin

3)  When the spec on the Arduino that VCC could be 2.5 to 5V, does that mean the digital output voltage also floats with vcc, or does that mean it will regulate the digital output voltage to 3.3, regardless of vcc?  Ok, I didn't understand how it works.

4)  I've also considered building my own Arduino clone so I can minimize the power draw, not have any LED's.  If I stick with three AA batteries, I'll need a 3.3V power regulator for sure.  How do I wire it up so that the regulator isn't always sucking power from the Arduino?  The power regulator is really just used for the wireless module, since the ATMEGA328 can operate on 4.5V.  LP3981 power regulator w/ enable pin.

cjdelphi

You're probably best sticking with the atmega chip, no external circuitry (eg usb to ttl ic)..

Tricky part is supplying the 3.3v , you could power the processor using just the batteries (providing it's not over 5v) getting a regulated 3.3v...

Maybe a LDO (but as soon as the voltage sags, there's not much head room)
Maybe a 3.3v zener diode and a small npn transistor


CrossRoads

I'd suggest 3AA battery and a switching regulator such as
http://www.pololu.com/product/2122
to really get the most out of your batteries.

Make a standalone board if you want to cut down on external parts. Don't need much:
'328P, 8 MHz crystal, 2 22pF caps, 10K resistor, 2 100nF caps.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

arusr

#3
Mar 16, 2014, 05:56 pm Last Edit: Mar 16, 2014, 06:01 pm by arusr Reason: 1
Thanks for the suggestions.  I actually just started looking at more efficient voltage regulators.  I'm confused on two issues:

1)  Can I just run the Arduino off battery power (3xAA = 4.5V), and use the voltage regulator strictly to power the 3.3V wireless module?  I'm not sure how to make it so the wireless module is only powered up when doing the occasional transmit.  Maybe power the regulator from the output pin of the Arduino, and have the regulator power the wireless module?  Does that sound weird?

2)  Do I need some type of capacitor to help the wireless module run more smoothly, like when it transmits it uses quite a bit of current?

3)  When the Arduino runs at less than 5V, do it needs to switch to 8kHz mode instead of 16kHz mode?  That a slower clock speed change anything with the wireless module libraries like RFM69 or nRF24L01?



I'd suggest 3AA battery and a switching regulator such as
http://www.pololu.com/product/2122
to really get the most out of your batteries.

Make a standalone board if you want to cut down on external parts. Don't need much:
'328P, 8 MHz crystal, 2 22pF caps, 10K resistor, 2 100nF caps.


CrossRoads

You can add p-channel mosfet and cut off power to the RF module under '328P control.
Then add 74HC4050 chip as level translator from 4.5V to 3.3V.
Use simple 3.3V linear regulator to make 3.3V source for the RF module.
Some regulators even have an enable line, so you wouldn't need the P-channel mosfet.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

For example:
http://www.digikey.com/product-detail/en/LP3981IMM-3.3%2FNOPB/LP3981IMM-3.3%2FNOPBCT-ND/570181
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

fungus


Hello,
I'm trying to use a Arduino nano, mini, or lilypad for a battery-powered wireless sensor application.  I don't have any of these yet, so I'm looking for guidance.

1)  I can't tell from the schematic whether the nano, mini, or the lilypad have LED's built in.  I would definitely not want an LED.


You can easily remove them.


3)  When the spec on the Arduino that VCC could be 2.5 to 5V, does that mean the digital output voltage also floats with vcc, or does that mean it will regulate the digital output voltage to 3.3, regardless of vcc?


DIgital outputs are the same voltage as Vcc.


4)  I've also considered building my own Arduino clone so I can minimize the power draw, not have any LED's. 


I've had great success hacking Pro Minis for this.

http://www.ebay.com/sch/i.html?_nkw=arduino+pro+mini

If you look at those you'll see that some of them have a double row of pins next to the reset pin (for an ISP connector...) That's the board I've been using.

If you remove the power components (marked with red crosses below) you get a little 16MHz Mega328 board which sleeps perfectly. It's 30 seconds work, just poke the unwanted components with a soldering iron and they fall right off. Much easier than building your own.

You can program the chip via the ISP connector or via FTDI if you jumper Vcc on the FTDI  connector to the Pro Mini's Vcc under the board (the green line in the image below).


If I stick with three AA batteries, I'll need a 3.3V power regulator for sure.  How do I wire it up so that the regulator isn't always sucking power from the Arduino?


The nRF24L01 draws less then 15mA so it can be powered completely from an Arduino output pin.

Connect the regulator to an Arduino digital output, set the output "HIGH" when you want 3.3V power.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

arusr



I've had great success hacking Pro Minis for this.

If you remove the power components (marked with red crosses below) you get a little 16MHz Mega328 board which sleeps perfectly. It's 30 seconds work, just poke the unwanted components with a soldering iron and they fall right off. Much easier than building your own.

You can program the chip via the ISP connector or via FTDI if you jumper Vcc on the FTDI  connector to the Pro Mini's Vcc under the board (the green line in the image below).


Wow, thanks for the tip.  Can I ask what the components in red are?  Are you taking about the built-in (less efficient) regulator, and powering the Arduino Mini directly from 3xAA battery at about 4.5V?  Does that work?  Is it still running at 16MHz?  I'm wondering what the other parts are.  If you wouldn't mine describing it, I'd appreciate it.

I'm actually leaning towards using RFM69HW wireless module, which requires 150mA @ 3.3V, so I'll probably use the voltage regulator that CrossRoads mentioned above, and use the Arduino's output pin to enable the regulator when sending a signal.

Man, so there's a couple of options. I was leaning towards building my own, but the tutorials on building your own don't really cover lower power considerations.  For stability, I thought I might make the AVR run at 8MHz instead of 16Mhz, for when the battery voltage starts to drop.  But I don't know if a lower clock speed effects how I'd use the RFM69.  I think if I want to run a 8MHz, I'd need to build my own Arduino right?  I can't make the Arduino Mini Pro run at 8MHz because it's already got a built in 16MHz oscillator?

fungus


Wow, thanks for the tip.  Can I ask what the components in red are?  Are you taking about the built-in (less efficient) regulator, and powering the Arduino Mini directly from 3xAA battery at about 4.5V?  Does that work?  Is it still running at 16MHz?  I'm wondering what the other parts are.  If you wouldn't mine describing it, I'd appreciate it.


Yep. It's the voltage regulator, the power LED, some diodes+capacitors. Basically the power supply. Whoever designed that board grouped them all together nicely. You might be able to remove less of them, I just removed parts until it did what I wanted (I could see where the crystal was so I didn't touch that...)

3xAA won't actually give 4.5V for most of the lifetime... but what it gives should be fine for running this.


I think if I want to run a 8MHz, I'd need to build my own Arduino right?  I can't make the Arduino Mini Pro run at 8MHz because it's already got a built in 16MHz oscillator?


The Mega328 has an internal 8MHz oscillator. It will run at 8MHz. if you set the "fuse bits" to select it. It will use less power and run at lower voltages if you run at 8MHz.

But ... if you're going to do that you might as well use a bare Mega328 chip - you're not using _any_ of the components of the Pro Mini.  Mega328 s can run at 8MHz with no external components. The only reason I hack Pro Minis is because I want the 16MHz crystal.

With correct fuse settings you can even make it run at 1MHz (and it will work with 2xAA!)
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

arusr


But ... if you're going to do that you might as well use a bare Mega328 chip - you're not using _any_ of the components of the Pro Mini.  Mega328 s can run at 8MHz with no external components.


haha, yeah.  It's just weird the economics of ebay.  A Mega328 with or without the bootloader is about $3.50.  Same price as the whole Arduino Mini pro.  You'd think they sell the bare chip for cheap(er).

fungus


haha, yeah.  It's just weird the economics of ebay.  A Mega328 with or without the bootloader is about $3.50.  Same price as the whole Arduino Mini pro.  You'd think they sell the bare chip for cheap(er).


OK, here's a revised design:

(The green crosses are the Pin 13 LED, maybe you want that, I dunno...)

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

csamu

Is modifying an Arduino Pro Mini something for a beginner that does not have experience with electronics?
If a beginner wants a wireless sensor node, then maybe Arduino is not the best option.

CrossRoads

Or just wire one up standalone. Not much to it - the '328P chip, 10K reset pullup resistor, 8 MHz crystal, two 22pF caps, three 100nF caps (VCC, AVCC, Aref to Gnd).
Bare bones schematics have been posted plenty of times.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

apolonio

I am going through this adventure now, so far I got it down to 2.5mA



Basically it is PIR and communicating via NRF24L01+ and 4AA batteries. 

From my calculations I should get 1156 hours or a month and a 1/2.  I am doing a real world test  starting at 10AM May 1, it is still going.

I based a lot of the stuff I did from this site

http://www.gammon.com.au/forum/?id=11497

What took a lot of power was the NRF24L01 radio, I pulled it and looked at the current draw in it was under a mA I think it was around 30uA.

I am now looking at a transistor (I have a 2n2222 but does not seem to work) to turn the radio off. 

lokidude

I'm a bit late to the party but I'm running a bunch of wireless sensors using these..

http://www.elecrow.com/devduino-sensor-node-v2-atmega-328-p-1046.html


Runs on 2 AAA  batts and draws less than 20 uA while sleeping (with my setup anyway).   My code wakes up every  5 minutes, reads temp and humidity and then powers up the radio, transmits the data to an arduino mega and then goes back to sleep.

Based on what I've seen so far a pair of AAA's will run this thing for over a year in my setup.

$16 bucks and comes with an NRF24L01+ module included.   The 24L01 says it can run down to 1.9v so this thing should work for a good long time. 

Go Up