Author Topic: NEED HELP! Line follower, modifying photoresitors  (Read 885 times)

0 Members and 1 Guest are viewing this topic.

Offline oltion28Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
NEED HELP! Line follower, modifying photoresitors
« on: June 04, 2012, 08:14:57 AM »
Hello there,

I have a project at my university, and i have to build a line follower robot with arduino, and for sensors i have to use photoresitors. How can i modify the photoresistors to detect a line. And i also want to know the program to upload on the arduino board.

Its is urgent because I have not enough time!   

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 238
  • Helpful? 12
Re: NEED HELP! Line follower, modifying photoresitors
« Reply #1 on: June 04, 2012, 08:30:22 AM »
I'm not clear why you would want to modify the photoresistor.

I assume your line is a different color than the background - and if you point the photoresistor at the line it will give you a different reading over the line vs. off the line - and that is the information you need to make the line follower work. If you have two photoresistors, you can straddle the line. If you have only one, you can follow one edge of the line.

I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline oltion28Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Re: NEED HELP! Line follower, modifying photoresitors
« Reply #2 on: June 04, 2012, 09:01:56 AM »
I've heard to attach led to the photoresistor, and i don't know how to do this.  :( 

And where i can find the code to program it ?

Tank you

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 238
  • Helpful? 12
Re: NEED HELP! Line follower, modifying photoresitors
« Reply #3 on: June 04, 2012, 12:59:00 PM »
OK, watch a little of this video:
Two Wheel Lego Mindstorms NXT Balancing Robot at LTU


See the red spot shining on the table in front of the robot? That's from the LED.  The LED lights up a spot on the surface and a photoresistor would be mounted right next to it and would react to the amount of reflected light. The two are not really connected together electrically except to share a common power source.  In fact, you want to keep them somewhat separated by something that the light doesn't shine through so that the photoresistor only reacts to the light reflected from the surface - glue them both to opposite sides of a piece of cardboard.

The LED will be connected to power and ground (+ and -) through a resistor to limit the current to the LED.

The photo resistor will be hooked up like shown here: http://www.societyofrobots.com/schematics_photoresistor.shtml

You may be able to find some code if you google. Otherwise you will have to write it yourself. I assume that the point of the homework assignment is to get you to write code - right?
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline oltion28Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
Re: NEED HELP! Line follower, modifying photoresitors
« Reply #4 on: June 04, 2012, 03:19:03 PM »
no the main point is electronic, and so i want to get the code of programming almost done :D. Thank you very much for your reply, it was helpful. :)

 


Get Your Ad Here