Tuesday 19 January 2016

Blinking a led using arduino uno

Just like our first program in C language is Hello World.
Our first program in arduino is blinking a led.

What is led?
Leds are light emitting diode, which emits light when subjected to forward voltage of 2.0 Volts and it requires current of about 25 mA. Leds comes in different colours viz. red, green, blue, white, etc.

Always check for its forward voltage and current consumption.

 How to check leds using multimeter?
 Set the multimeter on diode mode, now connect red probe to anode and black probe to cathode of led.
Checking led using multimeter



Now as arduino uno provides a logic of logic 1 (+5 volts) or logic 0 (0 volts). We have to connect external series resistor for led.

Some calculation:

According to ohm's law: V=IR

R=V/I

R=5000 mV/25 mA

R=200 ohms.

This is not a standard value.

We will use 220E resistor.

Code for blinking a led:

const int led=7;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(led, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}


Upload the above using arduino IDE. That's it

Fritzing sketch of arduino uno






Stay tuned for more updates !!! 

Robotics companies in Delhi India

Tuesday 12 January 2016

Monday 4 January 2016

Making your first robot

Hello guys, hoping you are doing well.

We will make line follower robot without microcontroller.
Let's see what are its objectives and how to make it

First of all, line follower robot follows a particular strip. Lets assume that our floor/surface color is black and we have a white strip. In line follower robot, we have a pair of IR (infrared) sensors.

IR sensor diagram
As you can see in the diagram, that ir led is connected in forward bias while photodiode is connected in reverse bias. The resistance of photodiode changes when subjected to light. But, this setup will give us analog (continuous) output i.e. in the range of o-5 volts. In order to change analog output to digital (discrete) one we use op-amp in comparator mode. Here we are using LM-358. It has two channels, but we are using just one.


Op amp diagram

In the above diagram, the analog output from photodiode is fed to pin no. 2 of op-amp (LM358).
Potentiometer here refers to analog output from photodiode. When voltage at pin no. 3 is greater or equal to 2.5 volt then output at pin no. 1 is +5 volt. When voltage at pin no. 3 is lower than 2.5 volt then output at pin no. 1 is zero volt. For obtaining 2.5 volts, we are using potential divider.

Outputs from op-amps are fed to H-bridge that is used to drive motors.

H-Bridge



Fritzing Sketch
The motors are geared one, as we know that geared motor has more torque than normal motor. That's why we are using geared dc motor. In this figure, we are using two 9-volt battery, one is for motor driver and ir sensor while other one is dedicated for motor.

Here is the pic of line follower robot which is made on breadboard.

Line Follower Robot

Stay tuned for more updates !!!