Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[MOVED] Triangular Wave Generator

Status
Not open for further replies.

iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
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
 

Attachments

Last edited:

Venkadesh_M

Advanced Member level 4
Joined
Jun 26, 2013
Messages
1,375
Helped
258
Reputation
516
Reaction score
254
Trophy points
83
Location
Coimbatore, India
Activity points
6,738
re: Triangular Wave Generator

Hi where is the output is this circuit correct??



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

Attachments


iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
re: Triangular Wave Generator

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:

iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
re: Triangular Wave Generator

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
 

Venkadesh_M

Advanced Member level 4
Joined
Jun 26, 2013
Messages
1,375
Helped
258
Reputation
516
Reaction score
254
Trophy points
83
Location
Coimbatore, India
Activity points
6,738
re: Triangular Wave Generator

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

iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
re: Triangular Wave Generator

Will do :)
 

schmitt trigger

Advanced Member level 5
Joined
Apr 17, 2013
Messages
2,653
Helped
844
Reputation
1,692
Reaction score
819
Trophy points
1,393
Activity points
17,795
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!
:idea:
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!:smile:
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.
 

iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
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!
:idea:
...
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
 

schmitt trigger

Advanced Member level 5
Joined
Apr 17, 2013
Messages
2,653
Helped
844
Reputation
1,692
Reaction score
819
Trophy points
1,393
Activity points
17,795
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
 

iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
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
 

Attachments


iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
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
 

Attachments


godfreyl

Advanced Member level 5
Joined
Apr 18, 2012
Messages
1,981
Helped
632
Reputation
1,266
Reaction score
624
Trophy points
1,393
Activity points
12,776
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!
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,993
Helped
13,940
Reputation
28,128
Reaction score
12,577
Trophy points
1,393
Location
Bochum, Germany
Activity points
274,002
re: Triangular Wave Generator

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

iimagine

Member level 5
Joined
Oct 23, 2013
Messages
85
Helped
10
Reputation
20
Reaction score
10
Trophy points
8
Activity points
511
re: Triangular Wave Generator

What do you mean by "Matched hfe to ~7"
The two transistors are different in hfe of around 7, give or take
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,993
Helped
13,940
Reputation
28,128
Reaction score
12,577
Trophy points
1,393
Location
Bochum, Germany
Activity points
274,002
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.
 

godfreyl

Advanced Member level 5
Joined
Apr 18, 2012
Messages
1,981
Helped
632
Reputation
1,266
Reaction score
624
Trophy points
1,393
Activity points
12,776
re: Triangular Wave Generator

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.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,993
Helped
13,940
Reputation
28,128
Reaction score
12,577
Trophy points
1,393
Location
Bochum, Germany
Activity points
274,002
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.
 

schmitt trigger

Advanced Member level 5
Joined
Apr 17, 2013
Messages
2,653
Helped
844
Reputation
1,692
Reaction score
819
Trophy points
1,393
Activity points
17,795
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.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top