electric scooter

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);

The "stall current" (zero speed) of a DC motor is much higher than the running current.

Hi,
Have you got a fuse in the positive line of your battery?

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

x=map(val,160,644,0,256);

255 not 256 , but to restrict your max speed for trouble shooting, 256 should be about 100.
Not sure why 160 to 644 analog input values.

What is the mass of your electric bike?
Is the motor geared?

Thanks.. Tom.... :slight_smile: