Making a simple Line Sensor

What is a line sensor?

Line Sensor is one the most commonly used Detector in Robotics. It is used to detect the presence of a line. It has or applications. Theoretically, it detects the intensity of light reflecting off a surface. In most competitions, the robot either has to follow a line, or navigate a grid. So you are provided with white lines on a black surface. What this sensor does is it checks the amount of light reflected off a surface and outputs it as a voltage level, which may range from Vcc to a certain minimum value depending on the characteristics of the photodetector.

The principle is that different colors reflect different amount of light, white being the most reflecting, black being the least. So when using this on a black surface with white lines, when you get a high reading, the line is present(white is detected), when you get a low one, line is absent. These are generally used in groups of 208 to help decide which direction to turn

Here’s a diagram for a simple line sensor.

Simple Line Sensor

Simple Line Sensor

The data pin is attached to an ADC or the ADC pins, if your microprocessor has an inbuil one like AVRs, the others are obvious. Don’t supply more than 8 Volts to the circuit or it may get damaged. If you donot have an ADC on your board, just use a comparator and compare it to some constant value.

You wold want to first get a reference value for the given scenario, then use it so you can adjust to ambient lighting. You may also want to cover the  The photodetector with a tape so it is not sensitive to ambient lighting in the first place.

int wref;

function get_refernce(){

::wref=Read_ADC(Channel)

}

void main(){

if (Read_ADC(Channel)<wref-20)

{

//Line is absent. Do something. Move the robot, stop it whatever

}

}

That’s a sample code. Just a sample, not really usable, so don’t copy paste it.. It just explains how this thing works. I’ll write a better tutorial someday…

The photo page on orkut is for YOUR photos! Deal with it

This post is dedicated to all the people out there who’ve been clogging orkut and facebook disks with photos of celebrities. Fellas, if you haven’t noticed, there are dedicated websites that post photos of these people regularly. I mean seriously, what is wrong with these people. If you don’t have any photos of your own, leave it blank. Fine you put celebrities on your profile pic, thats cool but for god’s sake stop clogging these sites with celebrity photos, and while you are at it, remove those tacky slogan pictures, poems, landscapes. For God’s sake, take them off. Its not really as cool as you think.

Comon, little shy fellas, put  up your photos, no one is going to laugh no matter how ugly you look. Even if we do, know that either these people do it “In your face” or will do it when you eventually.

Practical Exam dates advanced.

See earlier I wrote that exam dates had been postponed. The college now decided that instead of having the pracs after the exams, it’d be realy fun to have them all of suddent on the 7th dec when no one is ready, everyone needs to study for the biggie, and no one wants to come. So that means less time to study, which I do very little of anyways. haha so much fun. Plus roam around for getting the file complete. More time wasted. What a pain in the ass this college is

Exams postponed

It seems our exams have been postponed to 14th December. Well, postponed is the wrong term since WBUT never really gave us a date. We just somehow assumed it was 8 of December. From what I read on the site, exams for MBA start on 8 Dec and all other streams on 14 Dec. All other streams probably means us.  This would be generally good news unless the college decides to hold practical exams before the exams instead of after, which would be trouble.  Ciao

Finally a google wave invite.

For those who don’t know, I have been hunting for a googlewave invite for the last two weeks. I tried to ask mukul, posted on life hacker thread, requested google, did this, that. Finally, today around 15 minutes ago, i got the invite.

Now for those wondering why google doesn’t make wave public, it is for good reason. The thing is definitely not ready for the world. Its got many flaws and could, in my opinion use an interface revamp

Google Wave looks like this

Google Wave looks like this

Here’s a screenshot of google wave. If you actually care about wave, you already know what it looks like. I won’t go into the finer details. It basically lets you have real time editable conversations. So you can edit stuff in real time. Like documents, text, anything pretty much. So you start a document, edit it, and your friends can see those edits. It has a lot of gadgets so you can make itenaries, maps, this and that all in real time

If you want an invite, register on my blog and leave a comment with your email.

You studied under WBUT if….

1.  Your marks in a subject are in inverse proportion to your preparation. You get the lowest marks in the subjects you studied the most (Not studying a subject intentionally will however get you a big F)

2. Exam dares are declared a week before they start.

3. You think Matrix is the best book to study from :-P

4.  You think every other college is better than yours.

5.  You rarely study more than one night for most subjects(the night before the exam). Holds for all engineers actually.

6. Your girlfriend says “Eww!” when you ask for a kiss.

7. You have no idea how to do a fourier transform or a laplace transform even though you are in your final year.

8. You actually thought Ajab Prem Ki Gajab kahani was funny.

9. The word “Panu” means half your life to you.

10. You actually took time to read this.

Rant: Exams Again!

So here they are again. Exams back at haunting you. You should really tell these people to get a life rather than being a complete pain in the ass of students. I mean comon they return every six months and kick your ass totally. What the heck is that now. Someone should put them in jail as they are abetted to 80% suicides among students. But who listens to me anyways!

Update:

So here’s how the time after my birthday has been. Wel my laptop had turned bad, so I had to rely on other things for entertainment that is until I went to Gurgaon on the 22nd. I enjoyed Durga Puja. Somik and Ankush were there. We played 29 pretty much he whole time. But anyways, it was interesting. We also discovered from Aindrilla tha Ankush had been hitting on her, Riya  Neogi, Shreya Bhattacharya among others.

Well lol, as the word goes. Then there was an extremely boring Diwali when I decided to stay home at Kalyani. Anyways, then there were attendance problems, mine stood a 57 while cutoff was 60. I managed to fill the form by crook, now let’s see wat happens next. Also SPIE student chapter is catching on, we’ve got 35 members. As for debate club, we have 11 members yet

Happy Birthday

Happy Birthday to me again. NOw this birthday would be my golden birthday. which has me wondering a lot of things some of which I will share in a seperate password protected post which I will share in the next post. The password I will leave clues to ofcourse. As of now, I can tell you that being single always on these special occasions has a certain drawback. I mean it goes good with the bachelor till death do me(hah!) image but can become a real boredom when the rest of the world is out celebrating. Anyways that’s all

Got a suppli

Well the sems results came out on the 25th and apparently, I got a suppli in Digital Electronics. Its sad I know. My GPA is 5.93, it might increase to 6.3 or 6.4 after the supply is cleared, if ever that is. I hope it will be. Hang in there