Help with monostable multivibrator - Page 1
Forum section: electronics / beginners

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 10:16:24 am
content: Hi there. I'm trying to assemble and test the circuit shown below. I'm fairly sure I have followed the instructions properly and the circuit is wired as shown. There is one mistake I found in the schematic and that is that the 'E' and 'C' labels for the emitter and collector of Q1 are on the wrong side. The thing is, this circuit doesn't seem to behave like a monostable multivibrator. The astable multivibrator on the right formed with Q3 and Q4 works properly to produce the tone, but the monostable multivibrator on the left made from Q1 and Q2 doesn't seem to be working. I was expecting the buzzer to sound for a short period and then turn itself off, but what happens instead is that the buzzer goes on and off immediately when the light source is varied over the CdS cell. Is the circuit diagram for the monostable multivibrator correct? My hunch is that maybe the 10uF and 33K components in the monostable multivibrator need to be flipped? Thanks very much if you can help me with this. I can provide more details if needed.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2024, 10:55:39 am
content: The holdtime (of the unstable state) of the monostable multivibrator is about ln(2)RC. With R = 33 kOhms and C = 10 µF t is about 0.23 s which is quite short. For a longer beep you could increase the value of the capacitor. 22 µF would increase the holdtime to 0.5s, 33 µF to 0.75 s, and 47 µF to 1 s.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 11:02:09 am
content: Quote from: madires on April 07, 2024, 10:55:39 amThanks! The thing is at the moment there is no hold time at all, the buzzer just stays on. I will make a video to show you the behaviour, give me an hour or two.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2024, 11:11:19 am
content: Which transistor are you using for Q1/Q2? Could be an hFE issue.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 11:22:04 am
content: Quote from: madires on April 07, 2024, 11:11:19 amThe transistors are NPN transistors markedSTC 945 G N2.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 11:25:17 am
content: Quote from: jj5 on April 07, 2024, 11:02:09 amHere is the video demonstrating the problem:

author: wasedadoc
author_rank: Super Contributor
timestamp: April 07, 2024, 11:26:07 am
content: Typical silicon transistors have a base to emitter reverse breakdown voltage of only 5 to 6 Volts. Running those circuits from 9 Volts exceeds that. The best case result is that the actual periods when a transistor is off, is significantly shorter than the calculated time.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 11:45:54 am
content: Quote from: wasedadoc on April 07, 2024, 11:26:07 amI tried running the circuit on 5V instead of 9V and it behaved the same way. That is, the LED lights when light is removed, and the LED goes off then light is applied. There is no unstable state that resets after a period.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2024, 11:49:17 am
content: The STC945's datasheet states an hFE between 70 and 700, a large range. You could increase the base current by changing the 33 kOhms resistors to 10 kOhms, and check if this helps.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2024, 12:07:56 pm
content: Quote from: wasedadoc on April 07, 2024, 11:26:07 amTo solve that problem one can insert a diode between the cap and the transistor's base (to prevent the negative base voltage).

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 12:16:09 pm
content: Quote from: madires on April 07, 2024, 11:49:17 amI put 10 kOhm resistors in parallel with the two 33 kOhm resistors but the behaviour of the circuit didn't change. I tried testing at both 9V and 5V but the behaviour was the same.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2024, 12:21:52 pm
content: Then back to the original circuit and change the 33 kOhms resistor at the cap and the base of Q1 to something like 47 kOhms.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 12:37:02 pm
content: Quote from: madires on April 07, 2024, 12:07:56 pmI put an 1N4007 between the base of Q1 and the 10uF cap. I will leave this in the circuit unless instructed to remove it. The addition of this diode didn't seem to change the behaviour of the circuit at all.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 12:40:11 pm
content: Quote from: madires on April 07, 2024, 12:21:52 pmI put a 47 kOhms resistor in place of the 33 kOhms resistor (and also the diode you suggested) but the behaviour of the circuit remains unchanged.

