Here is a sample WM that is very low power, nothing unusual. I used female and male headers so I can plug/unplug whenever I need to:
(http://i.imgur.com/YERx1ia.png)
Here is the code from the sample sketch I am running which is important to shutoff the battery circuit:
#define BATT_MONITOR_EN A3 //enables battery voltage divider to get a reading from a battery, disable it to save power
#define BATT_MONITOR A7 //through 1Meg+470Kohm and 0.1uF cap from battery VCC - this ratio divides the voltage to bring it below 3.3V where it is scaled to a readable range
...
void readBattery()
{
unsigned int readings=0;
//enable battery monitor on WeatherShield (via mosfet controlled by A3)
pinMode(BATT_MONITOR_EN, OUTPUT);
digitalWrite(BATT_MONITOR_EN, LOW);
for (byte i=0; i<5; i++) //take several samples, and average
readings+=analogRead(BATT_MONITOR);
//disable battery monitor
pinMode(BATT_MONITOR_EN, INPUT); //highZ mode will allow p-mosfet to be pulled high and disconnect the voltage divider on the weather shield
batteryVolts = BATT_FORMULA(readings / 5.0);
dtostrf(batteryVolts,3,2, BATstr); //update the BATStr which gets sent every BATT_CYCLES or along with the MOTION message
if (batteryVolts <= BATT_LOW) BATstr = "LOW";
}
I do nothing different, I have a RFM69W on one of these, and HW on another, the HW one has been running the longest without a charge.
One thing I probably missed to add is flash.sleep() when FLASH MEM is present, but already the chip is low power so that should not cause a problem.
There are a few things that have to be TRUE (when sleeping and not reading the battery) for the circuit to be low power:
- an A3 voltage reading must be HIGH (pulled up in HIGH-Z INPUT mode)
- A7 must be 0volts, as well as the tip of the little SOT23 mosfet
These are things you can easily verify.
Hi Felix,
unfortunately I can confirm the same results of buster999.
In my configuration the moteino is supplied with +5V.
I've also verified that the voltage on pin A3 is HIGH, but not at 5V, only around 4.05V, and I've measured around 390uA flowing trough that pin. I've also tried to used different (digital pins) but there is the same problem.
A3 instead is at 0V (when not measurning)
I've double checked and in the code is present the command:
pinMode(BATT_MONITOR_EN, INPUT)
It seems that the arduino has an internal pulldown around 10k - 15k.
If there is any measurement that can be useful, please let me know.
Bye
Filippo