ActoBitty Line Following Robot

by Actobotics in Circuits > Robots

6480 Views, 14 Favorites, 0 Comments

ActoBitty Line Following Robot

ActoBitty-Robot-Kit-9.jpg
ActoBitty Robot Kit (large) 2.jpg
ActoBitty Robot Kit (large).jpg
ActoBitty-Robot-Kit-7.jpg
ActoBitty-Robot-Kit-8.jpg
ActoBitty-Robot-Kit-10.jpg
ActoBitty-Robot-Kit-11.jpg
ActoBitty-Robot-Kit-Arduino-Mega.jpg
ActoBitty-Robot-Kit-Arduino-Uno.jpg

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.

Hardware Required
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)

Assemble the ActoBitty

54e3bfda26ece2dd2f0000bd.jpeg
54e3c01026ece2779c000232.jpeg
54e3c04f26ece2dd2f0000be.jpeg
54e3c07426ece2914f0000cb.jpeg
54e3c10426ece29501000071.jpeg
54e3c13e26ece2e8c500008a.jpeg
54e3c1a126ece26466000055.jpeg
54e3c1c026ece2ecb500008f.jpeg
ActoBitty Robot Kit (large) 2.jpg
ActoBitty Robot Kit (large).jpg
ActoBitty-Robot-Kit-7.jpg

You can watch a video tutorial

  1. 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.
  2. 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.
  3. Stretch the rubber lip ring over the edge of the 2’’ precision disk wheels so that the wheel is evenly covered by the ring.

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

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

  6. Snap the Arduino mounts onto the channel using the indicated holes.These mounts can be rearranged for different applications if desired.

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

  8. Slide the AA battery pack inside the channel. Snap the acetal battery mounts into the indicated holes to hold the battery pack in place.

Assemble the Polulu DRV8835 Motor Driver

Line Bot 1.png

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.

Attach Sensors to Plate

Line Bot 2.png

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.

Connect Left Sensor

54e500b02f7cc6bdb800010e.jpeg

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.

Connect Right Sensor

54e500ec2f7cc674c60000fc.jpeg

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.

Connecting Motor Driver

Line Bot 4.jpg
  1. Plug the motor driver into the Arduino.
  2. 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.

Software Installation

Line Bot 5.png
Line Bot 6.png
Line Bot 7.png

For instructions on how to connect and upload a program to the Arduino board go to http://www.arduino.cc/en/Main/Howto

  1. 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
  2. Open the Sensor_Values example. Ensure that the #define LeftSensePin and # define RightSensePin values match the correct pins on the Arduino.
  3. 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.
  4. 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.
  5. 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.

Finished

Instructable 1.jpg
Instructable 2.jpg
Instructable 3.jpg

You're line following robot should now be up and running! Congratulations!