Motor Controllers - Testbed of death (well maybe just some nasty gnarly exceptions with big pointy teeth)

While building a POC of some autonomous controls for a distance rover, it became apparent that I needed to do a little testing on the different motor controllers and with different mainboards. I’m running 4.2 QFE2 and currently a Hydra and L298 Motor Controller module (MegaMotor has spent some time on the board and as soon as I order and receive a Chimp Driver module, it will get some time on the board). I actually had some motors connected to it but apparently at 4AM they were loud enough to wake the wife and after receiving a beating, I pulled out my old Micronta 22-211 meter which is no doubt older then half the forum members here, but its quiet. I was going to pickup a Extech EX330 tonight as I heard it was a reasonable multimeter, but maybe tomorrow.

So for example I have discovered with my L298 module, if you call motorControllerL298.MoveMotorRampNB you will get an exception:

Exception System.Exception - CLR_E_DIVIDE_BY_ZERO (7)

#### Message: 
#### Gadgeteer.Modules.GHIElectronics.MotorControllerL298::MoveMotorRamp [IP: 002c] ####
#### Gadgeteer.Modules.GHIElectronics.MotorControllerL298::MoveMotorRampThreadStart [IP: 0019] ####

A first chance exception of type ‘System.Exception’ occurred in GTM.GHIElectronics.MotorControllerL298.dll
An unhandled exception of type ‘System.Exception’ occurred in GTM.GHIElectronics.MotorControllerL298.dll

Which is too bad as that is an ideal call, smooth ramp up, easy on the battery, electronics and mechanicals (this is where I think those graphing capable multimeters would be nice so I could see the ramp up/down), and an exception I’m sure is easily fixable (I hope). Once I work my way through all the motor controllers and report my findings to the approperiate folks, I will be able to get back to the originally schedule program.

Phew! So it’s not just my motor driver that had issues. :slight_smile:

I thought my one meter was old, but it is at least digital… :).

maybe related to this https://netmf.codeplex.com/workitem/1749

Voted.

Yo tambien!

@ GMod(Errol) - I suspected it wasn’t just your module and hence why I decided that I had to build something to test them all with.

Another thing I’ve notice with the L298 is if we use motorControllerL298.MoveMotor and take the motors from a negative value (ie going in reverse) to zero (ie stopped), the motors go into warp drive reverse and we have to go into a positve value (ie forward) first then down to zero to stopped the motors. So in short the only way to stop the motors is from a forward direction down.

I got my Motor Driver today and while playing with it I hit the same issue, I investigated a little and posted my findings I hope you or the next person find it helpful.
http://www.tinyclr.com/forum/topic?id=9171