Hi there,
This is a shot in the dark here- I am trying to get a gear motor to rotate, it's speed controlled by a potentiometer. I have the wires set in to the right place for the motor, but I am completely new to code. Does anyone have experience with this shield and can help me get started?
which one V 1.0 or V 2.0 ?
Post the link using the hyper (globe)button.
Arduino example code->basic->analogReadSerial
Arduino example code->basic->analogReadSerial
That takes care of the pot but do you know how to control the shield ?
Did you see this ?
raschemmel:
Arduino example code->basic->analogReadSerial
That takes care of the pot but do you know how to control the shield ?
Did you see this ?
Motor Shield V1.0 | Seeed Studio Wiki
Since the OP is completely new to code, one part is good enough for now. You can't hand over a completed project to a noob even you want to.
The motor shield 1.0 is the version I have. I am mostly uncertain about two things.
- There are no pin slots on the shield, to my knowledge, so is it possible to control the motors with a potentiometer?
- Can it operate solely with an external power supply (6 v), not plugged into the USB?
Apologies if these questions are obvious, you all have already helped me quite a bit.
paste this after the void loop{} and use it like this : motor(the motor you want , direction , speed)
where the motor is 1 or 2, the direction is 1 forward 2 backward 3 stop and the speed is in percent 0 to 100
void motor(int m, int d,int s){
int final;
final=(255/100)*s;
if(m==1){
if(d==1){digitalWrite(13,HIGH);
digitalWrite(12,LOW);
}
if(d==2){digitalWrite(13,LOW);
digitalWrite(12,HIGH);
}
if(d==0){digitalWrite(13,LOW);
digitalWrite(12,LOW);
}
analogWrite(10,final);
}
if(m==2){
if(d==1){digitalWrite(11,HIGH);
digitalWrite(8,LOW);
}
if(d==2){digitalWrite(11,LOW);
digitalWrite(8,HIGH);
}
if(d==0){digitalWrite(11,LOW);
digitalWrite(8,LOW);
}
analogWrite(9,final);
}
}
- Can it operate solely with an external power supply (6 v), not plugged into the USB?
YES & NO. The motor shield has external MOTOR POWER terminal, but the CIRCUITRY is powered by the arduino through the shield pins so if you make a splitter cable that bare leads going to the MOTOR POWER screw terminals and the other cable has a 2.1mm
dc power plug that fits in the arduino external power jack then YES, technically both the motor shield and the arduino would be working off an external power supply . The " CATCH" is that if your motors "WANT" 6V and the arduino external jack "WANTS" a
MINIMUM of 7V, then you would have find some way to do that because it's not good to run 6V motors on 7V and it's not good to run the arduino on board regulator on 6V. I suppose you could get a one or two 1n4007 diodes to drop the voltage from 7.4Vdc to 6V.
See attached photo for motor power terminal.

raschemmel:
- Can it operate solely with an external power supply (6 v), not plugged into the USB?
YES & NO. The motor shield has external MOTOR POWER terminal, but the CIRCUITRY is powered by the arduino through the shield pins so if you make a splitter cable that bare leads going to the MOTOR POWER screw terminals and the other cable has a 2.1mm dc power plug that fits in the arduino external power jack then YES, technically both the motor shield and the arduino would be working off an external power supply . The " CATCH" is that if your motors "WANT" 6V and the arduino external jack "WANTS" a
MINIMUM of 7V, then you would have find some way to do that because it's not good to run 6V motors on 7V and it's not good to run the arduino on board regulator on 6V. I suppose you could get a one or two 1n4007 diodes to drop the voltage from 7.4Vdc to 6V.
See attached photo for motor power terminal.
The motor shield V+ can be connected to the arduino vin via a jumper, according to the schematic. I bet it is the yellow one on the bottom in the picture. I don't know about the diode solution, sounds doable. You just don't have to make splitter cables but attach the power to arduino and attach diodes at the jumper.
the shield has a voltage regulator so there is only one power supply needed for it and that is the motor power suply
to power both
Maybe zim was talking about a different shield. This one definitely has no voltage regulator.
the title says seedstudio motor shield thats the one I have
OK. Yes , I see a regulator there.


