+ Post New Thread
Results 21 to 36 of 36

4th November 2013, 18:44 #21
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
re: Triangular Wave Generator
[QUOTE=schmitt trigger;1294792]My two yen:
the flattening out of the top of the waveform looks to me like saturation...awfully close to 5 volts.
/QUOTE]
I suspected this as well, I will reduce the voltage down to half by using R4
   Updated   
Well, by introducing R4 to the circuit as originally drawn, cutting down ref voltage to half, the flat line is now gone (see attached image). Only the early effect still remains
With all components being the same as post #13.
R3/R4 = 470k/470k
   Updated   
Errr.....some how my post title is changed, and I cannot post a new respond without being seen as Updated

8th November 2013, 02:50 #22
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
Since I cannot solve that problem, I've come up with another circuit. This one is even simpler, symmetry can be adjusted via R5 (RSense); square wave can be seen at Q1's collector (much better than the previous version). The working principle is the same only the discharging method is changed
I'm going to test this one soon, hopefully it will work
I will learn not to trust LTSpice from now on :)

Advertisement

8th November 2013, 05:16 #23
Re: Triangular Wave Generator
Advice from an electronics veteran: One always learns more from a non_functional circuit than one that works.
What you should learn here, to use baseball terminology, is that computer simulations will only get you to first or perhaps second base. To get to third, one must build a breadboard circuit, and to get to home and score a run an actual, fully functional pcboard is required.

8th November 2013, 09:00 #24
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 45,437
 Helped
 13824 / 13824
 Points
 260,190
 Level
 100
Re: Triangular Wave Generator
I will learn not to trust LTSpice from now on :)
The problems grow, if the circuit operation depends on exact component parameters. Your previous circuit has been e.g. very sensitive to transistor current gain, an unexpected high gain caused saturation. Running a simulation with parameter variations could reveal the design flaws in this case, much better than a breadboard setup.
Not to trust any simulation is a good advice, though.Last edited by FvM; 8th November 2013 at 09:05.

8th November 2013, 20:25 #25
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
Well, I figure I should at least try to understand whats happening with my first circuit. Up on close inspection of the bottom waveform in simulator (setting R3/R4 to 470k/470k), and by probing the base of Q7, the time period when Q7's turns on and off is totally coincidental with when the nonlinearity begins and end!? Although in simulation, this time period is short. Could it have something to do with Q7 using some current from Q3's collector, thus effecting its mirror Q4? I removed Q7's base from Q3's collector and give it it's own ref voltage using another voltage divider network, to my disappointment, the result waveform is the same. So what is happening here? Replacing R3/R4 back to 1Meg/1Meg seems to damped this effect down a lot but it is still there. I'm suspecting that in real world this is magnified much more, thus giving that result that i posted before.

Advertisement

15th November 2013, 10:25 #26
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
First off all, I have good news! A member from another forum decided to test out my circuit in real world, and post his results. It was just as the sim predicted, waveform was almost exactly as shown in LTSpice. Apparently I have problems with my real world circuit! I dont know if it is against the rule here, otherwise, I would post his result here.
Well, I still havent rebuild my first circuit yet, as I have not the time to do so. Right now, I'm only trying to find a way to produce true linearity for my fist circuit. I like discrete stuffs, I am learning so much more about transistors this way.
Anyway here is what I came up with: Version 4
1. No more current mirrors!
2. Sharp square wave to trigger current source.
3. Added current sense transistor Q8 to monitor and correct Q5's base current
4. Added schottky diode across Q6's base and collector to prevent it from saturating (This solved the problem of nonlinear discharging)
I think I've nailed it! Although at higher frequency, changing cap to 1nF, distortion begins to show, might have to shove a little more current into it.
Anyway, thats it for now. Thanks to all who have been following this thread, and those who have been responding, helping and thus providing me encouragement to further explore.
As always, please provide feedback!
PS: Thanks to you both, 'schmitt trigger' and FvM, your words has encouraged me to further explore and understand/troubleshooting my little circuit.

15th November 2013, 14:24 #27
 Join Date
 Apr 2011
 Location
 Minneapolis, Minnesota, USA
 Posts
 12,938
 Helped
 2578 / 2578
 Points
 52,882
 Level
 56
Re: Triangular Wave Generator
Here's a website by a fellow who also likes to construct circuits from discrete components.
You can view some articles for free (public, PA, PM).
For other articles he asks you to pay a subscription fee (ML, MO). One of them might show a triangle wave generator.
http://www.4qdtec.com/#osc

Advertisement

18th November 2013, 11:56 #28
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
I finally assembled my version 4 together on a breadboard, using same transistors from version 1, other components value are exactly the same as on the schematic, only exception is R4, it is now changed to 220k and since I didnt have a BAT54 handy, it was omitted.
Worked on the first try!
Here is the result:
Edit: C1 = 1nFLast edited by iimagine; 18th November 2013 at 14:00.

