The purpose of this project is to build an Arduino robot that can avoids objects in its way. It is based on an Actobitty 2 wheels robot,an Arduino Uno microcontroller, an Arduino Motor shield and an HC-SR04 Ultrasonic Distance Sensor. This is a fun project that you can build it with your children!!!!
Step 1: List of Components.
1.Actobitty 2 wheel robot kit https://www.servocity.com/html/actobitty_2_wheel_r...
2.Arduino Uno rev.3
3.Arduino Motor shield rev.3
4.Ultrasonic distance sensor HC-SR04
8.Arduino 9V Jack adapter
9.Led (color of your choice)
11.Old parts from Lego or Lego Technic
12.Base for Ultrasonic distance sensor
13.2 small screws for the Ultrasonic sensor
14.4 AA rechargeable batteries
Step 2: Assembling the Chassis and Motors
Actobitty 2 wheel robot is a handy kit with an aluminum chassis.You can find the full instructions on how to build the kit here:
The kit includes the following parts:
2 x Clear Precision Disk Wheels
2 x 3mm Bore Aluminum Hubs
1 x 4.5” Aluminum Channel
2 x 90PRM Micro Gearmotors
1 x Acetal Arduino Mount
1 x Acetal Sensor Mount
1 x 4 cell AA Battery Pack (batteries not included)
1 x Acetal Battery Pack Mount
2 x 6-32 x 3/16” Socket Head Cap Screws
2 x 2-32 x 3/16” Phillips Head Cap Screws.
Also inside the kit there are :
1 x 1/16” Hex Key and 1 x 7/64” Hex Key
You must attach 2 wires to the cables of the motors in order to work with the Arduino motor shield. you can solder them but i prefer to put some electrical tape.The kit is very easy to assemble.
Step 3: Build the Front Wheel
In this step we will build a custom front wheel. This wheel made by Lego technic and it gives the ability to the robot to turn better and to overcome small object like to climb a carpet.It is in your imagination to build the wheel and as many parts from Lego you have the better will be.
Step 4: Assemble the Ultrasonic Sensor and Attach to the Chassis
In this step we will place the ultrasonic sensor to the chassis.
We will need the sensor, the base, 2 screws, the screwdriver, wires from an old usb adapter and tie zip.
We place the sensor to the base with 2 screws. The sensor has 4 pins To my project i used a 4 wire from a usb pci adapter from an old pc. The wires are as follow: Red for gnd, Blue for echo, orange for trigger and grey for vcc(power). Also u can use electrical tape to the wires.You can attach the base of the sensor to the inside of the chassis with a tie zip. Place the tie zip to the holes of the bottom of the base and secure it to the chassis. The aluminum chassis of the kit has a lot holes and these are very helpful.
Step 5: Place the Breadboard, Battery and Arduino.
In this step we start finalize our robot.The kit includes 2 mounts for arduino but we going to use them for the breadboard. Place them as far as you can for better holding of the breadboard.
Attach the breadboard and behind the ultrasonic sensor place the battery pack which is included in the kit and secure it to the breadboard.
Next take the arduino uno and motor shield and with a tie zip secure them to the breadboard.
Next step we must secure the cables, connect the motors to the shield, place a second 9V battery and wire the sensor.
Step 6: Secure Cables, Add 9V Battery, Wire the Motors and Sensor.
Now that our robot is almost ready we have to be sure that everything is in place.
First with a screwdriver unscrew the motor shield and insert the cables of the motors. Each motor have a dc and a ground cable.
Secure the cables of the motors with tie zips at the chassis and the cables of the battery pack with electrical tape below the breadboard.
The 9V battery is also important because we want to power the motors an arduino and a shield. So with the 4AA battery pack and the 9V battery we have a good solution.Place the 9V battery at the back and below the breadboard.
The cables of the sensor have to be wired as follow:
1.Red cable(gnd) to GND pin of the shield
2.Grey cable(vcc) to 5V pin of the shield
3.Yellow cable(Trig) to 4 pin of the shield
4.Blue cable(echo) to 2 pin of the shield
Now our robot is almost ready we have to add last a led, add the code and we are ready to go!!!!!
Step 7: Wire Led and Make Final Adjustments
Before end we have to add a led so every time the robot goes back the led turn on.
We need a common resistor. We connect the positive leg of the led to the resistor and the resistor goes with a cable to pin 10. Also we have transfer with wires power and gnd from the shield to the breadboard so we connect the negative leg of the led to the gnd of the breadboard.
Now we have finished the hardware part and our robot is ready to go. In the next step we will continue and upload the code to our arduino and see our robot working!!!!!
Step 8: Arduino Code, Video, Conclusion and Additional Steps.
In our final step we have to write the code and upload it to the robot.
The robot moves and when it finds an object it turns either left or right. Before the turn it makes a small backward movement and the led it turns on. If the object is very close the robot turns right else turns left. The time scanning of the sensor is 200 milliseconds.All these parameters can be changed by you and your preferences.
Upload the code, power your robot and u are ready to go.
I think that the kit of the Actobitty 2 wheel robot is very good for introduction to robotics. The chassis with the holes gives you the ability to attach sensors or a 3rd battery to the robot. The gear motors are good quality and the wheels are really smooth.
Additional steps:You can add a small servo motor to the ultrasonic sensor so you can make your robot scan left and right and decide which direction to take, or you can add an LDR sensor and built an Actobitty 2 wheel light tracking object avoidance robot!!!!!!!. For bigger robots or modifications to your projects you can visit
https://www.servocity.com/ and let your imagination fly.