Friday 14 June 2013

Robot to read human thoughts

fMRI allows robot to read human thoughts remotely



The fMRI, known as Functional Magnetic Resonance Imaging is a machine that can perform unbelievable things like recording videos of your dreams, enlightening innovative skills during sleeping, etc. Now,Israeli researchers have used it in controlling a robot remotely through human thoughts.
The fMRI is capable of calculating theactivities of brain instantaneously by recognizing the blood flow changes. As it can sense changes, it has the potential to distinguish between the human thoughts like turn right, turn left, walk forward, etc. This is what the Israel researchers implemented on their experiment.
The fMRI machine reads the human thoughts in real time with the help of a distantly alarming degree of accuracy. The main advantage of this technology is that it doesn’t require moretraining like other brain-controlling methods. All you want to do is just think an image of a robot performing a work, and fMRI will capture those thoughts and make the robot to carry on the same.


A researcher at Israel thinks turn right or turn left or walk forward inside the fMRI machine, and these different thoughts are read and performed by a robot present thousand kilometers away from France. This astonishing performance is shown in the below video:

New face cloning method for robots

Disney invents a new face cloning method for robots



For long years, the robotics researchers have succeeded in developing humanoid robots, but failed in bringing the natural human faces and expressions. Therefore, Disney’s researchers at Switzerland have come out with a ‘face cloning’ technique, which provides the most realistic facial expressions to the animatronic robots.


This technique uses 3D Motion Capture Technology for scanning the person’s facial expressions. The scanned image is developed as a digital mesh, and later designed as an optimized model of the robot head. This results in describing various movements of robot, and sets the best points to place the artificial skin.

Disney’s research team has used silicone rubber skin with various thicknesses at specified areas. This helps the skin to make more realistic forms. The right position for placing the skin in the robot head is guided by the digital model. It also helps the head to move at least stretch and ensures the elongation of skin only happens at the thickest area.

A three-dimensional silicon mold is prepared after completing the design of skin and head. The resulting molded skin is then fixed to the motorized metal and plastic head. At last, the effort of all these processes brings a realistic human head for animatronic robots.

The cloned face is fairly larger when compared with the unique face. It is differed because to provide control for the robot’s movements. The researchers believe in bringing out a multi-layered skin in their next development, which could have high flexibility to control various movements.

Let us hope for the best, and wish the Disney research team to bring out their best in the near future.


 You can watch the process of Disney’s face cloning in the below video:




First female android



Alissa – Russia’s first female android


In this modern world, Android has been expected to be the future of robotics, and Neurobotics and Russia 2045 movement also expects the same to happen by 2045. A little impact of it is shown from the development of Alissa, which is considered as the Russia’s first realistic female android head. It was developed by Dmitry Itskov, and recently revealed by Russia 2045 movement.

A nice looking picture of Alissa is shown in the above image, and it looks realistic to a certain extent. The silicone mask has been developed by Neurobotics with eight points of articulationrather than 30 points (common on other android heads). These eight points are added only for the movement of the eyes and mouth.
Alissa has a wheel base at its bottom for mobility, and its head is located to a mannequin. The expressions of the face i.e. eyes and mouth are controlled by a standard game pad. It also has a basic Artificial Intelligence, which helps it to match the movement of mouth according to thewords spoken by a speech synthesizer.
Alissa is capable of streaming a video feed with the cameras placed at its eyeballs. The operator can use Skype for chatting with others in the Telepresence mode. It is still under early stages, and the company experiments the movement of robot base using operator thoughts with the help of EEG (Electroencephalography).



The below video shows you some of the mouth movements of Alissa:

Strong Limbed SCHAFT Robot

Strong Limbed SCHAFT Robot gets displayed




