+ Post New Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 36
  1. #1
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    [MOVED] Triangular Wave Generator

    Google Triangle Wave Generator and almost all that you get are circuits that employ 2 comparator/opamp ect...
    Well I wanted an alternative, more efficient way of doing this, so I designed this circuit in LTSpice. It simulates well, giving a very nice, highly linear waveform. uses very little power! The only problem is that I dont have a lab (I only have a breadboard and a DMM). I'm asking for help on test this out and to prove that it works. Any comment or suggestion is much appreciated.

    I'm planning on using this for my Discrete Class D Amp

    Thanks in advance

    Edit: Included LTPsice .asc file in zip file
    Last edited by iimagine; 23rd October 2013 at 06:55.

  2. #2
    Advanced Member level 4
    Points: 7,632, Level: 20
    Achievements:
    7 years registered
    Venkadesh_M's Avatar
    Join Date
    Jun 2013
    Location
    Coimbatore, India
    Posts
    1,375
    Helped
    258 / 258
    Points
    7,632
    Level
    20

    re: Triangular Wave Generator

    Hi where is the output is this circuit correct??



    The problem is i didnt get the output.......

  3. #3
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Quote Originally Posted by Venkadesh_M View Post
    Hi where is the output is this circuit correct??

    The problem is i didnt get the output.......
    Hi!

    In my circuit:
    R1/R2 = 2.2k/220
    R3/R4 = 33k/33k
    C1 = 1nF

    Output taken at the cap C1
    Last edited by iimagine; 23rd October 2013 at 06:45.

  4. #4
    Advanced Member level 4
    Points: 7,632, Level: 20
    Achievements:
    7 years registered
    Venkadesh_M's Avatar
    Join Date
    Jun 2013
    Location
    Coimbatore, India
    Posts
    1,375
    Helped
    258 / 258
    Points
    7,632
    Level
    20

    re: Triangular Wave Generator

    Hi changed the values no change in output here is proteus file..

  5. #5
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Quote Originally Posted by Venkadesh_M View Post
    Hi changed the values no change in output here is proteus file..
    Can you use LTSpice? I dont have Proteus and not familiar with it. I dont know why you are not getting any output

    •   AltAdvertisement

        
       

  6. #6
    Advanced Member level 4
    Points: 7,632, Level: 20
    Achievements:
    7 years registered
    Venkadesh_M's Avatar
    Join Date
    Jun 2013
    Location
    Coimbatore, India
    Posts
    1,375
    Helped
    258 / 258
    Points
    7,632
    Level
    20

    re: Triangular Wave Generator

    i dont have LTspice but i have proteus, you already simulated with it so trying it in different simulator..

  7. #7
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Will do :)

  8. #8
    Super Moderator
    Points: 52,942, Level: 56

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,949
    Helped
    2580 / 2580
    Points
    52,942
    Level
    56

    re: Triangular Wave Generator

    In case another simulation is of interest...

    I get a triangle wave at 782 kHz.

    Screenshot:


    •   AltAdvertisement

        
       

  9. #9
    Advanced Member level 5
    Points: 14,971, Level: 29
    schmitt trigger's Avatar
    Join Date
    Apr 2013
    Posts
    2,488
    Helped
    805 / 805
    Points
    14,971
    Level
    29

    re: Triangular Wave Generator

    I applaud your decision in "going all the way" and designing a discrete-component amplifier. It is a good learning experience!

    But my first word of advice is that you'll definitively need more than a DMM to design and debug it. Beg, borrow or steal an oscilloscope and a function generator. Also, some power resistors, because if you plan on using a speaker for testing, your living companions will evict you from home before you are finished!
    A distortion analyzer and/or spectrum analyzer would be a real bonus.

    My circuit comments:

    To charge a 1 uf cap 1.1 volts at 650 Khz takes 715 mA, Only half of the period is spent charging it, the other half discharging it. Thus average current consumption is 358 mA. And that is only for the capacitor! The additional current consumed by biasing must also be taken into account. Whether this is low power or not depends on the application.

    Another issue I find for a real-world circuit is that both current mirror transistors require to be reasonably well matched at its operating levels. It can be done, of course, I'm only pointing it out.

    •   AltAdvertisement

        
       

  10. #10
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Quote Originally Posted by schmitt trigger View Post
    I applaud your decision in "going all the way" and designing a discrete-component amplifier. It is a good learning experience!

    ...
    Thank you for kind words of encouragement!

    I am a little confused as why you mention 1uF when I am using a 1nF cap though

  11. #11
    Advanced Member level 5
    Points: 14,971, Level: 29
    schmitt trigger's Avatar
    Join Date
    Apr 2013
    Posts
    2,488
    Helped
    805 / 805
    Points
    14,971
    Level
    29

    re: Triangular Wave Generator

    "I am a little confused as why you mention 1uF when I am using a 1nF cap though"

    It means that it is time for me to visit an optometrist

  12. #12
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Got rid of 1 current mirror, saving more power and less headache from bjt matching !
    Added an extra current source for more linearity

  13. #13
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Well, my hantek6022BE PC based oscilloscope arrived! I went right ahead to test the circuit, using:
    Q1/Q2 = MPSA93 Matched hfe to ~7
    Q3/Q4 = 2n3904 Matched hfe to ~7
    Q5/Q6 = MPSA42 Matched hfe to ~7
    Q7 = 2n3904
    R1/R2 = 100k/10k
    R3 = 470k
    No R4, I wanted top peak at ~5v
    C1 = 1nF

    It does oscillate! :D However the waveform is unexpected :confused: I will investigate this at a later time
    Any suggestion or comment is appreciated

    Edit: Using my first circuit

  14. #14
    Advanced Member level 5
    Points: 11,015, Level: 25

    Join Date
    Apr 2012
    Posts
    1,981
    Helped
    637 / 637
    Points
    11,015
    Level
    25

    re: Triangular Wave Generator

    Hi

    Let me first admit I don't understand how this circuit works, and don't have access to a simulator now to play with it. :(

    However, I suspect a big part of the problem may be non-linearity of the current mirror comprising Q1 and Q2. Q2 has the full output voltage swing on it's collector, and that causes it's vBE to fluctuate as well.

    One way to improve the mirror would be to add emitter degeneration resistors to Q1 and Q2. Another, possibly better approach would be to cascode Q2, to keep it's vCE fairly constant, and about the same as the vCE of Q1.

    Have you tried running it slower, e.g. with C1 = 1uF? If it works a whole lot better at 700Hz than 700KHz, that would indicate speed-related problems - maybe a transistor taking too long to come out of saturation.

    P.S. I'll echo schmitt trigger's sentiment - it's nice to see something really inovative like this!

  15. #15
    Super Moderator
    Points: 260,253, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,450
    Helped
    13829 / 13829
    Points
    260,253
    Level
    100

    re: Triangular Wave Generator

    What do you mean by "Matched hfe to ~7"

  16. #16
    Member level 5
    Points: 1,422, Level: 8

    Join Date
    Oct 2013
    Posts
    85
    Helped
    10 / 10
    Points
    1,422
    Level
    8

    re: Triangular Wave Generator

    Quote Originally Posted by FvM View Post
    What do you mean by "Matched hfe to ~7"
    The two transistors are different in hfe of around 7, give or take

  17. #17
    Super Moderator
    Points: 260,253, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,450
    Helped
    13829 / 13829
    Points
    260,253
    Level
    100

    re: Triangular Wave Generator

    It's unclear what causes the distortion. With MPSAxx transistor models you see only small deviation from ideal waveform.
    Although current mirors might be not well matched, this won't cause nonlinearity.

  18. #18
    Advanced Member level 5
    Points: 11,015, Level: 25

    Join Date
    Apr 2012
    Posts
    1,981
    Helped
    637 / 637
    Points
    11,015
    Level
    25

    re: Triangular Wave Generator

    Quote Originally Posted by FvM View Post
    Although current mirors might be not well matched, this won't cause nonlinearity.
    Let me try rephrasing my previous comment:
    While the output voltage is rising, we want it to rise at a constant rate. This means we need Q2's collector current to remain constant. However it will be constantly changing, due to Early effect and Q2's changing vCE.

    •   AltAdvertisement

        
       

  19. #19
    Super Moderator
    Points: 260,253, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,450
    Helped
    13829 / 13829
    Points
    260,253
    Level
    100

    re: Triangular Wave Generator

    Yes early effect respective transistor output impedance is one of the important sources of non-linearity.

    But transistor models with realistic parameters (including VAF) don't result in a similar waveform as shown in post #13.

  20. #20
    Advanced Member level 5
    Points: 14,971, Level: 29
    schmitt trigger's Avatar
    Join Date
    Apr 2013
    Posts
    2,488
    Helped
    805 / 805
    Points
    14,971
    Level
    29

    re: Triangular Wave Generator

    My two yen:
    the flattening out of the top of the waveform looks to me like saturation...awfully close to 5 volts.

    One suggestion.....if you have a variable power supply, can you increase the voltage, in 1 volt increments to 10 volts?....you may have a constrain to only use +5volts which I ignore, but now that you are troubleshooting the circuit, you may want to experiment a little.
    And troubleshooting is the fun and learning part of building a circuit. After the dust settles, you'll be a little wiser.

--[[ ]]--