Help: m3pi Line follower problem!

I have an m3pi robot that I am using for a senior design project. I was running the m3pi linefollower PID code on it ( mbed.org/users/chris/code/m3pi_LineFollower_PID/) using the mbed online compiler and it was working just fine. Recently, I tried to run the code and when I placed the robot on the track it started up, attempted to read/detect the black line using the bottom sensors, and then it just didn’t move at all. It does this everytime I compile and start it up.

At first, I thought it was the light sensors that were not working but after disconnecting the mbed part of the m3pi robot, I ran the line follower code for the 3pi robot by itself and it worked and followed the line successfully.

Therefore, I know its not the sensors or the bottom half (3pi) of the robot, so the problem must be somewhere else.

I tried to troubleshoot it in the following ways : Finding a different line follower code for the m3pi and running it, compiling on different computers, and disconnecting and connecting the mbed part. I also searched google and this forum and was unable to find anything.

Could you please advise on what I could do to fix this issue?

Thank you
-Alex

Hello, Alex.

It sounds like you’ve narrowed down the issue to the mbed or the m3pi board. It is easier to test the mbed, so I would start there. Can you try disconnecting the mbed from everything else and try loading some program that just blinks the LEDs? Is the program you are trying to run Chris’ unmodified line follower code?

- Ryan

Hi, Alex.

I agree with Ryan that you should start by making sure the mbed is working properly, and from there maybe try running a very basic program to ensure that the 3pi and the mbed are communicating properly. Did you remember to load the appropriate serial slave program back onto the 3pi after you tested it by itself?

- Ben

Ryan,

Thanks for the prompt reply. To answer your first question, I tried the blinking LED and it works. Serial data is working, we are able to print messages to the computer. It seems as if any code over 30 lines of code is not working; some of the smaller codes that are just controlling the motors are also working.

To answer the second question: Yes, we are running Chris’ unmodified line follower code.


Ben,

We made sure to load the appropriate serial slave program!

When it does not move when running the line following program, is there any symptoms like it resetting or any other trouble? One quick thing to try is to make sure your 3pi batteries are fully charged - it’s possible that the 3pi has enough power to work by itself, but with the added mbed load it is having trouble.

- Ryan

Ryan,

We checked the batteries and it wasnt the problem.

We finally figured out what the problem was, it turns out that the pin 10 (receive on the serial port) is dead. Therefore, it was not receiving any data from the 3pi part.

We figured it out by connecting it to a Bluetooth chip and the Cortex M3 processor was not receiving information.

We are going to try to order one overnight since our prototype is due on Friday. Hopefully we can receive it in time…

Thank you for all of your help