Let's Make Robots!

Rover 5 Motor causing program to Crash

For the chassis of my current project I'm using the Dagu Rover 5 chassis 2 motor version ( http://letsmakerobots.com/node/23331 ). The problem I’m encountering at the moment is that one of the motors seems to cause my program to crash and stop running.

To control the motors I’m using a logic board based around a pic18f4550 which is powered by a 5v volt regulator attached to a 9v battery. The logic board is then attached to the Dagu 4 channel motor driver ( http://letsmakerobots.com/node/25865 ) which is attached to 6 AA battery’s which in turn power the motors.

The logic board is attached to my laptop using a Pickit 2 while running Mplab and this is how I know when the program crashes.

The problem is very weird in that the other motor runs perfectly with the same wiring set up and I if i swap in the broken motor it will run for about 5 seconds then the program crashes.

I have tried the motor in all 4 of the channels and it’s the same result in all of them even if I use brand new wires. So i was wondering has anyone else experienced anything like this before? Any advice on how to fix it or should i just contact the website i purchased it off and exchange it for a new one.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Found out what the problem was and I feel so embarrassed about it.

Basically when the motor turns on, the vibrations knock the Pickit slightly causing Mplab to pause and reset the program. I noticed this after i rotated the robot and the other motor seemed to break.

Thanks for all your advice so now I know what to do if I encounter any other problems

Ha ha! Don't be embarrassed. Stupid things like that always crop up. You are not alone.

I still don't understand what you mean when you say your program crashes, but I second Crunch's question - do you have any filter capacitors across your motors or the motor power supply?  What does the motor do if you just hook it up directly to the battery pack?  You might try that and look for excessive current draw, heating, smoking, fires, etc.  It might not directly't explain why your program isn't happy, but it might provide some insight.

Are the motor supply and logic supply grounds isolated on the board?  You should them connected in your wiring schematic.  It could be that you're getting some noise into the ground from the motor winding or creating a ground loop from some charge buildup somewhere on the motor housing.  That might be enough to cause digital confusion on your board.  Or maybe not.  I have no definitive knowledge on the subject.

Is there any chance we can get a clear, in focus picture of your set up?

This is wire set up for the Motor controller board. The motors are then connected to outputs 3 and 4.

I've used the same logic board on a number of different projects before so i don't think the issue is there.

As I said before the right motor works on all the outputs (including 1 and 2 when they have been connected in the same manner) while if i plug in the left motor with out changing any of the other wires and restart the program then it will run for about 5 seconds before crashing.

do you have filter cap over your moters ?

It seems odd that your micro would crash due to motor problems if the power supplies were separated...

Do you have a multimeter you can use to check the resistance of your two motors? Perhaps the dodgy one has an internal short.

After poking about with my multimeter both motors have the roughly the same resistance (about 6 ohms).