Introduction: Elementary Robotics Part 2 - Adding the Microcontroller and Motor Driver
This week our students at Long Ridge School (http://www.longridgeschool.org) attached the electronics to the robot chassis that was completed in part 1: https://www.instructables.com/id/Elementary-Robotic....
We found that we had to replace the spacers on the robot because they were too short to accommodate the heat sink on the motor driver, so there is a repeated step in this instruction.
The intent in part 2 was for the students to understand how the electronics of a robot are assembled and attached to the robot power supply. After assembly, the code is downloaded from a computer to the microcontroller and the robot is ready to move in a set pattern.
Materials used in this Instructable:
The microcontroller http://www.microcenter.com/product/431997/Uno_R3_M...
The microcontroller is pre loaded with software found here: http://arduino.cc/en/Main/Software.
Step 1: Attach the Microcontroller and Motor Driver to the Underside of the Top Body Deck
- Take apart the top deck from the robot.
- Position the motor driver to the front deck (curve with the terminal blocks closest to the front). See the picture.
- Position the microcontroller with the USB port and power facing the back of the robot chassis.
- Attach each electronic board with 3 screws and nuts. Make sure they aren't too tight as that will bend the circuit boards or the deck of the robot.
Step 2: Attach the Cable Between the Electronics
1. Attach the female end to the motor drivers to the input pins starting with (ENA) and make sure the other end (male ends) matches to digital pin 2 on the microcontroller.
Step 3: Attach the Leads From the Microcontroller to the Motor Driver
- Take the blue lead and plug the bent end into ground (GND) on the microcontroller board.
- Take the red lead and plug the bent end into battery voltage (Vin) on the microcontroller board.
- Take the other end of the blue lead and attach to the ground (GND) middle blue terminal block. Tighten the screw on the top of the terminal block after putting the lead into the GND. Be careful to insert the wire between the metal, not underneath it.
- Take the other end of the red lead and attach to the voltage motor supply (VMS) on the blue terminal block. Tighten the screw on the top of the terminal block after putting the lead into the VMS. Again be careful to insert the wire between the metal, not underneath it.
Step 4: Attach the Top Deck to the Chassis
- Make sure the DC motor wires are separated to keep wires from crossing.
- Attach the red wires outermost in the green terminal block, just as you attached the blue and red leads. Remember to insert the leads between two pieces of metal.
- Attach the black wire next to its paired red lead in the green terminal block.
- Repeat for the other black wire.
- Turn the board over and attach the spacers with screws into the five holes, starting with the middle.
Step 5: Power the Microcontroller
- Plug the power into the microcontroller and watch it go!