Motor with Arduino

Ok, I've read around a bit, and I'm still not certain about how to power a motor with Arduino. I'm looking for the absolute simplest way possible. I don't really want to buy a controller or anything. I was wondering if I could use a 9v battery combined with a MOSFET to power a 9v motor. Would this work?

Would this also allow for speed control?

How could I get it to go in

How could I get it to go in two directions? Would i have to use two MOSFET? Or would I just not be able too?

 

What are PICs?

Try using an H-Bridge
Try using an H-Bridge configuration, look it up on wikipedia or something. Very useful little circuit :slight_smile:

** I had the same question**

edit: I never realized a MOSFET was a kind of transistor until now, so yeah, my post is kindda pointless.

I had the same question some time ago, and found this simple way to do it, you can solder transistors in free form like this:

http://www.beam-online.com/Robots/Circuits/circuits.html (scroll down till you see h-bridge)

but there are some considerations that you can read here in this post: https://www.robotshop.com/letsmakerobots/node/13403

I took that same diagram and tried to improve it, or complicate it, and put it on a PCB. Just because I didn’t want to order stuff online, so all the components can be found on radioshack, if you live in the US.

here is the link for the PCB design: http://fritzing.org/projects/motor-h-bridge-driver-shield/

it works great, and you can drive the motors in all directions and use PWM. this one is for two motors.

good luck