Zumo Robot Troubleshooting With Border Detect Program

I bought the Zumo kit and completed build on Wednesday. This kit build included the reflectance array sensor. Today, I began testing the robot with some of the library examples.

I can run the buzzer and pushbutton examples successfully. And I can run the motor example with the wheels rotating correctly. Further, I can run the sensor calibration and see the 6 sensors notice the difference in contrast of the white border and black main running area via the serial monitor. So far, so good!

Now, I run the border detect program and it does not behave as expected. The robot runs backward not forward as it is setup. And it changes direction every 2-3 inches effectively creating a tiny square it operates within. This occurs whether it is close to the border or in the center of the main running area. In fact, I am not sure it is detecting the border.

Net, I need help in troubleshooting this issue so I can enjoy my Zumo. Some things to note:

  1. I have painted a white circle as a border on a black surface. I am using 1/4" black foam board and a sharpie white painted line. The line is about 3/4" wide.

  2. The batteries are fresh.

  3. I calibrated the reflective sensor on the white border on the black surface. Numbers in the serial monitor range from 0 to 1000 depending on where the sensor is relative to the border. The serial monitor shows 6 columns of data which changes as each sensor goes over the border in the sensor calibration program. There is a 7th. column which I do not understand what its value represents. It seems to vary around 2500.

  4. As I pick up the Zumo to turn it off, I can see the 2 tracks oscillate in opposite directions about equivalent in time that would move the Zumo the 2-3 inches in one backward direction.

  5. I have not adjusted the threshold value that the comment in the program says may need to be adjusted. I will try that tomorrow morning by lowering the value in equal amounts. Based on what I read on the forum by someone experiencing a similar behavior with the border detect program, this did not seem to change anything.

Any idea about how to resolve this problem will be appreciated.

Hello.

Have you tried changing the threshold value (QTR_THRESHOLD) yet? If your sensors are reading between 0 and 1000, it is very likely that changing the threshold value in the “Border Detect” demo program will fix your problem. This program checks the sensors on each end of the reflectance array, and when they are below the threshold value, reverses and turns the Zumo. Since your sensors are always reading below the demo code’s default threshold value (1500), the Zumo is always trying to reverse and turn.

-Brandon

A post was split to a new topic: Zumo border detect example program giving error