Line Following MRK Robot With 3d Printed Parts

by joshwoldstad in Circuits > Robots

2742 Views, 32 Favorites, 0 Comments

Line Following MRK Robot With 3d Printed Parts

556cba8b67400c949e0003d6.jpeg

With the MRK + Line kit, you can build your own line following robot. The platforms are sturdy and metal, but rectangular. We wanted to create open source robots parts that have a smoother design, but are still strong enough to drive around.

Parts List

IMG_0564.JPG
IMG_0565.JPG
  1. Hardware: everything you need you can get from the Line Following Motor Robot Kit.
  2. 3D Printed Parts:
    1. BasePlate
    2. Motor Mount
    3. Sensor Bracket
    4. (edit) Drag Button
  3. Tools:
    1. Small Screwdriver
    2. Computer with MPIDE
  4. 4 AA batteries
  5. Misc: the Line Following Motor Robot Kit has all the required nuts and bolts for the original parts, but because we're changing stuff around, I used these 6-32 thread nuts and screws.

Assembling the Base

IMG_0601.JPG
IMG_0604.JPG
IMG_0607.JPG
IMG_0608.JPG

First we want to get our Motor Mount and Sensor bracket connected to base plate.

  1. On the bottom side of the baseplate, you'll see a "beam" from one side to the other, attach the Motor
    Mount there.
  2. Attach the Sensor Bracket to the front the baseplate, use the 1st and 4th holes in the first row to secure everything.

Attach Drag Button

IMG_0609.JPG
IMG_0611.JPG

On the back-end, they'll be a place to secure the drag button.

Attach ChipKIT Connectors

IMG_0615.JPG
IMG_0616.JPG
IMG_0617.JPG
IMG_0618.JPG

Now we're going to attach all the connecting parts to the baseplate before we do anything else. Everything is gonna pretty tight, so it's easiest to get this done now.

Use the washers for the front two connectors, this will also help us secure the Sensor Bracket more.

Attaching the Pmod Clips

IMG_0619.JPG
IMG_0620.JPG
IMG_0621.JPG
IMG_0622.JPG

We're just going to keep on attaching stuff in this step.

We Are Here

IMG_0599.JPG

At this point the Pmod clips, drag button, chipKIT connectors, Sensor Bracket, and Motor Mount should be connected to the baseplate.

Attaching the Motors

IMG_0623.JPG
IMG_0624.JPG
IMG_0625.JPG

Now we want to attach the motors to the Motor Mount, you'll have 8 tiny screws to attach the motors. Be careful, the tiny screws are very tiny.

I recommend screwing all four in a little bit, then tightening them after.

Putting the Sticky Tires Onto the Wheels

IMG_0626.JPG
IMG_0627.JPG

Pull the Sticky Tires onto the wheels, this may take some finangling.

Attaching the Wheels

IMG_0628.JPG
IMG_0629.JPG

Now it's time to attach the wheel to the motors. The motors and wheels only attach one way, they are also very secure, so it may take a lot a work to get the attached all way.

Adding the Battery Case

IMG_0644.JPG
IMG_0645.JPG

Use the smaller velcro strip to attach the battery case to the mid-left side of the baseplate, making sure to have the wires in the top-left.

Attaching the PmodHB5s

IMG_0649.JPG
IMG_0647.JPG
IMG_0667.JPG

Find the two PmodHB5s. Connect the Pmods to the motors using the cables that come from the motors. Then click them onto the Pmod clips that are right of the battery case.

Attaching the ChipKIT Pro MX4

IMG_0569.JPG
IMG_0651.JPG
IMG_0653.JPG

On the chipKIT Pro MX4, they'll be rubber stoppers protecting the bottom. Pop these off with the small screwdriver.

Now screw the chipKIT Pro MX4 onto the chipKIT connectors that we attached to the topside of the baseplate a while back. Orient the board so that the on/off switch is on the front side.

Wiring the HB5s and the ChipKIT Pro MX4

IMG_0668.JPG
IMG_0660.JPG
IMG_0659.JPG
IMG_0661.JPG
IMG_0666.JPG

There will be two black wires and two red wires, strip the wires by a couple a millimeters on both sides, then attach the red wires to VM, and black to GND.

Now get the wires to the near the on/off switch. I pushed the wires through extra screw holes, but you don't have to.

Attach the red wires onto the VEXT, and black to GND.

Add Batteries

IMG_0669.JPG
IMG_0670.JPG

We want to do this now, it's gonna get crowded.

Connecting the HB5s to the Pro MX4 (part 2)

IMG_0663.JPG
IMG_0664.JPG
WP_20150601_005.jpg
IMG_0671.JPG

Now we are going to connect the Pmod HB5s onto our board using the cable connectors.

Plug the connectors into the HB5s with the flower side showing.

Take the cable that is closer to the drag button, and plug it into the bottom half of the JD port with the flower side down. Take the cable that is farther away from the drag button and plug it into the top half of the JD port with the flower side down.

Adding the IR Sensors

IMG_0675.JPG
IMG_0674.JPG
IMG_0678.JPG

Now we want to get our IR sensors ready. Take the longer strip of Velcro and cut it in half. Attach the two strips to the front-bottom part of the Sensor Bracket, check out picture one for a good distance apart.

Attach the IR sensors to the velcro, they need to be fairly close to the ground, picture two is about the distance you want to have. (Note: this picture is just to show that the sensors should be uniform distance from the ground, keep the velcro sections seperated)

Loop all the wires below the 6-pin connectors and closer to the empty Pmod clip (picture three has everything connected, we will go over this next step).

Attaching IR Sensors to the PmodLS1

WP_20150601_006.jpg
IMG_0686.JPG

This is the PmodLS1. If you check it out you can see that there is a list of colors (WHT, BLU,GRN,ORG) and a list of number (S1, S2, S3, S4), take note of these.

Looking at the pictures above, plug in all four cables into their respective pins (1-S1, 2-S2, 3-S3, 4-S4, color-to-color).

Attaching the PmodLS1 to the Pro MX4

IMG_0686.JPG
IMG_0679.JPG

There will be one longer cable connector, we're going to use this one to connect the PmodLS1 to the Pro MX4 up top.

On the Pmod end, the flower side should be visible. The cable will go to the right, and connect into the top half of the JJ port. At the JJ port, the flower should not be visible.

Plugging in the Power

IMG_0681.JPG

At this point you can grab the battery case wire and plug it in, check out the picture above of where the wire should go!

Uploading the Code

MPIDE.png
IMG_0682.JPG

Click here to download the demo project, open it using MPIDE.

To upload the code you must do several steps.

  1. Plug the cable found in the chipKIT Pro MX4 box into the UART slot, and plug the USB end into your computer.
  2. Change the jumper by the on/off switch to URT, then turn the board on.
  3. In MPIDE, make sure that the board selected if the chipKIT Pro MX4.
  4. Press the upload button to upload the code to the chipKIT Pro MX4.
  5. After everything is uploaded, move the jumper to EXT.

Running the Robot

IMG 0684

Now you can run the line-following robot!

There are two buttons in the front left corner. BTN2 starts the robot, and BTN1 stops.

When you turn on the robot, there will be a green blinking LED, this is the start-up light. After it has stopped, you can run the robot.

You can calibrate the sensors by using the small orange screw-button on the PmodLS1. It's recommended you just pop it off the button and keep the sensors on the track. (Electrical tape works great for a track)