Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pwm buffer question

Status
Not open for further replies.

highlight

New Member
I am buffering a PWM signal coming from my microcontroller using the U11 opamp in the circuit, but the PWM at the output of the op amp is overshooting giving me a distored PWM signals. I drew the PWM waveforms on the circuit. Anyone know what i can do to prevent the overshoot?

24bt72p.jpg
 
Are you really using a TL062? im not sure they are designed to operate from 3.3V. The reason I say this is LED's/OPTOCOUPLERs do not have a very high reverse blocking capability. Whats the opamp powersupply
 
Last edited:
What are the voltages at pins 4,5,8 of U11?
 
Transistors driven by PWM are completely turned on and off by the signal so overshoot makes no difference.
All opamps have overshoot unless you filter out high frequencies then a square-wave input results in a triangle-wave output.
 
When the output of the opamp goes high to +3.3V then the LED in the opto-isolator turns off. The overshoot when the output of the opamp goes a little higher than +3.3V does not affect the output of the opto-isolator, unless the PWM frequency is much too high for the photo-transistor in the opto-isolator.
 
When the output of the op-amp (P7) is zero, the intrinsic capacitance of the diode in the opto isolator will be charged to the forward drop out voltage of the diode. When the output switches high, this voltage will rise instantly on top of the output voltage of the op-amp causing overshoot.
This overshoot voltage is likely to be shortlived as the capacitance rapidly discharges into the output stages of the op-amp and will be in the order of 3.3v+Vdiode forward drop.

The problem is that the output of the op-amp can drive it's output positive. Try a LM311 comparator/open drain/open collector that cannot drive high and use the load as a passive pull-up.
 
Transistors driven by PWM are completely turned on and off by the signal so overshoot makes no difference.
All opamps have overshoot unless you filter out high frequencies then a square-wave input results in a triangle-wave output.

yeah i dont think the overshoot matters, but the pulse width at the output is getting distored, its a little less than the width at the input. Im using this to generate a dc voltage so the correct duty cycle is important to me, any ideas to address this..
 
I've always used a simple NPN transistor to buffer a logic signal to drive an LED.

If you can invert the PWM signal then drive the base through a resistor, ground the emitter and tie the collector to the cathode of the LED.

If you can't invert the PWM signal, use the NPN as an emitter follower. Connect the collector to 3.3v, drive the base directly, and connect the emitter to you LED resistor. The LED resistor may need to be a lower value as the emitter follower will reduce the voltage by about 0.7Volts.
 
Do you even need to buffer the PWM? Can't the PWM source drive the opto LED via a simple resistor?
 
i put it there so the micro doesnt have to sink the current when the opto is on.

It has to sink only about 10 mA. That is not a problem for a micro unless you drive many optos at the same time.
 
exactly, for this type of thing I would let the uP sink (or bypass) the opto/LED directly.
 
It has to sink only about 10 mA. That is not a problem for a micro unless you drive many optos at the same time.

Ok, without the buffer everything works great, i just thought it was good practice to use a buffer. The micro's datasheet says it can sink a max of 25mA so it should be ok.
 
Status
Not open for further replies.

Latest threads

Back
Top