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.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts List
- Hardware: everything you need you can get from the Line Following Motor Robot Kit.
- 3D Printed Parts:
- Small Screwdriver
- Computer with MPIDE
Step 2: Assembling the Base
First we want to get our Motor Mount and Sensor bracket connected to base plate.
- On the bottom side of the baseplate, you'll see a "beam" from one side to the other, attach the Motor
- Attach the Sensor Bracket to the front the baseplate, use the 1st and 4th holes in the first row to secure everything.
Step 3: Attach Drag Button
On the back-end, they'll be a place to secure the drag button.
Step 4: Attach ChipKIT Connectors
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.
Step 5: Attaching the Pmod Clips
We're just going to keep on attaching stuff in this step.
Step 6: We Are Here
At this point the Pmod clips, drag button, chipKIT connectors, Sensor Bracket, and Motor Mount should be connected to the baseplate.
Step 7: Attaching the Motors
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.
Step 8: Putting the Sticky Tires Onto the Wheels
Pull the Sticky Tires onto the wheels, this may take some finangling.
Step 9: Attaching the Wheels
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.
Step 10: Adding the Battery Case
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.
Step 11: Attaching the PmodHB5s
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.
Step 12: Attaching the ChipKIT Pro MX4
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.
Step 13: Wiring the HB5s and the ChipKIT Pro MX4
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.
Step 14: Add Batteries
We want to do this now, it's gonna get crowded.
Step 15: Connecting the HB5s to the Pro MX4 (part 2)
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.
Step 16: Adding the IR Sensors
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).
Step 17: Attaching IR Sensors to the PmodLS1
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).
Step 18: Attaching the PmodLS1 to the Pro MX4
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.
Step 19: Plugging in the Power
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!
Step 20: Uploading the Code
Click here to download the demo project, open it using MPIDE.
To upload the code you must do several steps.
- Plug the cable found in the chipKIT Pro MX4 box into the UART slot, and plug the USB end into your computer.
- Change the jumper by the on/off switch to URT, then turn the board on.
- In MPIDE, make sure that the board selected if the chipKIT Pro MX4.
- Press the upload button to upload the code to the chipKIT Pro MX4.
- After everything is uploaded, move the jumper to EXT.
Step 21: Running the Robot
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)