Page 1 of 1

Grove Line Followers

PostPosted: Sat Jan 10, 2015 11:50 pm
by Bastian
Hi Alan,
I've bought the Grove set, installed it with the M2 spacers and ran some test with my_get_sensor_reading.py (only returning “ultrasonic” and “digital” and connected to A5, A4 and A3). Everything seems to work: all sensors are burning red until I move a paper with a black taped line underneath. Two sensors turn black and I receive the correct readings (128, 64). The third sensor doesn’t react at all. Only when I put the black line direct to the sensor (distance 0.0 mm), it turns black and returns the right value (32). I re-installed the cabling, switched positions of the sensors and used different pins on the Dagu-Arduino, but got the same results over and over. Moving the bot from high above downwards, the failing sensor is the first that turns on its red light. Looks like, from the moment it starts sensing, it interprets only black. Is there anything else I can do to correct the sensing level? (I could remove it and work with two sensors, but with the difficult to control motors, I’d prefer a 3-way reading of the lines in my line-following-script).

Re: Grove Line Followers

PostPosted: Mon Jan 12, 2015 1:04 pm
by Alan
Hi Bastian,

There's a little screw potentiometer on the back of the sensor that should let you adjust its sensitivity. Can you try playing with that to see if it improves things please? You'll need to be a bit careful when adjusting it however as they can be quite easy to break if too much force is used.

Regards

Alan

Re: Grove Line Followers

PostPosted: Mon Jan 12, 2015 7:43 pm
by Bastian
Hi Alan,
Thanks for your reply!

That did the trick! Now I also understand the phrase at the Seeed Wiki-page: “Using the adjustable resistor the detection range can be changed from 1.5cm to 5cm. If the sensor can’t tell between black and white surfaces, you can also use the adjustable resistor to set a suitable reference voltage.” I overlooked the screw (part of aging I’m afraid) and was looking for a software way to control it . I tried to read the sensor as ANALOG in the hope I could find some threshold values for the ones that did react, but that brought nowhere. Thanks again!

Re: Grove Line Followers

PostPosted: Tue Jan 13, 2015 11:33 am
by Alan
Great stuff, glad you got it working. :)