Six wheeled All Terrain Vehicle (6WD)


In this post we”ll be making a Six wheel drive all terrain vehicle (ATV). These are rare and hence expensive robots (at least in India). Dagu manufactures a similar 6WD chassis but its way too expensive (Rs 20000 / $ 250). So I decided to make a cheap Six Wheel drive(6WD) – All terrain vehicle(ATV) chassis out of aluminium and steel and then control it with an android mobile phone using HC-05 Bluetooth module. If you don’t know how to use a HC-05 bluetooth module click ​here for the guidelines.

IMG_20140803_212001 - Copy

Of course one can make various sorts of autonomous robots with this chassis using different control systems. I will be using an arduino Mega 2560 as the brains of this robot. Alright, so lets go ahead talk about various steps involved in making such a vehicle.



People think that while building a robot electronics and coding are the two main steps. But its not true, in fact design is the real mother-ship. If you got that part right it will reflect in the rest of the system. A good design could provide better efficiency, low cost, good looks etc. The elegant design of this chassis is the best bit of this project.

Now, ​the first question that strikes is that why a six wheel drive for an ATV? As the name suggests a six wheel drive (6WD) means a drive system in which all the six wheels are able to move independently. Well to be honest there is nothing special in 6WD unless you provide it with a real nice suspension system. In this project I have chosen to go with individual tyre suspension as it gives better traction and more torque on an uneven surface. This design is inspired by six legged insects, although it doesn’t has legs but it sure has similar flexibility.

The Chassis:

There are many other options available in the market if you want a six wheel drive chassis. The reason why this product stands out is that its cost effective. I spent Rs 2000 (approx. $33) on this project.

Material/Parts required are:


  • Aluminium sheet.
  • 12 L shaped motor brackets (steel).
  • Six high torque motors.
  • Six high traction wheels (10 cm diameter).
  • PVC pipe (diameter just greater than motors).
  • Screws and nuts.
  • A hammer and a nail (for making holes in aluminium sheet).
  • Nylon ties

After having all the required material here is what you need to do next:

  1. Cut the Aluminum sheet into 32 by 12 cm.
  2. Make six pieces of PVC pipe of length just greater than that of motors.
  3. Make four perpendicular diametrically opposite holes in the PVC pipe.
  4. Fit motors into PVC pipe such that holes are on the inner side.
  5. Divide the aluminium sheet into 3 sections by marking with a sketch pen.
  6. Place two L shaped motor brackets on Al sheet and mark positions such that motor just fits in.
  7. Make holes on these positions using a hammer and a nail.
  8. Affix the brackets using screws and nuts.
  9. Screw nuts into bracket and holes on PVC to affix motors.
  10. Tie two opposite motors with nylon ties.

Adding a control System:



Now that we have build the chassis, we have to decide how we want it to work. In general, there are two control systems.

  1. AI-Automation
  2. Remote control

Automating a robot is a challenge. It is definitely difficult to implement than remote control. In this project we are keeping both options open by installing an arduino for automation. This arduino is also connected to a Bluetooth module (See PCB) which can be used for remote control. In remote control the actual brain behind movement of robot is a human brain, now imagine if a human brain is aided by a little touch of automation (example: automation an help in object contact avoidance).

I controlled the ATV through an android device via bluetooth. There are a lot of apps available on playstore for controlling arduino via bluetooth. I used Arduino BT Joystick.


Obviously, there is no limit to what you can do with this chassis. So if you got some interesting ideas please share them with me in comments. Thank you for reading.

Controlling Pan and tilt mechanism with Infra red (IR) TV Remote.

Making arduino wireless is a piece of cake with an IR Sensor and a TV remote. In this post I”ll show you how to build a pan tilt mechanism with servo and then control it via an IR Remote(TV remote). My favorite part of this post is the home-made PAN AND TILT mechanism. So lets get to it.

You will need:

IMG_20140726_010141 IMG_20140726_010322 IMG_20140726_010219 IMG_20140726_010021 IMG_20140726_005940IMG_20140726_005953

  • Arduino
  • L clamp. I used the one which is actually made for clamping motors.
  • Two high torque Servos
  • Nylon cable ties to hold servos and brackets together
  • Screws and nuts
  • IR Sensor. I used TSOP 1738
  • TV Remote. I used a Sony Bravia LED TV Remote.
  • .Breadboard
  • Jumper wires