Is it possible to develop a robot with superhuman strength? Most of them will say yes, but it is not that much easy as we see in Hollywood films. To create a high-powered robot requires powerful electric motors, which are lacking for long years. Even Honda’s ASIMO is capable of picking up a few kilograms. It is estimated that adult robots have got one-tenth of strength than the average person.
SCHAFT Inc., a Japanese company has come out with its patented new actuator, which can make muscles of robots much stronger. They used a biped robot named HRP3L from Kawada Industries to test their Urata Leg. The Urata Leg incorporated a high-output capacitor powered water cooled motor system instead of standard servos. An inclusion of advanced bipedal control algorithms along with this system helped the robot to uphold its balanced when kicked.
A high voltage and high current liquid-cooled motor driver acts as the heart of this system, which is powered by a capacitor. The capacitor has the capability to supply the current, fast and consistent than the batteries. As a result, the electric motor gets the ability to provide high torque and high speed to the arm.
SCAFT Inc. will display their innovative motors in the DARPA Challenge. The company will start marketing their compact and powerful robot’s arm.

Wednesday 12 June 2013


People Counting Machine with GSM


The main objective of this project is to design a system which counts the number of people present inside a premises with the count being sent automatically as an SMS upon dialing the phone number.

It consists of 3 modules
1. Infrared Transmitter and Receiver
2. Microncontroller with LCD
3. GSM Module


1. Infrared Transmitter and Receiver

There are two of them say IR1 and IR2. Breaking the beam of IR1 first and then IR2 will increment the count by 1 where as breaking the beam IR2 and then IR1 will decrement the count. The output of IR1 and IR2 are connected to microntroller interrupts INT0 and INT1 respectively. Complete design of IR Tx and Rx can be found here :

  Infrared Beam break Detector



This purpose of this article is to design a circuit using Infrared signals to detect a beam break which can be used in multiple real world applications. The IR receiver used is TSOP1738. Below are some of the main requirements of Infrared Transmiter signal properties as described in the datasheet

· Carrier frequency should be close to the center frequency of the bandpass (38kHz)

· Burst length should be 10 cycles/burst or longer

· After each burst which is between 10 cycles and 70 cycles a gap time of at least 14 cycles is neccessary 


Design




1. Carrier Frequency (f1) : The center frequency of TSOP1738 is 38kHz

f1 = 1.44/((Ra1+2Rb1)C)
f1 = 38kHz

Let
Ra1 = 1k
C = 0.01uF

With that Rb1 = 1.394k or
Rb1= 2k variable resistor


2. Burst and Gap frequency (f2) : Let burst cycle equals gap cycle be equal to 40 cycles (burst between 10 and 70 cycles and gap greater than14 cycles)

f2 = 38k/ 40
f2 = 950
f2 = 1.44/((Ra2+2Rb2)C)

Let
Ra2 = 10k
C = 0.01uF

With that
Rb2 = 70.789k or
Rb2 = 100k variable resistor

Note:

      1. BC547 is used at the output of transmitter as switching transmitter to boost the voltage increasing the             range.

      2. When the Infrared beam is broken, the output of TSOP1738 goes high. Using switching transistor    2N2222, the signal is inverted to High to Low which can be directly interfaced to External edge triggered interrupts of 8051 (EXT0 and EXT1) 




2. Microncontroller with LCD

The microcontroller used here is 89c51. INT0 and INT1 of the micronctroller is connected to output of IR1 and IR2 respectively. It is connected to a GSM module via a serial port. And the microncontroller is also connected to a LCD which displays the total count at any given point of time. The microntroller increments or decrements the count based on weather INT0 interrupt occurs first and then INT1 or vice versa and continuously displays on the LCD. Micronctroller will also receive a serial interrupt when there is an incoming call in whch time it will read the phone number, disconnect and send the total count as a SMS

3. GSM Module

The microcontroller sends AT commands to GSM module to read the phone number, disconnect and send an SMS to the calling number. Below are the AT commands used.

1. Disconnect a call
ATH and Enter

2. Read the phone number of an incoming call



· Set the below AT command only once

AT+CLIP=1 and Enter

· When there is a incoming call, the data from GSM will be similar to below for default settings

RING

+CLIP: "+919449XXXXXX",145,"","",0

RING

+CLIP........

· Read the phone number above into an array and send the SMS



3. Send an SMS

AT+CMGF=1 and Enter
AT+CMGS="+919449XXXXXX" and Enter
"Hello World" and CTRL+Z

During programming CTRL+Z requires to be sent as 0x1A Ascii character while the escape character for Enter is '\r'. For better understanding on sending a SMS and C code, refer to Sending SMS using AT commands



