Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Tools
Old 27th August 2009, 06:57 AM   #1
Default op-amp triangle wave, need help

Hi all, (first post here)

What I'm trying to do is to create a triangle wave using op-amps so that I can make a LED fade on then fade off. At the moment I'm using the circuit that I attached.

The first problem I'm having is getting the attached circuit to even work. Using the values that are shown in the schematic all that happens is the LED comes on and then stays on. I tested the op-amp outputs for any kind of wave form and there is nothing at either output.

I've tried adjusting the values of the components and the best I can get the circuit to do is to make the LED fade on, put after that it just gets stuck on and doesn't fade back off. To do this I changed out the resistor that goes from pin 7 to ground from a 4.7k Ohm to a 1k Ohm.

I understand how to an op-amp can be used to create a square wave but I don't totally understand how two can be used to create a triangle wave. So most of the component adjusting I've been doing is just randomly swapping out parts.

Oh yea I'm using the LM358.

Anyways any help would be greatly appreciated.

Thanks!

[Edit]: I probably should have said that I've done quite a bit of googling for different circuits and tried quite a few and have had similar problems with all of them.

-Sparrow
Attached Thumbnails
op-amp triangle wave, need help-fading-led-lm358.jpg  

Last edited by Sparrow338; 27th August 2009 at 07:50 AM.
Sparrow338 is offline  
Old 27th August 2009, 08:38 AM   #2
Default

Quote:
Originally Posted by Sparrow338 View Post
[Edit]: I probably should have said that I've done quite a bit of googling for different circuits and tried quite a few and have had similar problems with all of them.

-Sparrow
hi,
You will not get a good dimming control of an LED using this method.

Commonly used are PWM [pulse width modulation] circuits.
You could use an OPA to generate a square wave, where the on/off time drive to the LED can be varied.

The 555 timer ic makes a simple PWM osc.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 27th August 2009 at 08:39 AM.
ericgibbs is offline  
Old 27th August 2009, 08:41 AM   #3
Default

You create a triangle from a square wave by sending the sq wave into an integrator, which can be made from an op-amp.

I agree a sq wave with varied ON time is a better way to change brightness.

Last edited by bountyhunter; 27th August 2009 at 08:42 AM.
bountyhunter is offline  
Old 27th August 2009, 09:00 AM   #4
Default reply

Generating Triangle Waves

In the basic square wave generator circuit, a gradually-charging capacitor was used to help set the timing or frequency of the circuit. However, since it was only charging through a resistor, it necessarily charged on a logarithmic curve, rather than as a linear ramp. Can we use an op amp integrator here to obtain a linear triangle wave along with the square wave?


--------------------------------------------------------------------------------

In the circuit to the right, we use a separate integrator to generate a ramp voltage from the generated square wave. As a result, we can get both waveforms from a single circuit. The phase relationship shown between the two output waveforms is correct — remember that the integrator inverts as well as integrating, so it will produce a negative-going ramp for a positive input voltage, and vice-versa.

Because we are now using an op amp integrator to get the triangle wave, we no longer have a logarithmic response anywhere in the circuit. Therefore, the equation for the operating frequency is simplified to:

fout = 1 ( R2 )

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

4RtC R1

The squarewave amplitude is still the limit of voltage transistion, which we are assuming here to be ±10 volts. The triangle wave's amplitude is set by the ratio of R1/R2.
Arjun_prrsad is offline  
Old 27th August 2009, 08:26 PM   #5
Default

Your circuit does not work because pin 3 of the opamp is shorted to ground instead of having positive feedback.
Also, your timing resistor is much too high at 4.7M, it should be 47k then the timing capacitor value should be much higher. The circuit I show uses two polarized capacitors back-to-back so that they pass AC.
The circuit works best with a single red LED. Two red LEDs in series will be off most of the time and fade on for a very short time.
Attached Thumbnails
op-amp triangle wave, need help-fading-led.png  
__________________
Uncle $crooge

Last edited by audioguru; 27th August 2009 at 08:27 PM.
audioguru is offline  
Old 28th August 2009, 04:21 AM   #6
Default

Thank you all for the fast responses. I have a much better understanding of how this works now. I got it working using the schematic that audioguru posted.

Incase you wanted to see what it looks like here's a youtube link to a video of it. I'm planning on etching a board for it soon, but here's a quick mock-up.

YouTube - LED Fader using LM358

Thanks again for the help!
Sparrow338 is offline  
Reply

Tags
opamp, triangle, wave

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
how to work triangle wave generator? baggio2 Electronic Projects Design/Ideas/Reviews 12 10th January 2009 10:20 PM
Need to make a triangle to sine wave converter TheJokerV Electronic Projects Design/Ideas/Reviews 4 9th February 2008 12:42 AM
sine wave to triangle wave raviram87 Electronic Projects Design/Ideas/Reviews 5 12th January 2008 06:01 AM
Squared wave converter to Triangle wave prprog Electronic Projects Design/Ideas/Reviews 7 27th January 2007 03:44 PM
Triangle wave generator 4electros General Electronics Chat 6 14th January 2006 04:41 AM



All times are GMT. The time now is 06:38 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker