The SparkFun Serial Controlled Motor Driver (SCMD) is a versatile and compact board designed to control motors through a serial communication interface. It is capable of driving a single bi-directional DC motor or two unidirectional DC motors. With a voltage range of 4.5V to 13.5V, it is suitable for a variety of small to medium-sized projects. Common applications include robotics, custom RC vehicles, or any project requiring motor control.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VIN | Voltage input for motor power (4.5V to 13.5V) |
3 | TX | Transmit pin for serial communication |
4 | RX | Receive pin for serial communication |
5 | A1 | Motor A output 1 |
6 | A2 | Motor A output 2 |
7 | B1 | Motor B output 1 (if using two unidirectional motors) |
8 | B2 | Motor B output 2 (if using two unidirectional motors) |
The SCMD accepts serial commands for controlling motor speed and direction. The default baud rate is 9600 bps, but it can be adjusted to suit your needs.
Here is a simple example of how to control the SCMD with an Arduino UNO:
#include <SoftwareSerial.h>
SoftwareSerial scmdSerial(10, 11); // RX, TX
void setup() {
scmdSerial.begin(9600); // Start serial communication at 9600 bps
}
void loop() {
// Command to set motor A to full speed forward
scmdSerial.write(0x88); // Start byte
scmdSerial.write(0x01); // Motor A
scmdSerial.write(0xFF); // Speed (0xFF for full speed)
delay(2000); // Run for 2 seconds
// Command to stop motor A
scmdSerial.write(0x88); // Start byte
scmdSerial.write(0x01); // Motor A
scmdSerial.write(0x00); // Speed (0x00 to stop)
delay(2000); // Stop for 2 seconds
}
Q: Can I control stepper motors with the SCMD? A: No, the SCMD is designed for DC motors. Stepper motors require a different type of driver.
Q: What is the maximum number of motors I can control with one SCMD? A: You can control one bi-directional DC motor or two unidirectional DC motors.
Q: How do I change the baud rate? A: You can change the baud rate by sending a specific serial command to the SCMD. Refer to the SCMD datasheet for the command structure.
This documentation provides an overview of the SparkFun Serial Controlled Motor Driver, its technical specifications, usage instructions, and troubleshooting tips. For more detailed information, refer to the official datasheet and user manual provided by SparkFun.