I’m using a ESP12F to control a servo that moves a solar panel that charges an 18650 cell in a V3 18650 battery shield. The shield powers an ESP32Heltec Lora.
The Lora board is on all the time and drains the cell. The cell has discharge protection. The shield has been modified to provide power trough for when sun is up.
At some point overnight the Lora board crashes and later when cell recharges or sun is up the Lora doesn’t restart without a reset. The ESP12 has it’s own battery shield
and uses deep sleep most of time and doesn’t discharge much. In order to reset the Lora I need to pull the RST pin low.
My questions are.
1)Do you think this N Channel enhancement Mosfet would
be a good choice for a switch to be controlled by GPIO14, and what should the Load resistor be?
2)Am I overthinking this, and just connect GPIO14 to RST and keep it high and just pull it low when I need to reset the Lora, and do I need a resistor at all?
Yes, all the GNDs will be connected together, but that shouldn’t be a problem. I’m new to using Mosfets but I think if I bring the gate up to 3.3V and Drain is at 3.3V the switch should open and RST will be brought low and reset. Gate voltage will be switched off quickly. I hope
Are both boards powered from same 3.3V source ? If so, you can just connect GPIO to reset directly. Reset pin doesn’t draw (or sink) any current so it won’t damage GPIO pin. Just make GPIO’s internal pull-up active.
Only thing you might do is add an external pull-up resistor, if internal won’t be enough - since internal resistor is quite high. Do some testing - you’ll see if it works without.
That makes me think Schottky diode. When both boards working Lora RST pin is pulled high and GPIO14 pin is pulled high no current flow across the diode. If Lora RST pin is low i.e. no power going to the board but GPIO14 is pulled high no current flows against the diode to the Lora board. If Lora RST pin is high but crashed then I pull GPIO14 low momentarily and will pull Lora RST pin low and it will reset. Again may or may not need a resistor in series with the diode. A lot of things to try. I’ll practice on a cheaper ESP32 board.
OK , trying with the diode connecting switch to RST pin.
So far so good. When I push Reset Lora switch the ESP32 that is playing the part of the LORA resets.
If I restart the Servo controller ESP32 by switch the Lora doesn’t reset.
If I remove the power and power up the Servo ESP it resets the Lora board.
No magic smoke yet. Nothing even heating up.