Microcontroller Troubles - Any troubleshooting tips before i go mad?

Thread Starter

LearnMeElectricals

Joined Nov 15, 2012
4
Hello there,

I am coming to the end of a line following robot project. And just as everything is coming together there has been a few problems. One big problem is two sensors which just straight up refuse to work with the microcontroller.

There are four line sensors on the ground to detect the line which all work perfectly and they are set up the exact same way as the two which dont work. The job of the two that dont work is to detect lines on the left and right at certain locations to stop.

Now this is where the problem comes in, on first inspection it looked like the robot was just going too fast over these stopping lines in order to register them. But it was then discovered that if the values of the sensors were manipulated to having detected the line (there are red test LED's which can be set on or off with either the sensors ability to detect or simply by turning potentiometers attached to each one), so the red LED was on, that as soon as the microcontroller was switched on, both LED's would turn off instantly and they wouldn't be able to come back on again until the power to the microcontroller was removed.

All connections were taken out and new ones were made in case it was a connection issue and that didn't fix the problem. I apologise for the vague decription I wasn't sure how necessary it was to go into the details when I am just looking for experienced troubleshooting help.

Thanks for any help!
 

thatoneguy

Joined Feb 19, 2009
6,359
Great description of the problem.

Lousy description of the actual hardware to troubleshoot and what tools you have available.

uC is?
Language and uC debugging tools?
source code?
photos of board(s), both sides, in clear focus, without blinding flash bounce, resize to 800-ish pixels and attach to post with paperclip
comparators for line detect?
interconnections?
etc.
 

John P

Joined Oct 14, 2008
2,026
Disconnect the wires going to one of the failing sensors and also to another sensor which hasn't caused any problems. Wire them up again in reversed order. Now you have a "known good" sensor wired as if it were a failing one, and a suspect sensor wired in a "known good" location. Which sensor (if either) works now? This should allow you to identify the source of the problem.

I would be especially careful about anything involving setup of the port pin on the processor. Is there any way that a good input could be getting rejected, such as the pin not being set as an input?
 
Top