Author Topic: Easiest way to run a motor?  (Read 1292 times)

0 Members and 1 Guest are viewing this topic.

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Easiest way to run a motor?
« on: May 24, 2010, 11:06:20 AM »
Hello all. I'm looking for a way to run a small 6v motor from a microcontroller. I don't need proportional speed or direction. Simple on/off is what I'm looking for. What is the easiest way to accomplish this? Can it be done with a simple transistor? I'd like to be able to put a pin high and have the motor run. Put the pin low and it turns off. My thinking is that this can be accomplished with a NPN Transistor but I'm not sure how to wire it up.

Thank you for any input you can provide.
Conscripted.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: Easiest way to run a motor?
« Reply #1 on: May 24, 2010, 11:14:07 AM »

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: Easiest way to run a motor?
« Reply #2 on: May 24, 2010, 01:38:30 PM »
Thank you for the response. That looks like it will work well. I'd already looked around a little on google. Evidently I wasn't asking the correct question.

What is the purpose of the 1k resistor on the pin used?
Would this work as drawn if I'm using different batteries for the motor and logic (with the grounds tied together)?

Conscripted

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Easiest way to run a motor?
« Reply #3 on: May 24, 2010, 02:32:09 PM »
The 1k resistor is to set the transistors base current.

The motor could be run from a higher voltage than the processor. The emitter is the common reference for both the motor and and processor.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Easiest way to run a motor?
« Reply #4 on: May 24, 2010, 04:17:33 PM »
And proportional speed is done by using PWM on that I/O pin if you need that later on (still in only one direction of course).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list