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
Current time:0:00Total duration:5:29

Video transcript

all right so this is our motor and this is our battery and we know that if we switch the connections on the on the battery we can change the direction of the motor but all we can do right now is put the motor in some sort of a housing and have it run around and then we have to manually change everything so what we want to do based on our our goals or objectives for this project was we want to be able to control the motor and have it turn and turn on and off and go backwards and forwards when we want it to so what we've done is we've selected a microcontroller this is called this particular one is called an Arduino Uno and you can get these online I got this particular one for about $20 there are variations that you can get that are is that are as cheap as ten or twelve dollars all the way up to you know seventy or eighty dollars depending on what you which you wanted to do and how much work you're willing to do to to put the board together so this one comes preassembled it's ready to go it's got the connector for your computer so it's it's easy to use and that's why I selected this particular one so Arduino is an open-source microcontroller and it comes with a an online or it comes with a compiler so you can download the compiler and write your code upload it to the Arduino and cause your your robot to move and do different things so the Arduino can take information from sensors and use that information to tell parts of the robot what to do so we know we've got a motor that moves and we know we have a power source and we have brains to make it move but there's an issue we can't hook the motor directly to the Arduino because the Arduino wants to run on a lot less current than what the motor wants to run on so the motor is going to burn the Arduino out we have to have a way to switch the the high current of the motor control it in other words a way to turn the high current on and off and in a way to control the direction of that high current the polarity of it without directly affecting the the Arduino so we need another another device to do that and that device is called a motor controller so we've already built this motor controller up and I'm going to show you how to make it it's a solar buttocks motor controller and I'll talk a little bit about what it does so it basically controls the speed and direction of our motor and so it switches that the higher power of the batteries and it allows more current to flow and it takes signal information from the Arduino which is a low voltage low current signal and so the low voltage low current comes in to the motor and controller and says hey turn the motor on in this direction and then the motor controller let's power from the battery flow through the motor controller to the motor without damaging the Arduino and so it lets us run the the motor on a higher amount of power than we could if we tried to run it through the Arduino itself so the way it does that is signals come from the Arduino and they go into these little ports here and those ports are the signals are interpreted by this logic chip here which is a l2 ninety eight chip and that that allows us to control the power going from the battery to the motor now there's also a chip here this is a five volt power supply regulated power supply chip and this allows us to take five volts out of the motor controller to power the Arduino so we can take that five volts out from this terminal block right here and connect it to the Arduino so this also allows us to run multiple different voltages so the motor is going to be pulling 12 volts from the batteries but the Arduino will be pulling only five volts from this supply here so then we also have these diodes on board and the diodes are their flyback diodes and they prevent voltage from coming back from the motor and damaging other parts of the circuit and when you stop a motor faster when you reverse its direction you can get a pulse of electricity come that comes back down the line and can affect other parts of the board so because diodes act as valves and only allow the electricity to flow in one direction it protects your your board so then we also have some resistors here you can see these resistors these two resistors are designed to protect the LEDs here and the these LEDs are emitting diodes and they indicate the direction or the polarity of the current and that it will indicate the direction the motors turning so that's what they're there for and these resistors protect them from getting too much power and burning out and then we have a little tiny capacitor here that's a high frequency filtering capacitor and then we have an electrolytic capacitor and that probably helps to smooth out some of the variations in current we have two more resistors back here and they protect various aspects of our our chip back here I believe so we have our terminal blocks and these terminal blocks that's where the power goes so the motor will be connected to the terminal block this motor will be connected to the terminal block like that and the power from the battery will come in to the terminal blocks here and I'll show you how to connect all this and wire it up and the next video we're going to build this little guy and show you how it how it works