Hello all, i have problem that i cant fix or i dont know how thats why im here. So i have hoverboard motor motor controller and arduino, i want to control forward and backwards motor with low speed with key fob, i made everything and everything works good except for torque, i can stop motor with my hand and sometimes it wont start, all this i show in video i uploded.. take a look guys and let me know where is problem..
my code is simple:
const int rm1 = 13; ///Ide na senzor
const int rm2 = 8; ///Ide na senzor
const int pwm = 3; ///Ide na Driver za pwm
const int dir = 7; ///Ide na Driver za direkciju
void setup(){
Serial.begin(115200);
pinMode(dir, OUTPUT);
}
void loop(){
while (digitalRead(13) == LOW && digitalRead(8) == LOW) {
analogWrite(pwm, 0);
}
while (digitalRead(13) == HIGH) { // Dugme za zatvaranje
analogWrite(pwm, 20);
digitalWrite(dir, false);
}
while (digitalRead(8) == HIGH) { // Dugme za otvaranje
analogWrite(pwm, 20);
digitalWrite(dir, true);
}
}
More torque requires more voltage to the motor. Low speed means limiting the average current by pulsing the current. Schematic or block diagram, please!
oh i dont know that since i bought used hoverboard with bad battery and i dont even know how to drive it so i didnt even try it.. could be motor problem>?
DC motors operate on current, noto voltage. Voltage is simply a means of controlling current. Motor torque is proportional to motor current. Getting high torque REQUIRES high current, regardless of speed. Having slow motion WITH high torque implies the presence of a high load. The only reasonable to achieve the kind of control you need is with a properly tuned PID controller, which controls either position or speed, and with provide whatever current the motor requires to achieve the desired position or speed. Simply varying PWM value based on desired position or speed will NOT work.