Several months ago I saw on the Mindsensors website that they were looking for beta testers for their upcoming Line Leader sensor. I applied and shortly thereafter I was contacted by one of the guys there named Deepak. He told me they were still in Alpha testing phase but that they’d get back to me when they were ready to send out beta sensors. True to their word, a few weeks later, I was the lucky recipient of one of their beta sensors.
The Line Leader sensor is not just an array of LEDs and receivers but can actually take care of a lot of the heavy lifting usually done on your NXT. It has a built-in PID controller that can return a value that can be used almost directly to control the speeds of your motors! The sensor is not *just* suitable for line following, of course. You can get all the raw data from the sensor through I2C. That includes the average weighted value of the sensor, but also which of the 8 sensors is currently detecting something. This makes it possible for you to use your own PID controller or use the data to navigate your robot along a line maze.
I set out to line following build a robot that could handle tight turns, so a low center of gravity was a must. I gave it extra large wheels to be able to get a bit of extra speed. I think the result is quite good. Tammy took some awesome pictures of it and the sensor.
A track had to built to test the sensor, so I got some large thick paper sheets, white for the background and black for the lines. I affixed the background paper to plywood for extra strength. The program I wrote is a modified version of the one supplied by Mindsensors. Mine allows you to tweak all the parameters (Kp, Ki, Kd and motor speed) without needing to recompile through a menu driven configuration tool. The settings are saved when you change something and when you exit the program.
Here’s a video of the robot on the track:
The batteries were a bit flat, so I can probably make it go faster, stay tuned for more videos!
Here is a link to the program, it requires RobotC 1.40+: [LINK].