Sending SMS using AT Commands


This article describes sending a SMS from a Microcontroller through a GSM modem using AT Commands. through RS232. AT commands can be sent to a GSM modem via a computer serial port or from the serial port of a 8051 Microcontroller.
Computer serial port



1. Connect your GSM modem to the computer serial port. New systems nowadays dot not have serial port, hence you would need to buy a USB to serial converter and connect the GSM modem to it.

2. If you are using Windows XP® OS, open Programs -> Accessories -> Communications -> HyperTerminal

3. Select the COM port you have the modem connected to.

4. Check the port settings, make sure that the baud rate matches with that of the GSM modem and and also that the Flow Control is set to "None".

5. Type the AT Commands below in the HyperTerminal Editor

AT+CMGF = 1 and Enter
AT+CMGS="+919449XXXXXX" and Enter
"Electronicprojs.Blogspot.com" and Hit CTRL+Z

6. In Windows 7® OS though, there is no hyperterminal program inbuilt. You will have to download a similar one. There are many good free programs available.

7. You would need to note that in this case we are connecting the serial port cable from Female pin (GSM Modem) to Male pin (Computer). Hence no crossing is required. In other words, we should use a straight cable.
8051 MicroController Serial port
1. 8051 SFR's are programmed for a baud rate of 9600.

2. Send the AT commands in #5 above through code. For Enter use escape character "\r" and for CTRL+Z use ASCII 0x1A.

3. The serial port cable is connecting from Female pin (GSM Modem) to Female (8051 Board). So you need a have a female to male converter. Also, make sure that the Rx and Tx inside in the converter are crossed. In otherwords, the Rx pin of GSM Modem should go to Tx pin of 8051 microntroller. This is called a crossed cable.

4. Below is the C program using Keil® Compiler for 8051. We added infinite while loop after the sendsms() routine because otherwise we found that the code compiled was sending the SMS in a infinite loop.

Note : Beginners always complain about their code working through serial port of a computer but the same not working through chip. It is very essential to understand the difference between crossed cable and straight cable as well as the pins configurations of male and female connectors before starting.

C program

#include <REGX51.H>
#include <AT89X51.H>

unsigned char *command_AT = "AT\r";
unsigned char *command_CMGF = "AT+CMGF=1\r";
unsigned char *command_CMGS = "AT+CMGS=\"+919449XXXXX\"\r";
unsigned char *message = "electronicprojs.blogspot.com";
unsigned char CTRLZ = 0x1A;

void puts(unsigned char* ptr);
void putc(unsigned char chr);
void sendsms(void);
void initialize();

main()
{
initialize();
sendsms();
while(1);
}

void initialize()
{
SCON = 0x50; /*SCON: mode 1, 8-bit UART, enable receive */
TMOD |= 0x20; /*TMOD: timer 1, mode 2, 8-bit */
TH1 = 0xFD; /*TH1: for 9600 baud */
TR1 = 1; /*TR1: timer 1 run */
}

void sendsms()
{
puts(command_AT);
puts(command_CMGF);
puts(command_CMGS);
puts(message);
putc(CTRLZ);
}

void puts(char* p)
{
char *temp = p; /*temp pointer so that the actual pointer is not displaced */
while(*temp != 0x00)
{
putc(*temp);
temp++;
}
}

void putc(unsigned char chr)
{
SBUF = chr;
while(TI==0); /*Wait until the character is completely sent */
TI=0; /*Reset the flag */
}

DEMO VIDEO OF PROJECT


Wednesday 10 April 2013

A LIGHT FOLLOWER ROBOT

A LIGHT FOLLOWER ROBOT



The main purpose of this project is to design a robot which would follow the path of higher luminescence across all directions.It is based on the principle that resistance of a LDR changes with the amount of light falling on it.

The light following robot is a mobile machine which is capable of detecting and following the light source on the traveling path. It is developed without the help of a micro-controller for providing easier connections and understanding of the circuit. It requires fewer numbers of electronic components and very cost-effective as well.

The concept of this light following robot is very simple. It includes two photodiodes, one on the right and other on the left. When the light falls on the right photodiode, the robot will move on the right side. Similarly, the robot will move on the left side when the light falls on the left photodiode.



