I am using the lesson below to control a brushed DC motor controlled by a bidirectional ESC for brushed motors.
I have set up the circuit the exact way it shows. The ESC powers up and the potentiometer values are output perfectly, but when I hook up the motor leads to my meter I get 0V so no motor spin.
The ESC has two options for signal input and I have tried both the single yellow input and your typical 3 wire servo signal plug
Can you give me advice? I'm guessing it's the signal type being sent to ESC from my UNO?
Lesson Here
Motor Here
ESC Here
Slide pot here
circuit
slide pot output
/*
Arduino Brushless Motor Control
by Dejan, https://howtomechatronics.com
*/
#include <Servo.h>
Servo ESC; // create servo object to control the ESC
int potValue; // value from the analog pin
void setup() {
Serial.begin(115200);
// Attach the ESC on pin 3
ESC.attach(9,1000,2000); // (pin, min pulse width, max pulse width in microseconds)
}
void loop() {
potValue = analogRead(A0); // reads the value of the potentiometer (value between 0 and 1023)
potValue = map(potValue, 0, 1023, 0, 180); // scale it to use it with the servo library (value between 0 and 180)
Serial.println(potValue);
ESC.write(potValue); // Send the signal to the ESC
}