I need to power a GPS board (Ublox Neo 6M) with an ESP32. The i/o pins on the ESP are 12 mA max; the GPS board needs around 50mA. My analogue / discrete component knowledge is rusty / out-of-date: what's the easiest way to switch the GPS unit on and off?
You would not be powering the GPS from an ESP32 I/O pin though, would you ?
Which ESP32 board do you have ?
You'd use the output of the ESP GPIO, of 3.3V, to power a component, like a relay or mosfet circuit, to control the power of the GPS device.
My guess is that @quilkin wanted to power the GPS from an I/o pin in order to be able to power it down when not required to save battery power.
Question: is it possible to put this GPS into a low power sleep mode such that there is no need to cut power to it?
The GPS module is this one. Yes, I wish to power it up and down to save power; the GPS chip itself does have a low-power mode but I don't think that this module has i/o available to make use of it. I realise a mosfet might be suitable; can someone suggest a suitable part number, given that I only need to power ~50mA?
The ESP32 is a LilyGo T-Call SIM800.
How long and how often is the GPS likely to be powered down ?
Which GPS do you have?
Not sure of exact duty cycle until I do some experiments, but I'm guessing aound one minute powered up to find satellites; I need a reading at least every ten minutes.
Just discovered that (in theory) it's possible to use a low-power mode using serial commands. But I haven't found a suitable libraray to do this. I'll post a new question in the relevant section.
Please don't do that or the context will be lost
I suggest that this topic is moved to the Programming section
The datasheet I found for the Neo6 chip says 67mA max consumption, and it can provide upto 50mA to an RF LNA too. Best to actually measure this I think, not assume its 50mA.
The module has power management features, it suggests there's a software way to
put it into low power modes?
yes, maybe 67mA but I doubt the answer to my original question will be much different if it's 50 or 67mA.
Yes, as I said up thread a little, there is a way of putting it into a low power mode, but I have failed to find a library to achieve this. The TinyGPS library works (I get data coming out) but I need to send fairly complex setup commands to go into low power, and TinyGPS is receive-only. I could use the datasheet to write these myself but don't really want to reinvent the wheel. I tried u-blox GNSS and UbxGps but these fail on setup commands - maybe they are not compatible with the Ublox NEO-6M (or maybe mine is a fake module).
So, the simplest way appears to be to switch the unit on and off under micro control; what is the minimum components required to do this (i.e. provide 67mA from a 12mA source)?
You could try a PNP transistors like bc327.
How are you powering the GPS module? What voltage?
If you cut power to the module with a transistor or whatever, you also need to end serial communications to it and set the TX line to input, to prevent phantom powering it through that line.
Why do you need a library ?
Please publish the details of how to put the module into low power mode
The datasheet is here (page 153 for power control settings, page 96 for the protocol) - sure, possible to do myself I guess but hoping that someone has done it before
BC327, yes I used those 30 years ago. Surely there's something newer? Anyway I've forgotten how to use them! Good point about the TX line, thanks.
Certainly is. They are called FETs (MOSFETs). Mostly replaced BJTs as suitably chosen, they can have vastly less voltage loss.
Yes, I mentioned Mosfets up-thread, and asked for a suitable part number (there are many many different types) given the low power requirement. I was hoping that someone here could help.
Well, here's a very useful looking part!