Problem Sensing Black Line On Field

I want to know if anyone has had success detecting the black lines on the VIQRC field reliably - we seem to get lots of anomalous readings that I assume are due to the holes on the field. Is there a model or activity specifically for detecting the lines on the ground?
Thanks!
Garry

1 Like

Hi @Garry_Law!

Would you mind sharing the project that you were using to test? I’d like to see if I can recreate the same issues :slight_smile: When line detection is not working properly, the first thing that I always check is the thresholds for the sensor.

We also have this example in VR based on this activity that might help.

2 Likes

Detecting lines is something that needs some care. As Lauren says, the first thing you need to do is tune your thresholds. What is value is white and what is black. On the IQ fields, the lines are quite matt, and therefore have a very low reflectivity which makes them great for detecting. It’ll probably return a value of less than 10%. The white parts of the field should return quite a high value. The threshold is important - you don’t want it too low that you miss the lines, but not too high that you get false detections either. And don’t forget to make sure that the sensor’s LED is on too.
So first thing to do is take a note of what your white and black readings are. You could do this to find out:

image

Then hold the sensor over a white area, and a black line to see the different values. They will be a long way apart, so your threshold should be somewhere above the black value.
For example, if I saw 70% for white, and 8% for black, I might pick a threshold of around 20%. Then I can drive forward until I detect the line like this:

image

Let us know a bit more about exactly what you are trying to acheive when detecting the lines.

3 Likes

Thanks @Chris_Calver and @Lauren_Harter we did end up having some success at the end of the term last year! You are right, it is about tuning the thresholds, I will be doing some more line following testing before the start of the school term to see if we can get more of a system in place to reduce the errors we were getting before. Thanks again for your help!

3 Likes

Great! Keep us posted on how you get on!

1 Like

@Garry_Law great! Glad to hear it :smiley:

1 Like