Page 1 of 1

Esp32 Power supply

Posted: Mon Oct 14, 2024 11:49 am
by Aloxen
Hey guys,

I want to build a DIY, indoor irrigation system. I have 8 24V magnet valves I have written an app to connect to the esp32 and send the irrigation schedule to the board. I would use an "oktokoppler" (https://www.amazon.de/Verst%C3%A4rkerpl ... C73&sr=8-1) to controll the magnetic valves, but at the end I do not want two different power supplies for my project. Is it possible to use the 24v power to power the esp32 too? And what do I need to get from 24v to 3,3v and how do I avoid grilling my new ESP32?


As you might have noticed, I am not very experienced, so I would really appreciate it if you were kind and explain it to me in detail.
Awesome!

Re: Esp32 Power supply

Posted: Tue Oct 15, 2024 3:14 am
by ESP_Sprite
Aloxen wrote:
Mon Oct 14, 2024 11:49 am
"oktokoppler"
You're looking for 'optocoupler' (or Optokoppler in german). It uses an optical method (LED/phototransistor) to couple a signal, hence the name.

but at the end I do not want two different power supplies for my project. Is it possible to use the 24v power to power the esp32 too? And what do I need to get from 24v to 3,3v and how do I avoid grilling my new ESP32?
You can, but you indeed do need to get the voltage down. Your choices would normally be a buck converter or an LDO, but as an LDO burns up the voltage difference between input and output, a buck converter is a better choice here. You can get modules that do that in the usual places; just make sure they have a supply voltage range that includes your 24V, and that they can supply 500mA or more to the ESP32.

Re: Esp32 Power supply

Posted: Tue Oct 15, 2024 7:57 am
by MicroController
The valves are powered by 24V DC, right?

As @Sprite said, you probably want a "buck converter", often also called "step down converter". Most of the modules you'll find have adjustable output voltage.

Make sure the converter can supply enough current for the ESP. Nominal minimum needed would be ~500mA, but to be sure I'd go for 1A to 2A at least. Step down modules based on the LM2596 are pretty wide-spread.