Author: GDSIN

Hi There! First of all, thank you for showing interest in knowing about me. My Real Name is “Gagandeep Singh“, but you probably know that. :) In my free time I like to do some projects involving electronics, coding and in general applied Physics. As I am a Undergrad Majoring in Physics, I also do core physics experiments in my coursework. If I am not sleeping, here are the list of things that I might be doing right now! Playing counter strike. Reading some physics book ( for my coursework). Browsing internet. Doing some arduino based project. The rest includes daily chores which are a must to survive.

Six wheeled All Terrain Vehicle (6WD)

​Hello,

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.

Design:

IMG_20140803_210806IMG_20140803_210745

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:

IMG_20140728_232527IMG_20140728_232544IMG_20140728_232627IMG_20140728_232326pro-00001_1

  • 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:

IMG_20140730_202945IMG_20140730_202934IMG_20140730_202925IMG_20140730_202911IMG_20140730_233936

IMG_20140730_202945.jpgIMG_20140731_014705.jpg

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.

IMG_20140801_120015IMG_20140730_015801

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!

DOWNLOADS: THE CODEDECODER CODE.

 

What’s Next?

Here is the list of projects that I’ll be publishing soon.
1. PC controlled Four wheel drive robot with RF.
2. PC controlled Six wheel drive robot with RF.

image

3. Using HC 05 bluetooth module with arduino.
4. Controlling the Four wheel drive robot with an android phone.
5. SD card data logging with arduino.

and much more.

Obstacle avoiding robot: As simple as it can be.

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

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.

image

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).
image

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.
image

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

Code:
#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()
{

range();

if (distance < 30)
{
stopcar();
delay(200);
range();
if (distance 30)
{
forward();
}
}

void range()
{

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

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

digitalWrite(led,HIGH);

// 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.

Blackbody Radiation

Image

I know its a bit theoretical and less fun but I am posting this experiment for people who are really interested in physics and do not have means of getting this kind of experimental setup. Although this is a must Do-it-yourself experiment but that’s not possible, at least not in a country like India. Nevertheless, I am providing you with my raw data and the analyzed one so you can get a feel of the experiment.  (You can download the data files provided at the end of this post. Its a .rar file so you’ll first have to extract it using winrar or any other software.)

In this experiment we will investigate the radiation emitted by an incandescent light bulb. This is achieved by using a prism spectrophotometer (image below) that measures relative light intensity as a function of angle.

Image

A Broad Spectrum Light Sensor is used with a prism so the entire spectrum from approximately 400 nm to 2500 nm can be scanned. Wavelengths corresponding to its particular angle is calculated using the equations for a prism spectrophotometer. The relative light intensity can then be plotted as a function of wavelength as the spectrum is scanned, resulting in the characteristic blackbody curve. The goal of this experiment is to determine  accurate experimental values of the Wien’s constant and of the Stefan-Boltzmann constant. The experiment is repeated for different temperature of the incandescent light bulb. Temperature of the light bulb can be changed by changing its intensity. The temperature of the filament of the bulb can be estimated indirectly by determining the resistance of the bulb from the measured voltage and current.

Click here to download data and the official guide to this experiment.

Reference: http://www.pasco.com/prodCatalog/EX/EX-9920_blackbody-radiation-experiment-scienceworksho/#overviewTab