Author Topic: Sawtooth Wave Generator  (Read 11676 times)

0 Members and 1 Guest are viewing this topic.

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Sawtooth Wave Generator
« on: October 06, 2015, 07:51:10 am »
Hi guys, I want to generate a sawtooth waveform of the following specifications:
 (1) Rise from 0 to 1V; fall time <100ns
 (2) Ton variable from 0.1 to 1ms
 (3) Variable duty cycle ,D,; 1% to 50%

I want to use a Howland current source to charge a capacitor, comparator to compare the voltage across capacitor with 1V, discharge through a transistor switch. A delay generator is also needed to control the Toff.
 Problems:
(1) when I connected current source directly to the capacitor, no current flowed through the capacitor, so ramp wave was not obtained
(2) i dont know for what value the delay or trigger generator, how to connect all these circuits together?
« Last Edit: October 06, 2015, 08:38:42 am by ArjunSukumar »
ARJUN SUKUMAR
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Sawtooth Wave Generator
« Reply #1 on: October 06, 2015, 08:49:57 am »
1. Once the capacitor charges, the op-amp is unable to provide more voltage, and it stops charging (it's not an ideal current source, of course). If you didn't have a switch and comparator connected, this will be the final state.

2. You don't want a delay -- instead, use a comparator with hysteresis, or a bistable circuit (e.g., examine the internal diagram of the 555 timer).  That way, the capacitor is not discharged to an unknown voltage, but the discharge stops when the capacitor is discharged below the threshold.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Re: Sawtooth Wave Generator
« Reply #2 on: October 06, 2015, 09:15:47 am »
thank u Tim for reply, I have some doubts. I connected a comparator to compare with 1V and a switch (transistor ) to the circuit, but then also I am getting an output of 1V constant.
ARJUN SUKUMAR
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Sawtooth Wave Generator
« Reply #3 on: October 06, 2015, 09:18:45 am »
Schematic?
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #4 on: October 06, 2015, 09:26:40 am »
I'm not sure why your circuit is not working, but for what you describe, I'd perhaps use a pulse/rectangular wave generator with variable high and low voltage durations (i.e., a pulse wave with variable pulse duration and frequency, see 555 astable oscillator). Then AC couple the pulse wave to an op-amp integrator to get the variable rise & fall triangle wave. (I assume you want a repeating triangle waveform, not just a single pulse.)

Dave describes the basic op-amp integrator in this vid (go to 36 minute mark):
 

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Re: Sawtooth Wave Generator
« Reply #5 on: October 06, 2015, 09:56:09 am »
Schematics
ARJUN SUKUMAR
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Sawtooth Wave Generator
« Reply #6 on: October 06, 2015, 12:30:57 pm »
I don't have Word handy, can you just post a PNG or something?
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #7 on: October 06, 2015, 01:41:42 pm »
What are you op-amp supply voltages connected to?

@T3sl4co1l: here's a screenshot
 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: Sawtooth Wave Generator
« Reply #8 on: October 06, 2015, 01:56:28 pm »
Seems like your buffer/unity gain opamp U2 is not working as is should.  It got about 5 volts at the input and only 0.1 at the output.
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #9 on: October 06, 2015, 02:26:03 pm »
That's not 5V in but 100mV.  Typo in the schematic. So 100mV at the output of U2 (voltage follower) is correct. The problem is after U2. Nice circuit to analyse... for those not half way to bed.
 

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Re: Sawtooth Wave Generator
« Reply #10 on: October 06, 2015, 03:40:21 pm »
Power supply used is 15V for the opamps
ARJUN SUKUMAR
 

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Re: Sawtooth Wave Generator
« Reply #11 on: October 06, 2015, 03:42:41 pm »
I have one more doubt, can I connect a capacitor as a load to Howland current source?
ARJUN SUKUMAR
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: Sawtooth Wave Generator
« Reply #12 on: October 06, 2015, 09:29:52 pm »
Your op-amp has to have both input and output voltage range down to zero volts (rail-to-rail inputs and outputs) for your current source to work, unless you have a positive and negative supply.

Your comparator op amp will just turn on the transistor enough to hold the input and output at 1V.  It won't oscillate.

To oscillate, you need something that switches between two states:  charge until 1V, then discharge until zero or some fixed delay time, then switch back to charging...

 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Sawtooth Wave Generator
« Reply #13 on: October 07, 2015, 02:30:41 am »
You need to apply positive feedback to the last stage (the comparator stage, though it's labeled as "opamp").

You also need a current limiting resistor into the transistor base, otherwise the opamp output is shorted when driving the transistor on (and causing reverse breakdown, if the op-amp has +/-15V supplies).

The easiest way to do this will be adding a second switch after the transistor (i.e., a NOT gate), swapping the comparator inputs, and adding a resistor from output to +in and a resistor from +in to V6.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Re: Sawtooth Wave Generator
« Reply #14 on: October 07, 2015, 03:39:51 am »
@rfeecs
which circuit will be useful in switching between 2 states?
ARJUN SUKUMAR
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: Sawtooth Wave Generator
« Reply #15 on: October 07, 2015, 04:22:26 am »
@rfeecs
which circuit will be useful in switching between 2 states?
Look up "Schmitt trigger relaxation oscillator"
Or "astable multivibrator"
For two examples of circuits that oscillate between two states
 

Offline Joule Thief

  • Regular Contributor
  • *
  • Posts: 249
  • Country: us
Re: Sawtooth Wave Generator
« Reply #16 on: October 07, 2015, 05:12:54 am »
Seems like your buffer/unity gain opamp U2 is not working as is should.  It got about 5 volts at the input and only 0.1 at the output.

5 volts at the + input of U2 must be incorrect. The R18 / R17 divider powered by a 5.6v zener would yield a 100 mv at the input to U2.
Perturb and observe.
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: Sawtooth Wave Generator
« Reply #17 on: October 07, 2015, 11:39:08 am »
My circuit will allow you to adj. sawtooth ontime, sawtooth offtime and thus also sets duty cycle.
The op-amp is a rail to rail input/output fast slewrate dual op-amp used both as a buffer and a comparator.
The RED LED should be biased for a forward voltage of approx 1.7 volts to allow the adjustment pot plus limit resistor to have a 1V drop at the shortest ontime ramp setting of 100uS.
The 555 timer limit resistor plus pot should have a resistance range to allow a delay range from 2uS to 2mS with a fixed value capacitor.
The transistors can be any high-beta general-purpose types such as 2N3904, 2N3906.

Operation:  The capacitor on the left is charged to Ton time by a constant current generator composed of the LED-PNP circuit until 1V is reached in the linear ramp sawtooth waveform.  At this point the second op-amp section used as a comparator triggers the D-flipflop. The flipflop is set which discharges the timing capacitor to 0 volts by turning on the NPN transistor, and also triggers the 555 timer which creates Toff time. At the end of Toff the 555 resets to 0V output and this pulse is inverted to reset the discharge cap. flipflop and a new ramp output begins its rise again. 
By setting both Ton and Toff, duty cycle is also set.
« Last Edit: October 07, 2015, 12:09:59 pm by Paul Price »
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #18 on: October 07, 2015, 04:12:09 pm »
@ArjunSukumar: Here is an excellent electronics tutorial dealing with exactly what you're trying to do:



(PS. To get the circuit you're after, you just need to add another of the second op-amp stage after the third to the circuit shown on the whiteboard. But I strongly encourage you to watch the whole tutorial; the guy is great at explaining stuff and you'll learn a lot. ;) )
« Last Edit: October 07, 2015, 04:27:32 pm by SteveLy »
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: Sawtooth Wave Generator
« Reply #19 on: October 07, 2015, 04:34:29 pm »
SteveLy:  The video you posted does not exactly address the original poster intention for creating a sawtooth ramp generator, rather this is an overview of circuits for triangle wave generation.
« Last Edit: October 07, 2015, 04:37:44 pm by Paul Price »
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #20 on: October 07, 2015, 04:47:41 pm »
Well, it discusses how to create a square wave, how to turn it into a triangle, and then how to generate a pulse wave. Then going from pulse to variable rising & falling ramp sawtooth requires the exact same integrator circuit as going from square to triangle. It's the same idea: integrate the square/pulse wave to get the triangle/sawtooth.
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: Sawtooth Wave Generator
« Reply #21 on: October 07, 2015, 04:52:11 pm »
But to say this is a solution to exactlywhat the original poster is interested in is misusing the word "exactly", which should be only used with extreme caution in science.

To compare a triangular wave generation with sawtooth generation is like comparing zebras to asses. You end up here with an half-ass explanation hoping to solve the original poster's request for help.
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #22 on: October 08, 2015, 07:10:57 am »
Ok you're right, you win. Closely related but not exactly the same.
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: Sawtooth Wave Generator
« Reply #23 on: October 08, 2015, 09:45:11 am »
It is not about for me to win, but for the original poster to resolve and find and answer for their request for help.

To llead someone away from their intention, even when done in the name of magic, is called misdirection.
 

Offline nbritton

  • Frequent Contributor
  • **
  • Posts: 443
  • Country: us
Re: Sawtooth Wave Generator
« Reply #24 on: October 09, 2015, 12:19:26 am »
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: Sawtooth Wave Generator
« Reply #25 on: October 09, 2015, 10:33:07 am »
This video also fails to resolve the requests of the original poster, since this simple circuit, ( just one of so many simple relaxation oscillator circuits that are easy to find on Youtube and the web,) does not generqte a linear ramp sawtooth but instead an exponential ramp, and fails to help the request of the original poster to control duty cycle.

Misdirection.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Sawtooth Wave Generator
« Reply #26 on: October 09, 2015, 12:55:01 pm »
You can save the cost of one component, and obtain a linear ramp to boot, if you replace the battery with a constant current power supply.

Hey, just because a battery or the wall outlet doesn't happen to be "constant current", doesn't mean it's not theoretically equally valid... :popcorn:

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ArjunSukumarTopic starter

  • Contributor
  • Posts: 10
  • Country: in
Re: Sawtooth Wave Generator
« Reply #27 on: October 10, 2015, 04:52:53 am »
how to design a howland intergrator circuit?
any text book reference for that?
ARJUN SUKUMAR
 

Offline SteveLy

  • Regular Contributor
  • *
  • Posts: 220
  • Country: au
Re: Sawtooth Wave Generator
« Reply #28 on: October 13, 2015, 05:22:14 pm »
how to design a howland intergrator circuit?
any text book reference for that?
Not sure about the "Howland" bit but op-amp integrators are described in most uni level electronics texts, e.g., Millman & Halkias; I've attached the relevant pages, see sec. 16-4 for the integrator. (You can find the full textbook at archive.org; it's public domain. Same goes for Horowitz & Hill's "Art of Electronics".)
« Last Edit: October 13, 2015, 05:25:10 pm by SteveLy »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf