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].
I really want one of these for use in my robotics club’s contests. When can I expect it to be released? What is the price point? Also, can it be reprogrammed to complete a line maze such as shown here?
http://www.chibots.org/drupal/?q=node/22
Thanks,
~Will
Hi there Will,
I am not sure when it will be released. Beta testing is still ongoing, so perhaps dropping the guys at Mindsensor a mail regarding release date and price point will clear that up 🙂
As for reprogramming the sensor to solve a maze, you can’t. You can use it in a maze solving robot as a sensor to detect the line, check for crossings, etc, but it won’t solve the maze for you. That is something your robot will have to do, using the data from the sensor, of course.
Regards,
Xander
[…] program in this robot is based on the same one I wrote for the Mean Lean Line Leading Machine. I made some improvements, of which includes the ability to enter the PID and speed parameters with […]
Hi,
I have some problems to fine tune the PID controller. (Kp, ki and Kd values)
THe problem we always get is after a turn, if there is a straight line, the robot heavily shakes…
Can you give us a tip to fix this? (which values will affect)
Thanks
From http://www.societyofrobots.com/member_tutorials/book/export/html/350
Tuning the PID control
This is the most interesting part in building a PID control. In this step one should tune the Kp, Ki and Kd values to get the best results. I cannot give you the values because what works for me will not work for you. The optimum Kp, Ki and Kd values vary a lot from robot to robot. And the best way to determine the optimum values is by trial and error.
First, set all values to 0 and start with tuning the Kp value. First time I just gave an approximate value. Seeing the robot perform will determine what you should do next. If the robot wobbles a lot reduce the Kp value, if the doesn’t follow the line (goes straight in curves) increase the Kp value. Tune the Kp value till the robot smoothly follows the line. By now you will have observed that the robot goes with no acceleration on straight lines. Now, tune the Kd term. After tuning the Kd term move to the Ki term. After which, you will see the robot first center over a straight line and then accelerate also.
Note: The optimum Kp, Ki and Kd values vary a lot even from track to track. You can only know these optimum values by testing.
Thanks! We wil try it out!