Software apps and online services
Hand tools and fabrication machines
If you're a beginner in Arduino and have a plan to make your first robot, then here's the tutorial for you. Look at the images of what you are going to build, today.
In this tutorial I am going to show how to make an Arduino robot with different functionalities. We can learn the use of different programs for different functions, mainly a smart phone controlled robot with Obstacle avoider, wall follower, and maze solver. Or you can also make it for only a single function.
Drill two holes for motor:
Connect two motors:
Make three holes for caster wheel:
Connect the caster wheel:
Make two holes on either side of the box for connecting the motors and three holes on the bottom for connecting the caster wheel after measuring and marking the correct diameter. Then install the motors and the caster.
Connecting the batteries.
Glue the batteries inside the box.
Mount two 9 volt batteries inside the box above the caster. Then wire them in parallel and connect a switch as shown in above diagram.
Attach the motor shield above the Arduino.
Connect the battery wires to the PWR terminals of motor shield.
Connect the motors to the motor shield.
Remove the jumper from this port.
Connect the motor shield above the Arduino and place it above the battery. Then connect the wires from the motors and battery to the motor shield. Check out the connection diagram before connecting, as it is very important.
- Connect the left motor to "M1" of motor shield
- Connect the right motor to "M3" of motor shield
- Connect the the wire from battery to "ext pwr" of motor shield
Don't forget to remove the jumper from the "pwr" of motor shield
Mark the spot to make holes.
Make the holes.
Connect the battery clip to DC male jack to the 9V battery.
Place this 9 volt battery inside the box.
Make two holes for accessing the USB port and the DC input port of the Arduino. Take another 9 volt battery and connect a battery clip to a DC male jack adapter, then connect the DC male jack to the Arduino DC input port, to power the Arduino. Then place the battery between the motors and Arduino inside the box.
Connect the Bluetooth module to the Arduino as shown in the connection diagram and place it inside the box. Then make hole to mount the switch on the back side of the box and connect the switch (here I have changed the switch which is used earlier because of some soldering problem).
Wiring Instruction of Bluetooth module:
- "TX" of Bluetooth Module goes to "RX" of Arduino
- "RX" of Bluetooth Module goes to "TX" of Arduino
- "VCC" of Bluetooth Module goes to "5v" of Arduino
- "GND" of Bluetooth Module goes to "GND" of Arduino
- The State & Key pins of the BT modules are kept unused.
Take the ultrasonic sensor and glue a small 'L' shaped plastic piece to it and glue it on top of the plastic box (or if you don't have a glue stick use double sided tape). Then connect the jumper wires to as shown in the circuit diagram above.
Wiring Instruction of ultrasonic sensor:
- "VCC" of Ultra sonic sensor goes to "+5" of Arduino
- "GND" of Ultra sonic sensor goes to "GND" of Arduino
- "Trig" pin of Ultra sonic sensor goes to "Analog pin 1" of Arduino
- "Echo" pin of Ultra sonic sensor goes to "Analog pin 0" of Arduino
Now we finished the all the connections and it's time to program.
Upload the "Final Sketch" provided in the code section. If you face any error, make sure you have installed the AFmotor library.
Now, we learned how to program a Arduino easily. I have shown here some programs to work this robot as a obstacle avoiding robot, Wall follower, and Bluetooth controlled. and at last i have combined this three functions together. Watch the video for more details and information
Make sure to install AFmotor library into Arduino. Download AFmotor library. To install Arduino library, refer this Page.
Some fun with Wall Follower & Obstacle Avoidance
Visit my blog here - robotechmaker.com
If you have any questions or any suggestions please comment below.