PWM to DC for DRV103

Thread Starter

Fussel

Joined Mar 25, 2026
3
Hey,
I´m currently trying to convert a 20kHz PWM Signal generated with an ESP32 to DC voltage.
Goal is to control a hydraulic proportional flow control valve with a DRV103 solenoid Driver.

The DRV103 needs an analog Input Signal from +2.2 - +5V to activate the Output.
With the ESP I´m able to supply up to 3.3V which is enough for my purpose.

I already tried different combinations of RC Filters that all worked decently well.
The problem I´m having is that the DRV still stops randomly for about a second.
I measured the DC output of the RC Filter and noticed that there are very short random dips up to -1.7V.
I guess the DRVs PCB goes into some kind of protection when that happens and has to restart first.

I tried solving the problem with a Pulldown on the output of the RC to stabilize the signal and the dips nearly completely vanished. (havent tested it yet but since they didn´t completely vanished i doubt the result will be much different)

Here´s a list of the RC combinations i tried until now and why:
1. 4.7kO + 1yF (first one i tried. just threw together some parts i had lying around to see if it worked). Result was pretty good DC but with said dips.

2. 1kO + 100nF (found a post on this site that recommends a filter with an RC time constant equal to about twice the period of the waveform)
This one didn´t result in a proper DC voltage more of a very flat triangle voltage

3. 10kO + 10yF + 100nF parallel and second stage with 4.7kO + 10yF (got desperate and asked AI) :( Result pretty much the same as with 2.

First time I´m working with RC filters so I´m not experienced with what cutoff frequency to choose.

Since I´m able to change the PWM frequency freely and its not really critical what value I use it would also be helpfull if someone nows a configuration that works well with a specific frequency.

Other options i thought of but dont have the parts for yet are 1. adding a OP-AMP to the RC, 2. using an i2c H-Bridge with a 5V voltage converter.

Thanks in Advance.

Regards,
Alex
 

Loreani

Joined Mar 23, 2026
8
Ah, I get what you mean. I’ve had the same issue before those tiny dips make the DRV freak out, even if the RC filter looks fine. Honestly, adding a buffer or messing with the RC a bit usually stabilizes it. Without that, it’s just frustrating watching it randomly cut out for a second.
 

Thread Starter

Fussel

Joined Mar 25, 2026
3
Ah, I get what you mean. I’ve had the same issue before those tiny dips make the DRV freak out, even if the RC filter looks fine. Honestly, adding a buffer or messing with the RC a bit usually stabilizes it. Without that, it’s just frustrating watching it randomly cut out for a second.
Thanks, the big issue is that i use the prop valve to controll the speed of a hydraulic motor and when the drv cuts out the rotation stops for a brief moment.
Did you find a reliable solution?
I also thought of using the internal DAC of the esp32 to supply the drv with DC. I will try that later and see if it works better
 

Thread Starter

Fussel

Joined Mar 25, 2026
3
Thanks, the big issue is that i use the prop valve to controll the speed of a hydraulic motor and when the drv cuts out the rotation stops for a brief moment.
Did you find a reliable solution?
I also thought of using the internal DAC of the esp32 to supply the drv with DC. I will try that later and see if it works better
Internal DAC worked way better but the ESP does a really weird thing once i reach about 40-60% ... It looks like it just glitches out ... no dips in supply voltage or on the 3.3V rail but it looses connection to the ESP-Now remote and the DAC value cant be changed anymore ... when i power the esp from my laptop and not with my buck converter i dont have the problem
 
Top