First of all, we need to assemble the L-clamps and Servos together. There is one base Servo which rotates the system horizontally and then there is a neck servo which rotates it vertically. You can assemble them in any way you like as long as they are doing their function. The only thing to remember while making a pan and tilt mechanism is that it should be sturdy. There should not be any vibrations. One trick to build such firm system is to keep center of gravity as low as possible.


With the assembly done, its time to do wiring! 

Below are the connections schematics:

baseservo          Arduino

      Vcc         ->     +5v 

     Gnd        ->      Gnd

     Signal     ->      Digital PIN 4


Neckservo          Arduino

      Vcc         ->     +5v 

     Gnd        ->      Gnd

     Signal     ->      Digital PIN9


IR Sensor          Arduino

      Vcc         ->     +5v 

     Gnd        ->      Gnd

     Signal     ->      Digital PIN 2

To know schematics of IR sensor refer to datasheet above(in “You will need”).

Wiring is all done. So lets do some coding now.

You can try and use the standard IRRemote library of arduino, but I got some serious errors while using it with Servo library. I think its because both of them uses the same timer i.e timer 2. So I used this library instead.

Next step is to debug your IR remote. That is to know what code is linked to which key of you TV remote. I have provided a sketch for doing that. Its at the end of this post. Once you debug your Remote, just put in the correct codes into the main sketch(also at the end of this post) and you will have Pan and tilt mechanism with Remote control.

You can attach a webcam and use this for security purpose etc. Below is a some video I made just to inspire you!



Obstacle avoiding robot: As simple as it can be.

Got an arduino and want to make a fully automated robot? Well Read On.

Making robot is a fantasy project for lots of people and obstacle avoiding robot(OAR) is definitely the simplest form of locomotive robots. There are tons of thousands of tutorial on the internet but this one is for people who want step by step detailed instructions for making an OAR.


You will need:

1. Arduino ( I used Uno but it really doesn’t matter).
2. Ultrasonic sensor HC SR04
3. Two motors and two wheels with clamps.
4. L293d based motor driver chip ( see pic below).
5. 9v battery with clamp.
6. One caster wheel.
7. Chassis: You can show how creative and innovative you are by designing it yourself but if you are not that type you can always buy it online. I made mine with perforated aluminum (wooden sheets is also an alternative).

8. Some experience with programming (if you don’t have any don’t worry you can download my sketch).

Its working is very simple. The HC SR04 sensor senses the distance and report to the arduino. Using a simple “if” condition in the code the robot can be made to stop if there is an obstacle.

Power the motor driver and arduino with external battery. Remember the ground of external power and arduino should be same.

#define trigPin 13 // trig from hcsr04 //to 13 on arduino

#define echoPin 12 // echo from //hcsr04 to 12 on arduino

#define motora 3
//a1 of motor driver to 3 of arduino

#define motorb 4
//a2 of motor driver to 3 of arduino

#define motorc 5
//b1 of motor driver to 3 of arduino

#define motord 6
//b2 of motor driver to 3 of arduino

long duration, distance;

