Elementary Robotics Part 2 - Adding the Microcontroller and Motor Driver

by pkadams in Circuits > Robots

1218 Views, 17 Favorites, 0 Comments

Elementary Robotics Part 2 - Adding the Microcontroller and Motor Driver

DSC_0165.JPG
DSC_0188.JPG
IMG_0306.jpg

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...

Motor driver http://www.robotshop.com/en/pololu-dual-dc-motor-d...

An ethernet cable connects the two electronics using connectors https://www.adafruit.com/products/392 and https://www.adafruit.com/products/598.

The microcontroller is pre loaded with software found here: http://arduino.cc/en/Main/Software.

Attach the Microcontroller and Motor Driver to the Underside of the Top Body Deck

DSC_0165.JPG
DSC_0169.JPG
DSC_0168.JPG
DSC_0167.JPG
DSC_0171.JPG
DSC_0174.JPG
DSC_0177.JPG

  1. Take apart the top deck from the robot.
  2. Position the motor driver to the front deck (curve with the terminal blocks closest to the front). See the picture.
  3. Position the microcontroller with the USB port and power facing the back of the robot chassis.
  4. 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.

Attach the Cable Between the Electronics

DSC_0178.JPG
DSC_0180.JPG

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.

Attach the Leads From the Microcontroller to the Motor Driver

DSC_0182.JPG
DSC_0185.JPG
DSC_0187.JPG
DSC_0184.JPG
DSC_0186.JPG
DSC_0188.JPG
DSC_0189.JPG
  1. Take the blue lead and plug the bent end into ground (GND) on the microcontroller board.
  2. Take the red lead and plug the bent end into battery voltage (Vin) on the microcontroller board.
  3. 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.
  4. 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.

Attach the Top Deck to the Chassis

  1. Make sure the DC motor wires are separated to keep wires from crossing.
  2. 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.
  3. Attach the black wire next to its paired red lead in the green terminal block.
  4. Repeat for the other black wire.
  5. Turn the board over and attach the spacers with screws into the five holes, starting with the middle.

Power the Microcontroller

  1. Plug the power into the microcontroller and watch it go!