20th November 2013, 04:52 #29
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
Nonlinearity still exists when discharging C1 via Q6 base. If I substitute R3/R4 with a constant current source, this will limits Q6 Ic at a constant rate, thus its Ib will remain at a constant rate, this would work nicely at lower freq, but I cant seem to get rid of the current spike (red). While I understand that, this is due to voltage not develop fast enough at Q5's base when Q6 turns off, the reason for this is still unclear to me , increasing current source helps, but will slow down the discharging rate.
Anyone have any suggestion?
Is there a trick to keep Q6's Ic constant without the use of a current source?
Blue line  Q6's base
Red line  current in and out of C1

21st November 2013, 18:39 #30
 Join Date
 Apr 2011
 Location
 Minneapolis, Minnesota, USA
 Posts
 12,938
 Helped
 2578 / 2578
 Points
 52,882
 Level
 56
Re: Triangular Wave Generator
Simulating one of your earlier schematics, I notice two transistors play a role in discharging the capacitor, one in sequence after the other.
The second transistor turns on only for a brief time, at the final moment when the downward slope ends. The slope remains linear because its current flow is unchanged as compared to the preceding transistor.
From what I can see, that changeover from one transistor to the other is important for creating hysteresis action.
Could your latest schematic have a similar action, but at a greater current flow, causing the nonlinearity which you report?

21st November 2013, 20:07 #31
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
I have solved the problem of nonlinearity (post #29), if you look at the output pic that i posted earlier, red line is the current being charged and discharged out of the cap. Earlier versions did not have constant current source biasing Q6. The problem was because of Q5's VBE is constantly changing, its Ic also increasing exponentially, causing a slight nonlinearity, if you use falstad sim, it is not noticeable. In my latest version, no matter how much current, faster or slower, being fed into Q6 via CCS, the slope will always be linear, although symmetry will change, but it could be adjusted via Rsense
I have been suspecting that the change over between the 2 discharging transistors might have something to do with why voltage isnt develop fast enough at Q5 base when Q6 turns off, but I could not find any evidence to evict them :)
Anyway, I think that current spike is caused by what is known as 'early effect' although I'm not so sure. Right now the only way I could minimize this is to increase CCS into Q5
I'm trying to make this circuit more efficient by reducing unnecessary wasted current as much as possible. Parts count does not matter to me, as long as it is efficient and do its job for my discrete class D headphone amp. :)

Advertisement

22nd November 2013, 13:49 #32
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
Here is my latest work, version 6.
50% reduction in power consumption!
This is an overall improvement over all previous version, I think i'm going to stick with this new method of discharging, and charging the cap. In this version, CCS (constant current source) are all being used as reference currents to be amplified at the charge and discharge states, therefore, power consumption being used by these are only a few µA. There are still distortions to be corrected but I'm quite happy with it now.
Please help me finish this, I'm getting a little bored doing it by myself

23rd November 2013, 05:02 #33
 Join Date
 Jun 2013
 Location
 Coimbatore, India
 Posts
 1,375
 Helped
 258 / 258
 Points
 7,632
 Level
 20
Re: Triangular Wave Generator
Hi imagine nice effort but the number of transistors are going higher and higher, I cant imagine the working of the circuit with this much of transistors How did you designed it?..

23rd November 2013, 10:39 #34
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
Hi Venkadesh,
I have reduced the number of transistors down to 10, I know it is still a large number but accuracy and efficiency demands it! :( I'm still constantly trying different method to see if i can further improve, reducing part counts ect... :)
As for how I design it, I'm basing everything from my first circuit idea, I try to solve its problems and when I cant seem to do it, I find alternative ways of approaching, facing them. I use both falstad sim (a great little java app) and LTSpice to simulate results. Although falstad sim is some what limited and simple, it helps me visually analyzing and developing a simple circuit first and then the use of LTSpice

23rd November 2013, 13:36 #35
 Join Date
 Jun 2013
 Location
 Coimbatore, India
 Posts
 1,375
 Helped
 258 / 258
 Points
 7,632
 Level
 20
Re: Triangular Wave Generator
That mean you are trialing circuits using simulator? The best option is going block by block, you can do all of them with simple blocks of square wave generator and integrator..
It will reduce your time consumption...

23rd November 2013, 13:54 #36
 Join Date
 Oct 2013
 Posts
 85
 Helped
 10 / 10
 Points
 1,422
 Level
 8
Re: Triangular Wave Generator
You missed my point...
The whole purpose of doing this is to find an alternative way of generating a triangle wave, with as much efficiency as possible, I would have just use high speed opamp/comparator otherwise. There is no purpose to redo the square wave/integrator using discrete components as that method can not be further optimized.
I want to save battery power :) go GREEN!
+ Post New Thread
Please login