# Triangle wave generator

Discussion in 'General Electronics Discussion' started by keelen, May 9, 2013.

1. ### keelen

4
0
May 9, 2013
For one of my projects, I need to design a triangle wave generator. What I was thinking to do is to use an adjustable linear voltage regulator (i.e LM117 or LT317) and use a digital potentiometer at the adj pin to change the resistance. Afterwards, i will use a microcontroller to change the steps very quickly. I am hoping that this will create a relatively good triangle wave. The main issue that I am faced with is that my Digital Pot is only capable of handling 5 Ma's and the current flowing through it is approximately 5.5 Ma's. I know this is probably not the best way to proceed in order to design a signal generator but since I am on a tight time constraint, this was the only idea that I could think of.

If anyone has any suggestions in order to improve my idea or suggestions concerning other components that I could use in order to bring down the current flowing through the pot, it would be greatly appreciated.

Thanks

2. ### BobK

7,682
1,688
Jan 5, 2010
If you are already using a microcontroller, why not use a DAC to output a triangle wave directly?

Bob

3. ### keelen

4
0
May 9, 2013
The main issue that I am faced with is that a DAC will not output enough current for what I need to do. I should have mentioned this before but I need a triangle wave with an output current of 1.5 amps and a min/max voltage of 1.8 and 3.3 volts respectively.

4. ### BobK

7,682
1,688
Jan 5, 2010
Basically, a voltage regulator is just a an error amp and a pass transistor. You could build this yourself with an opamp and a darlington transistor. You would feed a triangle wave from the DAC to the + input of the opamp, and feed back the output voltage at the pass transistor to the - input, with the output of the opamp controlling the base of the pass transistor. This would basically be a high-power voltage follower.

Bob

5. ### BobK

7,682
1,688
Jan 5, 2010
Here is a circuit that simulates well anyway.

V2 is the triangle wave input. If you use a microcontroller with a DAC you could output this directly, or you could use PWM with an RC filter to make a crude DAC, or you could use an external DAC.

The opamp could be any single supply capable opamp like the LM358

Bob

Last edited: May 9, 2013
6. ### keelen

4
0
May 9, 2013
Thanks a lot Bobk for your help

7. ### keelen

4
0
May 9, 2013
BobK, I was just wondering what software did you use in order to perform this simulation?

8. ### BobK

7,682
1,688
Jan 5, 2010
LTspice. If is free from Linear Technologies, and works quite well.

Bob