Hi,
I created a "development instance" of a low power wireless sensor based on the arduino pro mini clone and nrf24l01+ wireless module.
I removed LEDs from arduino pro mini as well as I removed the onboard voltage regulator (ams1117 3.3) and I power the arduino via VCC pin with 3.3V. As a source of 3.3V I use step up voltage regulator with low quiescent current. It uses 2108A 1304/33 step-up ic. I removed the LED from the step up converter regulator as well to save as much power as possible. I power the step up converter from 2xAAA alkaline batteries. So the final setup of the wireless node is:
Arduino pri mini
Step up 3.3v converter
nrf24l01+
DHT22
I wanted to test it how it will perform, so I wrote a code which will measure temperature and humidity every ~5minutes and send it to second arduino via nrf24l01+. Second arduino writes it into database via ethernet. In the payload I send humidity, temperature, voltage of the AAA batteries (measured via analog pin), and counter (number of measurement).
I use Rocket Scream LowPower library and put the arduino to power down and wake it every 8 seconds (internal timer which works in power down mode) and I cound number of wakeups and if I have 37th wakeup, I measure and send values.
It works perfectly. Consumption is following:
In the power down, arduino alone draws from step-up conv: 30uA
In the power down with arduino alone, step-up draws from 2xAAA batt: 50uA
If I hook up the DHT and NRF24l01+ which is in power down mode as well: 80uA is drawn from AAA batteries.
I can't measure consumption during measuring and transmitting as it is fast and I have only basic multimeter, no oscilloscope.
I am interested into this:
- Is there still a way for improving consumption? How?
- Does measuring of voltage via analog pin (5 times measure and then average the value) consumes a lot of power? Should I avoid it? I use it as an "alarm value" that I would know the batt is weak
I have a feeling that batteries will not last as much as I had expected. I run it for ~3.5 days and I can see the voltage on the batteries dropped from initial 3.2V to 3.06V. I do not know if it will stick to this decreasing-fast tendency, but if so, then I can run it for days and not for months as I had expected. Here is the graph with voltage/time:
I use this loop code:
void loop(void)
{
LowPower.powerDown( SLEEP_8S, ADC_OFF, BOD_OFF );
currentCounter++;
delay(20);
if ( currentCounter - lastCounter >= 37 )
{
lastCounter=currentCounter;
int chk = DHT.read22(DHT22_PIN);
if (chk == 0)
{
radio.powerUp();
int sensorValue = analogRead(A3);
sensorValue += analogRead(A3);
sensorValue += analogRead(A3);
sensorValue += analogRead(A3);
sensorValue += analogRead(A3);
float voltage = ( sensorValue/5) * (3.32 / 1023.0 );
radio.stopListening();
payload.B=DHT.temperature;
payload.C=DHT.humidity;
payload.D=voltage;
bool ok = radio.write( &payload, sizeof(payload) );
delay(20);
radio.powerDown();
delay(20);
payload.A++;
}
}
}