Summary of Controlling speed controllers with Arduino
This article explains how to test RC speed controllers using an Arduino and serial communication. By connecting the speed controller's signal, power, and ground lines to the Arduino, users can send commands via the Serial monitor to control and test the motors. The provided Arduino code uses the Servo library to manage dual motor speed controllers on pins 9 and 10, helping users calibrate and record values for their own projects.
Parts used in the RC Speed Controller Testing Project:
- Arduino board
- RC speed controller
- Servo library (software)
- Connecting wires (red, black/brown, yellow/white)
Submitted by Newton Labs for the Instructables Sponsorship Program
Step 1: Setup
All you need to do is hook up your speed controller to your Arduino, red(s)->+5 black/brown(s)->GND yellow/white(s)->10 and/or 9.
Step 2: Programming
// If you need any help feel free to PM me (simonfrfr) or email me
// at [email protected]
String readString;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo2; // create second servo object
const int left = 10; // left motor’s pin on arduino
const int right = 9; // right motor’s pin on arduino
void setup() {
Serial.begin(9600);
Serial.println(“servo-test-22-dual-input”); // so I can keep track of what is loaded
}
void loop() {
while (Serial.available()) {
char c = Serial.read(); //gets one byte from serial buffer
readString += c; //makes the string readString
delay(2); //slow looping to allow buffer to fill with next character
}
For more detail: Controlling speed controllers with Arduino