Check out a free preview of the full Hardware with Arduino & JavaScript course
The "Electricity & Hardware Terminology" Lesson is part of the full, Hardware with Arduino & JavaScript course featured in this preview video. Here's what you'd learn in this lesson:
Steve explains a few electrical engineering concepts, including Ohm's law, polarity, and resistors. A color-coded chart is shown, which helps identify the ohm value of a resistor.
Transcript from the "Electricity & Hardware Terminology" Lesson
[00:00:00]
>> All right, with that, let's talk about just enough electronics to make you dangerous, which is literally the bare minimum of this cuz you do not need a ton of this. You just need to know a few concepts that will help us out along the way. So this is my very helpful diagram to help explain Ohms law to you, which is basically, we have three major concepts that we care about.
[00:00:24]
Voltage, the euphemism. If you look up how do I explain Ohms law's is I use water in a hose, which I feel is somewhat inappropriate for electricity and somewhat rude. So I chose to just modify it a little bit which is how much pressure do you have? How much voltage you starting out with, if you have a lot, you have a little, cool.
[00:00:43]
There's a lot coming in there, right? The current is, how wide is the tube? As you all know the Internet being a series of tubes that cats run through, right? So how many cats do you have? That's the voltage, right? How wide is the Internet tube in which the cat memes can go through it and then anything that constricts that is the resistance, right?
[00:01:06]
So you could have a lot of cat memes running through and then all of a sudden you have maybe something limiting the Wi Fi then there is less cat memes going through. In a lot of cases like most of the Arduino pins create 5 volts. All those digital pins, they send 5 volts, they don't send 5 volts.
[00:01:26]
The 5 volt pin, spoiler alert, sends 5 volts. The 3.3 volt pin, which we will not use today, sends 3.3 volts, right? Sometimes, that is enough to cause trouble, right? So sometimes we will use a resistor to kind of limit that a little bit. The LED that we're gonna plug in in a second, could you send 5 volts to it?
[00:01:52]
I can confirm that you can. Should you? You should not, right? And one of my goals today with this workshop is I obviously hope you learn a bunch of stuff you get a lot of value out of this. If I do not set this place on fire, we're gonna count that as a total win, right?
[00:02:08]
So for some of this stuff, we will be responsible that we will use the resistors when appropriate. I will tell you at one point in particular when we get to the temperature sensor, if you smell plastic burning, just unplug the thing please. [LAUGH] All right, there are one or two pieces that if you put them in backwards and then you smell a funny smell just unplug it.
[00:02:32]
[LAUGH] I say this from experience. So just already don't assume everything is fine. When in doubt unplug it and we will deal with it from there. But I think that amount kind of starts us out. And then we've got, where this also becomes important is we've got polarized and non-polarized components.
[00:02:55]
Now, I assume that most of you have used a battery before, right? And in those cases, we know that there is a right way to put in a battery that works, and a wrong way to put in a battery that doesn't work, right? And for most appliance, we have to put it in twice.
[00:03:11]
It's kind of like a USB-A cord, right? You got to try both sides before you realize which one works. Some things we're going to use are polarized, which are the LEDs. We're not gonna use a battery, but some things matter the order that they go in, the temperature sensor.
[00:03:24]
Some things do not matter, right, like a button, something along those lines, right? And so in some cases it matters. In other cases, it does not matter. I could run through a whole bunch of electronics terms that will maybe one day become useful for you. But in this case, understanding that for the most part, we've got a bunch of little components like LEDs, like buttons, like sensors that we're gonna use.
[00:03:50]
We've got some resistors. We've got wires. That's about like you're now caught up. All right, that's about as much as you need. There's some other fun stuff in there. I will say like we are not doing this today because involved bringing stuff that you don't have but they're like the last example in the Arduino starter kit is how to hook up something to one of your remotes and control it with code.
[00:04:15]
I was not gonna say, hey everyone, please bring a TV remote you're happy to lose, that felt rude. But on your own, [LAUGH] for your own edification afterwards. That is definitely a thing you can do. But we're gonna keep it mostly simple cuz our main focus today is not just the electronics pieces.
[00:04:31]
But actually what new and really aspirational things can we do with the Venn diagram of not only the fact that we have hardware at our disposal, but then also the fact that we have all of the JavaScript ecosystem at our disposal. And we only got a day together, right?
[00:04:47]
And so let's laser focus on that. Awesome, so let's look at this first LED. So we've got that built in one. We should also talk a little bit about how to actually do something from the outside world cuz yes, it was very rewarding to make the little built-in LED blink.
[00:05:09]
I'm glad we all had to share that experience together, but now let's hook up some external stuff to it. So the LED is one of the first kind of like polarized components that we'll use. The long tail is the positive side, right? All circuits kind of run from the source all the way into ground.
[00:05:26]
So from positive to negative, right? Like any good emo album. And we start with the positive through the negative so that this is one of those polarized components that we care about as well. We're also gonna use a resistor, right? And resistors have color codes on them. You'll notice that there are two different ones here.
[00:05:49]
There are four bands and there are five bands. May having opened one of these kits a few weeks ago I think we have the five bands in there. But I show both diagrams just in case we all open these kits and find a surprise or later when you're watching this video or watching at home You have different ones lying around those will work as well.
[00:06:10]
It's not that the blue ones are different than the brown ones, it is simply that the blue ones have more bands to help you try to figure it out. But like it's basically each band represents a digit, right? And so Brown is 1, black is 0 so it looks like a 10k ohm.
[00:06:32]
One other box. I'm thinking yeah. And so a lot of times you can stare at it. The other life hack that I will tell you is if you just order capacitor or I'm sorry, resistors off of Amazon, they come in a little baggy, that just tells you the answer on the back.
[00:06:49]
So you can squint and hold it up to this chart. And I think you might have to a little bit today. But I'm gonna show you a cheat sheet in a second 'cause we're only gonna use two different values and you can just kind of look at those two different values and figure it out.
[00:07:02]
Like right now but in general, the life hack that I use is if you just order them and don't throw away the packaging, the answer is in the packaging.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops