Sals Hacker Space

Sal's Hacker Space

Friday, February 22, 2013

Wall Crawler: Sensor Calibration

I was initially worried that the IR sensor would not give reliable readings when it moves over a line drawn by an erasable marker.

This is because the lines of drawn by an erasable marker are not consistent and to top it off i had concerns regarding the difference in infrared light reflected back to the sensor when moving from white to black on a shiny reflective surface such as a whiteboard.

After some tests today im glad to report that i can still get reliable readings from the sensor when moving from a white glossy surface to a darker glossy surface.

Here is a video showing the sensor in action. Im using my nephews writing board and i have programmed the Arduino to move the servo's forward only when the sensor is over a black line. When the sensor moves away from the black line, the Arduino will stop the servo's from moving.

video

The basic layout at the moment is on a piece of cardboard. Here is how i am laying things out
The code used for this test is given below:

No comments:

Post a Comment