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)

Saturday, 26 June 2010

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

It's time to look deeper into adding the Serial Motor Controller. A couple of custom items need fabricating.

From Project: Burt

The first job was to add some insulation between the motor controller board and the chassis.
A local RC Models Shop had some thin perspex sheets that are ideal for snipping and drilling.
With a simple paper template used to get the area right. Four holes were made to help it align over the battery containers screws and rivet. Taped down that sucker is not moving.




The second item is a small strip board to connect the motor wires, motor power, and Arduino digital IO pins (for TX, RX, and Gnd). I've added one of the blocks from the ScrewShield to take in the 9V battery wires. The four motor wires connect to this strip board. The 9V lines feed into Gnd, and into Vcc via a switch plus LED (and resistor). Jumper wires routed underneath the switch make this the Off position. When toggled, it will be easy to trip this kill switch, and drain the power to the motor controller.


I've added a ScrewShield to help with other interfacing. The three wires from the IR sensor (Vo, Gnd, Vcc) are hooked up (A2, Gnd, 5V).


Plus the addition of the CMUCam3 :)

Tomorrow I'll be posting the second part, along with a video of Burt coming to life :D