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
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
- Hardware: everything you need you can get from the Line Following Motor Robot Kit.
- 3D Printed Parts:
- Tools:
- Small Screwdriver
- Computer with MPIDE
- 4 AA batteries
- 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
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
Mount there. - 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
On the back-end, they'll be a place to secure the drag button.
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.
Attaching the Pmod Clips
We're just going to keep on attaching stuff in this step.
We Are Here
At this point the Pmod clips, drag button, chipKIT connectors, Sensor Bracket, and Motor Mount should be connected to the baseplate.
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.
Putting the Sticky Tires Onto the Wheels
Pull the Sticky Tires onto the wheels, this may take some finangling.
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.
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.
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.
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.
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.
Add Batteries
We want to do this now, it's gonna get crowded.
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.
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).
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).
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.
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!
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.
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)