Control ESP32 using a flip-flop or transistor when the button is pressed or the pin is toggled

Moxianision
Posts: 1
Joined: Sun Jul 09, 2023 9:24 pm

Control ESP32 using a flip-flop or transistor when the button is pressed or the pin is toggled

Postby Moxianision » Sun Jul 09, 2023 9:28 pm

Hello dear community,

Unfortunately, I couldn't find anything suitable using the search functions. Or rather, the ones I found were too old to be worth revisiting.

As the title suggests, I am looking for a way to control my ESP using a button. I have already written a sketch that sets Pin 5 to high based on my MQTT commands... now I just need the necessary hardware for this.

In simple terms, I want the ESP to receive power when the button is pressed, execute its commands, and then turn off again. I want everything to happen manually, and preferably in a power-efficient manner since I rely on batteries.

Unfortunately, I'm not particularly knowledgeable in electrical engineering. I've only just grasped the concept of URI and voltage drop.

I understand the basic functioning of a transistor, but I'm not sure how to calculate the signal strength.

I don't want someone to explain everything from A to Z. Are there any alternatives or modules that can handle this job? Essentially, I just need some kind of flip-flop/transistor circuit that can be switched once with the button and then with the pin.

I hope my jumble of words can be read and understood, and someone will take pity on me.

Thank you very much,

Maxim

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

Re: Control ESP32 using a flip-flop or transistor when the button is pressed or the pin is toggled

Postby ESP_Sprite » Mon Jul 10, 2023 1:43 am

Why don't you use deep sleep? The ESP32 only uses micro-amps in that mode, which is enough to last a battery for a long time, and you can wake up from it using a GPIO.

Who is online

Users browsing this forum: No registered users and 131 guests