Introduction:


Now the question is, how can we start our project? We need to learn how electronics and mechanical structure work together. We will go forward step by step. If you want to make a Light following robot, you need to have some basic knowledge of the following things:



Electronics:

LDR (Light dependent resistor).
H-Bridge Driver.
L293D ( Motor Driver)
Ardunio Uno (MCU)
Battery

Mechanical:

Wheel.
Robot structure.
Ball caster.
Micro Metal Gear Motor.

For this project we have used Arduino Uno as the main processor unit. It is an 8-bit microcontroller. It has 32 Kbytes of flash memory. Enough memory space to do this kind of project, I think.




CONSTRUCTION AND WORKING

motor driver(L293D) circuit



rectifier circuit
Connect a 9V battery to the breadboard with the help of a battery holder. The positive power supply is passed to the IN of IC 7805 (1), and sent out through the OUT (3). The negative power supply is sent to the GND (2) connection of IC 7805. In between, two capacitors (C1 & C2) are connected to the IN and OUT of IC 7805 respectively. As a result of this process, 5V of current is obtained.

Now, connect an IC LM358 in the breadboard. As it is a voltage comparator, it will predict the output from the photodiodes based on the input voltage. For instance, let us consider that the voltage at 3rd pin is more than or equal to the voltage at 2nd pin. At this time, the 1st pin of IC LM358 will be high or else it will stay low. A 10K resistor is coupled with each photodiodes. Then, place an IC L293D in the breadboard, and join the 2nd and 15th pin of it with 1st pin of IC LM358. In between this connection, include a LED with the 10K resistor.

The four – core wire of left motor is connected to the 3rd & 6th pin of IC L293D, while the right motor is attached with 11th & 14th pin. The two 10cm wheels are mounted with the motors. Acastor wheel is included at the front of the robot for balanced and comfortable movements. A power supply of 5V is applied to the 1st, 7th, 8th, 9th, & 16th pins. The remaining 4th, 5th, 10th, 12th, & 13th pins are connected to the ground.

After finishing all the circuit connections, place the robot in the dark room. Connect the 9V battery and power the robot. Now, show the light in front of the robot, and it will follow the light wherever it goes.

LOCOMOTION


The locomotion system we are using here is the differential drive. It is a basic design with two motors, two wheels and a castor wheel as shown in line follower post. The chassis is a ready-made steel chassis that can be bought from robotics shop.




SENSORS


LDR SENSORS

LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits. Normally the resistance of an LDR is very high, sometimes as high as 1000 000 ohms, but when they are illuminated with light resistance drops dramatically.

The above schematic diagram is an example of a light sensor circuit :

When the light level is low the resistance of the LDR is high. This prevents current from flowing to the base of the transistors. Consequently the LED does not light.

However, when light shines onto the LDR its resistance falls and current flows into the base of the first transistor and then the second transistor. The LED lights.

The preset resistor can be turned up or down to increase or decrease resistance, in this way it can make the circuit more or less sensitive.



ldr sensor and its orientation





















This is the most important part of the robot. We have used here a three sensor layout which enables the robot to sense any light source in front of it. Of course, there can be several more different layouts to optimize the performance of the robot. Below is the picture of the sensory circuit mounted on the robot.

Let us mark these sensors as left(L), right(R) and center C) sensors. The ultimate goal of our code is to find which sensor receives maximum intensity and to face the robot in that direction. Below diagram shows the circuitry in the sensor circuits:

Each sensor has to be provided a 5V Vcc supply and a data(D) output has to be taken out from it. Three sensor circuits as shown in fig 2 will complete our sensory part of the robot.

A COMPLETE CIRCUIT DIAGRAM OF LIGHT FOLLOWER









CODES FOR LIGHT FOLLOWER USING ARDUINO UNO





int motorLEFTpin1 = 5;              //define digital output pin no.
int motorLEFTpin2 = 6;              //define digital output pin no.
int motorRIGHTpin1 = 10;
int motorRIGHTpin2 = 11;
      
int ldrs1=A0; 
int ldrs2=A1;
int ldrs3=A2;

int ldrs11=0; 
int ldrs22=0;
int ldrs33=0;


