I’m basically a software guy. I did take a couple of electricity and electronics classes in high school, but that was, um, a little while ago. I designed a few ALUs and things like that in my undergrad CprE courses, but never had to actually build them. There are a few things I’d like to try to do with electronics, but sometimes it’s best to start with a refresher course.
You might recognize the circuit above as Experiment 11 of the Make: Electronics book. It’s a neat little circuit that uses a couple of programmable unijunction transistors (PUTs) to make a sort of wah-wah-wah siren sound come out of the speaker. One PUT is a high-speed oscillator that creates the basic signal in the audible spectrum. If you only have that one hooked up, the speaker makes a constant buzz. The second PUT is a low-speed oscillator. It feeds into the high-speed oscillator and changes the frequency a couple times a second. The two NPN transistors next to the speaker are there for amplification – they make the sound louder.
What I was saying before about the fun of using low-level interfaces like assembly language goes double here. The two PUTs are identical; it’s the combination of capacitors and resistors attached to them that make them oscillate at different rates. If you replace any of those components with a different valued part, you’ll change the frequency of part of the signal. If you’re far enough out, you might stop the oscillator from working at all. I spent a long time staring at a non-working version of this circuit before I realized I’d misread a 470 kΩ resistor on the schematic as 470 Ω.
It’s a beautifully analog sort of thing. The PUTs are controlled by the voltages at their gates and anode (two of the PUT’s three pins). The voltages are set by some resistors (that’s the “programmable” part) and change, at a predictable rate, as the capacitors build up charge. Then the PUT opens, the capacitor drains, and the whole process starts over. And you get to hear the whole sequence happen in real time.