#105
Вставка
- Опубліковано 14 сер 2013
- A comment posted on my previous video on the adjustable sawtooth/triangle waveform generator circuit, asked how to generate a sawtooth waveform with just NPN and PNP transistors. There are a lot of ways to do this, and this video shows a very simple example. It uses a current source to charge capacitor to create the ramp, and then pair of transistors hooked up in a regenerative fashion (positive feedback) is used to quickly reset the capacitor voltage.
- Наука та технологія
Thank you so much for not only telling what it does but also why it works. So few videos explains how the circuit works. Very helpful.
Alan, you pointed me to a direction that it was so fundamental that I realised I had difficulty in understanding the difference between sourcing and sinking. After reading a few articles on the web I think I understand now why you used pnp for sourcing and not npn.
I thank you for sharing your wealth of knowledge with us, god bless you.
Thank you for asking that question (why pnp instead of npn) ... it was a very good question. And no, I do not understand currently (pun intended) even what sourcing and sinking is. 😂
Your videos are very helpful! Even though I had electronics training many many years ago, your videos still help me out.
Please keep them coming. I really enjoy them. Thank You!
Some of the best tutorials I have ever seen. Thanks for sharing knowledge.
As already commented, thank you for this simple circuit and the great detailed explanation of how it works. The waveform also is very impressive.
I was looking for a way to generate a saw-tooth wave for a crude PWM generator. Your video goes in depth of how it works and provides a clear explanation!
Thank you!
Thank you once again for your comprehensive explanation of circuit and component function.
Thank you for the circuit and the detailed explanation. It is great to know how the circuit works.
Awesome circuit just found it yesterday on Google :) nice to see it in action Thanks for sharing!!!
0:02, lol, thank God, my bench looks just like this. I always figured the pros would be all neat and tidy.
So simple and elegant. And yet I never would have thought of it.
Awesome tutorial. Just made this for a project I was working on. Thanks dude.
Thank you, Alan. This is one of the best explanations I have ever seen. Just tried it out on the breadboard. :)
Glad you liked it. You'll probably enjoy my other circuit tutorial videos too.
Thanks For More Circuit Fun,,, These Circuits are Getting More Interesting,,Keep Up The Good Work!!! The Amazing Things You Can Do With Transistors!!!
man I love these vids. I have watched this over and over. Very helpful. Thank you.
A clear and intuitive explanation of how SCR's work. I don't know whether it is correct scientifically but it works for me as it helps me understand how they work. I was always baffled by these devices and never took the time to properly understand them. Thankfully, I no longer need to. :)
You should be proud Alan. You have 1200 likes to 2 dislikes. That's a 600:1 ratio. Highest I've ever seen on YT.
Thanks! I have a few that have even better ratios, like this one:
ua-cam.com/video/SBqLOrlA7QI/v-deo.html
or even a few with no dislikes.
That's very good going indeed. It's definitely your style and personality that results in these figures. I really like the hand drawn circuits on maths paper. Just like I like to do it.
Agreed but I cant imagine why there are any dislikes. Takes all sorts but at least they are few and far between :)
How can somebody dislike yhis video I do not understand. Would be nice to more of these kind (smart)ANALOG circuits videos being explained.
wow! This is really neat. I'm definitely going to have to try building this myself.
Wonderful video. I made use of the back-to-back pnp-npn transistors you showed in the video to sharpen up falling edges of current pulses (variable width) generated with a pair of MOSFET transistors and a capacitor. Basically, using a MOSFET transistor, I was controlling discharge from the capacitor after having been charged with constant-width voltage pulses of variable voltage so that a linear ramp down occurred after each pulse which was used as a timing mechanism. The ramp down profiles, however have different heights depending on the input pulse height. In turn, the ramping-down voltage was fed into the gate terminal of another MOSFET which controlled (switched on/off) the drain-source current. While the shut-off timing was controllable with this scheme, not surprisingly, the falling edges were rounded in nature (sigmoidal shape). When I inserted the pnp-npn pair in the circuit with a reference voltage at the emitter of the pnp transistor and the ramping-down voltage fed to the base of the pnp transistor, boom! the shut-off sharpend up, I have perfectly controllable pulse width with vertical falling edge. Thank you, great stuff.
Messing with this was really fun. I actually bought a variable cap kit so I could fiddle. I had not seen the parallel to pots.
i built this virtually using iCircuit and had to put 3 separate voltage sources of 9v in order to see the sawtooth wave pattern. Makes a lot of sense Alan. Please keep up the awesome work and explanations which make sense..
I also used iCircuit to model this circuit. I have to keep remembering to set the bandwidth high enough in order to get the circuit to run correctly even in the audio range. iCircuit always defaults to 256Hz bandwidth.
I built it using EveryCircuit, but it did not work very well. Not sure why... trying to make it work.
Absolutely brilliant! Love your videos, and your style. I built it and it worked just fine after I installed a poly capacitor. I am not sure if the leads were too thin on the ceramics or what...
Great circuit description. Wonderful.
Really interesting, and very well explained! Thank you :)
Dude you explain things well!
Yes Alan you are correct I didn't think deep about the current souce. yes we have a ~30 uA current source that sets the timing. thanks any way great circuit and great videos.
Thanks for that, I am trying to learn how to use LT Spice better but have trouble finding what I need. I will see how this works tomorrow, I have LTSpice on a different computer than this one. I'll also be sure to put some 2N3906 in my next order so I can get the real deal going.
Also thanks for all the effort you put into the community here at UA-cam, forums, and podcasts. I benefit quite a bit from your content. Made me real interested in getting started with amateur radio and analog.
I am loving these tutorial vid's. Thank you, keep them coming , much more useful than trying to read text books about this stuff....now, where's my breadboard....
This project is very good!
I like these types of videos. Thumbs up!
This Circuit is Simple. Cheap in Cost And Useful,,,,Thanks Alan!!!! This Circuit Demonstrates Sawtooth Generation Found in Analog Scopes To Have The Beam Go Across The Screen!!!
I'm glad your desk looks like mine 😄
thanks for pointing this out. i had this problem too. There is a checkbox "skip the initial transient point calculation" in simulation settings dialog window. Once that's clicked it just works perfectly. Thank you.
great explanation
An audio sound effects box is always fun, and you can expand on it over time. My immediate thought would be something similar to a C-64 SID chip - several wave generators (sine, square, triangle, sawtooth) and a white noise generator, each with ASDR and frequency adjustments. I had a ball as a kid just making weird space noises with my C-64.
A nice clear video, thank you.
Simulating a 2n3904 or a 2n5089 instead of a 2222 seems to show some sort of latchup in LTSpice, though the circuit works fine. The fix seems to be increasing the NPN collector current. Anything around 8k or lower for the bias resistors seemed to work.
Fantastic. Many thanks for sharing.
thanks man, really helpful 👍
Yay! Got it to work. 30k resistor from power to pnp emitter. Never give up.
Well, that's my drone synth oscillator sorted. Thank you!
We'll explained, thank you !
The structure on the right, made up of the two npn transistors, is known as a programmable unijunction transistor or PUT. it is the compliment of an SCR wherein the base of the upper transistor is pined out instead of the base of the lower transistor as in the case of the SCR. Put another way, in an SCR the "top" P region and the lower P and N regions are pinned out of the chip. In a PUT it is the "top" P and N regions and the lower N region that are pinned out. Turn on voltage is programmed by fixing the base voltage of the upper transistor. Once on it will conduct until the current drops below a critical level and the PUT resets to the off condition. I also like the way you use a transistor as a constant current source to charge up the capacitor and thus get a true linear ramp. Excellent video.
Bogy Wan Kenobi I think you are confusing a PUT relaxation oscillator that is used to trigger SCRs, or thyristors, with the action show above. The PUT is closer to a FET than a BJT. Also the transistors at the right are not both NPNs. One is a PNP, and the other is a NPN. They are connected, as the author describes, for the same action as an SCR (PNPN) and function as a latch. I agree that a PUT could be used to produce simular results, but the point is the components at the right create an SCR rather than a PUT.
@@NCmountainview I disagree with this. That circuit is *exactly* a PUT. And can also be used like an SCR, or an SCS (SCR + anode gate). I rather like that cross-coupled complementary pair, it's extremely versatile.
I second your opinion Sir@@Roy_Tellason
GOOD STUFF, this whole playlist; Big Thanks es 73, Alan AC0AC
Works a treat! Mine sings around 700Hz and is just shy of 5V.
Brillant. Thank you
Hi Alan,
I realy enjoy your circuit Tutorials videos, they are awesome! I like the way, you build them up from general components, the simple and beautiful logic, and the way you explain all the things. Please keep on making this kind of videos! I have also a idea, lets say for comeback in this field ;). It would be very useful for a workbench: a simple transistor driven (because I like transistor that much) 0 - 5V regulator supply that can handle maximum of 100 mA current. In many cases it's only required to have a small signal with precise voltage. Please consider making a tutorial about it.
Best regards
Sounds like a fun little project - I'll add it to my long list...
you can buy 5 volt 100mA regulators or find them in broken electronics their pretty common.
WOW THAT IS SO COOL!!!!
Beautiful.
Thanks for this.
I have a question, Alan. You have showed us so many great circuits. Do you actually think of these yourself? Just building block circuits you've learned over the years? Or do you look them up and then figure out how they work?
I like it, I might just use it :)
Really cool
Dude. You're awesome.
I second THAT !!
Awesome Video,,,Thanks Alan!!! Circuit Fun #2,,You Should Publish A Soft Cover Book Of These designs Would Be Interesting,,Once Again Thanks and Keep Up The Good Work!!!
Which transistors did you use? Could I change the frequency by changing the cap value right? Thanks for the great video
Nice video, good explanation!
At first glance, I assume that the circuit works only for very narrow input voltage range (5V...8V).
That 2-transistor configuration is known as Programmable Unijunction Transistor (PUT) rather than SCR. Using the 2-transistor model as a reference, for SCR, its gate is connected to the base of the NPN transistor, whereas for PUT, its gate is connected to the base of the PNP transistor. To which side of the bases the gate is connected to differentiate them. In fact, their electronic symbols have their gate terminals connected to the opposite sides to one another.
Really clever circuits Sir, thank you for sharing. One small suggestion, if you could at some point in the video show the entire schematic so that anyone wanting get a screen capture could easily do so.
At 00:34, you've got a full screen shot of the 3-transistor circuit. If you want more details on the more complex one shown at the beginning of the video, then go to this video:
ua-cam.com/video/ibnz5UjQ4u0/v-deo.html
and all of the notes shown in that video can be downloaded here:
www.qsl.net/w/w2aew//youtube/Adjustable_Sawtooth_Generator.pdf
Thank you for the education I've been looking to understand for many years. Your presentations, demonstrations & explanations on your channel are hands down "the best". As a person who has worked in the television industry, I can see all the preparations, effort & polish you put into your videos. I would say you are the "Forrest Mims" of the Internet. Anyway, my question is, how necessary is the 1K resistor in the circuit? From what I can deduce, wouldn't the first transistor conduct the same whether it's there or not? I can see how it makes a voltage divider for approx 8.2V at the base ( for ~0.82V potential between the Emitter & Base), but I'm not sure why that is needed. Thank you in advance for helping me to understand this.
If the 1k resistor wasn't there, the base voltage would be much closer to ground which would have two consequences:
1) The emitter and collector current would be much higher, which could be compensated for by increasing the 10K emitter resistor,
2) The transistor would saturate more quickly as the timing capacitor charged up, because the base-collector junction will become forward biased at a much lower voltage because the base is at a lower voltage. This is the main problem. It is likely that the transistor would saturate before the SCR-connected transistors have enough voltage across them to turn on. So, the circuit wouldn't oscillate.
A PNP transistor requires a 'negative' bias on the base to turn on. This 1K resistor provides the 8.2 volts from the divider. ( 8.2 volts is more negative than the 9V on the emitter) This is what turns on the "current" source.
Thanks a lot for this circuit idea :)! I just used it in my Flyback design to replace a sawtooth generator with 2 opamps that would have cost much more
Just keep in mind that this circuit hasn't been tested over temperature, supply variations or for long-term reliability or consistency with device variations...
Yep, I am fully aware of that :)!
the cross coupled transistors and the resistor divided function somewhat like a UJT - uni junction
Hello sir. I do really appreciate your work for spreading knowledge. If you let me i would wish to request some mosfet basics vidoes. It just sits very well in the brain the way how you explain
Have you watched these:
ua-cam.com/video/oambDFa0Pr8/v-deo.htmlsi=lvxwrPl0AIK54YnQ
ua-cam.com/video/gloikp9t2dA/v-deo.htmlsi=MIk8zr1ePoTCWr0z
Thanks, cool vid. Am I right in thinking you could replace the 10k resistor connected to the first PNPs emitter with a pot to control the rate of charge of the cap, thereby controlling the frequency of the oscillator?
Good tutorial! I wonder what would happen if I add a resistor to the output of the capictor, would it discharge gradually instead of an instant discharge?
You can use UJT (uni junction transistor) to substitute both discharging transistors.
Cheers from Indonesia
An example of UJT is BRY39
op-amps types and uses to interface with mc's please. Great videos, many thanks.
it works, but may not last long. Peak base current through the output stage is pretty high.
Nice
Nice circuit.
I guess, if we add another NPN Transistor such that the emitter is grounded and the base share the the base node of the other NPN transistor and its collector is connected to the top of the capacitor, then you can discharge the capacitor all the way to ground.
Sir, thank you very much for all your time and effort! I would like to ask you for a big favor. Just for educational purpose, I am trying to build Current-Mode buck converter, using discrete components. I "somewhat" understand the working principle of slope compensation circuit ( saw-tooth ramp ) but I don't know how to build it with basic components. Of course, I found a lot of information online, but it is just theory and formulas on paper, which are important but lack this practical implementation. I do not want to use any dedicated IC for that purpose, because I still would not understand its operation. Is it possible to make a video tutorial in the near future? I appreciate your help in advance!
I liked that video !! GLX/73
Might have mentioned the nice linearity comes from only charging the cap a bit, probably less than half, right? You might also mention frequency calculations--essentially time domain calculation for half charge.
I love these videos! I have a general question, I am designing a midi controlled analogue synth and am currently writing a report towards it. I need to write some technical design specifications before considering the design and give reason to why I chose them, such as waveform output voltage, current in etc. Could you give me some examples of what can be aimed towards at this point and how we would support these specs ? thank you, keep it the great videos :)
A programmable unijunction transistor (PUT) formed from two complimentary transistors...
Do you need the 1st transistor on the left? It seems to work fine with just an RC circuit. And also thanks for explaining how the circuit works, especially the SCR like transistor pair.
It will work with a resistor, it just won't have a linear ramp - it will have a slight curve on the ramp.
this is an interesting circuit. A few years ago i built it after seeing this video and it worked fine. Now I watch this video again I wonder why it doesn’t start oscillating at the time the voltage at the base of the PNP (in the BJT pair) is zero. At that moment it could also be some kind of stable situation. Voltage at the capacitor is still a diode drop above zero, which would trigger the circuit again. What prevents the circuit from staying in, or around that state? It must be something like what voltage is ramping up more quickly, but I can’t get it completely clear in my head on this.
It isn’t a perfectly reliable circuit and can sometimes reach a stable point and not oscillate. Device and breadboard parasitic usually keep it going.
I had not seen this circuit before, thank you for sharing. Still, I do not quite understand how the two transistors behaving like an SCR return to the OFF state. I assume that a design criterion for the magnitude of the current coming from the constant current source should be below the holding current of the transistor pair. Otherwise, even after the discharge of the capacitor, the constant current would have kept the transistor pair on the ON state.
0:38 at right, Home made UJT transistor :D
Thanks for the great video as always! Will try this one for sure. Sorry if this is really basic, but why do you need a transistor for the current source? Why not just connect the resistor and capacitor directly if you have the transistor fixed biased anyway?
Using just a resistor to charge the capacitor will result in the ramp part of the waveform to have a little curvature to it instead of being nearly linear.
I am binge watching your videos from the hospital. I love them all !
I bought 2 used HP power supplies exactly like yours (6214A). One of them goes to 8.5V Only! I opened it up and peeked and poked with a DMM and couldn't find anything wrong, except when I compared it to the good one, I noticed that the bad one had some work done on it as there are signs of rework. I think the problem is with a 1.2V Zener but I am not sure how the whole thing operates.
Is there a way you could do a video on this power supply and go through the schematic, showing what each part does and why?
It will also show your viewers how a commercial linear power supply of this class is designed and constructed.
Just a request from a fan.
I can add that to my list of topics.
Great, thanks.
I second that. It would be very informative. :D
I'm very impressed by your excelent explanation of every single detail of what's going on, that helps to understand the dynamics in the circuit.
My question is: I am trying this in proteus. It works but I haven't been able to generate frecuencies higher than 100Hz. When I decrease the capacitor capacitance too much (say 1nF), it wont oscilate at all even after rising the emiter's resistance to 500K. Sorry if I am missing the obvious here but I'm an absolute beginer.
Is it possible to generate a frecuency of about 20KHz-50KHz with this circuit? I'm trying do build a PWM using only transistors, do you thing it would work ?
Thank you so much for your help.
This simple circuit is a very imperfect oscillator. Operation depends on transistor parameters that are not well controlled, so I wouldn't plan on making anything serious with it. It will certainly not be adjustable to do PWM operation.
Thank you very much. I was suspecting the problem increasing the frecuency were related to the 2nd and 3rd transistors properties.
If you were charging the capacitor through a resistor, that would APPROXIMATE a constant current if the peak capacitor voltage is small in comparison to the voltage source and therfore the voltage across the resistor is relatively constant, so I think that's probably what you're getting at. As it is, a CCS is used and that's where the linearity comes from as explained by the author.
Charging a capacitor thru a resistor gives you an "exponential" waveform - not linear.
@@technobubba4 that is true, and also not what I'm saying.
Hi,
Can this setup achieve about 10kHz or so? I am thinking of using this along with a comparator to generate a PWM signal. Do you have any suggestions?
Regards
Thanks for another great video. I have a question to ask that is not on this topic. Do you have another address that I should write to for that?
Bob
Great lectures from your channel. Thanks a lot for all. Any e-mail to "talk" to you off the channel?
How about a 2 transistor oscillator driving a charge pump to create an isolated voltage (>8V) to switch a MOSFET N channel gate?
Hi Alan! I really enjoy all your videos. It’s the only way I’ve been able to learn electronics.
What would change if I wanted to make my rising edge steep and falling edge gradual? I think I could build the complement of this circuit… swapping VCC with GND and PNP with NPN. Does that sound right?
...or you could follow this with a simple inverting buffer/amplifier.
I was able to build this but it took some debugging to figure out that I needed to make my current source not so strong ultimately, or else the PNP-NPN pair actually stays on and doesn't get starved of current lol (so no waveform comes about at all). I had tried the 30uA at first but now at like 10-20uA for me it is working, using 3904 and 3906 transistors. Very cool, but I wonder how to calculate perhaps the maximum current that is low enough to starve the positive feedback pair... I also wonder how resilient that max current would be to changes in hfe/beta of the feedback pair?
Very cool still overall xD
Thank you for your comment. I have the same problem using bc327s and bc337. Thanks to your comment I found the issue faster. Increasing the emitter resistance on the first pnp solved my problems.
@@TheShowdown16 naisu!
Would you have any advice for simulating? I've tried both building and simulating (using OrCAD PSPICE) and no luck either way yet. I'll try tweaking that resistor value some more in the built circuit...
The other question I have is related to how to eliminate the DC component of the sawtooth signal. Because it is not a sinewave signal, I do not think we can just use a capacitor without compromising the sawtooth waveform. What would be your recommendation?
Thanks again!
beautiful! Is there a way to modulate it's "base frequency" (which I guess will depend on the capacitor size)? I'd like to modulate it with noise around it's "base freq". I planned to use a negistor, but your oscillator is very elegant
Varying the capacitor size will adjust the frequency. Varying the current sources will individually adjust the rising and falling speeds.
@@w2aew When asking about dynamically change frequency, I was talking about the second circuit, the one with just 3 transistors. For instance, would applying a varying voltage to the base of 1st transistor (instead of the 1k,10k divider) modulate the frequency of the saw?
@@fer_fdi Oh, sorry. You can vary the 10k resistor connected between the 9V supply and the emitter of the PNP transistor. This will vary the charging current to the capacitor, thus changing the frequency. Or, you can inject your "noise" signal into the base of that PNP transistor.
@@w2aew Great, thanks a lot! : )
Hi, thanks for the video and for giving me the inclination to play around with electronics again. I've just tried implementing this with some 2N3904/2N3906s but have been running into an issue where the capacitor never seems to charge up (or it does and then gets immediately discharged to ~0.65V) and the "latch" seems to never stop sinking current (causing the PNP to get slightly warm). Everything in that part of the circuit seems to either be around ground or one VBE drop. Any ideas why it isn't switching properly?
Sounds like something is wired wrong, or wrong component values. Nothing should be able to draw much more than 10mA, and that would assume that the 1k resistor is shorted across the 9V supply. Otherwise, everything should be around 1mA or less, which means nothing dissipates enough power to get warm (even if you have 9V across a device with 10mA through it - that's only 90mW which shouldn't be warm to the touch). Be sure to double-check the transistor pinouts - they can vary!
Any one can help me , Do I have to use specific PNP and NPN transistors to get the circuit working? I have a punch of general purpose transistors I do not know which can I use ?
Can you please do a video about mosfets?
Thanks in advance
Hey I built one with a 2n2646 Unijunction Transistor and 1815 transistor and it's not functioning.
Superb! Nice simple design, and looks like it would be easy to modify so as to generate a symmetrical triangle wave (by discharging the cap. through a current sink).
BTW, is there a name for the transistor pair structure that does the switching?
To answer my own question, I guess that you'd call it a discrete SCR or something. I must admit, I had no idea that this would work, given that the base/collector regions are not physically contiguous. I'll have to build the circuit and see what happens.
Sometimes referred to a "hook" configuration ( back in my 'old' days).
I like video of this style because they bring you right into the action to where he is. However, you always get a lot of camera shake with this type of production. I think maybe if you had a goose neck on a mic stand, where you could move the camera around while you were talking and then leave it fixed in that one position while you talk, so it will be perfectly still for those moments, and then you move it to the next shot, and so on. Just a thought. Everyone has the same problem with this.
How would you change the period of the waveform?
Or change the value of the capacitor. A larger capacitance will take longer to "fill" with the same current source
Observe the oscillator from a different reference frame.
+p39483 Best comment ever
Very nice! I built this on a breadboard using 2n3904 and 2n3906 transistors. It definitely does work and definitely oscillates. But it will not work below about 7.5 volts, which I cannot understand. The way it is designed, I would have expected it to make a sawtooth with an amplitude about 1 diode drop less than 1/2 the rail voltage (so for 9v, about 4.5 - .7 or about 3.8v, which is just what it does). So at 6v, I would expect it to peak at 2.3v, but it won't charge up the cap below about 7.5. If you have any insights into this, please comment. There's hardly any current drain in this circuit, so it should be easy to turn on that one pnp and charge the cap. It acts as though the trigger pair never really shuts off, so the cap can't charge.
mmagliaro If the cap can't be charged, the PNP transistor (2N3906) BE is not conducting. The 2N3906 datasheet says VBE needs minimum 0.65V in order to conduct. With the PS voltage of 7.5V, VBE is less than 7.5*(1K)/(1K+10K)=0.68V. That's why 7.5V is the margin. You can try to increase 1K Ohm to a higher value or reduce 10K Ohm to a lower value.