void setup () {
  Serial.begin(9600); 

  pinMode(ldrs1,INPUT);
  pinMode(ldrs2,INPUT);
  pinMode(ldrs3,INPUT);
  
  pinMode(motorLEFTpin1,OUTPUT);        //set pin 5 as output
  pinMode(motorLEFTpin2,OUTPUT);        // set pin 6 as output
  pinMode(motorRIGHTpin1,OUTPUT);       // set pin 10 as output
  pinMode(motorRIGHTpin2,OUTPUT);        // set pin 11 as output
  delay(100);
}        


void loop()

  
         // read the input pin


  Serial.println(ldrs1);
  Serial.println(ldrs2);
  Serial.println(ldrs3);

  Serial.println("\t");
  Serial.println("\t");
  ldrs11 = analogRead(ldrs1);
    ldrs22 = analogRead(ldrs2);
    ldrs33 = analogRead(ldrs3);
   
  
   if ( ldrs33<200 && ldrs22<200 && ldrs11<200 || ldrs22<200 ) {                  //move straight
    
    digitalWrite(motorLEFTpin1,HIGH);
    digitalWrite(motorLEFTpin2,LOW);
    digitalWrite(motorRIGHTpin1,HIGH);
    digitalWrite(motorRIGHTpin2,LOW);
    


else if ( ldrs11<200) {                  //move left
    
    digitalWrite(motorLEFTpin1,LOW);
    digitalWrite(motorLEFTpin2,LOW);
    digitalWrite(motorRIGHTpin1,HIGH);
    digitalWrite(motorRIGHTpin2,LOW);
    delay(200);
  

             
    }
     else if (ldrs33<200 ) {                  //move right
    
             digitalWrite(motorLEFTpin1,HIGH);
             digitalWrite(motorLEFTpin2,LOW);
             digitalWrite(motorRIGHTpin1,LOW);
             digitalWrite(motorRIGHTpin2,LOW);
         
    } 
else if ( ldrs33>800 && ldrs22>800 && ldrs11>800 ) {                 
 //no light, move 360 degree  and search for light
    
    digitalWrite(motorLEFTpin1,HIGH);
    digitalWrite(motorLEFTpin2,LOW);
    digitalWrite(motorRIGHTpin1,LOW);
    digitalWrite(motorRIGHTpin2,HIGH);

  
  }
  
}

Saturday 30 March 2013

ROBOTS IN MEDICAL SCIENCES

   

              ROBOTS IN MEDICAL SCIENCES


Few decades ago, people are aware of robots only through movies and books. Robots are used for the purpose of entertainment in various movies. In these days, robots play a major role in the field of medicine. Scientists are trying to find out new ways for making use of robots in their medical field. Robots can be helpful in the medical world by three ways which includes dealing with diagnosis, surgery and bringing back good health for the patients.
There seems to be high risk of difficulties in most of the surgeries and some times there are chances for mortality. Hence, most of the scientists and doctors made various researches in order to make the surgeries safe and secure. In such situations, robots can help a lot in making the surgery more safer since they could make smaller cuts in the organs or tissues. This would in turn make the patients feel easier and comfortable.
The most important point considered in the medical world is to get accurate and safer diagnosis. Most of the times, the patients are diagnosed in an inaccurate manner and hence they suffer from various problems. The test instruments in robots are able to perform various tests that can be performed by doctors or nurses. These tests include sample collection, CAT scans performance, etc. This would help in reducing the errors and also reduces the malpractices done in case of reports delivered.
Most of the people are injured through accidents. The quality of such patient’s life can be improved by rehabilitation. Robots would help in such process by helping the patients in restoring the function of their legs and hands. Robots can also help in monitoring the progress of each and every patient. Thus robots play a vital role in the field of medicine and it reduces the work of human.


