Hi there,
I am using g2 24v21 motor driver for drive my 200w 24 v maxon motor. I am using arduino that connection 10 k Potentiometer and then i get to pot analog signal, it turned pwm signal on the arduino after that when i tried conrtrol pot , my motor turning constat speed, moreover when i turning pot as slowly motor is begin turn after pass 100 analog value. i want to control my motor speed with pot. For now i dont need know speed value, only i want to do that change speed.
This is my arduino code:
const int pot_pin = A0;
const int motor = 8;
const int dir = 2;
int durum = 0;
int cikti = 0;
void setup() {
pinMode(motor, OUTPUT);
pinMode(dir, OUTPUT);
pinMode(pot_pin, INPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(dir,HIGH);
durum = analogRead(pot_pin);
Serial.println(durum);
cikti = map ( durum , 0 ,1023 , 0 , 255 );
analogWrite(motor , cikti);
}
Video link: