Monday, April 26, 2010

Line Following Robot


Hey Folks,
In the last post, I have a shared a document on implementing PID controller, I hope that it was useful .
In this article I would like to share one of its applications – Line Following Robot.

Now let’s analyze how can we build a Line Following Robot using the PID controller and analog sensors.
My tryst with this robot happened when I decided to participate in a competition at SASTRA university  and at the end of it all I won 2nd Prize. The sad part being I could not find enough time to make a new Hard Ware (HW) for this competition, so I had to modify my Micromouse . So my Line Following Robot is same as my Micromouse but with modified sensor position and Software (SW). A small advise for the aspiring Robot-makers same robot model can be used for several competition ( solving different problem statements) with minor modification in HW and significant change in SW.
This is my Micromouse
This is my Line Follower after Modification :
Bottom View:

You can observe that the major change is only in sensor board (considering HW). 
Modified sensor board for this Line Follower looks something like this .
The third sensor in the above pic is completely competition specific, at this moment you can safely ignore that sensor (for more information on sensor's refer my presentation on Making of Micromouse in my old posts).
Both the sensors are connected to ADC port of the microcontroller. Also remember that the distance between two sensors should be equal to the width of the Line (i.e. white line on black background or vice versa) that robot should follow.
This would be Ideal position of the sensors.
IDEAL POSITION:
Output voltage from both the sensors would be approximately same. Lets now introduce a new variable Error, which is mathematically calculated as shown below,

Error = LeftSensor(O/P voltage) –  RightSensor(O/P voltage);

For the ideal position this Error will be Zero (approximately).
Lets now imagine that the Robot deviates towards right, the new sensor position would look something like this.
SCENARIO 1: ROBOT DEVIATING TOWARDS RIGHT:
In the above scenario voltage reading from Left sensor will be greater than that of Right sensor resulting in Error value greater than zero . As a corrective measure, robot should move a little towards left, so that it would come back to the ideal position again. 
Solution: There are two ways to get back to Ideal Position
Solution 1 :  The speed of the left motor should be reduced when compared to that of right motor.
Solution 2:  The speed of the Right motor should be increased when compared to that of Left motor speed ( I prefer increasing the speed of Right Motor).
How much speed change should we apply??

Lets now introduce another term named Delta speed. We can use PID controller to calculate this delta speed. 
Lets imagine that we are using a P (proportional) controller alone.

DeltaSpeed = Error * Kp; 
Where Kp is a proportional constant.
SCENARIO 1: ROBOT DEVIATING TOWARDS LEFT:
Here error would be negative, so DeltaSpeed is calculated as
DeltaSpeed = Error * (-Kp);
Now this DeltaSpeed calculated is the amount of speed that should be either reduced or increased on the respective motors in order to bring the robot to ideal position.
By using trail and error method the value of Kp is obtained. 
Since our Robot moves continuously on the line and correction is done continuously, it is not necessary to concentrate on Steady State Error, so we can also safely ignore Integral and Derivate Controller. So, foline follower proportional controller would be Sufficient.
Here is a Small video of my Line Follower:


Monday, March 15, 2010

PID controller ...

Hi there...
Its been almost an year I posted on my blog. Though had loads to share, couldn't... Was quite busy with assignments at Germany and Bangalore.You hardly find time for personal stuff after you get into "IT life".M not scaring you, its just a mere fact!!!
Now, coming over to that part where we all are interested in - ROBOTICS. :)
This post gives u a glimpse at PID controller (most of the 3rd years - engg must hav been familiar with this word). If not you can google it for the basic info. All the books and search engines give you an idea of what it is, its usage and the best they can tell you is explain its mechanism through graphs. In short, theory.N the next question that arises is - how do we implement it for our applications???
I came across an application note recently on how to implement a PID controller in a microcontroller from Microchip.I found it interesting n informative. Though its explained using a PIC18 MCU, the concept can be used with any controller.

M including the link for your benefit.

Hope you'll find the answer for the question through it.


Friday, April 3, 2009

Mobile Phone Operated Robot - Complete Document

It has been long time since I made my last POST. 

Actually I was little busy with my job in BOSCH, because of which I couldn't continue with my hobby projects, couldn't make any POST’s.

I use to get tons of queries regarding making of Mobile Phone Operated Land Rover. After this article got published in EFY magazine, this number increased even more. So, to make every one understand the concept behind this and make their own Robot, I am uploading the complete document. 

Still queries ...?

Feel free to get back to me ..

Click here for complete document

Monday, June 2, 2008

VIT University - A Review

Every year once the admission season for the various universities across India sets off, I get many calls from my relatives, my friends and strangers. The conversation starts with a wee inquiry and ends up with a through interrogation.
There are critics for reviewing movies, books, cafés and almost everything from mobile phones to hair pins. Just log into google and type nokia 6600+review.you will find a slew of pages matching your query explaining you the pros and cons of owning that mobile.

Now try the keyword VIT university review. How many results did you find….?

If your answer is zilch and you are in a desperate need to find one, then this is an attempt to wane your curiosity. Here it goes.

The first question that ppl usually shoot at me is “How’s VIT…?”