Robots are critical to the medical field where extreme precision and delicacy is necessary, and the margin for error slim. In this section learn how robots are used to keep you healthy.
The first generation of surgical robots are already being installed in a number of operating rooms around the world. Robotics is being introduced to medicine because it allows for unprecedented control and precision of surgical instruments in minimally invasive procedures. So far, robots have been used to position an endoscope, perform gallbladder surgery and correct gastroesophogeal reflux and heartburn. The ultimate goal of the robotic surgery field is to design a robot that can be used to perform closed-chest, beating-heart surgery. The use of robotics in surgery will expand over the next decades without any doubt. Minimally Invasive Surgery (MIS) is a revolutionary approach in surgery. In MIS, the operation is performed with instruments and viewing equipment inserted into the body through small incisions created by the surgeon, in contrast to open surgery with large incisions. This minimises surgical trauma and damage to healthy tissue, resulting in shorter patient recovery time.

Robots are performing their function in different fields of medical science, such as

SURGERY:


Because robots are able to perform major operations while only making small incisions, patients receive many benefits: lessened trauma, fewer infections, decreased healing time, and a faster discharge from the hospital. Robots are used to perform heart surgery without opening patients chests.

EDUCATION:


Robots are currently used to test medical students. Pregnant humanoid robots, for instance, prepare students for various birth complications.

ADMINISTRATION:


Robots are also affecting the way hospitals are run and medications distributed. They make sure hospital visits are shorter and the risk of infection minimized.


Possibly the most glamorous application of robots in medicine, current state of the art couples a human surgeon with mechanisms that can perform surgery through very small incisions, greatly reducing the risk to patients. The surgeon's ability to control the mechanism is enhanced by providing force feedback to the controls, allowing the operator to have a sense of touch to help control the robot. This type of robot isn't completely independent, and is more properly called a teleoperated device, but uses much of the same technology an independant robot would employ for motion control, imaging and tactile/force feedback. The fully autonomous surgical robot that is a feature of science fiction literature and screen entertainment is unlikely to appear in the near future, and even if technically possible, would be viewed with great skepticism by patients (and their lawyers).
The robots are capable of doing lots of works in hospitals and medicine, some of them are:-
    


Diagnosis

Robotic test instruments range from exotic scanners (such as computerized axial tomography: the CAT scan) to laboratory equipment that processes and analyzes samples of blood and other materials extracted from the body for diagnostic purposes. They provide consistency and accuracy, reducing the possibility of human error that can cause an inaccurate diagnosis. While not the classic industrial robot, they do employ many of the same automation techniques.     


Prosthetics

Mechanical replacements for missing limbs and organs that can interact with the human organic system are a long-standing goal of the medical community. Research into replacement hearts, limbs, eyes, ears and other organs offers hope for the development of effective implanted devices and replacement limbs that can function for long periods of time. Robotic devices can also provide assistance to people with severe restrictions on movement, in many cases allowing them at least some capability to move around or nearby their homes. 

One of the great challenges facing the designers of implantable devices is the need to avoid stimulating the normal immune system response to foreign objects, a response that can cause serious complications or disable the device. It is also necessary for the device to be able to survive in the biological environment without damaging chemical interactions with the body.



Rehabilitation 

Robots can provide exercise platforms to help restore limb function and can monitor the condition of patients undergoing rehabilitation from the effects of injuries, stroke or other brain or nerve damage.

Pharmaceuticals 


Industrial robots used to manufacture drugs provide consistency and cost control in drug production and can perform many process and handling steps without the risk of contamination from human operators or exposing humans to dangerous chemicals or inadvertant drug doses. 




June 24, 2008 The rise of robotic surgery has marked a new age in medical science and one of its pioneers has just reached a major milestone. Dr. W. Randolph Chitwood, Jr. has performed his 400th robotic-assisted mitral valve repair at Pitt County Memorial Hospital. A globally recognized cardiothoracic surgeon, Chitwood’s robotic-assisted surgery training center at the Brody School of Medicine at East Carolina University (ECU) was the first site in the US to offer formal training in robotic-assisted mitral valve (a dual flap valve in the heart located between the left atrium and left ventricle) repair procedures.


Now robots have been implemented in every aspects of our life and it can not be ignored that how they make our life more better and comfrtable.

"By integrating computer-enhanced technology with the surgeons’ technical skills, robotic-assisted procedures enable surgeons to perform better surgery in a manner never before experienced"
 So now a days they are  integrated part of our life.










Thursday 28 March 2013

A LINE FOLLOWER ROBOT

