Page 1 of 1

Switching a 9v load

Posted: Thu Sep 10, 2020 10:19 pm
by anttok
I want to use the esp32 to in place of a physical switch on a bms. It shows a 9v and 5mA on the line. Can I use a GPIO pin pulled set low, to ground the current and activate the bms without damaging the esp32? I know i could use a load driver or ssr or nfet with some resistors as an alternative.

Re: Switching a 9v load

Posted: Fri Sep 11, 2020 8:32 am
by ESP_Sprite
No, you cannot, the ESP32 pins are not specced for a 9V voltage. Suggest you use a GPIO to drive a mosfet that lowers that line instead.

Re: Switching a 9v load

Posted: Wed Sep 16, 2020 5:56 pm
by markxr
You will need a transistor or some other switching device.

If the current, etc, is low enough, just a small n-channel mosfet with low enough threshold voltage, switch the low side of the load and it should work with a gpio pin on the gate. Obviously put a resistor to protect the esp32 gpio pin (probably 1k would do), if you are worried about electrical noise accidentally activating the load during startup (or any other time the esp isn't driving the pin, for example, sleep), then add a pull-down resistor to make sure it's off by default.