0-3.3v esp32 to 0-10v for vfd

Hello Everyone

I am making my first Custom PCB design, I have to control VFD by 0- 10V using ESP32 0- 3.3V PWM signal
I came to know I should use an op-amp so I choose LM358 and then simulated it on Proteus. At a gain of 3.03, I am getting exactly what I want, but I am worried about the result in reality vs simulation
I need a suggestion, will this circuit be okay, or should I do some modifications

Is this a game of spot the difference? Your schematics look the same to me!

I moved your topic to an appropriate forum category @leansolution.

In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

Don't worry about it, build it and test it!

Leave designing a PCB until you know the circuit is correct. Build your prototype on breadboard or stripboard.

I am not sure what you want to achieve or if your circuit will achieve that. Your circuit will change a 3.3V PWM signal into a 10V PWM signal, not a 0-10V analog signal. Which did you want?

If you want a 10V PWM signal, there are simpler circuits to achieve this.

1 Like

i want to change 0-3.3v PWM signal to 0-10v analog signal

I would suggest that you need to incorporate a low-pass filter in to your circuit to convert the PWM signal in to a DC voltage.

Here is a video showing the PWM output from pin 5 of an Arduino Uno R3 on the yellow trace, and the output of a low pass filter on the blue trace.

The low pass filter used comprises of R = 10kΩ, and C = 1µF.

This demonstration is a 5V PWM signal being converted in to 0 - 5V signal, but will work in a similar manor using a 3.3V signal.

1 Like

Put a 10k between the input signal and Pin 3.
Google confirms this.

A common LM358 is no a rail2rail opamp.
It's supply needs to be about 3.5volt higher than the required output voltage.
A 12volt supply might not be enough to output 10volt.
Leo..

2 Likes

No it does not. It said "not strictly always required".
So why do you think it is necessary in this circuit?

Simulate with a PWM input and see what happens.

"It can prevent unwanted behavior or improve circuit performance"

Use it don't use it, just a suggestion.

Can you give a description of the VFD drive controller you are interfacing to. There may be other ways, apart from the OP amp solution, to deliver a 10v PWM signal using the 12v supply, an Arduino and maybe a couple of transistors.

This is google AI nonsense. How will this resistor prevent unwanted behavior or improve the circuit?
Why 10K?

Esp32 has DAC as well.
Also, read the documentation of your VFD, some work with analog 0-10V and PWM .

1 Like

Note that the OP wants an analog output not PWM. See his answer in post #6 to @PaulRB ‘s question in post #5.

Oops I missed that. It is the same principle but with the low pass filter design which has been previously mentioned.
I played around with some values to get reasonable ripple across the range.
The opamp solution proposed in the OP could also be better maybe also using another opamp as a buffer.

With the values here and 2000Hz PWM 0.2% duty cycle give 500mV and 80% duty cycle gives 10 volts.

Hi, @leansolution
Welcome to the forum.

Can you please post a link to the VSD manual please?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

I reproduced your simulation of the DC based circuit. But with PWM input the circuit inverts the pulses. This apparent phase inversion or whatever rather puzzles me but I confirmed it by first simulating with pulsed input instead of DC and then with a scope on a test circuit. I used a TL072 opamp, which I think is roughly equivalent to your LM358.

Two example results: both used a frequency of 500 Hz and a 1.0V
amplitude pulse signal from my sig gen.

  1. With duty cycle set to 50% output was. 9V
  2. A duty cycle of 25% delivered average DC output of 7V.

As already suggested up thread, you can if necessary add RC smoothing to the opamp’s output.

It's rail2rail performance is worse. It needs a negative supply voltage to reach 0volt output.
The LM358 can do that without negative supply.
Leo..

2 Likes