GPS module power management

Hello Guyz, I am working with GPS module(Neo 6M) with Arduino and sim808.

The thing is because of GPS module is continuously operating it consuming power, while i only want location(latitude and longitude) after an interval(lets take 2 minutes). I am all aware about "delay()" function but i am not looking for it.

so, i am looking for a solution for temporary shut down the GPS module and wake it up after the interval.
I am adding part of my Ino code for you to understand what i am upto.

#include <SoftwareSerial.h>
#include <TinyGPS++.h>
#define GPSBaud 9600
#define ConsoleBaud 115200

TinyGPSPlus gps;

SoftwareSerial serialSIM800(SIM800_TX_PIN,SIM800_RX_PIN);

void setup(){
  Serial.begin(ConsoleBaud);
  serialSIM800.begin(19200);
  ss.begin(GPSBaud);

}
void loop(){
   gps.location.lat();
   gps.location.lng();
}

While i was surfing Internet Ive come to know about

gps.standby();
gps.wakeup();

but when i use this codes IDE gives me following error:

error: 'class TinyGPSPlus' has no member named 'standby'

same error for "wakeup" too.

Please help me on this topic. Any suggestions will be helpful. Thank you. :slight_smile:

While i was surfing Internet Ive come to know about

gps.standby();
gps.wakeup();

Well, I was surfing the net, and it said that that was nonsense.

Post a link to the site where you found that. I'm sure that you'll find that gps was an instance of some other class.

How are you powering the GPS? You COULD add an external power supply and a transistor. Use a digital pin on the Arduino to turn the transistor (and therefore the GPS) on when you need it, and off when you don't.

Don't forget that GPSs take a while to wake up.

Hi PaulS, thanks for your reply. This is the link where ive found that two codes.

You COULD add an external power supply and a transistor. Use a digital pin on the Arduino to turn the transistor (and therefore the GPS) on when you need it, and off when you don't.

thanks for this suggestion. i will use this and let you know.

Second thing i am using Arduino pro mini, using pins(vcc,gnd) i am giving power to GPS module.

Is there any other way to put GPS in sleep mode?

This is the link where ive found that two codes.

So, the Adafruit_GPS class has some methods that you want to use with the TinyGPSPlus instance. What would possibly make you think that would work?

Is there any other way to put GPS in sleep mode?

Sure. Get an Adafruit GPS and use the Adafruit_GPS library.

Is there any other way to put GPS in sleep mode?

PaulS' suggestion for using a transistor to turn it on or off will work for any GPS model. A logic-level MOSFET would work. As he said, you will have to wait for the GPS device to power up and start tracking satellites. This can take 30s to 15 minutes, depending on how long the GPS has been off and the quality of the satellite signals (reception).

Since you are using the ublox NEO-6M GPS device, you could send it special binary commands to control how much power it uses. The ublox NEO-6 Data Sheet specifies how much current it uses in various modes. The commands are described in the u-blox NEO-6 Protocol Specification. Section 9 Power Management describes the various modes and settings. This subsection might be describing what you want to do:

9.3.1.3 User controlled operation - update and search period of zero

Setting the update period to zero causes the receiver to wait in the Inactive for update state until woken up by the user. Setting the search period to zero causes the receiver to wait in the Inactive for search state indefinitely after an unsuccessful start-up. Any wake-up event will re-start the receiver. See chapter Wake-up for more information on wake-up events.

__* __ External wake-up is required when setting update or search period to zero!

The "Wake-up" chapter says you can wake up the receiver by sending it a character.

Using extra components to power the GPS on or off is easy to use in the software -- just turn a digital pin on or off. It also guarantees that the GPS will not use any current (uA or pA, anyway).

Sending commands to the GPS does not require any extra components, but the GPS device will still use some power when it is in the inactive state. I don't see a current specification for the Inactive state in the data sheed, byt according to this, it can only go as low as 10mA. If you need to use less current than that, you will have to switch the power in hardware.

Obligatory link my GPS library, NeoGPS. Also available from the Arduino IDE Library Manager.

Abhijeet8919:
Is there any other way to put GPS in sleep mode?

Yes, give it a backup voltage on the GPSs backup pin and turn of the main GPS power.

When you want a new fix, turn the GPS main power back on and assuming a decent GPS antenna and signals it should aquire a new fix within 5 seconds or so.

Most of the modern UBLOXs have a software backup mode, you can turn most of the GPS off, power consumption drops to around 200uA.

