So, I am a beginner with arduino. I am working on a little project, I have my Arduino, few sensors, few AD convertors, a display and an SD card datalogger. I need this thing to be battery powered and to log data only like every 5-10 minutes. And it needs to last on a battery for at least 24 hours. I was thinking about powering all the other boards through a MOSFET, that would turn them on only for a short time every 5-10 minutes, just to log the data and then turn them off again. Will this work? Or is there a better way to do something like this?
Use a bigger battery?
Yeah, but I figured that my whole circuit is drawing like 100 mA, while the Arduino itself takes only 20 mA, so if I could increase my battery life 4-5 times, that would be great.
But that will only put the Arduino in sleep, is that correct? But what about the other modules? They draw most of the power.
Oh I see.
Well, what modules? Some have quiescent currents of nano amps...some may use mAs.
A more detailed outline of your system may help.
What's using all the power?
Though an Arduino board typically uses about 50mA - they're not designed for low power - they've got two chips instead of one (and you can't sleep the 16u2), and a power light, and a crap regulator.
So I am using a pro micro, MPX10dp pressure sensor paired with HX711 AD converter, micro SD card reader with real time module (labled as deek-robot) and a 2 line display with l2c driver.
I use my arduino's mainly for animatronics.
I often use a traco DC/DC power convertor. It saves me a lot of battery power. Also the batteries I use are 7.2 volts so all my external boards are fed from the traco, NOT from the arduino. This way I can put the boards to sleep when I do not need them by turning them of with a mosfet.
I never needed to put the arduino to sleep with a decent battery. Some of my installations last more than 24 hours without a recharge...
Hope this helps.
Great, thanks. I was thinking about using a 7,4 V lipol and some kind of a regulator, the arduino itself cannot power all the boards that I connect to it. So turing the other boards of with a mosfet is ok? Will they work properly with the arduino after being turned back on?
Any particular reason you are using lipos for this ?
Screpheep:
Great, thanks. I was thinking about using a 7,4 V lipol and some kind of a regulator, the arduino itself cannot power all the boards that I connect to it. So turing the other boards of with a mosfet is ok? Will they work properly with the arduino after being turned back on?
Yet again...these "other boards" are very elusive.
I want to use a lipo because I have a few of them already at home. Is there a better alternative? The "boards" are the same ones as in my previous post, I should have written modules...
Right.
Well those modules will be using essentially nothing.
So I am using a pro micro, MPX10dp pressure sensor paired with HX711 AD converter, micro SD card reader with real time module (labled as deek-robot) and a 2 line display with l2c driver.
The Pressure Sensor (MPX*) uses 6mA.
http://www.nxp.com/files/sensors/doc/data_sheet/MPX10.pdf
The HX711* uses 1.5mA while operational and less than a microamp when "sleeping" (not in use).
The real time clock will use nothing...they usually have a 100mA battery that lasts years.
Your main power suckers are that LCD screen (ranging 100mA+ I bet) and the arduino.
The arduino can go sleep. Have a transistor power off the LCD when not in use.
Screpheep:
I want to use a lipo because I have a few of them already at home. Is there a better alternative? The "boards"
Good answer, i would suggest LA are better bang per buck and safer but if you already have them its difficult to beat 'free'.
While not pertinent to the uno , i have used single cell lipos to power atmel based circuits without a regulator quite successfully. Only up to 8 MHz though.
Being single cell they are easy to charge/use with solar backup.
I made some progress, I made a simple transistor switch to turn on and off the display. Connected the gate to digital pin 8. Tried just this simple code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
int value = 0;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
pinMode(8, OUTPUT);
lcd.begin();
}
void loop()
{
digitalWrite(8, LOW);
delay(2000);
digitalWrite(8, HIGH);
delay(500);
lcd.clear();
lcd.print("Value: ");
lcd.print(value);
value++;
delay(2000);
}
And this code does not work. The display turns on and initializes, but then it goes dark and never comes back. If I remove this part of the code:
lcd.clear();
lcd.print("Value: ");
lcd.print(value);
The display turns on and off in the specified intervals, as it should. What am I doing wrong?
Ok, I am an idiot I am using a PNP transistor, so the display is on when pin 8 is LOW, not HIGH. Now it works.