Electronic – Low-power alternative to Arduino, for simple project

battery-operatedesp8266low-powermicrocontroller

I have a really plain Arduino project: ultra-sonic sensor HC-SR04 returns distance which is then used as sleep time during a LED-wave effect. So it's a simple distance <-> LED-wave velocity relation. The closer you walk towards the device, the faster the LEDs. That's all.

The current being drawn when not running LED-wave and just checking 5 times per second if the distance is lower than 2 meters: 15 mA. This value is in my opinion huge.

I then heard about ESP-8266. It can fully replace Arduino. However the power levels are still not good enough. Browsed more, read about Teensy and others, and they all draw power like a crazy – it appears like this if only a person thinks about using batteries for a moment.

I think that professionals know the solution. Hobbysts are stuck in very fun Arduino world.

Can someone reveal the truth? There must be an answer as e.g. computer mice can run months on two AA. Or, for example, a shopped motion-detection-triggered lamp nicely worked for 7 days before I got bored with it and have put it into drawer. The lamp was giving actual light, not LED blinks, and didn't drain the three AAA batteries it used.

What can I use for my plain project? Need ping functionality for HC-SR04, 8 pins for LEDs and that's all. How to do this correctly and have battery lasting for months?

Best Answer

The Arduino has regulators and USB-Serial chips that are not Sleep friendly.

If you look at the Datasheet for the ATMega328 (section 32.2.2) however you will see that Sleep states exist down to around 4-8 uA (wake on WDT) for the MCU.

Consider simply building your own Arduino clone (if that's the programming environment you want to use) that has only the ATMega328 (or other AVR such as the ATMega8L) on it. You could run from 3 AAA batteries without a regulator at all providing you don't need to support higher voltage LEDs. There are many resources that show how to program an Arduino bootloader environment into a standalone AVR MCU. You could start here and here.