Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16F877a chip - IR interfacing: need help

Status
Not open for further replies.

tamer1221

Newbie level 5
Joined
Jan 2, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
IR interfacing

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

Although I am using the PIC16F877a chip,

I have designed, built and tested a bank of 8 IR Transmitter/ Photodiodes pairs.
They all return 1.2 to 4.2 volts 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???
 

IR interfacing

You can ue single op-amp as comparator it's commonly to use..
you can set voltage reference at 4V and you can use non inverting comfiguration.

it's the logic of comparator

if the input voltage < 4V
output =0
else 1

you can change the reference voltage depends on your need.

hope it can help
regard
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top