Author Topic: Phorotresistor Query  (Read 5882 times)

0 Members and 1 Guest are viewing this topic.

Offline JesseWellingTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Phorotresistor Query
« on: April 09, 2006, 10:57:00 AM »
I'm trying to make a Digital (on/off) Photoresistor sensing unit (for a line follower). I plan on using a Potentiometer to tune the threshold in hardware instead of software, but is there any thing else I have to do besides makeing a circuit like this



and instead of the resistor put in a potentiometer and then hook it up to a digital port?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Phorotresistor Query
« Reply #1 on: April 09, 2006, 08:56:17 PM »
Hey by complete coincidence I am currently working on the exact same project.

There are three things you also need.

One is as you said, a tuned resistor. Either a pot, or just a resistor if you already know which value to use.

The next is, you still want software threshold tuning. No way around this, trust me. But this is super simple. You just take the average of the sensor readings off the line and the sensor readings on the line.
You should do this for each sensor. For example, if sensor A says 55 on the line and 102 off the line, do (55+102)/2 = threshold. Software thresholding is required because you can never predict a sunlight through the windows change in lighting where your robot will follow the line. My robot must work on a white line on light grey concrete outside rain or shine, according to the competition rules . . .
http://www.societyofrobots.com/competitions_mobot.shtml

The 3rd item you need is an extra light source. Look up the datasheet for your photoresistor and see what wavelength it is the most sensitive to. For example, my photoresistors see green light the best. So I use green LED's to shine on the line so as to drown out ambient light. Of course, you must tune your photoresistor resistor to your LED. In all light based sensor robots, you must have a defence against ambient light (dont forget shadows!!!).

Just a side comment, you can also do this with infrared LED's and detectors too.

Offline JesseWellingTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: Phorotresistor Query
« Reply #2 on: April 10, 2006, 03:04:39 PM »
But you can't some how run it through a transitor to turn on once a certain Vo threshold is met using a pot?
That seems like a better solution to me is to do hardware tuning....that way when you go to your compitition or test or whatever you load up a test program that just spits you on line off line digital signal to a readable output and you just crank on your pot over the black line till you get a "on the line reading"

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Phorotresistor Query
« Reply #3 on: April 10, 2006, 03:20:34 PM »
Hey if you know how to get rail to rail output that is immune to the environment, I want to be the first to know  :P

What you would normally get is an analog value, where the difference between on the line and off the line is about a volt or two at max. And threshold can significantly change whether you have sunlight coming through your windows or not.

Offline JesseWellingTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: Phorotresistor Query
« Reply #4 on: April 10, 2006, 06:11:00 PM »
That's why i was thought I could tune it with a pot  ;D am I dead wrong or....some of my EE friends seem to think it's possible....but we'll let you know how it goes.

 


Get Your Ad Here

data_list