Introduction: ActoBitty Line Following Robot
Learn how to build a line following robot using the ActoBitty and an Arduino. Below is the list of hardware needed to complete this build.
1 x Actobitty 2 Wheel Robot Kit (https://www.servocity.com/html/actobitty_2_wheel_robot_kit.html)
1 x Arduino Uno (http://arduino.cc/en/Main/arduinoBoardUno)
1 x Pololu DRV8835 Motor Driver Shield (http://www.pololu.com/product/2511)
1 x Pololu QTR-1RC Reflectance Sensor (2-Pack) (http://www.pololu.com/product/2459)
4 x Male-Female Jumper wire (http://www.digikey.com/product-detail/en/MIKROE-512/1471-1231-ND/4495595)
2 x Female-Female Jumper wire (http://www.digikey.com/product-detail/en/MIKROE-511/1471-1230-ND/4495594)
2 x #2x1/4” Pan Head Philips Screws (http://servocity.com/html/_2_pan_head_phillip_screws.html)
Step 1: Assemble the ActoBitty
You can watch a video tutorial
- Remove the plastic plate from the back of the micro gearmotor enclosure and insert the gearmotor. Arrange the wiring so that it sets inside the provided indention and press the plastic plate back in place.
- Insert 4 screws into the indicated holes from the inside of the channel. Using the provided hex head driver fasten the gearmotors to the channel with their wiring facing back toward the long side of the channel.
Stretch the rubber lip ring over the edge of the 2’’ precision disk wheels so that the wheel is evenly covered by the ring.
Feed four screws through each wheel and into the threaded holes of the of the set screw hub on the other side. Make sure the set screw faces away from the wheel.
Slide the wheels onto the motor output shaft so that the set screw faces in toward the motor. Use the provided hex head driver to tighten the set screws. When tightening the set screws make sure that they sit centered on the flat portion of the motors output shaft.
Snap the Arduino mounts onto the channel using the indicated holes.These mounts can be rearranged for different applications if desired.
Insert the caster attachment into the rectangular hole in the caster mount. Snap the resulting piece into the bottom of the channel into the indicated holes. Orient the piece so that the square sensor mounts face away from the channel as indicated.
Slide the AA battery pack inside the channel. Snap the acetal battery mounts into the indicated holes to hold the battery pack in place.
Step 2: Assemble the Polulu DRV8835 Motor Driver
Assemble the Polulu DRV8835 motor driver as per instructions for the driver shield.
NOTE: Use a 2 pin male header row pin for the powering the shield (VIN and GND). This will allow the battery holder that comes with the ActoBitty kit to plug in to the shield.
Step 3: Attach Sensors to Plate
Using the #2 x 1/4” Pan Head Philips Screws to attach the two QTR-1C Reflectance sensors to the sensor plate. Ensure that the reflectance sensors face downward, when inserted into the 4.5”in channel of the robot.
Step 4: Connect Left Sensor
Use the female-female jumper wires to connect the 5V input (VIN) of the left sensor to pin 6 of the ICSP port and the GND pin of left sensor to pin 4 of the ICSP port on the Arduino. Connect the OUT pin of the left sensor to digital pin 2 of the Arduino using a male-female jumper wire.
Step 5: Connect Right Sensor
Connect the right reflectance sensor using the female to male jumper wires. Connect the 5V input (VIN) of the right sensor to the IOREF pin on the Arduino, the GND pin of the sensor to GND on the Arduino and OUT pin of the sensor to digital pin 3 of the Arduino.
Step 6: Connecting Motor Driver
- Plug the motor driver into the Arduino.
- Cut the connectors and expose some of the motor wire to connect the motors to the motor shield using the screw terminal connectors. Connect the left motor to output 1 and right motor to output 2.
Step 7: Software Installation
For instructions on how to connect and upload a program to the Arduino board go to http://www.arduino.cc/en/Main/Howto
- Download and install the Actobitty Line Follower library attached with this instructable (Actobitty_line_follower.zip). For instructions on how to install an Arduino library go to http://arduino.cc/en/Guide/Libraries
- Open the Sensor_Values example. Ensure that the #define LeftSensePin and # define RightSensePin values match the correct pins on the Arduino.
- Upload and run the example while moving each sensor over the light and dark parts of the line following track. Make note of the light and dark values of each sensor.
- Open the Line_Follower example and set the #define ThreshHoldVal to roughly the average value between the light and dark sensor readings obtained in the Sensor_Values example. For a typical setup this is usually around 1000.
- Run the program over the line/track. If either of the motors is running backwards, reverse the motor by setting the respective motor reverse parameter to 0 or 1.
Step 8: Finished
You're line following robot should now be up and running! Congratulations!