A Microcontroller Discussion Board
January 05, 2009, 08:38:44 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: P89V51 code for SDCC is now ready to download
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Robot Line Sensor Question  (Read 464 times)
0 Members and 1 Guest are viewing this topic.
richardv2
Freshy
*
Posts: 5


View Profile Email
« on: May 12, 2008, 10:34:15 PM »

I want to signal condition a phototransistor line sensor output to a digital input.

Although I am using the PIC16F8680 chip, the answer should be valid for most PIC chips. If not, please let me know.

I have designed, built and tested a bank of 8 IR Transmitter/ Phototransistor pairs.
They all return 1.2 to 4.2 volts at 3/8ths inch depending on a light or dark surface below the sensors.

I ultimately want an 8-bit digital pattern where the sensors might react like this when travelling over a black line.

00011000
00001000
00001100
00000100
meaning the robot is drifting off center.

Seems like I have several options:
Lets say I use Port B as an input port.

1. If I just run the sensor inputs to the port, it would seem that I would get what I want; zeros or ones.

2. Could I send the 1.2-4.2 volt signal through some kind of chip like an inverter to "clean up" the signal and only produce 0 or 1? I know an opamp could do this, but that seems like overkill.

3. How about an LED/resistor voltage divider to drop the 1.2 down to 0.7 to make sure I get a zero into the chip at low voltage??

4. I could use ADC, but it seems inefficient to convert the voltage into an 8 bit number just to turn it back into a one or zero.

So what would you do???
Logged
A Microcontroller Discussion Board
« on: May 12, 2008, 10:34:15 PM »

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
IR Distance Sensor Tutorials mcuprogrammer 0 644 Last post October 27, 2007, 11:04:07 PM
by mcuprogrammer
Analogue to Digital Line Converter PIC bluefuzz 1 614 Last post December 04, 2007, 07:51:57 PM
by Doug
How Much Current for Line-Following Sensor QRD1114?? Robotics richardv2 0 449 Last post January 28, 2008, 11:24:05 PM
by richardv2
Line Following Sensor Arrangement Algorithm Robotics richardv2 1 660 Last post March 05, 2008, 10:06:29 AM
by Doug
Robot Line Sensor Question PIC richardv2 0 164 Last post May 12, 2008, 10:33:31 PM
by richardv2
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!