4WD All Terrain Arduino Robot for Everyone




About: I'm an enthusiast of robotics :)

I've always liked robots that can move in rough terrain. This time I decided that I will use ready-made chassis modifying it slightly and adding a few additional components. By using a ready chassis I could quickly build a working model and take care of its software. The robot can operate autonomously detecting obstacles in its close surrounding. It can also be controlled via bluetooth using a mobile phone or tablet. The whole electronic design was made based on the Arduino Mega 2560 that is quite powerful. I hope that everyone will find something interesting in this instruction.

Happy coding :)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The List of Parts

If you don't have too much time to building your own mobile robot platform you can buy "Robot Smart Car Kit" that includes a chassis, wheels, motors and other mechanical components. To build the robot we will need additional electronics to control the motors and sensors to detect obstacles. At the end we will add LiPo batteries to power the robot and the project will be ready for testing.

Parts needed in this project:

  1. 4WD Robot Smart Car Kit x1
  2. Arduino Mega 2560 x1
  3. BTS7960B Motor Driver (H-Bridge) x2
  4. HC-05 bluetooth module x1
  5. SRF05 Ultrasonic Sensor x1
  6. Sharp GP2Y0A02Y IR Distance Sensor x1
  7. Micro Servo x1
  8. Li-Po batteries: 7.4V 800mAh and 11.1V 1300 mAh x1
  9. Jumper and cables
  10. Nuts and bolts (M2, M3)

Step 2: Assembly of Parts of a Mobile Robot

  1. Screw the bottom and sides of the metal chassis.
  2. Put the Arduino Mega and Motor Drivers in the chassis and mark the mounting holes (M3). To do this you must first unscrew the black radiator from the Motor Driver. Instead of the black radiator that is too large, you can use a piece of aluminium sheet having a thickness from 1 to 3 mm.
  3. After drilling the holes screw the Arduino and Motor Drivers to the chassis.
  4. Put two LiPo batteries in the chassis and stick them from the bottom side with double-sided adhesive tape.
  5. Mount 2 power switches to the top cover of the metal chassis.
  6. Perform the necessary wiring connections (see the next step).

Step 3: Making a Rotary Sensor for Obstacle Detection

To rotate the sensor you can use a micro servo. Servo can be attached to the robot chassis using piece of aluminium in the shape of U or L. Originally I've made housing for the ultrasonic sensor SRF05 from a piece of red plastic but finally I changed it to the aluminium that is much more durable.

Step 4: Connection of Electronic Parts

The main controller in this electronic system is Arduino Mega 2560. To be able to control four motors I used two BTS7960B Motor Drivers (H-Bridges). Each of the Motor Driver can be loaded by the current up to 43A that gives a large margin of power even for the mobile robot moving over rough terrain. For remote control of the robot I used a popular bluetooth module HC-05. The electronic system is equipped with two power sources. One for supplying the DC motors (LiPo battery 11.1V, 1300 mAh) and the other to supply Arduino, bluetooth module and sensors (LiPo battery 7.4V, 800 mAh).

All connections of electronic modules are the following:

  1. BTS7960 -> Arduino Mega 2560
    • MotorRight_R_EN - 4
    • MotorRight_L_EN - 5
    • MotorLeft_R_EN - 8
    • MotorLeft_L_EN - 9
    • Rpwm1 - 6
    • Lpwm1 - 7
    • Rpwm2 - 2
    • Lpwm2 - 3
  2. SRF05 Ultrasonic Sensor -> Arduino Mega 2560
    • Vcc - 5V
    • GND - GND
    • TRIG - 11
    • ECHO - 12
  3. IR GP2Y0A02YK0F Analog Sensor -> Arduino Mega 2560
    • VIN - 5V
    • GND - GND
    • VOUT - A7
  4. Servo -> Arduino Mega 2560
    • RED - 5V
    • BROWN - GND
    • ORANGE - 10
  5. Bluetooth HC-05 -> Arduino Mega 2560
    • TXD - RX1 (19)
    • RXD - TX1 (18)
    • VCC - 5V
    • GND - GND

Step 5: Arduino Mega Code

I've prepared a few examples of Arduino programs for you (all available at GitHub):

  1. SRF05_servo_nearest_obstacle - Find the nearest obstacle and turn the sensor in its direction.
  2. RobotKit_4WD_IR_GP2Y0A02YK0F_FollowMe - Follow the moving object (based on proximity IR sensor GP2Y0A02YK0F 20-150 cm).
  3. RobotKit_4WD_BTS7960_IR_SRF05_FollowMe - Follow the moving object (based on proximity IR sensor GP2Y0A02YK0F and ultrasonic sensor SRF05).
  4. RobotKit_BTS7960_4WD_Bluetooth_Controlled - Control mobile robot via Bluetooth using Android app

The first two simple programs allow you to test the sensors and actuators. In the third program the robot operates autonomously following the closest object. However, if you prefer to control the robot by yourself just upload a fourth program to your robot and control it via Android app.

Step 6: Testing of Mobile Robot

And finally, it's time for my favorite part of the project that is testing. These videos show tests of mobile robot based on programs from the previous section (Arduino Mega Code).

You can download my Android app that allows you to control 4WD all terrain robot from Google Play: link

How to use the Android app:

  • tap menu button or 3 vertical dots (depending on the version of your Android)
  • select the tab "Connect a device"
  • tap on the "HC-05" tab and after a while you should see the message "Connected to HC-05"
  • after connecting, you can control your robot
  • if you don't see your bluetooth device HC-05 tap "Scan for devices" button
  • on the first use pair your bluetooth devices by entering the default code "1234"

If you would like to see my other projects related to robotics please visit:

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    18 Discussions


    Question 12 days ago

    How do I get the Android bluetooth app, the link in the description does not work, thanks


    Question 5 weeks ago

    Sir, this 4WD robot can perform all the activities diaplayed in your three videos!
    can we use ardiuno UNO insteas of ardiuno mega


    Question 5 weeks ago

    An early response from your side will be highly appreciated.


    Question 5 weeks ago

    Sir,can this 4WD robot perform all types shown in your videos?
    Instead of ardiuno mega can we use Ardiuno UNO in this project!


    Question 2 months ago

    How do I download the sketch from Github?


    Question 8 months ago on Step 6

    Do you have the fritzing component for the IBT 2 to share?
    Thanks in advance!


    1 year ago

    l'app per il controllo non si trova in googleplay


    2 years ago

    Hi I am new to arduino , can I build this with L298N motor drive module??

    I was unable to find the BTS7960B at my local electronics shop.

    If able to use L298N , may I know what will be the connection to Arduino board like???

    Thanks for the advise


    2 years ago

    Very nice write up. Thank you for sharing.


    2 years ago

    is the yellow wire connected to mot positive??


    2 years ago

    i have followed each and every step but when I connect Bluetooth after entering password 1234 i appears in paired device list .please help


    2 years ago

    how do I get the bts7960 in fritzing to construct the wiring diagram?


    2 years ago

    How much weight can it carry?


    3 years ago

    How can i copy the program to the Arduino? need help ASAP :((


    3 years ago

    If I am walking through a crowd is there a way to keep the robot from following someone else. Can I carry an ultrasonic transmitter or do I need to follow this strategy used by Ben Heck. Do you know if there have been any improvements in Ben Heck's coding since 2012? Could you carry an rf transmitter and additionally put rf receivers, one over each tire.



    3 years ago

    Looks like a good example of the vanguard of the next wave of amazing, inexpensive robots -- it won't be long before they are bigger than drones -- as drones become robots, too!