servo library +esc
hi, name valentin.
i`m glad join forum , make first steps in world of arduino.
i found code (tested it), measure actual rpm of motor (d3 pin)through optical sensor
and output pwm signal (d11 pin)to achieve target rpm.
that make pid control, , closed loop system.
but code control brushed dc motor, , problem.
i want control esc hooked on rc brushless motor. seen videos
(and code) prove achievable arduino servo library, @ level,
i can not myself.
help me edit code can send signal esc instead.
all credits go mr.jmhrvy1947.
here video https://www.youtube.com/watch?v=kyfnuqge26e
here complete work on github https://github.com/jmharvey1/arduino-cnc-speed-control
i atached code text.
i`m glad join forum , make first steps in world of arduino.
i found code (tested it), measure actual rpm of motor (d3 pin)through optical sensor
and output pwm signal (d11 pin)to achieve target rpm.
that make pid control, , closed loop system.
but code control brushed dc motor, , problem.
i want control esc hooked on rc brushless motor. seen videos
(and code) prove achievable arduino servo library, @ level,
i can not myself.
help me edit code can send signal esc instead.
all credits go mr.jmhrvy1947.
here video https://www.youtube.com/watch?v=kyfnuqge26e
here complete work on github https://github.com/jmharvey1/arduino-cnc-speed-control
i atached code text.
ok, when use escs, need standard servo library. forget other pid loop/dc motor/etc stuff. if want test/calibrate esc, can use following code (note need potentiometer act throttle):
code: [select]
#include <servo.h>
servo esc_servo;
const byte pot_pin = 0;
const byte servo_pin = 3;
void setup()
{
serial.begin(115200);
esc_servo.attach(servo_pin);
}
void loop()
{
potentiometerstuff();
}
void potentiometerstuff()
{
int data = 0;
data = map(analogread(pot_pin),0,1023,20,180);
serial.println(data);
esc_servo.write(data);
return;
}
Arduino Forum > Using Arduino > Programming Questions > servo library +esc
arduino
Comments
Post a Comment