2n3904 astable multivibrator suggestions??? - Page 1
Forum section: electronics / projects

author: usao
author_rank: Newbie
timestamp: April 16, 2018, 04:08:23 pm
content: Trying to setup a astable multivibrator using (https://www.electronics-tutorials.ws/waveforms/astable.html) as a reference.According to the site, they have a chart which shows frequency for various RC pairs. The 1M/470n pair should generate a 1.5HZ square wave, but as you can see from the graph below the waveform is pretty crappy. Ive tried to adjust RC but most of the time im not getting any waveform at all (not even crappy ones). Just a straight line.My goal is to get something around 10kHZ to 100kHZ. None of the RC pairs which get near this frequency generate any curve at all, just a straight line..

author: james_s
author_rank: Super Contributor
timestamp: April 16, 2018, 04:15:30 pm
content: You have some very large resistors there, 1M? I would expect that to have some issues, try something more reasonable like 10k-100k and size the capacitors accordingly. If you want the output to be cleaner feed it through a Schmitt trigger.

author: Benta
author_rank: Super Contributor
timestamp: April 16, 2018, 04:51:45 pm
content: Yeah, expecting an hFE > 1000 for a 2N3904 ain't gonne fly...

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 16, 2018, 04:54:02 pm
content: Quote from: james_s on April 16, 2018, 04:15:30 pmQuite right. Attached is the LTSpice simulation with 100k / 4µ7. Works fine.Basically with base resistors that are too high in value, the transistors can't be driven into saturation, so you don't get a clean square output. You would get into trouble with high resistors values for the collector resistors as well.Note that this kind of oscillators (called astable multivibrators) are nice for learning electronics, but are bulky (when realized with discrete components) and rather power-hungry. There's a lot of integrated solutions out there that will have much lower power draw, better stability and take much less real estate.

author: usao
author_rank: Newbie
timestamp: April 16, 2018, 05:22:57 pm
content: Thanks, that simulation produces a nice square wave.I would like to see if I can get it up to around 10kHZ to 100kHZ though, when I reuce to 1u/50k I still get a square wave but it doesnt start for like 6 seconds. Not sure what that is all about.BTW, im really new to all this, so sorry if im not making sense.

author: usao
author_rank: Newbie
timestamp: April 16, 2018, 05:24:04 pm
content: Quote from: james_s on April 16, 2018, 04:15:30 pmThese RC sizes were based on the URL table which showed this should produce 1.5HZ.

author: StillTrying
author_rank: Super Contributor
timestamp: April 16, 2018, 06:33:23 pm
content: Quote from: usao on April 16, 2018, 05:22:57 pmIt's very common for simulated oscillators not to start because there's not enough noise. You can add a small start up pulse somewhere. Adding a 1V 1ms pulse into the 12V source works.Swap/copy/paste your 12V supply for this one!

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 16, 2018, 06:44:36 pm
content: Quote from: usao on April 16, 2018, 05:22:57 pmWith some other values, you will even get it to reach equilibrium and never start oscillating.Welcome to the world of simulation and perfect models, which don't always (or rarely) model reality in a sensible way. In order for this oscillator to oscillate, there must be some kind of initial asymmetry to it - otherwise it may reach equilibrium and never get out of it. Look at the circuit: with ideal components, it's perfectly symmetric, so there's not reason it should oscillate in the first place.But reality is different: components are not ideal and their values are never perfectly the same, and initial conditions aren't either. This is why such theoretically symmetric designs can start oscillating.If you modify one of the resistors by a small amount, the simulation will suddenly make you see what you're expecting.In your example, change one of the resistors to 50.1k instead of 50k. The simulation works as you'd expect.To get higher frequencies, just reduce R*C, and don't forget to make one of the resistors or capacitors slightly different from the other.You will also have to lower the collector resistors, to get faster rise times.To make sure the oscillation starts, you may additionally check the "Start external DC supply voltages at 0V" option in the transient simulation command. This combined to a slight component asymmetry will make your simulations work every time.

author: james_s
author_rank: Super Contributor
timestamp: April 16, 2018, 08:55:33 pm
content: Quote from: StillTrying on April 16, 2018, 06:33:23 pmA bigger issue is that the simulated transistors are too perfect and both identical. In order for a multivibrator like this to start, one of the transistors has to turn on slightly faster than the other. You might be able to adjust the hFE of one of them slightly, or make one of the resistors just a tad different than the other.

author: rstofer
author_rank: Super Contributor
timestamp: April 16, 2018, 09:39:13 pm
content: Welcome to Electronics where amplifiers oscillate and oscillators don't. Or so sayeth my instructor way back when.

author: Brumby
author_rank: Unknown
timestamp: April 17, 2018, 01:30:46 am
content: Quote from: rstofer on April 16, 2018, 09:39:13 pmLOL ... but so true.It may sometimes feel like you've entered the Twilight Zone where theory and practice seem like they are worlds apart ... until you understand what is happening in practice and work out that the theory describes it perfectly. That can take years and involve a lot of hair pulling.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 17, 2018, 09:05:24 am
content: Besides e.g. adding a VPULSE of fractional mV in series with one capacitor, you might set initial condition on one of the capacitors to a non-default value, so that it starts up unbalanced, rather than having the simulation engine calculate the DC operating point all too perfectly.The hFE used in the 2N3904 is surprisingly high (over 300), but don't let that fool you, real ones are more like 200 or 100, and even less if you want saturated behavior (which you do for this circuit). A ratio of Rb / Rc <= 50 is quite reasonable here.One final catch: SPICE doesn't model BJT breakdown (IIRC, LTSpice doesn't either). Note that, when a transistor switches on, it pulls down the capacitor on its collector, pulling down the base voltage of the opposite transistor by the same amount (nearly). For a 12V supply as shown, you're asking for pulses of about -11.3V on the base of those transistors -- but they're only good for about 7V!To model B-E breakdown, connect two 6V zener diodes in series (use the nearest SPICE model in the library, it'll be fine), anode to anode, and connect them from base to emitter. Do this for each transistor. You will see a higher-than-expected operating frequency, a slower collector falling edge (because the capacitor has to be charged up by about 5V), and a flat-bottomed base voltage.Best solution is to run this circuit at or below 5V, and if you need a 12V output, add an inverter as level shifter.Tim

author: Zero999
author_rank: Super Contributor
timestamp: April 17, 2018, 10:33:00 am
content: Quote from: SiliconWizard on April 16, 2018, 06:44:36 pmAnother way is to add some series resistance to one of the capacitors. That way the schematic doesn't look odd by having the different values for the two RC circuits.

author: Colin55
author_rank: Contributor
timestamp: April 17, 2018, 12:06:01 pm
content: Turning it on generally gives it the "kick start" to get it oscillating. Many of these oscillators will not start from a slow supply rise.

author: Colin55
author_rank: Contributor
timestamp: April 17, 2018, 12:07:55 pm
content: And don't forget, the capacitor actually saturates the transistor. The resistor is just there to start the "turn-on" process.

author: Audioguru
author_rank: Super Contributor
timestamp: April 17, 2018, 03:45:03 pm
content: The 2N3904 transistor has a maximum allowed emitter-base reverse voltage of only 6V so it has avalanche breakdown in this simple circuit with a 12V supply. The repeating avalanche breakdown affects the output and damages the transistors. Diodes can be added to eliminate the avalanche breakdown or a lower supply voltage cam be used. I do not know if the SIM program learned about the avalanche breakdown.Since the load resistor value is 1k and the transistor needs a base current of about 1/20th its collector current to remain in good saturation after the capacitor starts the "turn on" then the maximum base resistor value is 20k, far from the 1M shown. I don't know if the SIM program learned about the high base current needed for a transistor to saturate.

author: David Hess
author_rank: Super Contributor
timestamp: April 17, 2018, 07:14:37 pm
content: Quote from: T3sl4co1l on April 17, 2018, 09:05:24 amOr add diodes in series with the bases so base-emitter breakdown does not clamp the capacitor voltages.Quote from: Hero999 on April 17, 2018, 10:33:00 amThe lessor known emitter coupled version of this circuit only takes one timing capacitor.