A LINE FOLLOWER ROBOT

The purpose of this document is to help you build a Line Following Robot.
Starting with an overview of the system the document would cover implementation
details like circuits and algorithms, followed by some suggestions on improving the
design.



























BACKGROUND:


The present condition in Industry is that they are using the crane system to carry the parcels from one place to another, including harbor’s .Some times the lifting of big weights may cause the breakage of lifting materials and will cause damage to the parcels too.The robot movement depends on the track. Use of this robot is to transport the materials from one place to another place in the industry.


Practical applications of a line follower :  Automated cars running on roads with embedded magnets ; guidance system for industrial robots moving on shop floor etc.

Prerequisites:
Knowledge of basic digital and analog electronics.
(A course on Digital Design and Electronic Devices & Circuits would be helpful), C Programming


WORKING PRINCIPLE:

This simple robot is designed to be able to follow a black line on the ground without getting off the line too much. The robot has five sensors installed underneath the front part of the body, and two DC motors drive wheels moving forward. A circuit inside takes an input signal from five sensors and controls the speed of wheels’ rotation. The control is done in such a way that when a sensor senses a black line, the motor slows down . Then the difference of rotation speed makes it possible to make turns. For instance, in the figure on the right, if the sensor somehow senses a black line, the wheel on that side slows down and the robot will make a right turn.

overview of robot











Now we will discuss all blocks in detail..... and i 'll tell you the complete procedure to make all blocks separately and how to assemble them.


  1. SENSOR ARRAY
   
 

We have used IR sensors for making sensor array. IR sensor consists of a transmitter and a receiver as shown in above photo. The transparent led is transmitter while the black one is receiver. IR transmitter will transmit infra-red radiation which will fall on the surface and the reflected radiation will be received by the receiver. The reflection of radiation will depends upon the colour of the surface.as shown in photo below.
the orientation of sensors should be as like as shown in above photo so that robot can detect a sharp as well as curve tuns.

Most of the radiations will be reflected back from white surface but it is just opposite in case of black surfaces as shown in diagram below.

working of ir sensors

circuit diagram of one pair of ir sensor






















This circuit diagram is showing only one ir sensor. we need to make 5 sensors on PCB board as shown in 1st photo of sensor array.












2. COMPARATOR

We used comparators(OP_AMPs) to convert the analog signals received from sensors in to digital signals
The op-amp IC we used is LM324 to give square wave as a output by comparing the sensor signal with a reference signal provided by us.



Theory :-
As you all know that in the world of electronics all the microcontrollers and microprocessors works on DIGITAL SIGNAL, but from the sources like battery we get a ANALOG SIGNAL. So in embedded systems it is mandatory to convert the analog signal into digital signal.
So for converting the analog signal into digital signal we use operational amplifiers(OP-AMP). We use operational amplifiers as a voltage comparator . A op-amp is shown in figure below :-




We fix a voltage at negative input with the help of variable resistor of 10k ohm and at the positive input we give our analog signal. If the analog signal is grater than the fix voltage at negative input then we get 1 in output(means +5V) and if the analog signal voltage is less than the voltage at negative input then we get 0 at output(means 0V).
Note :- Set the negative input voltage with the help of variable resistor according to your requirement.
you can see a A to D converter in below fig.




There are several OP-AMP ICs are available like :- lm358, 741, lm324 etc.Here we use LM324 which have 4 op-amps in it.


 The reference voltage will be given to inverting terminal(2,6,9,13) . The value of Vcc will be equal to 5v or 6v so that output of opamp shold be less than 5v only otherwise micro-controller will not read the signal from opamp.

Sensitivity of IR sensor:

The sensitivity of sensor means that how much effectively the sensor senses the change that is
occurring in its surrounding. The sensitivity of the IR sensor is controlled by reference voltage at pin 2
using variable resistor.

· Large value of reference voltage – less sensitive.
· Small value of reference voltage – more sensitive.


3. MICRO-CONTROLLER

I am using ATMEGA 328 with ARDUINO UNO development board. it is very easy to programme and burn the same in to ur arduino.
Microcontroller board used :- ARDUINO UNO

Technical specification:-

Microcontroller:-                                      ATmega328

Operating Voltage                                    5V