Generic GPS libraries, such as TinyGPS++, are written for generic GPSs and are unlikely to have stuff such as software backup mode implemented, that tends to be very specific to each particular manufacturer.

srnet:
Most of the modern UBLOXs have a software backup mode, you can turn most of the GPS off, power consumption drops to around 200uA.

Is this from testing, or from NEO-7/8 specs? I couldn't find anything for the NEO-6...

-dev:
Is this from testing, or from NEO-7/8 specs? I couldn't find anything for the NEO-6...

From reading the datasheets, amazing what you find when you read datasheets, then implementing and actually testing it.

A feature of the UBLOX 7 and 8.

Its prabably a bit less than 200uA for the GPS, thats the current consumption of the entire tracker when its put to sleep.

Thank you friends for your suggestions. I will let you know about the progress.

-dev:
Is this from testing, or from NEO-7/8 specs? I couldn't find anything for the NEO-6...

This is the UBX command for software backup, send the array;

FLASH_ARRAY(byte, SoftwareBackup, 0xB5, 0x62, 0x06, 0x57, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x4B, 0x43, 0x42, 0x86, 0x46);

Shutdown is not immediate, takes a second or so.

'Activity' on the serial in port wakes it up, just a pulse will do.

srnet:
This is...

Yes, yes, I have practically memorized the NEO-6 specs.

I was asking how you knew the NEO-6 drew <200uA in the INACTIVE state, because there is no specification of the INACTIVE state current in any of the NEO-6 documents. All the other states are listed, the lowest of which is 11mA (see Section 3.3 of the NEO-6 Data Sheet).

-dev:
I was asking how you knew the NEO-6 drew <200uA in the INACTIVE state, because there is no specification of the INACTIVE state current in any of the NEO-6 documents

I dont know, since have never measured the sleep current of a 6.

The protocol decription for the 6 does imply that if the update period is set to zero, the receiver will wait in the inactive for search state, maybe the receiver does go to sleep in this mode.

LOL, after searching the NEO-7 and 8 docs, I still cannot find an INACTIVE current specification. I also found an AppNote, but it doesn't have anything either. The closest it comes:

2.3.1 General considerations using the PSM
...

In ON/OFF mode however, the average current drops significantly when the update period is increased. This is due to the receiver shutting down completely, with the exception of RTC and Battery backup RAM powered.

ublox M8Q Average Current in Power Saving modes.png

Figure 6: Average current consumption of a MAX-M8Q receiver in different PSM modes and Update Periods

If I squint, I think the M8Q average current consumption for an ON/OFF period of 10s is 3.75mA, and 10 minutes is 0.6mA.

ublox M8Q Average Current in Power Saving modes.png

I dont recall seing it listed either.

200uA for an M8Q in sleep mode was what I measured. I will investigate that some time since I suspect it ought to be lower, it might depend on the exact state that I\O pins are left in.

Hello. Quite new to electronics/arduino, (one of my first posts) have read many many posts from Pauls and -Dev and others during my research so just like to quickly say hi and hats off to your knowledge/skills.
In my project (328p, neo6m, sim800l Tracker fitted to motorcycle) I have it working on breadboard, of a fashion! I am looking into power efficiency as would like it battery powered.

I can put sim800l to sleep, 328p I am looking into now how to put into sleep mode power down and wake when falling edge (120ms low) interrupt by sim800 RI pin when called or SMS received.

The next step is powering up the gps when required (normally off to save power) I was thinking of using a relay, but I would like project to be as small as possible and after reading what PaulS wrote

" Use a digital pin on the Arduino to turn the transistor (and therefore the GPS) on when you need it, and off when you don't. "

can you suggest a suitable transistor that is small and will do the job?

Thanks in advance.

The RXM-PMREQ message puts the GPS in the inactive state for the period specified and is supported on Ublox6, 7, 8;

If you send it with a zero period as below the GPS goes inactive, but retains settings, so you can hot-fix it.

0xB5, 0x62, 0x02, 0x41, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4D, 0x3B

This is the measured power consumption in inactive mode;

Ubloc Neo 6M - 75uA
Ublox Max 8Q - 35uA

These are the bare GPS, no extra stuff connected.

Did not have a bare bones 7 to hand to test.

Nice work! I just wonder why they're not in the specs...

-dev:
Nice work! I just wonder why they're not in the specs...

Indeed very curious.

You would think that a 'software feature' that more or less negates the need for a seperate transistor turn off circuit is something to boast about in the datasheet.

can you suggest a suitable transistor that is small and will do the job?

Thank you PaulS.