author: Zero999
author_rank: Super Contributor
timestamp: April 07, 2024, 01:13:31 pm
content: The time delay is only 230ms,I expect the monostable is working.The monostable is triggered by a brief positive pulse on the base of Q5, causing it to activate the buzzer.One quirk of this circuit is, if the pulse lasts longer than the time delay, then it will remain on until the pulse terminates.To confirm this, increase the capacitor value to something like 47µF or 100µF, to make the delay longer, so it's easily perceivable.Now, briefly flash the light at the sensor and the LED should turn on for about 1 to 2 seconds, before going off.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 01:28:23 pm
content: Quote from: Zero999 on April 07, 2024, 01:13:31 pmI put 100µF in parallel with the 10µF capacitor and the behaviour of the circuit is unchanged. I'm going to rewire the whole thing to ensure I haven't made a mistake.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2024, 01:28:31 pm
content: Bummer! Have you tried with turning the potentiometer up/down?BTW, as long as the light intensity is too low Q5 stays on and shorts the base of Q1 (Q1 is off). This drives Q2, enabling the buzzer/LED. The monostable multivibrator's holdtime is triggered by the light intensity going up again (Q5 off).

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 01:37:45 pm
content: Quote from: madires on April 07, 2024, 01:28:31 pmYes. When the pot is low the LED flashes on and off slowly (around 2Hz). When the pot is high light on the CdS cell either turns the LED constantly on (when there is no light) or constantly off (when there is light).Quote from: madires on April 07, 2024, 01:28:31 pmOh I thought the initial pulse was supposed to drive the whole thing. If the multivibrator's holdtime is triggered by the light going back up, then perhaps what we're seeing is to be expected? I have to admit I am quite confused.

author: Zero999
author_rank: Super Contributor
timestamp: April 07, 2024, 01:38:11 pm
content: Quote from: jj5 on April 07, 2024, 01:28:23 pmQ5 is discharging the capacitor, when the other side is shorted out by Q2. Q1's base needs a diode connected in series to prevent this. It's not just there to protect the base-emitter junction, but is part of the circuit.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 01:56:33 pm
content: Quote from: Zero999 on April 07, 2024, 01:38:11 pmThanks! I finally got this circuit to work! Things I needed to do:put a diode on the base of Q1change the resistor on the base of Q1 from 33kΩ to 47kΩput a 220μF cap in parallel with the 10μF capAnd one thing I didn't understand is that the multivibrator won't start transitioning back to its stable state until *after* the stimulus is reapplied.Thanks to everyone for helping me with this one! <3

author: Zero999
author_rank: Super Contributor
timestamp: April 07, 2024, 02:15:37 pm
content: Good, I'm glad you got it working.Here's a SPICE simulation on the circuit.Note how the voltage on the RC circuit (yellow trace) goes negative, when Q2 turns on. Without D2, Q3 simply shorted it straight to 0V.It's really frustrating when there are errors in circuits, but fixing them is good learning experience.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 02:24:08 pm
content: Quote from: Zero999 on April 07, 2024, 02:15:37 pmExcellent. Thanks! What software do I need so I can do my own SPICE simulation?Quote from: Zero999 on April 07, 2024, 02:15:37 pmI see. Thank you.Quote from: Zero999 on April 07, 2024, 02:15:37 pmYes, it's all good learning experience!Speaking of learning, why did you set R4 at 1kΩ for your simulation? I had to pick a current limiting resistor myself and I picked 220Ω, much less than your 1kΩ. Is 1kΩ a good value to use in general for such purposes?

author: Zero999
author_rank: Super Contributor
timestamp: April 07, 2024, 02:29:31 pm
content: Most people here use LTSpice. Unfortunately many people find the GUI frustrating and there are some unintuitive aspects to it, but it's free, is considered one of the most accurate simulators and lots of people here can provide support.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 02:34:21 pm
content: Quote from: Zero999 on April 07, 2024, 02:29:31 pmI will check it out, thanks!I also had the question about why you set R4 at 1kΩ for your simulation? I had to pick a current limiting resistor myself and I picked 220Ω, much less than your 1kΩ. Is 1kΩ a good value to use in general for such purposes?

