1
\$\begingroup\$

I found that I can control one DC motor with PWM from pin P1.2 of the MSP430 Launchpad.

How should I physically wire it?

How should I divide the voltage in this picture?

schematic

\$\endgroup\$
1

1 Answer 1

1
\$\begingroup\$

This setup will almost work. The pin outputs on the MSP430 are not capable of driving a motor directly, this is due to the current limits on the output pins. You will need to place "something" between the pin and the motor. There are many things that can fill the "something", but in all cases they will basically act as a switch. A simple mosfet is probably the easiest to go with, you just need to make sure you get one big enough to power the motor.

As far how a PWM change the speed across the motor, what you will be doing is adjusting the duty cycle of the PWM. This is essentially adjusting the On/Off time of the motor. The PWM will be running so fast that you wont actually be able to notice the Ons and Offs unless you look at it on a scope, but the effective voltage across the motor will change which results in a change of speed.

\$\endgroup\$
3
  • \$\begingroup\$ I would have to agree with Kellenjb, and suggest using a transistor to turn the motor on. If the motor is small like a pager motor you could use some thing like a 2n2222. \$\endgroup\$
    – jsolarski
    Commented May 2, 2011 at 4:23
  • \$\begingroup\$ OK I learned it but i need to work just one dc motor.So how i'm gonna connect P1.2 to two side dc motor \$\endgroup\$
    – Cff
    Commented May 2, 2011 at 15:17
  • \$\begingroup\$ Just how it is drawn in the image, with one connected to ground. \$\endgroup\$
    – Kellenjb
    Commented May 2, 2011 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.