5 volt triangle wave generator + amplifier

Thread Starter

spuddo

Joined May 2, 2013
76
Hi All.

What i wanted from the above circuit was a 0-5 volt , low frequency (LFO) generator that could be used as a variable analog input to an Arduino to vary the rate of PWM.

Attached is a circuit that was on You Tube.

It seemed to tick all the boxes.

It didn't------heard that before ?

1597674812447.png

1597674874078.png

The triangle side was good , although the output was low according to the authors 1.4volt----only 750mv.

I used a variable pot for R1 and that provided the desired frequency range

When it came to the amp , things went pair shaped.

Very distorted wave shape and only about 2 volts P-P , author claimed 5 volts P-P.

Any thoughts

Best regards
 

Attachments

Thread Starter

spuddo

Joined May 2, 2013
76
Hi All.

What i wanted from the above circuit was a 0-5 volt , low frequency (LFO) generator that could be used as a variable analog input to an Arduino to vary the rate of PWM.

Attached is a circuit that was on You Tube.

It seemed to tick all the boxes.

It didn't------heard that before ?

The triangle side was good , although the output was low according to the authors 1.4volt----only 750mv.

I used a variable pot for R1 and that provided the desired frequency range

When it came to the amp , things went pair shaped.

Very distorted wave shape and only about 2 volts P-P , author claimed 5 volts P-P.

Any thoughts

Best regards
PS have tried to contact author to no avail.
Site that article was from was PCB heaven
 

Alec_t

Joined Sep 17, 2013
14,280
The main problem is the use of the antiquated 741 as the opamp. It was designed to have both positive and negative supplies and doesn't operate properly if its inputs are within about 3V of either supply rail. It won't be happy with a single supply of only 5V.
The single transistor amplifier is very dependent on transistor gain when configured as shown, so is likely to clip the output.
The circuit overall is poorly designed.
If your only available supply is 5V you will never get a 5V triangle output, although you can get close to it by use of opamps with 'rail-to-rail' output capability. If you use a 12V supply (for example) then the 741 opamps would be able to generate a 5V amplitude triangle (swinging between about 3.5V and 8.5V).
Edit: A simple 2:1 voltage divider would bring that 3.5-8.5V swing down to 1.75-4.25V, i.e within the analogue input range of the Arduino. The amplifier stage would then be redundant.
 
Last edited:

KeithWalker

Joined Jul 10, 2017
3,063
Do you really need the triangle wave as an input? It would be much simpler to just connect the potentiometer across the 5V supply with the slider connected to an analog pin on the arduino and use that to vary the PWM signal.
Regards,
Keith
 

sghioto

Joined Dec 31, 2017
5,376
Very distorted wave shape and only about 2 volts P-P , author claimed 5 volts P-P.
Any thoughts
Try changing the bias on the 2N2222. I added a 39K from the base to ground and changed the 130K to 120K with decent results. For your circuit you may have to experiment with those values. You will also need to adjust the 10K pot for best symmetry.
SG
EEE 741 Triangle wave gen..pngIMG_2717.JPG

EDIT: Or if you can get a couple of MC6002 chips try this circuit.
EEE MC6002 triangle wave gen.pngIMG_2718.JPG
 
Last edited:

Thread Starter

spuddo

Joined May 2, 2013
76
Try changing the bias on the 2N2222. I added a 39K from the base to ground and changed the 130K to 120K with decent results. For your circuit you may have to experiment with those values. You will also need to adjust the 10K pot for best symmetry.
SG
View attachment 215000View attachment 215002

EDIT: Or if you can get a couple of MC6002 chips try this circuit.
View attachment 215003View attachment 215004
Thanks for all your replies.

dl324 , the supply for the 741's is single rail 5 volts as per circuit offered.

Keith , had a pot to change pulse width , but wanted something faster , hence the 0-5 volt triangle wave LFO.

Alec_t , the Tl072 was probably a bad choice , i really want a single 5 volt rail.

sghioto , tried the mods to 2n2222 , only managed a slight increase in output , but still distorted. Have ordered MC6002.

Best regards
 

dl324

Joined Mar 30, 2015
16,839
the supply for the 741's is single rail 5 volts as per circuit offered.
The LM741 was designed back when it was common to operate opamps from + and - 15V. The typical common mode input range is 3V from the rails; best case it's 2V. If you got a best case design, the allowable input range would have been 2-3V.

With lightly loaded outputs, the output could swing to a volt less than the rails, so output range would be 1-4V. Worst case, it would be 2-3V.

The worst case part allows a 1V peak to peak input and output signal.

The text talks about a 5V output swing. Are you sure you didn't miss something? The 741 was never designed to operate from a single 5V supply. LM358/324 was probably the first to be designed to operate from 5V, but the input voltage range is only 0-3V.
 

KeithWalker

Joined Jul 10, 2017
3,063
Thanks for all your replies.

Keith , had a pot to change pulse width , but wanted something faster , hence the 0-5 volt triangle wave LFO.
I don't understand your answer. How can decoding a triangle waveform on an analog pin be faster than reading a DC voltage?
Why is speed so important when the frame rate of a servo is 18mS and response time is >0.5 seconds for 90 degree movement?
The simpler the system is, the less there is to compromise performance.
Regards,
Keith
 

sghioto

Joined Dec 31, 2017
5,376
sghioto , tried the mods to 2n2222 , only managed a slight increase in output , but still distorted. Have ordered MC6002.
Curious. What frequency are you using? My test circuit with the 741 was operating at 25Hz with a full 5 volt output although more sine wave looking.
SG
 

Thread Starter

spuddo

Joined May 2, 2013
76
I don't understand your answer. How can decoding a triangle waveform on an analog pin be faster than reading a DC voltage?
Why is speed so important when the frame rate of a servo is 18mS and response time is >0.5 seconds for 90 degree movement?
The simpler the system is, the less there is to compromise performance.
Regards,
Keith
Hi Keith , i wish to change the duty cycle of a square wave faster than i can manually using a pot.
Thought a low frequency osc (20hz-100hz) would do the trick.
Best regards
 

Thread Starter

spuddo

Joined May 2, 2013
76
Curious. What frequency are you using? My test circuit with the 741 was operating at 25Hz with a full 5 volt output although more sine wave looking.
SG
Hi ,sghioto
Using between 20hz-100hz.
Best i could get was 2.7volts.
The wave shape is not that important , i'm trying to emulate the movement of a pot that will change the duty cycle of a square wave at various speeds.
I chose to do this with a low frequency oscillator , rather than manually moving the slider.
Because this is an Arduino sketch , it will only accept 0-5 volts at it's analog input.
The MCP6002 chips are on thier way.
I,ll let you know the results.
Best regards
 
Top