author: Zero999
author_rank: Super Contributor
timestamp: April 07, 2024, 02:37:06 pm
content: Quote from: jj5 on April 07, 2024, 02:34:21 pmNo particular reason. Modern LEDs tend to be bright enough at 3mA, so 1k tends to be my go to value for 5V. If it's not bright enough, then reduce it.

author: vk6zgo
author_rank: Super Contributor
timestamp: April 07, 2024, 03:39:39 pm
content: Quote from: jj5 on April 07, 2024, 11:25:17 amIf Q5 turns on, the base of Q1 goes low, turning Q1 off, so the description is incorrect.You seem to have multimeters coming out of your ears, so initially look at the collectors of Q5 & Q1.By my reading of the schematic, Q5 collector voltage will be high when the LDR is illuminated, because its resistance will be low, taking the voltage at the point where Q5 base is connected below 0.6v, cutting off the transistor.Q5 collector is connected to Q1 base, biasing it on, so its collector voltage will be low.Break the light & Q5 will turn on, its collector voltage will fall, cutting off Q1, whose collector voltage with go high & so on.As far as I can see, the astable M/V is always operating, & all the monostable does is connect it to the buzzer by biasing Q6 on. The base of that transistor is already fed with the astable output.The best way to troubleshoot that circuit is with an Oscilloscope, but I've guessing you don't have one.

author: jj5
author_rank: Unknown
timestamp: April 07, 2024, 04:04:43 pm
content: Quote from: vk6zgo on April 07, 2024, 03:39:39 pmI have a scope on my bench! An Rigol MSO5074. It has four channels and all my probes are set at 10x attenuation. What points of interest should I look at?

author: vk6zgo
author_rank: Super Contributor
timestamp: April 08, 2024, 01:11:02 am
content: Quote from: jj5 link=topic=423215.msg5436437#\negative terminal of msg5436437 date=1712505883Using only one probe, connect the ground clip to the negative terminal of the 9v battery (marked "2" on your schematic).With the LDR illuminated, look at Q5 collector with your 'scope set to DC coupling---note if the voltage is around +9v(high) or very much lower.(low).If Q5 is an NPN transistor as drawn, with the LDR in its low resistance condition, Q5 should be turned off, with its collector "high".Following the schematic, if Q5 collector is "high", Q1 base should also be "high", turning that transistor on.Now remove the illumination of the LDR----rechecking Q5 collector, it should be "low", as should be Q1 base.This will prove out the operation of the LDR & Q5 circuitry.You can now follow the schematic through the monostable, but I would suggest now going to the emitter of Q6.If your mono is working, Q6 emitter should go "low" when you remove the light from the LDR, turning that transistor on & making the alarm sound.After some time, the mono should time out, taking Q6 emitter high & turning the transistor & alarm off.From my reading of the schematic, the astable should be continuously running, so you should see its output appearing at Q6 base.It is incredibly tiresome writing (& no doubt reading) these troubleshooting steps, whereas if I were standing alongside you in your lab, they would be but a matter of seconds.I also know that there are always "vultures" waiting to pick such dissertations to pieces!

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2024, 07:09:43 pm
content: Quote from: jj5 on April 07, 2024, 01:56:33 pmSwapping the diode for a small capacitor, which makes it AC coupled will change that.Now the monostable is edge triggered. Note that C2 blocks DC and slowly changing signals, so it doesn't hold C1 at 0V, when Q3 is continuously on.

author: jj5
author_rank: Unknown
timestamp: April 08, 2024, 09:18:32 pm
content: Quote from: Zero999 on April 08, 2024, 07:09:43 pmExcellent! Thanks very much for explaining this to me. If it's called edge triggered when it is AC coupled with a capacitor, what is the triggering called when it uses the DC pulse and a diode, as with our earlier design?

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2024, 09:46:53 pm
content: Quote from: jj5 on April 08, 2024, 09:18:32 pmThey're both edge triggered I suppose. It's just the capacitor ensures it doesn't remain triggered, if the input is still high, once the time cycle completes.