How to Build a Computer 6: Simple Transistor Circuits

 

The problem with simple transistor circuits is that any circuit with a transistor in it isn’t all that simple. And frankly, I don’t know how much you know about circuits; I’m guessing it ranges from “nothing at all” to “teach your grandmother to suck eggs why don’t you.” At the risk of boring the latter crowd we’re going to give this a slow and superficial treatment. Let’s start with a circuit that’s just about as simple as I can make it. So simple it doesn’t even have a transistor in it!

I’d make this circuit more interesting but I don’t know the symbol for ‘electric chair’.

 

Nothing too difficult here. Flip the switch, the loop completes, and the LED gives off light. One thing to note, the diode symbol is pointing in the wrong direction. Back when ol’ Ben Franklin was at the forefront of electricity research he proposed a convention to distinguish the two types of charge. He arbitrarily assigned one of them the term “positive”, and one of them “negative”. Much later we figured out that it’s actually the electrons that do the work as they move around the circuit, and that they’re associated with the negative charge. By then the way we draw circuit diagrams was pretty well ossified. As a result diodes and transistors point the way they would if current flowed from positive to negative.

Okay, batteries, resisters, these things aren’t that complicated. Let’s look at a circuit with transistors in it.

You could build this circuit with only one transistor, in the same sense that you could eat a salad without dressing. Where’s the fun in that?

This is an amplifier. How does this thing work? First thing, pretend that everything on the left side of the circuit is gone. Suppose you cut out the transistors and just stuck a wire across. You’d have a circuit that consists of your battery, a speaker, and a single resistor. Which… really wouldn’t do anything interesting. The fun stuff happens when you use the transistors to vary that signal.

Next thing to note there are no numbers on the drawing. Sorry ’bout that. The two vertical resistors on the left are much stronger than the horizontal one. That means that whatever signal is coming in from the plus sign on the left is going to dominate. Okay, but what about those transistors in the middle? It’s something called a Darlington Amplifier; sequencing those two transistors allows you to control a much bigger current than one transistor alone.

Control? Yeah, that’s the whole point of transistors. You put a weak signal source on that plus sign on the left, and you get a strong signal out of your power source on the right. A weak signal like what? The tiny signals I get by plunking my sweet electric guitar on the left get amplified into something that entertains the whole neighborhood! Bum-bah-Bah! Bum-bump bad-dah! Bum-bump bah-da bahm-bahm.

You could also hook up a piezolelectric sensor, to make tiny tiny currents out of sound waves and amplify my awful, awful singing. The less said about that the better. Okay, next circuit.

That bump in the center is where one wire crosses but doesn’t connect to another. It isn’t an aberration in my drawing no matter how much the rest of the picture leads you to believe that.

Those pairs of vertical lines? Those are capacitors. Capacitors will build up charge until they’ve reached their limit, then current will stop flowing. If you then remove the power source the capacitor discharges. You’ve built up power in it and it’ll drive the circuit backwards for a bit. One interesting interaction between capacitors and resistors, it takes time to fill a capacitor. The bigger your resister, the more time it takes. If you’re clever about it you can use that to make a timer.

What this circuit does, and it’s hard to suss out just looking at the diagram, it’ll alternately fill and discharge the capacitors. As long as you’re filling the capacitor on the right the then the transistor on the left has current at the base. That’s the middle wire which turns the switch on. The vanilla section of the ice cream sandwich if you recall. As long as that wire has power then the leftmost line of the circuit can run, and the red light is on.

Once that capacitor fills though, it starts running in the opposite direction. The left capacitor starts to fill, and that turns on the right transistor. The right transistor causes the blue LED to light up, and incidentally discharges the capacitor on the right. Once the capacitor on the left is full the transistor switches off again, the blue light winks off, the red LED turns on again, and you’re back where your started.

