Help with Op Amp circuit on project

Thread Starter

MDBSpark

Joined Feb 24, 2009
3
I am definitely a newb to working with circuits. I am an IT guy, so this is my first attempt at building circuits. I am making some dimmable leds and going to control them via a PIC using pwm. The pwm output from the PIC is a 400Hz signal and 0-5V. My drivers are Meanwell ELN-60-48 P that takes a pwm signal 0-10V, but must be in the range of 100Hz - 3KHz. I cannot use a low pass filter or it will turn my digital square wave into a rounded wave.

I have successfully built a simple circuit using a rail to rail op amp that takes the pwm signal and doubles the voltage output perfectly as the pwm signal rises and falls from 0-5V. However, what I do not know is if the frequency has changed and I assume since the wave input is a digital square wave, that the output is the same. I do not have an oscilloscope to check out the frequency and the wave, so I have some newbie questions:

If my input into the RTR op amp is 400Hz and the voltage doubles, will the op amp double the frequency also? Or is the frequency going to be sporadic and possibly rise above 3 KHz? If so, how can I limit or set the frequency without turning this into analog and keeping the digital pwm signal?

Simple Voltage Doubler:
2 - 10k ohm resistors 1% self explanatory for doubling voltage
1 - 4.02K resistor 1% on the pwm input
1 - .1 uf capacitor 3% to pwm input and ground

1 - TLV272 RTR dual op amp

12V power supply.

It is a pretty basic non-inverted op am design.

Would it be easier to use an lm555 timer? I am sure I have several options on this, but again some guidance in the right direction would be greatly appreciated.
I was thinking that I might have to run this through a second pass on the op amp as a comparator to produce the pwm...
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,201
Sorry that you haven't had many responses, it's been pretty busy lately.

I'd say your easiest solution for still using the PIC would be to use a logic level MOSFET or a transistor on your PWM I/O pin. It would invert the logic, so that 99% ON would be 99% OFF, but you can easily change that in software.

The thing about using an opamp is that you'd have to run it open loop, and even pretty fast opamps would have an output that looked more like a triangle than a square wave.

See the attached; it just takes 1 transistor, two 1/4W 1k resistors, and a 10v Zener diode.

If your PWM input to your driver requires more than a few microamps, you'll need a more robust driver than this.
 

Attachments

eblc1388

Joined Nov 28, 2008
1,543
I have successfully built a simple circuit using a rail to rail op amp that takes the pwm signal and doubles the voltage output perfectly as the pwm signal rises and falls from 0-5V. However, what I do not know is if the frequency has changed and I assume since the wave input is a digital square wave, that the output is the same.


No. The output signal frequency will remain the same as input after amplified by the Opamp.

The duty cycle will the same too if you have not inverted the signal using the Opamp.
 

Thread Starter

MDBSpark

Joined Feb 24, 2009
3
Thank a lot for the responses. I will test it out with the op amp as is on the power supply just to see how it reacts. But nice to know either way that it would not change the frequency for future reference. I am curious how it will react to the op amp circuit. I have the parts for Sgt. Wookie's circuit and will do that circuit as well and likely go with that one.
Exactly what I needed. Thanks again!
 
Top