0
\$\begingroup\$

Noob here (again). I have made this schematic of an astable multivibrator and a Raspberry Pi. I want it to produce a square wave, but it just outputs high constantly.

Schematic here

I use the Raspberry Pi as a signal analyzer of sorts. It has a 3.3 V voltage supply and also GPIO pins with which you can measure digital signals (it doesn't have analog signals). I have triple checked all of my connections but the output on the Raspberry Pi pin 16 stays high. (logical one). The transistors are the BC547B P3 E type. Calculating the expected frequency as described here comes out to be 7.21500721501 Hz, so it should be detectable using the Raspberry Pi's GPIO pins to measure the logic level. The capacitors are electrolytic and are 100 microfarads (in hindsight it wasn't a good idea to mark it as mF because it can be confused as millifarad, oh well). My knowledge of electronics is quite poor (look at my previous post), but I think I have put everything properly together, but it doesn't work. So I want to know why the circuit outputs always high at Pin16raspi. Thanks!

Edit: the schematic doesn't seem to show all that well in the picture, so the eeschema file (Kicad) is here.

Another edit: so I now connected the ground pins together and now the output fluctuates randomly between normal looking square wave and flat 0 volts. could some of my components be broken?

Edit 3: ok so i measured the voltage from the collector of the Q3 transistor and used 10kOhm resistors(like this) and did some other stuff and the result is that the output is a square wave and it works all good. thank you guys!

\$\endgroup\$
6
  • \$\begingroup\$ Looks like you did not connect the Pi GND and your circuit's GND. If you did, your Pin16raspi would be always low. \$\endgroup\$
    – fraxinus
    Sep 19, 2021 at 13:52
  • \$\begingroup\$ @fraxinus ok now i connected the grounds together and analyzed the output witih my raspi, but now it sometimes oscillates as square wave and then sometimes just outputs flat 0. \$\endgroup\$ Sep 19, 2021 at 14:15
  • \$\begingroup\$ If you've connected this up as shown in the schematic, you should be seeing a constant low. Your schematic can't match your circuit if you're ever seeing a square wave on its output. \$\endgroup\$
    – Hearth
    Sep 19, 2021 at 14:16
  • \$\begingroup\$ For 500ohm collector resistances use 10k base resistors (R2,R3) and recalculate capacitors for desired frequency. With such a high R1/R2 ratio it will not oscilate. \$\endgroup\$
    – user208862
    Sep 19, 2021 at 14:32
  • \$\begingroup\$ @MichalPodmanický Only R5/6 are 10k. Schematic ok. It must work. Maybe loose jumpers. But this can be simplified greatly with a Schmitt Inverter. Yet Rb must be much higher to slow rate. for RbC=T \$\endgroup\$ Sep 19, 2021 at 14:44

1 Answer 1

3
\$\begingroup\$

It seems you only have connection problems as the schematic is OK. (more or less) Keep them as short as possible, use twisted pair for long jumpers and check Vcc/Gnd noise.

Although the transistor Astable is taught for educational purposes, it is never used by experienced Engineers. There are a million answers on this Astable Multivibrator topic,(some bad answers) but allow me to give specific advice.

  • If load is just CMOS 5pF > 10Meg input @3.3V then your source impedance could be as high as 10% of this with some noise suppression cap.

    • 500 Ohm pullup for Rc is a classic example that uses 10 mA more current than needed here, unless you wanted to drive an LED in series with a suitable R.
  • If you don't mind a small rise in Vce, you do not need Ic/Ib=10 which is often rated in datasheets on devices with hFE=100 thus using about 10% of the linear hFE. However here the smaller the feedback step, the fast it responds but raising Vce from 0.2 to say 0.7 from 4.5V and the frequency might rise up to 20% This is good news and means you can use non-electrolytic caps and large Rc/Rb ratios of 30 and more with very high hFE transistors > 300

  • if you show any more numbers in your calculations than the tolerance of your components, we know you have yet to read up on 1st yr engineering. 7.21500721501 Hz, should be 7.2 Hz or even 7 Hz

Using the above advice, I simulated with hFE =30 here.

Using a 33k pullup, and 100k pulldown. a ratio of 4.5V is generated so that Q3 is no longer needed. Even without the pulldown, the series R would limit the ESD diode current safely. There is also some shift in duty cycle. enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.