hii there
i am trying to build an electric scooter.
the code works and when the scooter is in the air the wheel is turning, when i put the scooter on the ground the second i turn the potentiometer the motor drive burned.. what can be the problem and how to solve it please?
i use:
24v 14a motor
two battery of 12v 12a
motor drive:http://www.ebay.com/itm/DC-Motor-Driver-24V-One-Channel-H-bridge-Drives-Arduino20A-IMS-2C-Module-/252251682041?hash=item3abb5f34f9:g:eA8AAOSwFqJWmKVK
potentiometer
arduino uno
the code:
int forword = 3;
int backword = 8;
int val = 0;
int x=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(forword,OUTPUT);
pinMode(backword,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
val=analogRead(A2);
digitalWrite(backword,LOW);
x=map(val,160,644,0,256);
analogWrite(forword,x);