monster moto driver on arduino with batteries and motors connected via crocodile clips

Controlling A Monster

We have chosen to use a monster moto motor driver for Mr. Bit.  This driver is an Arduino shield format and the control of it is direct from a seeeduino.  We wanted to test the motor driver with a simple keyboard input to drive the motors backward and forward.   Firstly we had to solder the connector headers, we decided to swap the connectors for stackable ones so, if needed, the shield can take another shield and to simplify any other connections we need to make to Arduino later.

This slideshow requires JavaScript.

Once soldered and on the seeeduino we have used crocodile clips to wire up the driver to test it using a battery pack and some mini metalgear motors.  The seeeduino needs a sketch to control the motors.

The code is simple, it’s a slight change to the example from on the monster moto shield sparkfun webpage. Firstly we set up the pins that will be used to control the drivers, pins are used to either turn on clockwise or anticlockwise direction for the two motor outputs.  Pulse width modulation (PWM) is used to alter the speed of each motor.  There is also a current sense in which reads the current of each motor (might be useful to protect the motors).

The following code simply uses the serial monitor to read in a key pressed on the laptop and then drive the motors depending on the character pressed: “F” will drive motors forward, “B” backward and “S” will Stop.  If this works as expected we will use similar commands into the arduino from the Pi.

Here’s a video of the motors in action:

We’re very glad that the motor drivers are working! We’re still not sure about our overall approach through, the motor driver is actually the Arduino and the competition states the core system needs to be the Pi. Just how much work the Pi does vs the Arduino is yet to be seen – the shield itself requires two 5v PWM connections and since the Pi has only one PWM GPIO with max voltage of 3.3v we see no other option right now other than the Arduino.

Leave a Reply

Your email address will not be published. Required fields are marked *