void setup() {

Serial.begin (9600); // for debuging

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

pinMode(motora, OUTPUT);

pinMode(motorb, OUTPUT);

pinMode(motorc, OUTPUT);

pinMode(motord, OUTPUT);

void loop()


if (distance < 30)
if (distance 30)

void range()

digitalWrite(trigPin, LOW);


digitalWrite(trigPin, HIGH);


digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = (duration/2) / 29.1;

void forward()
digitalWrite(motora, HIGH);
digitalWrite(motorb, LOW);
digitalWrite(motorc, HIGH);
digitalWrite(motord, LOW);


void reverse()
digitalWrite(motora, LOW);
digitalWrite(motorb, HIGH);
digitalWrite(motorc, LOW);
digitalWrite(motord, HIGH);


void stopcar()
digitalWrite(motora, LOW);
digitalWrite(motorb, LOW);
digitalWrite(motorc, LOW);
digitalWrite(motord, LOW);


void left()
digitalWrite(motora, HIGH);
digitalWrite(motorb, LOW);
digitalWrite(motorc, LOW);
digitalWrite(motord, HIGH);


Basics of Ultrasonic Sensor HC-SR04

Image I purchased an ultrasonic sensor(HC-SR04) from ebay last week. I was searching the internet to learn how it works and found that there are very less elementary level examples so I decided to make one. An ultrasonic sensor first sends eight 40 Khz pulses, then detects the signal reflected by nearby obstacle and then based on time taken by pulse to return back it calculate the distance. Image It’s view angle is less (15 degrees or so) so it can only detect obstacle right in front of it. For people who are interested in the working and specification of this sensor click here to download its manual. Image In this example we”ll use HC-SR04 as proximity sensor to give a warning by glowing red LED if distance is less than 10 cm. This sensor is the essence of an Obstacle avoiding robot. The circuit diagram is:Image The code used is:

#define trigPin 13

#define echoPin 12

#define led 11

#define led2 10

void setup() {

Serial.begin (9600);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

pinMode(led, OUTPUT);

pinMode(led2, OUTPUT);


void loop() {

long duration, distance;

digitalWrite(trigPin, LOW);

// Added this line

delayMicroseconds(2); // Added this line

digitalWrite(trigPin, HIGH);

//delayMicroseconds(1000); – Removed this line

delayMicroseconds(10); // Added this line

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = (duration/2) / 29.1;

if (distance < 10)

{ // This is where the LED On/Off happens


// When the Red condition is met, the Green LED //should turn off

digitalWrite(led2,LOW); }

else { digitalWrite(led,LOW);

digitalWrite(led2,HIGH); }

if (distance >= 200 || distance <= 0)

{ Serial.println(“Out of range”); }

else { Serial.print(distance);

Serial.println(” cm”);

} delay(500); }

If you want to see how actually this works then see the video below.


Hello, In the previous post, I mentioned the connections which should be made to use HD44780 16 by 2 LCD. In this project I will be exploiting some ideas from previous project to make  temperature sensor and displaying the temperature on the LCD. Also, I have incorporated a light intensity measurement cum theft detect device which Displays the light intensity of surroundings on the LCD and produces a beep sound whenever someone crosses the door(i.e. light intensity is close to(or is) 0). Now, I used LM335 sensor for measuring the temperature of the surroundings by exploiting the fact that any change in temperature will change the voltage of LM335( at 0 K Voltage is 0 Volts). And for the light intensity measurement(on a scale of 0 to 10) I used a Light depending resistance(LDR), whose resistance (therefore voltage) varies as per the intensity of light falling on it. When light of high intensity is falling on LDR its resistance is less and when light of low intensity is falling on LDR its resistance is more. I have uploaded the circuit diagram and the code(I have put some extra things in the code for example: the interface would ask options from user like whether you want to display temperature or light intensity which you may want to delete so make them as comments!).

The circuit diagram

in the circuit diagram i have connected ground of arduino board to 5v. Obviously its wrong, ground of arduino should be connected to the 0Volt line(the top one).

Click here for the code…

I have made a small instructive video. Hope you enjoy it!

HD44780 16 by 2 LCD DISPLAY…

Recently I was engaged in a simple but interesting little project i.e using 16 by 2 LCD DISPLAY through different microcontrollers like PIC16F877A and ATMEGA328(Arduino uno).


Here are some hints and the code which might interest some of beginners:

1.Make connections as follows:

  • LCD RS pin to digital pin 12.
  • LCD Enable pin to digital pin 11.
  • LCD D4 pin to digital pin 5.
  • LCD D5 pin to digital pin 4.
  • LCD D6 pin to digital pin 3.
  • LCD D7 pin to digital pin 2.
  • LCD VSS pin to ground.
  • LCD VCC pin to +5V.
  • LCD VCE pin to a 10K potentiometer(varying this resistance will vary the display).
  • LCD V+ pin to +5V or you can use a 100K potentiometer to vary the background led intensity)
  • LCD V- pin to ground.

2. Use the code(!245&authkey=!ADc69b5b17QKIjw) or create your own and enjoy!

LCD Hd44780