Generate PWM 4-24v for a water pump from ESP32-S3

Hello,

I’m looking to generate a PWM (4-24v) signal from an ESP32-S3 to control a water pump speed and I’m a bit lost about which hardware to use.

Here’s the circulator’s documentation: https://www.solar-nu-webshop.nl/data/upload/files/220351220058512200052-64-bdaoeg-pomp-g51220058-cv-pomp-dn25-met-180-mm-l.pdf

The page with the specifications is page 48 (English) or page 72 (French).

UiH = 4 ~ 24 V
UiL ≤ 1 V
liH ≤ 10 mA

Is there a ready-to-use I²C module for this? Or what module should be used?

Thanks in advance!

Hello Ni0rd,

  • Another good place to ask ESPHome questions is ESPHome

First use multimeter to verify there’s no voltage (pull-up) across PWM+ and PWM- wires.
If not, you can try with direct PWM from esp. While 3.3V is below 4V, it’s worth to try.
Otherwise use optocoupler or transistor and 5V pull-up.

You need a level shifter to increase the voltage output of the esp32 (3v3) to 5V so it can work with your pump.

Use

to control an output pin, connected to the level shifter, which is then connected to the pump input.

It might actually work without the level shifter, but the specs say you need it, so you should use one.

If it helps anybody, I ended using a 3.3V-5V Channels Logic Level Converter Bi-Directional Shifter Module to increase the PWM signal to 5v.
Thank you for your help!

For future reference, it makes many things a possibility if you have some moafets on hand. There are so many possibilities they can be used for such as sending 3v-24v pmw for controlling the speed of DC motors/fans, adjust the brightness of one or dozens of led’s, use one to make a digital switch for voltages greater than what a gpio can use alone, and many more things including the exact thing you needed here, one of these single chabnel modules would have worked perfectly.

They’re probably one of my most commonly used components/modules and they control motors, fans, lights, relays, etc around my house. They also come as single modules or 4 channel modules.

4 channel module