I'm building a thermometer based on Arduino. It all works great, but I have problems with transmitters power consumption. Transmitter uses an Arduino Nano, DHT22 and a STX882 433MHz reciever. When active, it uses about 21mA of current, which is fine. I put it to sleep using LowPower library (LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); this line, to be exact). The problem is that this library promises 3-4uA current, but I can't get below 4mA when powered by a 9V battery. I have tried using 3 AA batteries plugged to +5V port as Vcc, but that didn't go much below 4mA, either. I also tried measuring currents over the transmitter and temperature sensor and their consumptions are so low (when in sleep) that my multimeter couldn't measure them, it was just 0.000uA displayed on the screen. Also, I removed the power led from Arduino.
One more question, is it okay if I Use LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); 16 times in a row? The current stays low all the time with no spikes between those 8s boundries between two lines of code.
I'll put the whole code in attachment, ignore the comments, most of them are from Visual Micro plug in for Visual Studio.
johnwasser:
The Arduino Nano has four LEDs, including a Power LED that is on as long as power is applied. Did you remove the Power LED?
As I have noted, I removed the power led.
srnet:
The best way of getting a low power Arduino is probably to build your bare bones 'Arduino' so you get to choose the optimum components for low power.
I'm not a exactly a pro at electrical engineering and Arduino stuff, are there components you could recommend for me to use?
Take a look at the schmatic; although it can be programmed as a standard Arduino, the board has none of the power consuming components present on UNOs and similar Arduino boards.
Sleep current, without the resistor divider to measure battery voltage and using the MCP1700 regulator is circa 22uA.
MrPranklin:
I'm not a exactly a pro at electrical engineering and Arduino stuff, are there components you could recommend for me to use?
If you are running it from batteries anyway, why not just take a plain ATMEGA328P chip. Available in 28 pin DIP for easy handling. You can use an Arduino as a programmer.
arduarn:
The USB controller will also waste some power.If you are running it from batteries anyway, why not just take a plain ATMEGA328P chip. Available in 28 pin DIP for easy handling. You can use an Arduino as a programmer.
What do you mean, I can just use an 328P without anything else? I have an Arduino clone with that chip, so if I take the chip out and put it on a breadboard, do I need to wire it up like this https://www.arduino.cc/en/Main/Standalone, just without the USB stuff (I could always plug the chip back to the Arduino board and program it from there) or do I just use a couple of wires and plug the stuff in? I am planning to power it by batteries with voltage smaller than 5V. I don't know which component does what, but it seems to me that I have to build at least a basic circuit around the 328P.
MrPranklin:
What do you mean, I can just use an 328P without anything else? I have an Arduino clone with that chip, so if I take the chip out and put it on a breadboard, do I need to wire it up like this https://www.arduino.cc/en/Main/Standalone, just without the USB stuff (I could always plug the chip back to the Arduino board and program it from there) or do I just use a couple of wires and plug the stuff in? I am planning to power it by batteries with voltage smaller than 5V. I don't know which component does what, but it seems to me that I have to build at least a basic circuit around the 328P.
Basically yes. That link is showing you how to build an Arduino equivalent on a breadboard, but most of the stuff is unnecessary. A basic circuit will always be required though, otherwise no current will flow...
It boils down to your requirements.
The 328P already does everything and can be run from 1.8 - 5.5 volts (with clock speed restrictions). If you don't need a regulated 5v supply for anything else, then you can skip the voltage regulator. Remember however, the voltage output of your batteries will vary depending on their state of charge. If you do need regulation, you can choose you components and configuration to make it as efficient as possible.
The crystal is also optional, the processor already has on-board clock sources; though if you have special timing requirements you may want to use an external crystal.
The other stuff like LEDs and USB controller you simply don't want.
I would be inclined to use a fresh MCU rather than hijack your already working one, but it is up to yourself.
okay, I made one exactly like it is shown on the link I pasted couple of posts higher, just without the oltage regulation, and it works great. I got 5.5uA without any sensors, etc. and 11uA when it's asleep with everything I need attached. Thanks a lot guys!
Now I'm wondering if there are any drawbacks considering functionality (I2C, for example) or is it just a lack of voltage regulation?