This is a nice project that you can continue to work on and modify as you learn more Arduino projects. This tutorial goes through the complete build for the bluetooth enabled robot in the first half of the video. It takes in total about 35 hours to 3D print, but can be assembled and programmed in around 30 minutes. Requires only 2 screwdrivers to build and does not require any soldering.
I wanted to design this thing to be inexpensive and use common parts, so this robot uses 9V batteries currently. They run out pretty quickly with a lot of use, so I will probably end up designing a new piece that allows for the use of rechargeable lithium ion batteries and Adafruit power booster.
Step 1: What You Need?
1 x Arduino UNO1 x USB Type-B Cable
2 x DC Motor with Wheel
1 x L298N Motor Driver
1 x 9V Battery Holder
1 x HC-06 Bluetooth Module
1 x HC-SR04 Ultrasound Ultrasonic Sensor
1 x Mini Breadboard
2 x RGB LED (Common Anode)
3 x 220 Ohm Resistor
40 x 6-32 X 1/2" SCREW
3D Printer or 3D Printer service
Male-to-Male Jumper Wires
Female-to-Male Jumper Wires
1 x 9V Battery
1 x Screwdriver
Optional
USB To Power Jack Cable
Female-to-Female Jumper Wires
Don't have components? Don't worry. Just click the component's name.
Step 2: Gather 3D Printed Parts
Step 3: Lightly Sand Wheels and Put Together Legs.
The wheels print in two pieces so use super glue and put them together. Lightly sand out the imperfections. Put the 4 balls inside the castors and push them all the way until they snap into place. Attach the 4 castors to the legs like in the below picture.
Step 4: Get the legs ready and add the geared DC motors.
Find the small L shaped piece and attach it to a motor exactly like the 4th picture shown above. Do the same thing with the other motor, and attach both to the legs. Meet the two legs together, being sure the motors are facing the same direction and you should have something exactly like the picture below.
Step 5: Add battery with box and complete base.
Step 6: Add the middle pieces to the base and add the range sensor and motor driver.
-Pull both battery wires and left side motor wires through the hole and tighten the screw you started. Tighten the second screw and secure the left side piece. Add the faux servo piece to this side and tighten both screws that hold it in, as in the third picture.
-Attach all 4 male to female wires to the HC-SR04 range sensor, it doesn't really matter what colors you use as long as they are different colors and you write down what color goes to what pin on the sensor.
-Attach the wires from the battery and the left side motor to the L298N motor driver according to the diagram. Add some male to female (or male to male) wires coming from the positive and negative terminals of the motor driver.
-Now pull the right side motor wires through the right side piece and attach those wires to the motor driver. Try to attach them in order, i.e. left side wire to left most hookup on the driver (same thing on the other side), that way you don't have to change anything in the code later.
-Use two screws to secure the right side piece, and use two screws to secure the motor driver, one per side piece is fine but there are holes to add all 4 if you want.
Step 7: Almost there.
-Use a screwdriver and add slack to the positive and negative battery wires as shown in the first picture (makes it easier for the battery to slide out the side when you need to change it).
-Find the neck piece in the third picture and attach the C shaped piece (file name neckNoServo.stl) with two screws from the bottom. Pull all the wires through that assembly. Attach the neck assembly with 4 screws to the base that you have so far.
Step 8: Done.
Step 9: Upload the code and Download app.
Download the Android apps in the two pictures below.
Pair your bluetooth module to your computer or phone with the password "1234" it will be called HC-06.Everything else is pretty straight forward to use, if you watched the video, the apps are pretty intuitive to use.
To control the robot via bluetooth from you computer connect the serial monitor to bluetooth port HC-06 and use these commands with CAPITAL LETTERS (put caps lock on) and hit enter after each command:
S = stop, F = forward, B = backward, L = left, and R = right.
IMPORTANT*** anytime you need to upload a new sketch the bluetooth module must be unplugged or else the code will not upload.
Hi! i read yout article that was really awesome and information. you provided each and everything that i was looking for. keep sharing your efforts with us. Thanks!
ReplyDeleteArduino Training