hi,
im building as a project at university an autonomous car supposed to follow white strip.
i have to tcrt5000 IR sensors at front one on the left and one on the right.
but every time it gives different numbers for the white.
sometime its:
left :47
right: 54
and if i will pick the car and put it again same place so
left:167
right:140
is there anyway to calibarte it?
Please read and follow the directions in the "How to use this forum" post.
asafanter:
is there anyway to calibarte it?
Yes, besides being white you need to check the illumination. So you need to go for the relative difference between the white and dark side of the stripe.
can you guide me please about the calibration proccess?
how to i suupose to use the data if white detection gives different reading?
i probably missed something
What is the range of readings when the sensor is on black?
lets say great than 400.
the car is moving on a white lane with width like the car and the entire enviroment is black.
i want the car to drive only at the white but im trying to use the fact that when the sensor between the black and the white it gives values more than white and less than black.
but every time the measures are different
So for white the range is 47 to 167 and the range for black is greater than 400?
that is the problem, i try now and the measures are different..
white is around 90-250;
black great than 550
That is a big enough difference to decide between black and white.
"seeing white" if sensor value < 400
"seeing black" if sensor value >= 400
Adjust as needed.
ok but i dont want to decide only if its white or black, in that way i have to wait the car to detect black area and then to be fixed, i want the car to be fixed before its getting to black area, that's why i want to use the "grey" values so ican fix when its getting close to the black
How difficult can that possibly be? Are you really at a university?
Why not actually think a little bit about the problem?
"seeing gray" if (sensor_value > 250 && sensor_value < 500).
thank you, you are very nice... 
yes im really at university, i'm trying to solve my problem and the thing you said is not correct because in a different measure it will consider 300 as white or black because it gives different values!
so im trying to do some king of calibrate and i dont know how...
it will consider 300 as white or black
No, that would be gray. See reply #10.
Good luck with your project!
It seems that ambient light is interfering with your sensor. Remove the interference.