237 lines
22 KiB
Plaintext
237 lines
22 KiB
Plaintext
|
|
Episode: 159
|
||
|
|
Title: HPR0159: Basic Electronics
|
||
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0159/hpr0159.mp3
|
||
|
|
Transcribed: 2025-10-07 12:33:02
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
It's Hack of Public Radio. We're singing the song to let you know that it's a time to start to show one Hack of Public Radio.
|
||
|
|
Hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey
|
||
|
|
hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey, hey
|
||
|
|
show and it's awesome goodness. This is a community supported which means yes even I count
|
||
|
|
because just me being a flesh bag and like being here I'm there for like community and
|
||
|
|
get to record into my microphone and yeah so woo hoo. Today I want to talk about electronics
|
||
|
|
so I want to just kick back take it easy and have obviously just another laid back and
|
||
|
|
fun episode so hopefully um maybe over the weekend or on your way home or whatever this
|
||
|
|
is going to be kind of just a laid back Ramline episode so when you're at a couple
|
||
|
|
minute well more than a couple minutes but when you get some time and you want to sit
|
||
|
|
back and listen hey I'll be here and we can talk about the basics of electronics okay
|
||
|
|
so okay cool all right here we go we're going to talk about electronics so basically I
|
||
|
|
need to specify that obviously electronics works off electricity and electricity comes
|
||
|
|
in two forms you've got AC and DC AC would stand for alternating current and DC would
|
||
|
|
stand for direct current and that's about as far as I'm going to go into it here today
|
||
|
|
all the stuff we're going to be talking and referencing and the form of electricity is
|
||
|
|
going to be DC which means direct current and as far as keeping it simple that's we're
|
||
|
|
talking about batteries basically anything that is coming out of the battery if you're
|
||
|
|
not plugging it into a wall meaning it's running off a battery yes even your car that's
|
||
|
|
DC now your alternator that's AC but you're battery anything that's battery powered yourself
|
||
|
|
on whatever that's that's all DC and we're going to be talking about electronics which means
|
||
|
|
low voltages and today specifically we're going to be talking about systems that you use five volts
|
||
|
|
or less so your car yes it has a battery and it's running DC but that would be called in
|
||
|
|
the electrical system that knows the difference on the end electronics electrical so you just
|
||
|
|
kind of learn a nice little what kind of general rule of thumb kind of tool so if you hear
|
||
|
|
somebody say electronics they're usually talking about something that's lower voltages as opposed
|
||
|
|
to something that's electrical and electrical can kill you whereas electronics it can make
|
||
|
|
like I said put your pants make you day not so happy but it's not going to kill you hopefully
|
||
|
|
so but today we're going to be talking about like I said low voltage systems five volt systems
|
||
|
|
because we're going to be talking about low logic gates oh logic gate oh yeah and awesomely there
|
||
|
|
are seven logic gates yeah so basically before we start talking about logic gates before we
|
||
|
|
even start talking about logic because whoa buddy you and logic danger stuff here like see I
|
||
|
|
just moved that metal thing away so I can't bang it anymore yes you yeah you in the back you are
|
||
|
|
welcome I'm sorry man so where was that okay so we're going to be talking about logic gates but
|
||
|
|
before I guess I can really jump into logic gates because logic gates are kind of a foundation of
|
||
|
|
you know how electronics today work and kind of the grandfathers of stuff and what we've built upon
|
||
|
|
so me being a person who enjoys electronics that's kind of one of the things that hopefully
|
||
|
|
with today's episode and my rambling along is that hopefully you know as you open up your computer
|
||
|
|
or see some kind of other electronics like the quote unquote guts where you see the little grain
|
||
|
|
PCB board and all the little black components and stuff well hey remember like those little black
|
||
|
|
right rectangular like chips yeah those are icy chips that's named for integrated circuit chips
|
||
|
|
and logic gates kind of compose up you know a family of those looking chips so you know hopefully
|
||
|
|
man listening to me ramble on a little bit and a little bit more each time we can learn a little
|
||
|
|
bit more of what's going on inside our systems and hopefully get a basic understanding of
|
||
|
|
electronics and the systems and what's going on so basically in talking about logic gates we're
|
||
|
|
going to be talking about a digital system and a digital system as I'm talking to a computer user
|
||
|
|
hopefully I don't know somebody listening to hacker public radio see I make the assumption I assume
|
||
|
|
we know what happens man don't do this okay so there's two kinds of systems in electronics we have
|
||
|
|
digital and analog digital is a yes or no it's on or off it's higher low it's one or zero where
|
||
|
|
analog analog can come in any shape size or form and berries it's it's crazy man it's analog
|
||
|
|
it's chaos so this whole digital is the only thing that separates between you and me and
|
||
|
|
analog chaos so let's give a better example of what I'm talking about so if you will
|
||
|
|
here we have a good example of a digital system we either have a tone or silence it's either
|
||
|
|
a high or a low it's either on or it's off this is a discrete system so it's either something
|
||
|
|
or it's not it's like a light it's either on or it's off so this is a good way to kind of think
|
||
|
|
of how a digital system exists now we have the sound of chaos this random noise we hear in the
|
||
|
|
background this represents the analog signal where before we had a series of tones now we have
|
||
|
|
noise everywhere so now in a sense of silence that noise to go and pick out a signal is very
|
||
|
|
different than going out and picking a signal in the digital system so with that little bit of
|
||
|
|
example given we're going to today to talk about a digital system which is much easier to deal with
|
||
|
|
obviously because it's either a tone or silence it's either on or off it's high or low it's a
|
||
|
|
one or a zero so it's either true or it's false so you'll hear a lot of different terminology for
|
||
|
|
digital systems and how they function depending on what kind of person is designing the system
|
||
|
|
and a lot depending on age as well an older person may be in more inclined to say true or false as
|
||
|
|
opposed to higher low or myself who I constantly want to say one or zero because being involved
|
||
|
|
with computers you're looking at you know the computer and ones and zeros and you know the matrix
|
||
|
|
and little green ones and zeros flying everywhere so if we're going to talk about a digital system
|
||
|
|
of course we have to have a way to deal with all these ones and zeros a series of tones and
|
||
|
|
silence it's just a series of tones and silence and as we have something to do with it we're
|
||
|
|
a way to analyze it and do something based on these conditions which kind of sounds a little
|
||
|
|
bit like logic we're getting dangerous so with a little bit of logic here we're going to step
|
||
|
|
into the world of logic gates i'm going to apologize to the guy in the back and
|
||
|
|
oh the first logic gates we're okay i'm putting it down okay there are seven logic gates
|
||
|
|
and basically logic gate has at least two or more inputs except for one there's one
|
||
|
|
exclusion but we have an input and based on an input we have a logic that says we do
|
||
|
|
something based on what the input is so our first example the first gate is the AND gate
|
||
|
|
like you and me yeah the AND gate so basically you've got at least two inputs for the AND gate
|
||
|
|
and it has one output so in order for the output of the AND gate to change state say to go from a
|
||
|
|
zero to a one or from silence to a tone then we have to have a change of states on all of the inputs
|
||
|
|
so whether you have two inputs or you have insert in number of inputs in order for the output
|
||
|
|
of the AND gate to change all the inputs must change and so in digital system this means
|
||
|
|
all the inputs go from zero to one or high or from low to high and then when all the inputs are high
|
||
|
|
thus the output is hot and that is the AND gate i hope i'm doing an okay job of explaining this
|
||
|
|
i'm probably butchering it but i kind of nervous on how to explain it so i'm going to go to the next
|
||
|
|
gate so the next gate is the OR gate the OR gate has at least a minimum of two inputs i think
|
||
|
|
you're going to have two or more but i've got to have at least two for the OR gate now the OR gate
|
||
|
|
it's a little less picky than the AND gate so if we have a change of state on either one of or
|
||
|
|
any of the inputs on the OR gate then the output will change and so if we have one or more
|
||
|
|
changes of the inputs then the output changes so it can be one it can be two it can be all of them
|
||
|
|
but at least one of them has to change and then the output changes on the OR gate
|
||
|
|
the next gate is the NOT gate and the NOT gate is pretty much the inverter so in this has one
|
||
|
|
input and one output and it's the basic and most simplest of the gates the NOT gate pretty much
|
||
|
|
reverses whatever signal comes in so if you're getting a high coming in it's going to output a
|
||
|
|
if you get a low input it's going to output a high which is pretty much reverses whatever's
|
||
|
|
going in so that's pretty simple the next gate is the NAND gate which is AND with an IN in front of
|
||
|
|
it so that's IN a IN D Nancy Alpha Nancy Donald NAND but the NAND gate works the exact opposite
|
||
|
|
way of the AND gate so basically has a little inverter on the output basically a NOT gate
|
||
|
|
on the output of the AND gate but it's called a NAND gate so in order for the state to change
|
||
|
|
on the NAND gate the output is always high assuming that there's no change of state on the inputs
|
||
|
|
in order for the state of the NAND gate the output to drop to a low then all the inputs have to
|
||
|
|
be a high so they all have to be one they all have to be true you have to have a tone whatever
|
||
|
|
analogy we're going to use they all have to have an active input in order for the output
|
||
|
|
to be nothing or zero or false so that is the NAND gate the NAND gate is basically it's the
|
||
|
|
actual it's been referred to as the mother of all gates really you can do any of the gates with
|
||
|
|
a NAND gate the NAND gate really is probably the most common one used of the logic gates because
|
||
|
|
one way or another you can do what you want to do also as a sad note if you are interested
|
||
|
|
to this point I'm assuming you are if you're still listening you just you're glutton for
|
||
|
|
punishment do a search on google videos for the the string that you want to search for is
|
||
|
|
from NAND to Tetris in 12 steps and basically it's a talk from an MIT professor who basically makes a
|
||
|
|
small computer out of NAND gates out of logic gates so yeah logic gates are really powerful
|
||
|
|
depending on how you want to use them that's kind of an extreme case but it's very interesting
|
||
|
|
because using all these logic gates basically well using NAND NAND chips to make logic all the other
|
||
|
|
logic gates and basically everything else to have a small computer that actually can play Tetris
|
||
|
|
along with some other stuff it's very impressive but we're going to continue moving forward now
|
||
|
|
with the other gates because we have covered four of the seven logic gates so the next gate is the
|
||
|
|
nor gate it's in OR that's Nancy or well Richard nor and the nor gate is basically the inverted
|
||
|
|
or gate so it's basically the opposite rules apply of the or gate just like the NAND and the
|
||
|
|
same thing for OR and NOR so the output of the nor gate is going to be high unless all the inputs
|
||
|
|
of the nor excuse me bring it back back up let's try again my friends the output of the nor gate
|
||
|
|
is going to be high unless any of the inputs change so if the inputs go from 0 to 1 on any or
|
||
|
|
all of the inputs then the output of the nor gate will go to low 0 false so that's basically how
|
||
|
|
the nor gate works the next gate is the XOR gate which is the letter XOR so XOR is how we
|
||
|
|
pronounce and how I pronounce it but the XOR gate works like the OR gate but it's a little bit
|
||
|
|
more picky so the XOR gate works on it's going to have the output is going to be 0 where it's
|
||
|
|
going to be low as long as none of the inputs or just oh none of the inputs or all of the sorry
|
||
|
|
I'm trying to remember I have to do my little finger thing and you can't see my finger thing
|
||
|
|
in any way in order for the the status of the XOR gate output to change we have to have
|
||
|
|
one but not all of the inputs change so say you've got two inputs and one output for your XOR gate
|
||
|
|
as I mumble along trying to describe we got two inputs and one output if you've got a change of
|
||
|
|
signal on one input then you're going to have a high output but if you have a change of state or
|
||
|
|
high input on both those inputs then the output drops to 0 or goes back to the same thing as if
|
||
|
|
none of them were active the last gate is the the XOR is going to be the last gate in this rambling
|
||
|
|
pummeling series of logic gates with no logic host but the XOR gate is the opposite of the XOR gate
|
||
|
|
so the output of the XOR gate is going to be high assuming that there's no input or we have a high
|
||
|
|
input from all the inputs so if we have a change of status on any of the inputs but it's not all
|
||
|
|
of them then the output is going to be 0 and I'm going to go ahead and stop right there with my
|
||
|
|
beautiful variable descriptions of the logic gates and basically basically that's what is going
|
||
|
|
on with the logic gates logic gates are very useful in electronics because for example you can use
|
||
|
|
interface them up with different sensors to be able to know what's going on so you could have for
|
||
|
|
example a daylight sensor that is a perfect example of a not gate that's pretty much an inverter
|
||
|
|
so if the daylight sensor senses sunlight then it turns your light off to consider electricity
|
||
|
|
because you don't need to have a light on during the daytime but at nighttime in the absence of
|
||
|
|
sunlight then it turns on the light basically an inverter of its input that's an easy example
|
||
|
|
we'll stick with that one another way that logic gates can be represented is in truth tables
|
||
|
|
and it's kind of an easier way to kind of as opposed to listen to me ramble about what
|
||
|
|
a logic gate is and how it works you can also do like truth tables so basically if you want to play
|
||
|
|
the home game take a piece of paper here let's just get our piece of paper here I've got my paper
|
||
|
|
and it's your ink pen pencil will equal for all copies your pen or pencil here we go and our piece
|
||
|
|
of paper feel like a certain radio host and I formulate nicotine strength hands okay but uh so
|
||
|
|
at the top of our piece of paper here let's write the letters a b and y okay and a and b are
|
||
|
|
going to stand for our two inputs and y is going to stand for our output and this is kind of a
|
||
|
|
standard uh how you write up your inputs and outputs for a logic gate so all your inputs they start
|
||
|
|
with a so if you have let's say four inputs they would be a b c and d and your output is y because
|
||
|
|
that's your output um that's that's how that rolls so let's say let's take our example and we've
|
||
|
|
got a b and y at the top of the piece of paper now let's draw a line down the page in between each
|
||
|
|
letter so now we've got a a row we've got a our column uh we've got a b column and then we've got
|
||
|
|
a c we've got a b and y column and then underneath each column we can have um basically a truth table
|
||
|
|
of ones and zeros representing the states of whatever gate we want to make the truth table of
|
||
|
|
so let's do the AND gate a and d the AND gate the first one that we talked about and so if we're
|
||
|
|
going to do the truth table for an AND gate if a input was zero saying there was no input on a
|
||
|
|
let's let's write it zero underneath the first column for a there in that first row and no input
|
||
|
|
on b then the output y is going to be zero so our first row is zero zero zero next row let's put
|
||
|
|
an input on a so we'll write one and then we'll have no input on b with zero and then our output
|
||
|
|
let's going to be zero because there's a high on only one of the inputs so our next row will have no
|
||
|
|
input on a but we'll have an input on b and then our output y is still going to be zero because
|
||
|
|
there's only one input and we have our only one change of state on one input and we have two
|
||
|
|
inputs so for our next row let's write a 1 under a and then let's also write a 1 under b
|
||
|
|
representing we have a high on both our inputs thus y is going to be one our output
|
||
|
|
because we have a change of state on all of our inputs so this is a basic truth table if you've
|
||
|
|
been playing the home game and you know if you look online if you do I search for logic gates if
|
||
|
|
you are so interested by this episode and you want further knowledge doing simple search you're
|
||
|
|
going to find a lot of complex things you want to look for electrical systems electronics
|
||
|
|
keep in mind you know look for digital logic you know that kind of stuff as some of it can get a
|
||
|
|
little overwhelming if you start looking in the wrong areas so keep that in mind but that little
|
||
|
|
home game that we just did there that's how you can make the truth table for basically any kind
|
||
|
|
of logic gate and however kind of system you've got set up another way to deal with this is
|
||
|
|
something that's known as boolean algebra and boolean algebra is a way to set up formulas and
|
||
|
|
equations to deal with tying together a whole bunch of different gates if you start tying together
|
||
|
|
nan gates and or gates and depending on what you want to happen in what kind of scenario and
|
||
|
|
what kind of senses you have feeding input whether they're going to alarms or lights or you know
|
||
|
|
rotate or you know what no telling it's it's your situation so in order to write a you know a nice
|
||
|
|
little equation depending on what you want to happen based on what kind of input you can use
|
||
|
|
boolean algebra and boolean algebra is kind of I don't know it's kind of a weird twisted form
|
||
|
|
of algebra but it's really not complicated I know the first time that we went over in school
|
||
|
|
everybody seemed to have a real hard problem with it nobody really liked it but once I kind of
|
||
|
|
got it got a little trick to it and it felt like a little game and went once you get it down it
|
||
|
|
I don't know for me it was like a little puzzle game I really enjoyed especially when we had large
|
||
|
|
test segments devoted to boolean algebra it was it was kind of easy money you know it was hey let's
|
||
|
|
play a game and get a high score on the test but also as I mentioned earlier when I talked about
|
||
|
|
the little black I see the black rectangular I see packages those right there those are
|
||
|
|
integrated circuits those are also what we would call TTLs which stands for transistor to
|
||
|
|
transistor to logic and basically each one of those little chips can have multiple gates inside
|
||
|
|
and there are there are many common packages the packages is another way of referring to those
|
||
|
|
little black sea chips come packages so there are very many packages that are common out there
|
||
|
|
so if you were to say go down to your local radio shack and walk into the back where they have
|
||
|
|
all that the scary bins and you know the real skinny bins which you slide open and they got all
|
||
|
|
the weird electronic components and stuff and you know it seems like there should be tools or
|
||
|
|
something in there you know but they're they're way too flimsy and kind of scary because they're
|
||
|
|
all the way in the back and you know I don't want to go back there because people then you might
|
||
|
|
be making bones or something scary but that's where all the cool stuff is so if you go back in
|
||
|
|
there and you know you should look look for the little drawer that has something like TTL on it
|
||
|
|
or something like that and you know see some all kinds of different I see some packages and
|
||
|
|
stuff like that in there and if you look in there you may see some that are like the 7400 series
|
||
|
|
these are the it's the family for logic gates and stuff like that so the most common is the 7400
|
||
|
|
which is the NAND gate and the 7400 is a little I see which has 14 pins and contains four NAND gates
|
||
|
|
in one little chip so that's kind of neat and from there I said the family goes on I'm not going
|
||
|
|
to sit here and read out you know the the whole family of I see components because that would just
|
||
|
|
get terribly boring but basically it just expands from there and really from here we can kind of
|
||
|
|
if you guys want this is all right and make some kind of sense you know this is kind of a basic
|
||
|
|
foundation of of electronics and basic digital systems and from here you have to you have to
|
||
|
|
test you can from here you have a basic foundation start building upon higher ideas such as like
|
||
|
|
clocks and memory and being able to do other things based on other input and stuff like that so
|
||
|
|
logic gates are just wonderful ways for handling inputs and outputs and doing stuff based on
|
||
|
|
other stuff wow okay so I think I've rumbled on long enough thanks for listening you guys have
|
||
|
|
a great weekend I hope you guys have enjoyed me listening talk about electronics you guys that
|
||
|
|
asked for you asked for it so I hope it was all right if you guys want to hear more let me know
|
||
|
|
I can rumble on for electronics more and more or hopefully if I can adjust any advice whatever
|
||
|
|
go more in depth whatever just keep doing it however let me know and we'll keep doing it because
|
||
|
|
I love electronics and if people are interested in how to do stuff whatever and if I can help
|
||
|
|
you know please let me know because hey electronics and hardware is awesome so thanks to all
|
||
|
|
you guys at right the awesome software but I love the hardware so until next week you know
|
||
|
|
this has been Hacker Public Radio neither baby
|
||
|
|
thank you for listening to Hacker Public Radio
|
||
|
|
HPR is sponsored by caro.net so head on over to C-A-R-O dot 18 for all of us
|
||
|
|
oh
|
||
|
|
breaking it down we're bringing you into the live lows here on k, Hp over you
|
||
|
|
bringing you in the midnight hours of midnight now on the radio
|
||
|
|
DJ station for a whole night radio listening KHPR video
|
||
|
|
KHPR video
|