Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: anik.shinde on August 21, 2011, 07:46:20 AM

Title: Troubleshooting White Line Sensor
Post by: anik.shinde on August 21, 2011, 07:46:20 AM
Hey, I have made an analog line sensor with 8 IR transmitter and receiver pairs. I have attached a schematic of the same( All odd numbered diodes (LEDs) are transmitters and rest of them are receivers). It is designed for sensing white line on black surface.

??? The PCB I've made has no problems at all. But the line sensor responds to color change only when all the pairs are on particular surface (either black or white). I am unable to troubleshoot this problem . Please help me!!! ???

Title: Re: Troubleshooting White Line Sensor
Post by: waltr on August 21, 2011, 08:27:58 AM
Can you give us a link to the data sheets of the IR emitters and sensors?
Or at least their full part number.

What is the connector attached to? What voltage do you measure at the connector when the 'color' under one pair is either black or white?
Title: Re: Troubleshooting White Line Sensor
Post by: anik.shinde on August 22, 2011, 07:25:29 AM
Can you give us a link to the data sheets of the IR emitters and sensors?
Or at least their full part number.

What is the connector attached to? What voltage do you measure at the connector when the 'color' under one pair is either black or white?

I don't know the part numbers . But when a particular pair is over white surface the voltage at the connector is around 0.4V while that in the case of black surface it is about 3.5V. Connector is connected to  ADC of ATmega128. I've checked the output of each pair on LCD. No output pin is shorted(I checked it using a multimeter). Still the readings on the LCD show a change only when the pair connected to 8th pin of the  connector experiences a color change. My ADC settings are:
Aref=AVcc;
frequency=125kHz;
Readings for black surface: Around 1000;
Readings for white surface: Around 100; 

??? ??? ???
Title: Re: Troubleshooting White Line Sensor
Post by: Conscripted on August 22, 2011, 09:17:20 AM
( All odd numbered diodes (LEDs) are transmitters and rest of them are receivers).

Does the schematic show that the other way around? Should it be arrows into the detector and out of the emitter?

Conscripted
Title: Re: Troubleshooting White Line Sensor
Post by: anik.shinde on August 22, 2011, 10:01:12 AM
( All odd numbered diodes (LEDs) are transmitters and rest of them are receivers).

Does the schematic show that the other way around? Should it be arrows into the detector and out of the emitter?

Conscripted

Actually, I have drawn this schematic in Proteus 7.6, and i don't know what package has been assigned to tx and rx. For tx(emitter) rays should be out and for rx(detector) rays should be in.
 
Title: Re: Troubleshooting White Line Sensor
Post by: Soeren on August 22, 2011, 10:40:31 AM
Hi,

[...] when a particular pair is over white surface the voltage at the connector is around 0.4V while that in the case of black surface it is about 3.5V.
If that goes for each pair when unconnected and change to only responding to the D11/D12 pair when connected, the problem is clearly not in the part that the schematic covers.

Did you try swapping that pair with another to see if the problem follows this pair or stays at the same connector pin?
What else did you try to isolate the problem?


Connector is connected to  ADC of ATmega128.
Each to its own A/D-C input pin or...?


I've checked the output of each pair on LCD. No output pin is shorted(I checked it using a multimeter). Still the readings on the LCD show a change only when the pair connected to 8th pin of the  connector experiences a color change. My ADC settings are:
Why use A/D-C at all, it's slower and takes more code than using comparators.


frequency=125kHz;
Is that your update speed or..?


Readings for black surface: Around 1000;
Readings for white surface: Around 100; 

??? ??? ???
Sounds like it work, just choose 316 as the above/below value.
Title: Re: Troubleshooting White Line Sensor
Post by: Conscripted on August 25, 2011, 03:43:00 PM
Sounds like it work, just choose 316 as the above/below value.

How did you arrive at the 316 number? I would have guessed 450 or so.

Conscripted
Title: Re: Troubleshooting White Line Sensor
Post by: Soeren on August 25, 2011, 04:08:26 PM
Hi,

How did you arrive at the 316 number? I would have guessed 450 or so.
Magic ;D

If you chose 450 it would be unbalanced going up to 222% to reach 1000 and down 450% to reach 100.
choosing 316 OTOH leaves it with 316% to each side.