The Digilent Line-Following Motor Robot Kit (MRK+Line) provides the perfect starting point for those new to robotics, but has the power to be used for advanced designs and applications as well. The MRK+Line pairs our powerful Cerebot™ MX4cK microcontroller development board with a rugged steel platform and all the motors, wheels, sensors, and other parts needed to build a complete robot.

This document demonstrates a simple design that will get your MRK+Line up and running, using its four IROS sensors to follow a dark line on a lightly colored surface. Using your MRK+Line’s powerful Cerebot MX4cK microcontroller, you’ll be able to add all sorts of functionality to your robot. Add some of our extensive line of peripheral modules (Pmods™) and you can design almost anything!

Your Cerebot MX4cK can be programmed with either Microchip MPLAB® IDE or chipKIT™ MPIDE. Microchip MPLAB IDE can be downloaded for free from microchip.com. chipKIT MPIDE can be downloaded for free from github.com/chipKIT32/chipKIT32-MAX/downloads. The demo project used in this design can be downloaded from the Line Following Motor Robot Kit product page at digilentinc.com. For more information on programming the Cerebot MX4cK with MPLAB or MPIDE, see the Cerebot MX4cK Reference Manual, available from the Cerebot MX4cK product page at digilentinc.com.

Included Parts

  • Cerebot MX4cK
  • PmodLS1 with 6-pin cable
  • Two PmodHB5 2A H-bridge motor amplifiers with attachment clips and 6-pin cables
  • Four IROS sensors
  • metal standoffs for microcontroller board
  • rugged metal platform with holes on 1/2“ center
  • two 1/19 ratio motor/gearbox drives with ABS plastic wheels (1/53 gear ratio motors also available)
  • rugged plastic wheels and drag button
  • rugged metal motor mount
  • all wiring and assembly hardware included
  • angled bracket
  • 4” Velcro mounting strip
  • 6” 6-pin cable

Functional Description

The rugged steel components have holes on 1/2” centers so Digilent circuit boards and other vendors’ products can be easily attached.

The following tools are recommended for robot assembly:

  • regular and small Phillips head screwdrivers
  • adjustable wrench
  • pliers
  • wire stripper

Example Assembly

1. Motor Mount

Place the motor mount on the right side of the platform. Attach it with two screws.

2. Motors

Attach the motors to the motor mount with the miniature screws.

3. Battery Case

Attach the battery holder to the platform (near the motor mount) using the shorter Velcro strip.

4. Pmod Clips

Attach the Pmod clips to the metal platform on both sides of the battery holder.

5. Drag Button

Attach the drag button to the platform, below the battery holder.

6. PmodHB5

Attach the two PmodHB5 modules to the Pmod clips and connect them to the motors.

7. Tires

Get the two wheels and the rubber traction bands. Stretch the rubber band around the outside of the wheel. Attach the wheels to the motors.

8. chipKIT PRO MX4 Jumpers

Compare your Cerebot MX4cK board to the picture below. Note that the blue shorts are attached to each jumper as shown. Remove the rubber feet from the bottom of the corners of the Cerebot MX4cK. Attach the standoffs to the board using the mounting screws. Mount the Cerebot MX4cK board to the top side of the platform. Be careful not to cross thread the screws while mounting the Cerebot MX4cK board.

9. 6 Pin Connectors

Connect the two PmodHB5 modules to port JD on the Cerebot MX4cK board using the two 6- pin cables. Using the PmodHB5s, connect the left motor to the bottom row of JD, and the right motor to the top row of JD. Use the marker on the cable connector to ensure that pin placements are in alignment when connecting the boards. See the pictures below.

10. Power Wires

Strip 6mm of insulation from both ends of all four 22-gauge power wires.

11. Routing Power

Route power wires from each PmodHB5 to the J18 power connector on the Cerebot MX4cK board, noting ground and voltage connections.

12. 3rd Pmod Clip

13. Angled Bracket

Attach the angled bracket to the front of the platform as well as the 4” Velcro mounting strip.

14. IR Velcro

Cut four ½” sections of Velcro from the other 4” strip. Attach these ½” pieces to each of the four IROS sensors.

15. PmodLS1

Attach the PmodLS1 to the Pmod clip, and then connect the PmodLS1 to the top row of the Pmod header JJ using the 6-pin cable. Take care that the pins are connected correctly. The flower-like symbol should only be viewable on one end of the cable. Please see the pictures below.

16. IROS Sensors

Attach the four IROS sensors from left to right on the Velcro mounting strip, and connect them in the same order to each of the headers (S1-S4) on the PmodLS1. In other words, if the robot is facing forward, and you are looking down on it from above, the sensor on your far left should be connected to S4, the sensor at mid left should be connected to S3, the sensor at mid right should be connected to S2, and the sensor at the far right should be connected to S1.

17. Powering the Board

When you are ready to power the board, add four AA batteries to the battery pack, and connect the power cable from the battery pack to the J14 battery power connector on the Cerebot MX4cK board.

You can now use MPLAB or MPIDE to program the LineFollowingMRK demo project to the board. Again, this demo can be downloaded from the Line Following Motor Robot Kit product page at digilentinc.com. Note that running the reference design requires that the power select mode jumper J12 be shorted to External Power (EXT).

Once the board has been programmed with the reference design, place the robot on a lightly colored (preferably white) surface with a black line between the two middle sensors. Turn the board on and press button 2 (BTN2) to cause the motors to turn and watch the robot follow the black line. Press button 1 (BTN1) to stop the robot.