Pololu DC Motor Controller
DC Motor Control Aspects of DC Motor Control H-Bridges Isolation Pulse-width modulation
An H-bridge
PWM 75 50 25
Installing the Pololu serial motor controller Place the controller on your breadboard and connect it to the BS2 and motors per the instructions in the user’s guide (Exercise 13).
Motor Controller Communication The motor controller uses a serial interface to communicate with the Basic Stamp 2 (BS2). You must program the BS2 to send data in the correct format the the contoller’s serial input, pin 4. The controller expects 8 bits at a time at a constant baud rate ranging from 1200 to 19200 baud. You must send the correct sequence of bytes to get the controller to run your motors.
The SEROUT command The controller requires a non-inverted serial transmission at a baud rate between 1200 and 19200, 8 bits at a time with no parity. The SEROUT command: SEROUT PIN#, 84, {OutputData} Provides that transmission at 9600 baud.
Configuring the Motor Controller You can configure your controller to control either one or two motors.
Controlling the Motor You can control each motor individually to run either forward or reverse at any one of 127 different speeds (from 0 to 127).