I'm powering a PIR motion sensor and an Arduino from the same battery pack (3 x AA rechargeable, total around 3.8v). The output signal of the PIR sensor goes into a digital input of the Arduino. This Arduino is "sleeping" most of the time (power down mode using the RocketScream library http://www.rocketscream.com/blog/2011/07/04/lightweight-low-power-arduino-library/). Once in a while the Arduino wakes up and checks the value of the PIR signal (high or low). When certain conditions are met, the Arduino sends a wireless signal to a receiver via NRF24L01 module.
Everything works great when the batteries are fully charged, so basically I have a wireless motion sensor which could run on 3 AA batteries for multiple months.
But when the batteries are not fully charged anymore (around 3.6v in total), I noticed the following behavior: the PIR motion sensor works and produces a high/low signal. But when the Arduino wakes up and sends the signal value, the PIR sensor "reboots". (this "rebooting" results in a high value when the sensor is calibrating, thus an incorrect reading) This happens even when the PIR sensor is not connected to the Arduino, they only share the same power source. So my theory is when waking up the Arduino and the connected NRF24L01 module, there is a spike in the current that's being drawn from the batteries. Then for a split second the PIR sensor gets underpowered and shuts down. Very shortly after that, the power consumption stabilizes the PIR and the Arduino are running correctly. But because of the "rebooting" of the PIR sensor, of course the Arduino only reads high values, even when there is no motion.
Is there a (battery-friendly) way to stabilize the spike in power consumption?
FYI: I have this behavior when using an Arduino Pro Mini and a "breadboard" Arduino.
There might be some electronic solution, for example a fairly large capacitor to absorb the waking current. Or maybe a boost converter module to bump up the battery output. I'm not sure what current that would consume with (virtually) no power drain by the Arduino. It might be acceptable.
Wow, I justed posted some questions over in the programming section of the forums, because I'm working on a wireless motion sensor project. I've been using the el cheapo 433MHz modules but about an hour ago ordered some of the ones you are using. If you wouldn't mind sharing your code, I'd be extremely grateful! I've never worked with the little 2.4GHz tranceivers before.
As per your project, I would think that a 470uF ~ 1000uF electrolytic would be more than sufficient?
jtlns:
Thanks for your reply Nick! What would be a "fairly large" capacitor? (how many Farad?) Should I just put it between the 0 and + of my battery pack?
I would have tried what I had to hand, even 100 µF (or less maybe) would be enough to absorb the extra power required to wake up.
Jan, I'm curious to know if you disabled BOD on the atmega? I was also thinking you could reduce power requirements further by having the PIR output wake up the atmega with an interrupt, instead of using the WDT to wake it up and check it every so often (I realize that your project may have totally different functions intended, just throwing this out there along with my security system type project).
I spent an hour and a half digesting the nrf2401 library last night, only to realize I had purchased the nrf24l01+ modules lol :~
Anywho, just posting for anyone else getting started with these who may find the info useful, here is the simplest examples I found: http://forum.hobbycomponents.com/viewtopic.php?f=25&t=1317
Coincidentally, that post also states: "Please also be aware that in the past we have seen cases where the modules peak transmit power is in excess of what the 3.3V supply on an Arduino board is capable of supplying. We therefore suggest that when powering the module directly from an Arduino board that you attach a 10uF or greater capacitor across the modules VCC and GND pins." I know you're using batteries, but felt this may be worth mentioning.