Switching a 9v load

anttok
Posts: 5
Joined: Thu Sep 10, 2020 10:14 pm

Switching a 9v load

Postby anttok » Thu Sep 10, 2020 10:19 pm

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.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Switching a 9v load

Postby ESP_Sprite » Fri Sep 11, 2020 8:32 am

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.

markxr
Posts: 15
Joined: Sun Aug 16, 2020 7:32 pm

Re: Switching a 9v load

Postby markxr » Wed Sep 16, 2020 5:56 pm

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.

Who is online

Users browsing this forum: No registered users and 74 guests