Autonomo and GPRS battery use

I’ve just ported some Mbili code across to Autonomo. The battery drain looks a bit alarming. The program sleeps for an hour and then wakes, takes a reading and sends to ThingSpeak with the GPRSbee before going back to sleep. Using the Mbili this runs for months (?forever?) with the solar panel keeping it topped up. Here’s the Autonomo graph.

Do I need to switch off the GPRS with digitalWrite(DTR, LOW); or is it just that Autonomo runs at this lower voltage? With the Mbili it never seemed to fall below about 4000 mV.

It is possible that the GPRSbee is not being switched off correctly.

Could you provide the initialisation, and upload code you use for the GPRSbee. Also could you confirm the GPRSbee hardware revision number and the library version you are using. There were some changes that were brought in to the library with the Sim800 and Autonomo.

When setup correctly, the GPRSbee will automotically be swtiched on and off when using the standard commands.


digitalWrite(BEE_VCC, HIGH);
gprsbee.initAutonomoSIM800(Serial1, BEE_VCC, BEEDTR, BEERTS); //NB this order is for rev 3, ?rev4 onwards needs RTS, DTR?

gprsbee.on(); //on waking send url with readings to GPRS
char result[20] = “”;
gprsbee.doHTTPGET(APN, APN_USERNAME, APN_PASSWORD, url.c_str(), result, sizeof(result));;

GPRSbee library is 1.9.1 and hardware is rev 6B
thanks Gabriel, great to get such a quick response.

This is all you need for the intialisation:

gprsbee.initAutonomoSIM800(Serial1, BEE_VCC, BEEDTR, BEERTS);
// Replace BEERTS with BEECTS for Autonomo Rev.4 or higher

Additionally, the calls to on/off, during the upload, are also unnecessary.
However, those extra calls should leave it in an off() state after each upload.

What is your sleep cycle like?

__WFI(); //Enter sleep mode

// …Sleep


Gabriel, as advised I have removed the gprson/off and digitalwrite commands. This seems to have helped quite a bit. Perhaps the superfluous command (a hangover from Mbili) is actually stopping the GPRSbee from switching off. Here’s the graph:-

I’m still concerned about the Autonomo battery use. I have now installed the 1.6.8 board manager which leaves the IO pins off and should prevent leakage (see thread Autonomo Sleep? Sorry for having created this second thread, perhaps the mod would like to combine them).
Here is the graph of the Autonomo running a scale overnight. It wakes once an hour, takes a reading, sends by GPRS and then goes back to sleep. 394mV consumed over a 20h period.

and here is the same program running on Mbili. As you can see much less decrease in charge. 19mV over the same time period. Any suggestions?

I have little to add to your observation but to the data:
Battery voltage is not suitable to measure power consumption and/or battery charge.
Can you measure actual consumption? What battery type is that?

thanks for the reply, it is a 1200mAh Lipo. My knowledge of physics and electricity is rudimentary, but I do realise that the mV is only an approximation for State of Charge or whatever. But it’s all I’ve got! And I guess once the voltage drops below 3.5 I’m cactus!
Although the slope seems to have leveled off at 3.75 the initial rate of discharge looks as though it would only last about 2 days before hitting the magic 3.5V.
Admittedly the Mbili is running a 2000mAh battery but I thought the Cortex processor was supposed to be more parsimonious.

Have you switched off the SPI to disable the SD card when entering sleep mode?

Could you try running it without the SD card code and the card physically removed.

Yes I had the SPI disabled in sleep mode.

I have run overnight with the SD card and code removed - this seems to help somewhat. The voltage drop is now about 13mV per hour (with the SD card it is about 20) but this is still far more than the MBili which was about 1mV per hour.

So there is still something else going on. Are we sure that the GPRSbee is switching off? Do you want me to try running the program logging to the SD card only - ie without the GPRSbee? Also does running the Serial2 interface effect all this - do you want me to disconnect this?

Thanks for the help with this.

I’ll try running your code here and see what results I get.

It is possible that there might be a minor fault with your specific hardware.

thanks Gabriel, I have the revision 3 board but in the green version which was sent out in the beta testing round last August.

Thu Jun 02 2016 00:00:13 GMT+0200 (CEST) 4134 mV, counter = 587, active since 0 days, 9 hours, 47 minutes
Fri Jun 03 2016 00:00:14 GMT+0200 (CEST) 4092 mV, counter = 2027, active since 1 days, 9 hours, 47 minutes
Sat Jun 04 2016 00:00:16 GMT+0200 (CEST) 4068 mV, counter = 3467, active since 2 days, 9 hours, 47 minutes
Sun Jun 05 2016 00:00:18 GMT+0200 (CEST) 4054 mV, counter = 4907, active since 3 days, 9 hours, 47 minutes
Mon Jun 06 2016 00:00:19 GMT+0200 (CEST) 4044 mV, counter = 6347, active since 4 days, 9 hours, 47 minutes
Tue Jun 07 2016 00:00:21 GMT+0200 (CEST) 4025 mV, counter = 7787, active since 5 days, 9 hours, 47 minutes

Doing nothing special and using a RN2483 which fires once per minute (3 seconds on-time)

I’ve setup a board to test your code Andrew. It is basically what you sent me with the load sensor code removed (I don’t have one to attach).

You can see the output on this ThingSpeak channel:

It is running on an Autonomo Rev 3, using a GPRSbee Reve 6b and a 1200mAh battery. A TPH board Rev 3 is also attached.

I have it wired through an ammeter, the sleep current is reading about 110uAs.

OK I’m watching - looks like field 6 is the battery

It seems to be having an issue with connecting. However, the ammeter is still showing 110uAs after entering sleep mode.

in the other thread (Autonomo Sleep) you mention that sleep mode should be 35-40 uAs. So is this my lousy code or is there something else going on?

The figure was about 35uAs which could be reduced to about 10uAs with additional code to put the dataflash chip into deep sleep. This was done with a very basic sketch, any additions will result in a larger current draw.

The code I am testing has the RTC running for the interrupt as well as the TPH board connected.

I reset it last night and removed the ammeter which seemed to be affecting the uploads.

After 24hrs it is still flipping up and down between two readings at about 5mV difference. So at the most a 5mV drop.

No solar panel or other charging device has been connected.