What you have there is called an oscillator, because it shifts back and forth. Confusing, no? Here’s an animation that might help you follow. If you hooked this circuit up you’d see the lights blinking back and forth. The rate that they blink depends on the size of the capacitors and resistors you use. Red and blue blinking lights. Reminds me of something. Almost as if someone phoned in a noise complaint…. Moving along.

Okay, you get one number. Not enough to do any math with. When I get to the math believe me you’ll know.

This is a bit different. I’m not actually showing you full circuits, but rather sections of one. No resistors or LEDs or such to cloud what’s going on. The line on the top is a five volt source. The dotted lines in and out indicate signals in and out. Let’s take a closer look at the leftmost circuit.

If the signal comes in (line on the left) the transistor comes on. The five volt source gets shunted to ground, and nothing happens. If there’s no signal coming from the left the transistor shuts down and you get signal out on the right. What you have is called a “NOT” gate. Let’s say that the presence of a voltage is a “1” and the absence of voltage is a zero. You can use this circuit to express that NOT 1 = 0, or conversely that NOT 0 = 1.

Neat, huh? Let’s look at the next two. The middle circuit is an OR gate; if either of the transistors are getting a 1 then the result is 1. If neither gets a signal then the signal out is zero. The one on the right is an AND gate; you need to give the top and the bottom transistors a 1 before you get a 1 out. These are three basic logic gates. There are more, but they build off the ones you already know. An example; what happens if you feed the output of an AND gate into a NOT gate? You get the opposite of an AND gate, or a NAND gate. These things are so useful that they get their own set of meta symbols. Expect to see more of these Logic Gates in future episodes. If you want to skip ahead the comic Tales of the Questor discussed the implications, only talking about enchanting swords.

The circle on the front of the NOT and NAND gates indicate negation, much like a goatee is a sure sign that someone’s an evil twin from the negaverse.

When they tell you that computers run on ones and zeros this is what they mean. Five volts and zero volts. The logic, the math, it all happens with these transistor circuits. Logically the next step in this series would be binary logic and building things like a basic adder, but I’m going to hold off on that for a time. We’re going to go back to the wafer fabs and discuss how exactly you draw your circuits on silicon. Join us next week for “A Smattering of Patterning” or “All my Circuits are Plaid”.

This is part six of my ongoing series on building a computer, the “it’ll put hair on your chest” way. You may find previous parts here: 1 (silicon) 2 (crystallography) 3 (doping) 4 (diodes and transistors), 5 (fundamental chemistry) or all of them under the tag How to Build a Computer. This week’s post has been brought to you by the Rhody Balzer Boxley Booze Fund. Remember, with other charities you pay for overhead, but the RBBBF makes no bones about it’s guarantee: Every penny you donate goes straight to our booze fund.

[First] [Previous] [Next]

Published in Science & Technology
This post was promoted to the Main Feed by a Ricochet Editor at the recommendation of Ricochet members. Like this post? Want to comment? Join Ricochet’s community of conservatives and be part of the conversation. Join Ricochet for Free.

There are 13 comments.

