If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Spider's power switch

Created by Karl Wendt.

Want to join the conversation?

Video transcript

In this video, we're going to connect the power switch and run the power wires to the L298 motor controller. So we've got our power switch that we made in a previous video. And you can see how we have a long wire and a short wire. So the wires from the battery, we're going to twist together. So we have two red wires, we're going to twist those together. We're wiring the batteries in parallel, because we want to keep the voltage the same but increase the amount of time we can run the batteries. So we're going to twist those wires together with the short battery wire-- or with the short wire from our switch. And so we're just twisting those together. And once we have them twisted together very tightly, we'll take our soldering iron, which is already hot. And we'll warm the wires up, and then put a little bit of solder on them. And that'll help to make sure that they stay completely together. That will just keep the wires held together. OK, so then we're going to trim off the excess there. And we're going to use some shrink wrap tubing on this. Now you may not have a shrink wrap gun or the shrink wrap tubing. So if you don't, you can also just use electrical tape, and tape it around it. The shrink wrap tends to hold a little bit better. But it means that you have to have the shrink wrap gun, so it's a little bit more cumbersome. But in any case, you can take just black electrical tape and wrap it around, and it'll do the same thing. So we've got our heat shrink gun, and we're shrinking that heat shrink tubing over that. And again, that's just to basically prevent the bare metal from touching anything else and potentially causing a short or a problem. So we want to make sure that all of the exposed wires are covered or insulated. All right. So now we've got our switch, and we're going to take some hot glue, and we're going to put it over all of the contacts on the back of our switch. And the main reason for this is that usually the switch is on the bottom of the tap light, so there's no chance for anything to touch those electrical contacts. But because it's not on the bottom of the tap light anymore, it can bump up against something that's metallic. And that means that the switch could potentially short out. Or the electricity could be conducted through a different part of the circuit in a way we don't want. And that could cause problems for us. So now that that hot glue is dry, the back of the switch is protected and insulated by that hot glue. So now we can take our long wire from our switch, and connect it to the port-- on our terminal block I should say, on our motor controller. That is meant for the positive wire. So what we're going to do, is we're going to take the long wire, and we're going to put it in on the terminal block that is on the far left-hand side. So it's really important that it goes on that one. Now it's also very important-- this is a little too long, so we're just going to trim it down just a little bit there. And again, it's important that we have just enough wire to make the connection, but no extra wire exposed there, because we don't want it to touch another metal piece. Now it's important that that red wire, the long red wire, goes to the far left terminal block when it's set up in this orientation. That's where the positive 9 volts comes in from the battery. OK. So now we're going to make another-- we're going to take two more wires. We've got one wire that's about 2 and 1/2 inches long, 3 inches long, and one wire that is about 5 inches long. So we're just stripping the ends off of those. And again, we're trimming our battery wires now, getting those ready to connect together. So these are the negative, or the ground wires, from our battery. We want to make sure we pull off the insulation. Sometimes it can be tricky to get off there. These wire strippers work really good for solid core wire, but this is a stranded wire from our battery, so sometimes it causes the wire to break. So you have to be kind of careful there. In any case, we've got our, we're going to take a little bit more, expose a little bit more of the wire. So it's closer to 3/8 inch. We're going to twist those two wires together, the two black wires, and those are going to be our negative wires. And then we're going to twist those with the two black wires from our battery. All right, so we have a nice solid connection there. And again, it's just kind of like what we did with our switch wire. And once we have those wires solidly connected together, we're going to take our soldering iron. And again, we're going to try and get the solder to wick through the recently twisted together wires. And once the solder flows down all the twisted together wires, we will have a nice solid connection. So we're going to trim off the edge of that wire. OK, so once we've got the wire trimmed off, we're going to take our pliers and squeeze the solder. And just make sure that it's nice and smooth, so that we can get it to fit in the center pin of our terminal block there. That's our 3 pin terminal block in the front. And we can get it to fit snugly, and then we're going to take our screwdriver. We're just going to tighten the screwdriver down, or tighten that pin down. And we'll take the long negative wire and bend it to the back. And the short one we're going to strip off about a 1/4 inch. And we can sort of keep that exposed for the front. So now what we need is, we're going to take our 5-- we're going to take, I'm sorry, another wire that's about 3 inches long, this is a red wire, and strip off about a 1/4 inch of insulation. And we're going to connect it to the terminal block pin on the far right, the 3 pin terminal block on the far right. And that that's going to provide us 5 volt power for our Arduino. So we'll connect that in a second. But for now, let's connect our, we need to connect our header pin jumper wires. And so we have four female to female header pin jumper wires. There's one, two, three, four. And we're going to connect those to our header pins on our L298 board. So we're just going to slide those down on all four of those header pin ones. It doesn't matter which one goes where. And once all of those are connected to our 4 header pins, we are going to be ready to connect our Arduino.