I usually start answering it this way
It was in the year 2004 that I came to know about some college called Vellore institute of technology .it was in the same year that I gave the VITEEE entrance exam and finally landed in this place. There was little competition in those days and getting through was a cake walk. Though I had a lot of options to opt for other well established colleges I never gave a second thought.(may be that’s because of the glitzy page 3 kind of prospectus that attracts lot of test takers even today).the four year journey was remarkable and I have no regrets.

Within a blink the Next question props up “is it better than so and so university or college…?”

Before asking this question one must understand that VIT is still nascent. By saying nascent what I mean to say is that it’s still young. It will be completing 25 years by 2009 and 7 or 8 years as a university by 2009.so u just can’t compare them with IIT’s and places like Anna university, BITS Pilani etc., which were established way back in 1940-50’s.for an institution to gain high reputation such as IIT’s it needs to produce some of the distinguished alums .VIT still being juvenile has no such alum to its credit. There is huge demarcation between VIT and these institutes and it will be of no surprise if VIT surpasses these stalwarts in the near future. As a matter of fact VIT is the fastest growing institute in India.

And the next question “howz the faculty…?”

FACT: A person who fails miserably in his academic life and has no other place to work usually ends up working as a lecturer in an engineering college. There are a few exceptions here and there. But, this fact holds well in all the institutions including IIT’s.
You can never find a university which boasts of highly intellectual faculty. I was able to meet some of the best in the Embedded Systems as far as my area of interest is concerned.

“Do you think this place suits my ward….?”

VIT isn’t tailor made for someone. It’s a readymade product with definite attributes. Skimming through the attributes if you feel like ‘this is what I was looking for’ then this is the right place for you
PRO’S
• Only institute in India to be accredited by IEEE,UK
• Likely to be accredited by ABET,USA by 2009
• Diversity; you will find ppl from almost all the states in India and 15 other countries
• Semester abroad programme
• The best Labs for research.
• Good placements; the placement record has been good from a long time now but the core companies,non IT firms, financial institutes and the top notch IT firms such as Microsoft,google have just started pouring in and with the looming recession we can expect a surge in non IT placements few years down the line. Right now placements are not so good in core companies, I fell that management is not working hard to get NOT IT companies for placements.
• Lot of club activities (but difficult to find an active and useful club)
• Good hostels
CON’S
• High population density
• No proper communication and relationship between the seniors and juniors; this is because of the over precautions taken by the management to prevent ragging.
• Inflexible class hours and hostel timings
• Horrid climate
• The worst administrative staff
• You will be writing exams the whole year
• You will get very little time for extra curricular ( If u can manage u can get lots of time)

Note: this is completely a personal view and opinions may vary depending on individual circumstances

Friday, February 15, 2008

Workshop on Micromouse......

I am posting this out my own excitement i could finally make some worth contribution to my juniors.
On the behalf of IEEE student branch, VIT I have conducted a workshop on making of a micromouse-'A DREAM FOR ALL THE ROBOTICS ASPIRANTS' . When I started making a mouse I had no proper guidance which made it look much more terrible to handle it. Amid these arduous construction of mouse, with patience and support from Amol Deshmukh, I could build my micromouse and it has achieved considerable accolades in all the competitions it contested. With Field of Robotics gaining appreciable respect all over the world I would like to encourage all the robotics aspirants to work on it .

Here is my presentation which I made for my workshop I feel these would help you considerably.....

Making of micromouse hardware
Floodfill algorithm

Sunday, December 16, 2007

Most cherished moments ...!

Year after year there has been reporting the success of people who presented their projects aboard n win prizes. I would often wonder what it actually took for the people to acheive this.
One day i was just gusing through my typical engg students daily schedules to get into d class on time when one of my well known lecture suggested me to participate in freescale semiconductor's 8-BIT MICROCONTROLLER DESIGN CONTEST, I was excited after discussion and found it very interesting to participate in the contest and was done with the registration by the evening. Engrossed in busy schedule of being a bindas engg student I slowly forgot about the contest. Two weeks just before the contest i just thought I would send some model so that i could end up atleast with a certificate of participation. I thought I would send my old model MOBILE PHONE OPERATED ROBOT which was also accepted for publication in SOUTH ASIA'S MOST POPULAR ELECTRONICS MAGZINE "ELETRONICS FOR YOU" .
Studying engg for three years now i got used to working late nights before the deadline.The same happened with this contest too n managed to make the entire working model using Freescale semiconductor's microcontroller just in time. Through out my engg life I found myself dreaming of going to my university on d bike. As days went on i forgot of this contest n was involved in the most fearful week of an engg student life the term end examination. when i came to know that I had won a BAJA PULSAR (2nd prize in design contest), I just could not believe what was happening around me I had just realised one of most cherished dreams had come true and this would live on in my mind as one of most happiest moments of my life....

My small robot model which gave me a BAJAJ PULSAR ...


Saturday, September 15, 2007

Guest Lecture

Presented a guest lecture on "Mobile phone operated robot" in the event "Robo Veda" - a two-day extensive robotics workshop at Vellore Institute of Technology.

To download the presentation click here
For pdf version of the presentation click here