Can someone explain how this simple oscillator works?

Started by Projectile, April 29, 2011, 06:31:34 AM

Previous topic - Next topic

Projectile

I'm trying to wrap my head around this simple oscillator circuit and keep getting stuck:
http://www.eleccircuit.com/wp-content/uploads/2009/08/simple-tone-oscillator-generator-by-2n2222.jpg

When I google "simple oscillator expalined" all of the information I find is related to much more complicated oscillators (mostly involving LC tanks or schmitt triggers). Oddly, those are a bit easier for me to understand, but this simple design leaves me scratching my head, and I can't find any info on it anywhere.

I see how cap charges up and turns on the npn transistor, but then I can't figure out how it gets turned back off again to repeat the process. It seems like the NPN transistor would just stay on. Can somebody help me figure out where I'm going wrong in my thinking? Thanks.

Projectile

Just did a spice simulation of it and that left me even more confused. It definitely oscillates, but I can't make much sense of the voltages I'm reading. I can post the data later if you guys are interested.


Gurner

A derivative of this...

http://www.covingtoninnovations.com/michael/blog/0502/index.html#garnosc

(note that's Garner not Gurner!)

A good rule of thumb.... if you use positive feedback, stuff oscillates! (think stage mic->speaker etc)

R.G.


1. Turn power on. Capacitor is discharged, 2222 is off, so 2907 is off.
2. Capacitor charges through resistors.
3. When it gets to the base threshold of the 2222, 2222 turns on.
4. This turns on the 2907.
5. This pulls the speaker up, also pulling up the bottom of the capacitor.
6. This pushes the capacitor charge into the base of 2222 - hard!
7. The 2222 and 2907 are latched on. This lasts until the capacitor has pushed all its charge into the base of 2222.
8. When the charge in the cap drops a bit, it reduces the current going into 2222 base. This cuts back on current in the 2907 base.
9. This causes the 2907 collector, speaker, and capacitor (-) voltage to start to drop.
10. This causes the base of 2222 to be driven more off.
11. This makes the 2907 to turn off faster.
12. The 2907 turning off drives the base of the 2222 off even faster through the capacitor.
13. Everything turns off - hard!
14. Cap starts charging again.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

digi2t

R.G., you're a master!

A total noob such as myself understands it the way you explained it.

I tell ya, if we had more people like you teaching in schools, the high school drop-out rate would surely go down.

Thanks,
Dino
  • SUPPORTER
Dead End FX
http://www.deadendfx.com/

Asian Icemen rise again...
http://www.soundclick.com/bands/default.cfm?bandID=903467

"My ears don't distinguish good from great.  It's a blessing, really." EBK

Projectile

Thanks R.G.. After reading your explanation and looking at the spice model for a while, it's starting to make sense. A few things I'm still confused about, though:

Quote from: R.G. on April 29, 2011, 10:36:01 AM
7. The 2222 and 2907 are latched on. This lasts until the capacitor has pushed all its charge into the base of 2222.
8. When the charge in the cap drops a bit, it reduces the current going into 2222 base. This cuts back on current in the 2907 base.
9. This causes the 2907 collector, speaker, and capacitor (-) voltage to start to drop.
10. This causes the base of 2222 to be driven more off.

According to the spice simulation, the capacitor actually fully discharges and then starts to charge in the opposite direction. The capacitor reaching a full charge (negative 8 volts) is what appears to cause the current drop through the base of the 2222 and starts the positive feedback cascade that turns off the 2907 (rather than it discharging). this makes more sense to me, since the cap being charged to -8v means that any small drop in current through the 2907 is going to show up as a large voltage drop on the base of the 2222. Then the cap has to to bring the 2222 base voltage all the way back up from -8v to 0.7v in order to turn it on again. At least that's how I'm seeing it, but maybe I'm missing something.

What also has me a little confused is the fact that I would have thought there would be enough current through the 10k-60k resistor alone in order to forward bias the 2222 base junction and keep it in saturation, but I guess not. That's what tripped me up initially.

Thanks for all of the help. It's starting to become clear now.

I linked some screen captures of the spice sim below. The first one shows the oscillation. The second one zooms in on the breif "on" cycle so you can see the action. The blue trace is the voltage across the load. The green trace is the voltage at the base of the npn transistor (referenced to ground), and the red trace is the voltage just across the cap:

http://i.imgur.com/zg5po.png
http://i.imgur.com/Q6lXG.png

R.G.

Quote from: Projectile on April 29, 2011, 11:23:54 PM
According to the spice simulation, the capacitor actually fully discharges and then starts to charge in the opposite direction. The capacitor reaching a full charge (negative 8 volts) is what appears to cause the current drop through the base of the 2222 and starts the positive feedback cascade that turns off the 2907 (rather than it discharging).
Hmmm. Obviously I didn't run this in a simulator. However, try putting a diode across the capacitor with anode to negative side, cathode to positive side and see what happens. An electro cap will not live all that long being charged to 8V reversed, I suspect. I think it may well start conducting at a volt or two reverse. I *know* that's what happens in the DC case.

QuoteWhat also has me a little confused is the fact that I would have thought there would be enough current through the 10k-60k resistor alone in order to forward bias the 2222 base junction and keep it in saturation, but I guess not. That's what tripped me up initially.
If the capacitor were not there, that's exactly what would happen. The cap slows down the charging, and adds a time delay to the process as well as forcing it to not be DC-stable.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

R.G.

Something nagged me about this circuit, so I simulated it. Sure enough, as reported, the capacitor (-) terminal is pulled up to +9 and charges the cap in reverse by about 8V.

A little thought got me to - the schematic is in error. The cap polarity should be reversed, with the + terminal to the 2907, the - to the 2222 base. Should work a lot better with the cap not being reverse biased.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

hday

Seriously R.G., I think I learn more from your kid-friendly explanations than I do from hours of online reading.  :icon_lol: +1 on teaching

Projectile

Yeah, thanks for clearing that up R.G.. That schematic I originally posted has some problems. It won't even oscillate in LT-spice until I change some values, so I'm not sure what the original designer was thinking. Fortunately, this is actually not the real schematic I am using. I just linked to it out of convenience, because the schematic I have is inside a pdf file. They are exactly the same except for the component values. My schematic uses a .5uF film capacitor there, so no problems.

The reason why I asked about this circuit was becasue a science club at my school had a class where they built these from a kit (using an ldr in place of the pot). I thought it would be cool to actually explain to them how the circuit works, but it turns out that nobody was interested. They just wanted to make noise and learn how to use a soldering iron. Such is the life of an electronics geek. ...sigh.  :)

Thanks for the help, once again.