Low Power Proximity Sensor, Battery Powered

I'm looking for a very low power proximity sensor that I can run for a long time with a few rechargeable AA batteries. Ideally this should be able to run for months (6+) off of a single charge.

The goal is to have this sensor wake the Arduino, executing code to validate a bluetooth pairing and if valid, unlock a door. I've already got one of those programmable locks in place, so I'll just be triggering that mechanism to lock / unlock the deadbolt.

The problem I'm running into is that of longevity of the power source, so I'm looking for ideas. The bluetooth shields I've seen require the Arduino to be awake the entire time. Are there any options for "Wake on Bluetooth"?

Anyone doing anything similar?

If battery power weren't a consideration, this would be simple... =)

  1. What exactly do you want to detect proximity of?

  2. Do you actually need to wake when a bluetooth signal is received ("Wake on bluetooth"), or wake on proximity and then power up the bluetooth interface?

1) Some human-sized object? 802.11 a/b/g/n wireless? Bluetooth? My main concern here is battery life; I could go either way for the initial detection.

2) The bluetooth boards I've seen require more power than the Arduino. If I could find a way to detect bluetooth signals and wake the Arduino / full bluetooth stack on that event, it would be perfect.

An Arduino clone like the Teensy 2.0 can run on 0.04mA in sleep mode. I've heard of other stripped-down Arduino compatible devices that run on even less (like 1µA). But, even at 0.04mA, a 1200mAh battery would last about 3 years. While in sleep mode, it can still monitor a pin to wake up on.

So, what would work easily is you could have a button that would wake up the Arduino and then do the validation and trigger the door to open. The problem doing it without a button is that the actual proximity sensing will eat through a little power source quickly.

I've created ultra-low powered proximity sensor circuits and sketches. But, the restriction is that it sleeps for 2 seconds, wakes up, powers up an ultrasonic sensor, sends a ping, and then falls back asleep for 2 seconds if the ping didn't trigger a condition. For 2 seconds, it only uses 0.04mA. During the ping it uses around 16mA. But, that's only for around 15ms. So, that works out to an average of around 0.16mA. With the same 1200mAh battery mentioned above, this circuit will work for around 10 months. Not bad for only a 1200mAh battery driving a proximity sensor every 2 seconds! You should be able to do similar lengths using other types of sensors as well.

A couple gotchas to look out for. First, the easy one. Voltage regulators can use quite a bit of power. Because we're only putting the Arduino to sleep, other components connected will draw power. The +5V voltage regulator I typically use consumes 3mA all the time. This means that instead of 0.04mA, it would be using 3.04mA! That translates to the same circuit only lasting 2 weeks instead of 10 months. So, creating a battery source that's right at 5v or 3.3v has a huge advantage (as long as your Arduino board doesn't have a voltage regulator). Or, if you must use a voltage regulator (like if you're using a 2S LiPo battery) use a voltage regulator that uses very little current.

Next, you must consider that everything else that's connected to the Arduino will consume power. For example, in my project I have a pot and the ultrasonic sensor. The pot uses around a half mA and the ultrasonic sensor uses about 10mA. Obviously, we can't have these powered on and connected to the battery all the time or that 10 months that vanished to 2 weeks is now only 3 days. There is a way to power these devices without using all that juice. The trick is to only send power to them when you need them powered and turn the power off for those 2 seconds that the Arduino is sleeping anyway. For the pot, I simply connect another pin on the Teensy to the pot instead of using a 5v power supply. I do the same with the ultrasonic sensor, but it needs more current than an Arduino pin can supply. So, I use a 2N2222 amplifier transistor with the Arduino pin connected to the base (with a 10k resistor inline). This way, the Arduino wakes up, sets a pin to HIGH which trips the 2N2222 sending voltage to the ultrasonic sensor. Then, I do a normal ping of the sensor before setting the pins back to LOW before putting the Arduino to sleep for another 2 seconds.

Anyway, it's not overly complex, you just need to connect a multimeter to your circuit to make sure you keep the current draw as low as possible. Also, don't even try to use an Arduino Uno, it uses way too much power even while sleeping. A Teensy works very well and is only $16 (and is super teensy at the same time).