3pi cannot detect line

Hi, I got given a 3pi for my birthday. Initially it didn’t work until we updated the firmware to 108
We loaded the demo program using Atmel studio 7 (windows 10 and the Polulu USB AVR programmer V1) and that works. Next we loaded the line following program from the example folder (examples\atmegaxx8\3pi-linefollower). The program loaded successfully and the start worked, we placed it on a whiteboard with one inch wide black tape, it rotated to the right and left (calibrating the sensors?) and displayed a value of 0. Then when we pressed B a second time it plays the start music displays “GO!” and goes round in circles anticlockwise.
Why does our 3pi not detect the line?

Hello, Ethan.

Yes. At the beginning of the 3pi-linefollower example, the 3pi calibrates the IR sensors by turning right and left to get the minimum and maximum values of the darkest and lightest parts of your course.

You mentioned that the 3pi-demo-program example worked on your 3pi. Did you run the “Sensors” test and verified that the bar graph, showing the individual sensor outputs, fluctuated as you slid the robot across the line of your course?

The 3pi-linefollower example also displays the same bar graph after calibrating the IR sensors (before pressing button “B” a second time). Can you confirm that the behavior is the same when reading the sensor outputs for both examples (e.g. ranges from 0 to 4000, always read 0, or behaviors are different)? Does anything change if you remove the PC5 shorting block?

If the sensors do not reading anything, then the emitters might be off. Can you use the camera on your cellphone (or a cheap digital camera) to look at the IR sensors while they are on? If the emitters are working, the camera should pick up and display the IR. See the instructions and picture at the bottom of this page for more information.

- Amanda

Hi, thank you for your advice. When we tried the demo program it did display a bar graph but it did not display a number from 0-4000. When we removed the PC5 shorting block it would also display a graph and numbers on the line following program but when we pressed “B” a second time it simply drove in a straight line. Then when we placed the whiteboard in bright sunlight the Pi was able to follow a line round one corner but then it could not turn around a second corner. We have also tried to see the IR sensors with two smartphones, as described by your link, but we could not see any lights other than the green led and the two blue leds. In short it is still not capable of following lines. Would it be worth trying to reinstall the firmware? We have previously had to update the firmware from 01 to 08 and it took a long time for the firmware to install.

Did you move the 3pi across the line to see if the sensor values changed? Can you post a video showing your calibration process, the bar graph, and the behavior when it tries to follow a line?

It is possible that both smartphones’ cameras have filters on them, so if you did not see any lights, it does not necessarily mean that the LEDs are not working.

I do not think that the issue is caused by the AVR Programmer. Did you receive an error while you were upgrading your AVR Programmer?

- Amanda

I sent a video of my 3Pi attempting to follow a line to Pololu support via email as the video would not send at 7.7 Megabytes.

We received your email and video. In case anyone is following this discussion, the video does show that the 3pi’s sensors are not reading the line. We suspect that one of the QTR-RC reflectance sensors or the FET controlling power to them is damage or missing, which would cause all sensors to not work. We will continue handling the issue via email.

- Amanda

1 Like