Search This Blog

Sunday 27 June 2010

Project: Burt - Assembly #3 Motor Interfacing (Part 2/2)

Now that we have the motor controller breakout board, and chassis insulation, we can fix in the Serial Motor Controller board.

A small plastic 'pop' rivet came as a spare with the chassis kit. With the millimeters of thickness added by the insulation layers, it snuggly hugs the controller board when fastened in place.





Next we can add the Deumilanove board and route the IR sensor wires into the ScrewShield.



Now for the rest of the Arduino stack. The three yellow wires (male to female leads) connect the Motor Controller TX, RX, and Gnd to the Arduino D2, D3, and Gnd. A WIP PDE file (Note 1) has been uploaded. The video below shows this simple test code running. The code uses the NewSoftSerial library from Mikal Hart. This allows us to use the appropriate baud rate (115200) to communicate with the motor controller.



Everything squeezes in nicely.



Here is Burt moving around. The uploaded PDE code rotates the tracks and moves forward and backward. It clatters and drifts about on the smooth floor.


The current (original) firmware in the motor controller only accepts 9 different speeds per motor. So I need to change the code to ramp up to a certain speed (or reprogram the motor controller firmware, ideally).

I've also removed the Pololu power switch from the breadboard, with it in place and hooked up it does provide smoother power on switching. So I'll likely add it back in, or swap it out to try passive filtering of the IR sensor signal. Alternatively I could hook in the spare button on the ProtoShield. Add code into the setup() function that waits for the button press before dropping into the main loop() function.

Even with the accelerometer detecting the motion of the chassis, my current thoughts (in relation to the motion and drift) is to upgrade the accelerometer breakout board with a 6DOF IMU (including compass/gyroscope).

Smoothing the motion and clatter needs some thoughts. The CMUCam3 shifts the centre of gravity quite high, helping to exagerate the movement of the camera and servo frame. Without smooth motion, object tracking with the CMUCam3 is likely to be bothersome..

Notes:
1 - SVN revision r41 (at the time of writing)

No comments: