Motors

Hey. I'm building a robot, but I'm kinda new at Arduino. I have a Uno with a SEEED v2 motor shield and I also have two 20v motors. I did my code and the motors didn't work. The code is right. My wiring is right. Is the voltage too much for my board to handle? Any help? :fearful: :fearful:

Yes. I am now aware of a better sub-forum for my topic, but I still need help.

It would help if you didn't insist everything you did works, something else doesn't and not provide any other useful data, for example your perfect code, the wiring diagram, and what power you have connected up where?

I connected the motors to the output pins, i am using an external source of a 9v battery, and the code i got out of a text book. IDK if the code is exactly right, i will reply again with it.

int speed1 = 3;
int speed2 = 11;
int direction1 = 12;
int direction2 = 13;

void stopMotor(){
analogWrite(speed1, 0);
analogWrite(speed2, 0);
}
void setup()
{
pinMode(speed1, OUTPUT);
pinMode(speed2, OUTPUT);
pinMode(direction1, OUTPUT);
pinMode(direction2, OUTPUT);
}

void loop()
{
digitalWrite(direction1, HIGH);
digitalWrite(direction2, HIGH);
analogWrite(speed1, 128);
analogWrite(speed2, 128);
delay (2000);

stopMotor();

}

So what is the specification of the motor, and how exactly have you got stuff wired up?

If the 9V is to the Arduino, then that is part of your problem. The regulator on the Arduino can't supply enough current to drive the motor.

And if you connected the motor directly to the Arduino, you may have damaged the Arduino.

20v. I stripped a couple of wires meant for a bread board, took my motors, soldered the stripped wires onto the two poles/anodes/things, and put them the sides that weren't stripped into the outputs, just the ones on the motorshield meant for motors and steppers. How can I boost the regulator so I can drive the 20v motors on my uno? And also what do you mean 9v to the arduino? I'm really new to this stuff, sorry. I really appreciate your help by the way, without you right now I'd be screwed.

No, no not to the arduino, to my motor shield on top of the arduino. That is what its for, right?

OK, so you have a motor shield, which is wired up correctly but doesn't work...

We do need to know exactly how it is wired.

If you are supplying the motor shield, supplying it's motor supply, are you also powering the Arduino, if so from what?

You would get a better more definitive and quicker answer if you posted a schematic, and told us what you though should happen and what actually is.

Ok.
https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0CAcQjRw&url=http%3A%2F%2Fwww.seeedstudio.com%2Fwiki%2FMotor_Shield_V2.0&ei=fEGGVPTbJMe0ggSvu4KYDw&bvm=bv.80642063,d.eXY&psig=AFQjCNFN38-7wfi-wMPIbRVqOU1eyEjVNw&ust=1418171120455049
On this link, on the motor output, I hooked the motors up. I just put the 9v in the power outlet for the arduino and the shield and the uno lit up.

You need to power the Arduino and the motor boards motor supply voltage (max 15V).

That means using a motor which will run on less that 15V.

Now you have both connected to power, what happens?

So I need to power both separately? So now I need to buy new motors, and I build a frame for my robot. What do I need to do exactly? How do I get a battery over 9 v that will connect to it? Why can’t I use the 20 v? what is the real problem??

goacego:
what is the real problem??

The real problem is that you're trying to pull a 2000 ton trailer uphill with a bicycle.
20V motors need 20Volts, not 9Volts, to work.
Also, you haven't told us what the stall current of the motors is. If it's over 1 Amp, you can say goodbye to your motor shield.

Your motor shield takes a maximum of 15V. Apparently at 1 Amp. If your motor will not work with this, you either need new motors that do or a shield that will work with the motors.

Yes the Arduino I suspect needs its own power. The motor supply circuit probably doesn't supply the board.

OK. So what I need to do now is to get new motors, ones below 20v, preferably at 9v. Then, I need to get a separate for the motorshield. Then I compile code and I am ready to go?

Post Script: Is there anywhere I can learn to do this stuff, I live in the American South, so they don’t teach us anything but what we’d need for farming. And also, the power is hooked up directly to the board.

If someone could DM me a website that would be great.

Start with posting a picture of how you have it rigged up.

A link to the motors would be good also. That way we can see if they would do anything on a lower voltage. (they might)

Then we can advise without you expending money needlessly.

Thanks, chili and everyone. I have found the problem. The code was wrong seeing as the people who made that textbook are incompetent. I really appreciate the help and I have found a frame which I am going to use in place.