Chat freely about anything...

User avatar
By Bonzo
#82315 I have made a small GPS unit and it was always meant to be battery powered but I have been building/testing it using power from the Nodemcu USB. This works and I am now working on the battery supply and have suddenly realised I have a problem.

A simplified circuit:
The data is on an SD card I forgot to draw.

The problem is at the moment I have to get the data off using the nodemcu USB connector and I will be back feeding the mcu through the 3V3 supply from the battery. This is where I initially thought I would put in a diode to stop the USB supply back feeding the battery. But I now realise it is not as simple as that.

I can put a switch in the OUTVOUT and 3V3 line but what will happen if I forget to turn off the battery?

Is there a cunning way to work around this?
Is it a problem as everything is running at or around 3.3V
I was going to charge the battery through it's built in USB but can use the 5V from the Nodemcu.
I thought there might be a cunning way to use a MOSFET but the 3V3 pin is being used for the feed and supply. Is the 5V out only woking when the USB is connected so I could use that to activate a MOSFET like a switch on the OUTVOUT and 3V3 line?
User avatar
By Bonzo
#82321 After some investigation the Vin pin puts out 5V as I have read. When back feeding the board through a 3V3 pin it puts out 3V. I could probably still work with that as I could put a resistor in to drop the 3V to around 0V and use the other 2V to activate a digital switch.

I have used a Texas instruments multiplexer on another project which switches supplies when the voltage drops below a certain level on the main supply. There is a version where you can specify which supply to use. They are part of the TPS211X range.

There are some digital switches but the current rating on the ones I have found is quite low.

More investigation required!