Files
hpr-knowledge-base/hpr_transcripts/hpr1690.txt

362 lines
22 KiB
Plaintext
Raw Normal View History

Episode: 1690
Title: HPR1690: Arduino 101 Breadboard
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1690/hpr1690.mp3
Transcribed: 2025-10-18 07:46:29
---
This is HPR episode 1690 entitled Arduino 101 Breadboard.
It is hosted by Klaatu and is about 28 minutes long.
The summary is learn how to use a breadboard.
This episode of HPR is brought to you by an honesthost.com.
Get 15% discount on all shared hosting with the offer code HPR15.
That's HPR15.
Better web hosting that's honest and fair at An honesthost.com.
Hi everyone, this is Klaatu.
I want to talk about electricity.
And then I want to talk about Arduino's, but not all in one episode.
No, I'm going to split it into two.
So let's get started with first just the electricity stuff.
First of all, I am no expert, not an expert in electricity, not an expert in electronics.
I'm not an electrical engineer.
I'm just a hobbyist.
But this is a lot of really cool and fun stuff.
So I want to tell you about it so that you also can start messing around with it if you so choose.
So the hobbyist, the typical hobbyist electronics kit,
starter kit, let's put it that way, is going to consist of pretty much a breadboard,
a power source, and then a bunch of things, like electrical components.
So by electrical components, I mean lots of things, but like resistors,
which are kind of boring, but sometimes necessary.
LED lights, those are always fun to look at.
And sometimes you need resistors for those because you'll blow them otherwise.
Speakers, like buzzers, switches, servos, motors, anything like that.
If you go to any of the popular online sellers of electrical components for Arduino,
you'll probably find stuff located there.
Otherwise, you can go to places that sell hobbyist electronic parts.
Let's start out with the breadboard, but for that to work, you're going to need a power source.
Now I'm cheating because I happen to have an Arduino Uno here,
and I'm just powering everything from that.
And since the end goal of this is to work with the Arduino,
I kind of want to start out from the Arduino perspective.
Now, if for whatever reason you have no interest in Arduino,
whatsoever, then that's fine.
You can do the electrical stuff without the Arduino.
And to get that started, all you need is a battery pack.
So if you go to an electronic hobby supply store and get,
they usually have some very friendly kinds of plastic cases,
where you can put like two or three or one AA battery.
They'll have cables coming off from the plastic case.
That's not even necessary.
Either to be honest, you could roll your own.
You can grab a battery and just put cables on either end of the battery,
and then put those cables into your breadboard as I will explain.
But you can do it with the plastic case just to make things a little bit easier.
If you do that, don't touch the two cables together.
That's a bad idea.
That tends to overload your battery,
and it'll get really hot,
and it'll probably start leaking acids and things could start burning up your plastic case even.
So don't do that.
That's one way to do this.
Now, having said that,
I'm going to speak as if though we're all using an Arduino,
because as I said, that's the end goal of this.
It's to end up doing Arduino stuff,
lightweight Arduino stuff, but still Arduino stuff.
Anytime I'm talking about the Arduino,
if you're not using the Arduino,
then you can pretend you're using batteries,
and just substitute battery for Arduino.
So that we're all on the same exact page,
I'm going to refer you to some open clip art images as well,
just so you can see what I'm speaking about as I speak.
So if you go, I don't really want to give the whole URL,
because it's too long.
So if you go to openclipart.org,
and search for breadboard, all one word,
you'll find one of, I think,
one image by a guy named Misa Mike,
or Misa Mike,
and that's the breadboard actually coincidentally,
that's like almost the exact same breadboard
as I actually have in real life,
but that is a coincidence.
But it's a very common layout for a breadboard.
And then the other thing that I want you to look for is Arduino,
and that will come up, I think, three different images,
but this one is the prettiest one.
It's B, it's by B, Gaultier,
and it's tagged with like Arduino and Genome and Microcontroller,
and actually the name of the thing is called Microcontroller.
But it happens, it just so happens to be basically an image
of the Arduino Uno,
which you've probably heard about if you've ever looked into Arduino.
That's kind of the, it's, I'm not going to say it's the low end,
because it's actually highly, you know, it's very functional,
it has lots of useful things.
So it's a really great entry level Arduino,
because it's got a lot that it can do,
and yet it's also very, very cheap and reasonably small.
It's not the smallest they come, but it's reasonably small.
So that's the starting point.
Let's get started.
So first of all, let's just plug in the Arduino to our computer,
and we're not going to worry about configuring that yet,
because all we're doing right now is we're using it as a power source.
So if you plug the Arduino into your USB port and the computer's on,
the Arduino now has power.
Set the Arduino next to the, the breadboard next to the Arduino,
and we're, we're nearly set up for this experiment.
So I don't know how much you know about electricity.
I know a little something about electricity,
and I certainly know that the tendency for electricity,
like a lot of things in nature,
is to move from a place where there is a lot of electricity
to a place where there is less electricity.
That's how electricity works,
and that's pretty common in natural phenomenon as it turns out.
That's why we have sayings like nature abhors a vacuum,
and it's why things will catch on fire even without touching fire.
You know, if there's like a tree in a forest,
and there's a fire six feet away from it,
even if the fire doesn't reach the tree,
like physically the tree will still ignite.
It will combust, because the heat has moved from a place
where there is a lot of heat to places where there is less heat.
So that's, that's just something about nature
that seems to be true,
and certainly it's true for electricity.
So if you look at the picture of the Arduino,
or if you have one, you can look at it with the Arduino,
with the USB port of the Arduino facing to your left
as you look at the top of the Arduino,
so that you can see all the, all the cable ports,
or as you see on the open clip art page that I've referred you to,
you'll see that there's a line that says a little bit of text
at the bottom of the Arduino board that says power,
and underneath that are a bunch of different things
that say like reset on the picture online,
you'll see it says 3v3, that's actually a typo.
It should be 3.3v, not 3v3, but that's okay.
And 5v, and then GND, and a bunch of other stuff.
So as you might have guessed, the 3.3v and the 5v both refer to power,
and 3.3 is what we'll use for this.
So 3.3v, the way that you use it is you buy from an electronics component parts,
the other thing that you need, which are patch cables,
or that's what I call them anyway,
I don't really know what they're called in the electronics world,
they're just cables with little pins at the end,
little metal pins, and that just makes it really handy
for poking into the breadboard and into the Arduino.
Strickly speaking, you don't actually need these,
if you're really on a budget, you can go just grab any cable lying around the house
that you're not using, like an Ethernet cable.
If you have one that's just been destroyed, and it's just no good anymore,
you could even, I think, do it with a power cable,
you could do it with a power cable that you would use for,
for instance, for a desktop computer that's not working.
If the power cable itself is all screwed up,
you could, it's harder because there's a lot of rubber around that,
but whatever kind of cable you have,
you can usually strip it down enough to get to
just kind of like the barest rubber sheaving,
and then on the inside, obviously, is the copper wire,
and the wire is what you need to expose,
at least a little bit, like you're exposed,
like maybe a centimeter of it on either end,
and then if it's a bunch of stringy copper,
then you probably need to twist it,
just kind of twist it between your fingers
so that you're making kind of one wire,
as it were, sort of a braided wire.
It doesn't have to be all that beautiful,
it just needs to be small enough
so that you can put it into this little tiny Arduino cable pinhole,
and so poke whatever you have ended up assembling
into the 3.3 volt thing,
and then take it over to your breadboard,
and insert it into the red column.
So notice I said column, and notice also I said red.
Now your breadboard might not actually have red on it,
it might not be labeled at all,
but let's talk about that.
So we've got a breadboard,
and you can see it on that open clip art page,
and so you see on the sides, on both sides,
there are sort of separated, segregated from the rest,
there are columns, there are pins,
and I'm telling you to look at them as columns,
obviously you could look at them as 30 rows of pins,
but don't do that, look at them as columns of one pin columns
of 30 pins, or however many pins are on your breadboard.
In other words, I want you to look at the red and the blue strip
along the side, or whatever kind of strip you have along the side,
as a column rather than a row,
and there are two columns, possibly only one,
it depends on the breadboard that you have,
but let's just talk as if though,
you know, since we're both looking at the open clip art one,
and I'll address other types later.
So right now we're going to say that there are two columns,
one is labeled blue, one is labeled red,
common electrical shorthand says that the red one is positive,
and in this case, the blue one is negative,
usually it's black, it's negative, and red is positive,
and it kind of depends on what industry you're in,
but anyway, speaking in this context,
red is positive, this blue line we're calling,
the darker line is negative, there you go.
So positive is where the electricity is moving to,
it's moving toward the positive.
So obviously, I mean, this is all just metal.
I mean, electricity doesn't care what color it is,
it doesn't care what column you stick it into,
it's just going to follow a, you know,
conductive path as far as it can,
so that we all know where to plug things in,
we're doing it a very specific way,
and we're saying we're going to take this patch cable
that we've got plugged into the 3.3 volt port of our,
Arduino, or our battery, and we're going to plug it into the red column.
So now, once you've done that, you won't see anything,
you won't feel anything, but you'll have to take my word for it.
This red column, up and down the side of your breadboard,
is now electrically charged.
Now, if you're looking at the breadboard,
and you notice that there's red column on the far left as well,
that's not electrically charged right now,
that's a separate entity,
it's just basically, it's a mirror image of what we have over on the right hand side.
So you can use either side, don't use them both,
just use one, we're basically we're creating a power grid here,
and that big gutter down the center of the breadboard is,
well, it's a gutter, it's dividing our breadboard into sort of a separate grid.
So right now, our power source is along the right hand side of our breadboard,
and we've color coded it red maybe,
I have, or the breadboard that I happen to have lying around,
is red, that has the red line.
So that's our electrically charged power stretch right now,
so that could power the rest of our breadboard, and in fact, it will.
So to complete our circuit,
well, let's do this first, let's not complete our circuit yet,
maybe you don't know what a circuit is.
So we've got power down this red column,
so now what we can do is we'll put that, we'll set that mentally aside,
that's our power source, that's the power station where all the power is coming from,
well, the Arduino would be that, this is the power line, the power grid,
and we're going to look at now at the pin holes in the middle of the breadboard.
So you've got probably about five pin holes across, and then again, probably like,
let's say 30 down, in the open clip art edition, I think it's like probably 60 or 120 down.
On mine, it's much smaller, it's again the sort of the size of a business card,
and it's 30 rows of five pins across.
Mine is also very helpfully numbered, but again, I've used some that are not numbered,
you just have to look, and that's fine, but for this it's actually helpful to have the numbers,
but unfortunately the open clip art one doesn't, but that's okay.
So basically I'm telling you, in the middle row of your breadboard, you need to look at those
pin holes as rows, not as columns. So each row is on the same, it's a power line essentially,
so if you think of them as houses and a neighborhood, that would be like on one power line,
horizontally, not vertically. If the power went out for someone on the first row,
the power would probably still be working for the people on all the other rows,
actually in this case nobody has power, but I'm saying that horizontally, those pins share power,
vertically they do not. They're segregated vertically, they're active horizontally.
And we can test that theory by taking another patch cable, and we'll plug it into the red column
of our breadboard, and the other end we're going to plug into one of these rows. I'm just going
to choose the top row, so I'm going to call that row one. So into row one, I now have a cable that
goes back to my power grid source, the red column. So now I'm going to take this, since this is an
audio show, I'm going to take a buzzer that I have, a little speaker, and I'm going to plug the red
cable of that. Again, electricity doesn't care about color, but the electronic people that design
all this stuff are going with the shorthand that red is positive, and so should we. So we'll take
the red cable and plug that into the first row. And you'll notice you'll hear nothing's happening,
and that's because we don't have a complete circuit. So the electricity is flowing from 3.3 volts
in the Arduino over to my breadboard, the red stripe, the red column, and then from the red column,
it is being sent over to that first row, and since I have my speaker plugged into the first row,
the electricity could go into the speaker via that red cable. But what's happening is that
that electricity moves in a circuit, and so it's not getting through the speaker. It's not going
through the electronics of the speaker because there's no way out of that yet. And if you think
about electricity, where does it like to go? Like when electricity occurs in the sky, for instance,
in the form of lightning, everyone basically knows it tries to get to the ground, right?
So in this case, it's trying to go to what we do call in electronics the ground connection. So
that on the Arduino, there's a couple of different places for that. And if you look at the picture,
you'll see one is on the power strip down at the bottom, and the other is at the top. Now usually,
I just use the one at the top because I feel like it's safer because if I accidentally plug it into
like the 5.5 volt or the reset or something, you never know what'll happen. So I just use the one
at the top there ground, G and D rather. So plug in a cable from G and D on the Arduino over to the
blue side of your breadboard. And now you've got an escape route. You've got a full circuit going.
You've got electricity going from the Arduino into the breadboard. And you've got a path out
of the breadboard back to this ground connection. So you've got a complete circuit. So now the
electricity is actually here in the breadboard is flowing through the breadboard. Now again,
it's still not in the speaker. So if we plug in the black cable into some other line, realistically
speaking, it's going to be hard to get that black cable into the second row just because
everything's so small. So I'm going to plug it in more like into row 10 of the of the breadboard.
Still nothing's happening. Well, again, these are isolated rows, right? So there's still no
complete circuit. So if I take a cable from and plug it into row 10 where my black cable also
exists and then complete that circuit by plugging it into the blue strip, the blue column on my breadboard.
Wow, that happens. So you just heard probably in the background the speaker was activated.
And that's because the electricity has finally found a pathway up the speaker cable, the red
speaker cable back down through the black speaker cable through the breadboard back into the
ground port of the Arduino. So there you go. That's that's electricity. So if I just pulled the cable
out to stop the buzz, but if I plug it back in, you see it just it activates it. And the speaker
and LEDs are both really good for testing like that because they're basically binary objects.
It's, you know, they're either off or if you plug in the speaker, they're on. It's it's just it's
a nice little indicator. So they're not bad things to have around just for sort of testing.
They're sort of the echo statements or print F statements of of simple electronics.
Okay, so that's that's a complete circuit. That's an introduction to the breadboard. So a little
bit more about the breadboard just kind of briefly. The the big gutter down the so I mean, if you
just look at the right hand side of the breadboard, forget the gutter and everything to the left of it.
Just look at the right hand side. Once again, we've got the positive and the negative columns on the
right. So that's your power source. Well, it's it's not your power source there. We know your power
source, your batteries, the power source. But that that's kind of like your electrical grid in
in you know, in the real world. That would be your electrical grid. And you can plug into that grid
from any row in the middle of the breadboard. Now the interesting thing is like if we think of
these as neighborhoods or whatever or power districts, I don't know, then that gutter would be
would would separate the two from one another and indeed it does. Like if I if I take the red cable
and plug it, let me let me get my complete circuit going. And then I'm going to take my sorry about
that. I'm going to take my red cable out and plug it into the first row on the across the gutter.
And you can hear nothing's happening. So so there there's no connection there. Now if I took
another cable and plugged it in from the the first row across the gutter and then into the first row
of the other gutter side. There it goes again. So you can bridge that gutter pretty easily. It's
not like there's something magical about the fact that those two things aren't connected. They're
just not connected. Some breadboards don't have two columns down the side as well. That's something
else to be aware of. So I've I've used breadboards where it looks exactly the same except instead of
two columns down each side. There's only one column down down each you know one column per side.
What you do in that case is you just have to assign okay well this column is going to be my
positive and this column is going to be my negative and that's what you're going to do. Or I mean
now that you know that you know that that the electricity is active horizontally in the middle
and vertically on down the side you can kind of arrange stuff however you want to really. It's just
convention that we're doing it this particular way. And you don't have to pay attention to colors
or the gutter or anything. You can do whatever you want but now at least you know you you understand
how the layout works. Okay so let's try something a little bit more complex with this gutter. So
I got this little tiny switch here from the local electronics shop and it's a push button switch.
It doesn't flip or anything it's not you know it's it's a spring spring loaded push button clip
and it's got four pins. So the four pins can sit. It can straddle this this gutter between in
the center of the the breadboard and it sits in some of the pinholes. So if I place this switch
in row one. So I've got two two of its pinholes over row the row one of the of the breadboard
and the other two are falling therefore on row three of the breadboard. Now what I could do
in the way that this particular switch works and I just found this out by experimentation really
is that when you press the button the legs on that are diagonal from one another connect.
So when the button is not pressed the legs diagonal from one another are not connected.
The circuit is broken but when you press the button they become connected. So using that logic
basically how we want to route this electrical signal is we want to send power to row three
on the right hand side of the gutter and we want my speaker to be on row one on the left hand side
of the gutter. Now there's no connection there if I'm not pressing the button but if I press the button
there's a connection it's made so I can just just press the button all I want and I can send
signals to the speaker and that's how that works and it works as you could hear fairly well.
Okay so that's really exciting stuff but again all of this stuff is basically it's you know
binary there's not really a whole lot going on in terms of well certainly we're not using the
Arduino capabilities for anything it's just a power source and and and so it's it's it's cool
and it's a lot of fun to play around with that sort of thing and there's actually a lot you can do
with that stuff but obviously the really fun stuff is once you start introducing the Arduino
and start coding and playing around with that that's not true they're it's both actually really fun
but as I said the purpose of this show was to introduce you to Arduino so we'll do that
in the next episode until then go out and go out and look see if you can get a breadboard
get some cables get some components and start messing around with it it's it's a lot of fun
talk to you next time
you've been listening to hecka public radio at hecka public radio dot org we are a community
podcast network that releases shows every weekday Monday through Friday today's show like all our
shows was contributed by an hbr listener like yourself if you ever thought of recording a podcast
then click on our contributing to find out how easy it really is hecka public radio was founded by
the digital dog pound and the infonomican computer club and it's part of the binary revolution at
binrev.com if you have comments on today's show please email the host directly leave a comment on
the website or record a follow-up episode yourself unless otherwise stated today's show is released
creative comments attribution share a light 3.0 license