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

Created by Karl Wendt.

Want to join the conversation?

Video transcript

So in this video, we're going to show you how to connect the power wires from the motor controller to the Arduino and the control wires from the motor controller to the Arduino. So we're connecting the red wire to the voltage in. That's the red wire goes to the VIN, and the black wire's going to go to the ground. So GND and the red wire goes to the VIN-- very important that those don't get mixed up. OK, so now we have our signal wires that are going to come up from our motor controller, and they're going to allow our Arduino to tell the motor controller when to make the motors go and how fast and in what direction. So they happen to be female header pin connectors, and we need males ones because of the way that we set up our Arduino. So we're going to just use some wire, and we're going to push the wire into the end of it. And then we're going to, basically, trim the wire off and get it to the right length. So we'll do this for all four pins and get the wires bent straight, and it takes a little bit of doing. You want there to be about a 1/4 of an inch of wire exposed, maybe just a little bit less. And again, we don't want any exposed wire. So you want it to be pretty close. I think 3/16 of an inch is probably even better than a 1/4 of an inch, as far as the connection there goes. So in any case, we're going to put our last wire in here. And you do when you some pliers to push those in. That time, the wire got bent, and so I'm going to try one more time to get this wire straightened out and put in place. They're kind of tricky to get in there sometimes. OK, so now we've got our wires. And now we're going to run those signal wires to the right ports on our Arduino. So the first one is going to go to pin 11. The next one is going to go to pin 10. The next one after that is going to go to pin 9, and then the next one goes to pin 6. No signal wires are following from left to right in the same order as they occur on the motor controller below.