Go Down

Topic: Need HELP with gear motors (Read 534 times) previous topic - next topic

vishalapr

I just bought 2 gear motors and on the instructions it says we need to connect one PWM wire to control the speed and the other wire to either to HIGH or LOW to change direction.
Could anyone tell me where I need to connect the PWM wire and some basic info on this PWM stuff.......
So that I can use two gear motors to make a robot.

johnwasser

Some of the digital pins of the Arduino can do PWM. See the reference pages for analogWrite(). For the direction signal you can use any digital pin you like. See the reference pages for digitalWrite(). You should avoid using pins 0 and 1 because those are used by the USB interface and are needed for sending debugging messages via Serial.write().
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

MarkT

Quote
I just bought 2 gear motors and on the instructions it says we need to connect one PWM wire to control the speed and the other wire to either to HIGH or LOW to change direction


To save us guessing, which motors and which motor controller(s)?
[ I won't respond to messages, use the forum please ]

vishalapr

There are two wires popping out of the motor so do I need to add 2 jumper cables to one of the wires so that one of those two wires go to PWM(Digital Pin) and ground and the other one goes to any digital pin. Or do I just need to plop one wire into PWM and the other into any digital pin.

Nick Gammon

Are you having trouble installing your Arduino? The heading for this part of the forum is "For problems with Arduino itself, NOT your project".

There is another part for "Motors, Mechanics, and Power".

I'm not trying to be difficult, the thing is that people who know something about motors are just not that likely to be reading the section entitled "Installation & Troubleshooting". So you may not get all the help you might want.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up