Become a member to join the conversation. Or sign in if you're already a member.
  1. Arahant Member
    Arahant
    @Arahant

    Hank Rhody, Possibly Mad: The circle on the front of the NOT and NAND gates indicate negation, much like a goatee is a sure sign that someone’s an evil twin from the negaverse.

    Always pay attention to Hank’s captions.

    • #1
  2. Judge Mental Member
    Judge Mental
    @JudgeMental

    I’m waiting for the part where Hank is going to say, ‘you build a few billion more of those, and then give it to a guy who knows Java’.

    • #2
  3. Gary McVey Contributor
    Gary McVey
    @GaryMcVey

    I’m not often given to hyperbole, but this stupendously enlightening Hank Rhody series is more entertaining than a hypothetical Bikini Team Showercam 3D YouTube channel, which is saying something, and more educational than a soupcon of quinzaines at the Sorbonne, which is also saying something, although I’m not sure what, exactly. 

    • #3
  4. Judge Mental Member
    Judge Mental
    @JudgeMental

    Gary McVey (View Comment):
    more entertaining than a hypothetical Bikini Team Showercam 3D YouTube channel

    It’s a good series, but c’mon.

    • #4
  5. tigerlily Member
    tigerlily
    @tigerlily

    Judge Mental (View Comment):

    Gary McVey (View Comment):
    more entertaining than a hypothetical Bikini Team Showercam 3D YouTube channel

    It’s a good series, but c’mon.

    Yeah, I’m with Judge on this one.

    • #5
  6. Gary McVey Contributor
    Gary McVey
    @GaryMcVey

    It really depends how you feel about Darlington Pairs. As for me, I could spend a whole summer with them. 

    • #6
  7. WillowSpring Member
    WillowSpring
    @WillowSpring

    My engineering classes were at night while I was working full time.  At work, we were working with early integrated circuits, but in Engineering lab, we were building flip flops and gates from individual transistors.

    You left out the fact that the easiest way to build an oscillator is to try to build a flip-flop – and vice versa.

    • #7
  8. Randy Weivoda Moderator
    Randy Weivoda
    @RandyWeivoda

    Hank Rhody, Possibly Mad: This week’s post has been brought to you by the Rhody Balzer Boxley Booze Fund.

    Who is Boxley?

    • #8
  9. Gary McVey Contributor
    Gary McVey
    @GaryMcVey

    Randy Weivoda (View Comment):

    Hank Rhody, Possibly Mad: This week’s post has been brought to you by the Rhody Balzer Boxley Booze Fund.

    Who is Boxley?

    The Right Nurse’s name IRL. 

    • #9
  10. Randy Weivoda Moderator
    Randy Weivoda
    @RandyWeivoda

    Gary McVey (View Comment):

    Randy Weivoda (View Comment):

    Hank Rhody, Possibly Mad: This week’s post has been brought to you by the Rhody Balzer Boxley Booze Fund.

    Who is Boxley?

    The Right Nurse’s name IRL.

    So she’s been made an honorary Rhody, one of Ricochet’s highest honors?  That’s OK.  I’m not jealous.

    • #10
  11. Judge Mental Member
    Judge Mental
    @JudgeMental

    Randy Weivoda (View Comment):

    Gary McVey (View Comment):

    Randy Weivoda (View Comment):

    Hank Rhody, Possibly Mad: This week’s post has been brought to you by the Rhody Balzer Boxley Booze Fund.

    Who is Boxley?

    The Right Nurse’s name IRL.

    So she’s been made an honorary Rhody, one of Ricochet’s highest honors? That’s OK. I’m not jealous.

    Honors, horrors… never noticed before how alike those words look.

    • #11
  12. Matt Balzer Member
    Matt Balzer
    @MattBalzer

    Randy Weivoda (View Comment):

    Gary McVey (View Comment):

    Randy Weivoda (View Comment):

    Hank Rhody, Possibly Mad: This week’s post has been brought to you by the Rhody Balzer Boxley Booze Fund.

    Who is Boxley?

    The Right Nurse’s name IRL.

    So she’s been made an honorary Rhody, one of Ricochet’s highest honors? That’s OK. I’m not jealous.

    I wouldn’t say that. Primarily because one of the reasons we brought her onboard is to avoid accusations that the RBBF was a front organization for WM&M.

    • #12
  13. Gary McVey Contributor
    Gary McVey
    @GaryMcVey

    TRN’s place in the RBBF was assured sometime last year, and it was referenced in a lot of threads, but we didn’t include it yet in the first RSR story afterwards, “Northern Exposure”, because N.E. was an almost-serious story about Matt and the Rhodys, and RBBF jokes didn’t fit. 

    Now they do! This time out, I’m not imitating James Michener or Brad Thor. Since TRN was already written into the story, having her not come to Milwaukee was definitely a problem at first. But I think I found a way to make it all work. 

    • #13
Become a member to join the conversation. Or sign in if you're already a member.