Input Voltage (recommended)                7-12V

Input Voltage (limits)                               6-20V

Digital I/O Pins                                        14 (of which 6 provide PWM output)

Analog Input Pins                                     6DC

 Current per I/O Pin                           40 mA

DC Current for 3.3V Pin                         50 mA

Flash Memory                                          32 KB of which 0.5 KB used by bootloader

SRAM                                                       2 KB

EEPROM                                                  1 KB

Clock Speed                                             16 MHz

















4.MOTOR DRIVER

L293D IC is a dual H-bridge motor driver IC. One H-bridge is capable to drive a dc motor in
bidirectional. L293D IC is a current enhancing IC as the output from the sensor is not able to drive
motors itself so L293D is used for this purpose. L293D is a 16 pin IC having two enables pins which
should always be remain high to enable both the H-bridges. L293B is another IC of L293 series having
two main differences with L293D.
PIN DIAGRAM OF LM293D






























CODES FOR LINE FOLLOWER


the following code is left priority code ie if all sensors will detect black line then it will go for left line. you can change the priority order by jst making slight change in code.




int motorLEFTpin1 = 5;              //define digital output pin no.
int motorLEFTpin2 = 6;              //define digital output pin no.
int motorRIGHTpin1 = 10;
int motorRIGHTpin2 = 11;
int irl2=2;
int irl1=4;
int irc=7;
int irr1=8;
int irr2=12;


int il2=0;
int il1=0;
int ic=0;
int ir1=0;
int ir2=0;

void setup () {
  Serial.begin(57600); 
  
  pinMode(irl2,INPUT);
  pinMode(irl1,INPUT);
  pinMode(irc,INPUT);
  pinMode(irr2,INPUT);
  pinMode(irr1,INPUT);
  pinMode(motorLEFTpin1,OUTPUT);        //set pin 5 as output
  pinMode(motorLEFTpin2,OUTPUT);        // set pin 6 as output
  pinMode(motorRIGHTpin1,OUTPUT);       // set pin 10 as output
  pinMode(motorRIGHTpin2,OUTPUT);        // set pin 11 as output
  delay(100);
}        

void loop()
{
  int c=0;
  int r=0;
  

  
  il2=digitalRead(irl2);
  
  il1=digitalRead(irl1);
  
  ic=digitalRead(irc);
  ir2=digitalRead(irr2);
  
  ir1=digitalRead(irr1);
  
  
  Serial.print("Raw Ratel2: ");
  Serial.println(il2);
  Serial.print("Raw Ratel1: ");
  Serial.println(il1);
  Serial.print("Raw Rateic: ");
  Serial.println(ic);
  Serial.print("Raw Rater2: ");
  Serial.println(ir2);
  Serial.print("Raw Rater1: ");
  Serial.println(ir1);
  Serial.println("\t");
  Serial.println("\t");
  

    
  if(ir2==LOW)
    r=1;
    
  if(ir1==LOW)
    r=2;

      if(ic==LOW)
        c=3;
  if(il2==LOW || il1==LOW)
      lft();
    
   else if(c>r)
       st();
          
      else if(r>c)
          rt();
      else if(il1==HIGH && il2==HIGH && ic== HIGH && ir1==HIGH && ir2==HIGH)
        lft();
    
    
    
  
}

void st()
{
   digitalWrite(motorLEFTpin1,HIGH);
   digitalWrite(motorLEFTpin2,LOW);
   digitalWrite(motorRIGHTpin1,HIGH);
   digitalWrite(motorRIGHTpin2,LOW);
}

void rt()
{
  digitalWrite(motorLEFTpin1,HIGH);
  digitalWrite(motorLEFTpin2,LOW);
  digitalWrite(motorRIGHTpin1,LOW);
  digitalWrite(motorRIGHTpin2,LOW);
}

void lft()
{
   digitalWrite(motorLEFTpin1,LOW);
   digitalWrite(motorLEFTpin2,LOW);
   digitalWrite(motorRIGHTpin1,HIGH);
   digitalWrite(motorRIGHTpin2,LOW);
}




ALL THE BEST GUYS..... IF YOU FIND ANY ISSUE, LET ME KNOW.