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

Motor controller connections

In this video we show you how to attach and wire the L-298 motor controller board to Bit-zee's frame. Created by Karl Wendt.

Want to join the conversation?

Video transcript

We're going to wire up our L298 motor controller. We're going to position it right on top of the camera where the batteries would normally go. So in order to get started, we've begun taping the area that we're going to attach the L298 motor controller to. And the tape serves a couple purposes. It protects the board from the sharp leads on the bottom of our L298, and it also allows us to remove the L298 should we need to later, because we're going to hot glue it down. So the Arduino-- we're going to remove the Arduino, because it is kind of in the way. We need to route wires, and it's a lot easier to route those wires when it's not there. So we're taping down the control wires for our camera. Those are the shutter and power wires. And now we're routing the wires from our switch-- that is the on off switch-- up to where they'll connect with the motor controller. So we're going to go underneath the camera to do that. And we're just using our needle nose pliers. And then this is the switch from the battery, or the wire from the battery, I should say. And we're going to pull that through as well. And you kind of just want to make sure that you are careful in that you don't knock any of the components on the bottom of the camera loose when you route those wires up like that. But if you go underneath the camera, it makes it look tidier and it's a little bit more straightforward. So now we're going to tape over the leads on our capacitor that's on our camera there. We realize that the L298 has some leads underneath that could potentially touch it and cause a short. So we want to make sure that doesn't happen. We're just covering it over with electrical tape, and double checking the position of the L298. And then what we're going to do is we're going to take our hot glue and squirt out about 3/4 of an inch in diameter blob of hot glue. And we'll let it sit there for just a few seconds, about 10 or 15 seconds, and that will allow it to cool just a little bit. And when it cools, it gets a little stiffer so it provides little more of a cushion between the camera and the bottom of the L298, once we install the L298. So we'll position the L298 where it needs to go, and the motor controller there, and we'll let it sit there for just a second. And we'll come back to before we wire. It'll take about two minutes for that hot glue to fully cure and harden. So now it's definitely hardened and in place. And so the L298 is secure. So now what we're going to do is we're stripping the wires that are going to go to our motors. Those are the wires that have come up from our motors, I should say. And once we've got those stripped, we're just going to connect them to the motor block terminals. So you can see we're just pushing the wire in there, and then we'll tighten the screw in the motor block terminal down. And that's how we wire our motors. So each motor has two wires, and both of those wires go to each one of those blocks. So each block is for one motor. So now we're connecting the last wire for the motor on the other side. And we just tighten that down. So now we're going to connect the wires that are going to come from our Aduino and tell our motor controller which speed and direction each motor should go. So there are different markings on each of the input pinouts, and you can see that the first one there says L1 and then there's an L2 right next to it. L1 and 2 are going to be individual wires that run back to the Arduino. L3 and 4 are also going to be individual wires that run back to the Arduino. Now, there's another pinout right next to the terminal block. That's E1 and 2. And we're going to connect E1 and 2 to E3 and 4. So the way we'll do that is we have a short wire. We stripped extra of the short wire off, and we're just wrapping that around another wire that we've stripped so that we can connect the two. So we're going to create what's called a jumper, and it's going to connect E1-2 with E3-4. So now what we're doing is we're just soldering the jumper together. And in order to do this, we're heating the part that's wound around-- the one wire that's wound around the other. And as those wires get hot enough, they'll melt the solder and the solder will actually wick in and around the joints. You can see it go there. And that'll make a nice strong connection that we don't have to worry about coming apart. Now we're just taking some heat shrink tubing that we've cut and using our heat gun to melt that or to soften that tubing and shrink it around our connection. And that'll prevent any shorts in the future. So if a stray wire touches that, it won't short out. And we're just waiting for the heat shrink cooling to dry and we're trimming off just a little of the excess. And we'll take our jumper and connected it to E1-E2, E3-E4, which are the two remaining pinouts. And we discovered that it's just a little long, so we're going to trim off the excess. And then we're going to try and strip the wire and take just a little bit of the insulation off so that we can put it in the pinout. And it's tough to get the wire insulation off when it's that short, so we used our nipper pliers to finish that off. So we're going to make our connections there between E1-E2 and E3-E4. Again, taking just a little bit of extra wire off-- it's not always easy to know exactly how much you need, but we don't want a whole lot of excess wire sticking up because it may be able to get knocked out that way. So we're going to route our wires down. You should have a total of five wires coming out of the motor controller. And we're going to route those down, and try and put them together in a really neat fashion. Before we do that, we'll trim off the excess from this wire. We're going to put them together just lining them up so they're parallel to one another and so none of the wires are sitting on top of each other. So they're all just sort of lined up in a nice, neat row like lanes in a highway. And then we're going to tape them down with our electrical tape. And that'll help to keep them in place and keep them ordered. And again, we want the wires to stick up past the side of the plastic housing about an inch. And that'll give us some excess if we need it for connecting to the Arduino.