So I bought a vibration motor from SparkFun. It hasn't arrived yet, but I wanted to confirm a couple things.
Firstly, it says it runs on 3V, but on Adafruit's page for the same motor, they say that 5V works too. Adafruit also says that with a 100-1000 ohm resistor, you can run the thing straight from an Arduino pin, which I'm skeptical about considering the reverse voltage generated from motors turning off.
So what is it? Can I drive this thing like an LED? Or should I use this:
That design is on the current PCB, and it's what I'll get made if nothing changes. Of course this assumes that the motor can actually tolerate 5V, which I'm unsure of.
You should measure the current. If it is below 40mA, then it might be possible to drive them directly with a output pin. The ATmega32U4 has mosfet outputs. If you make a pin OUTPUT HIGH and LOW and never make it INPUT, then you may connect a motor without any diode.
I would not use them with 5V. They could get warm, or mechanically fail (after a very long time).
Perhaps a resistor + motor directly to a output pin is the easiest solution.
Can you measure the current of the motor ?
Then you need indeed a transistor as shown in Reply #2.
A third possible circuit is with the motor at the emitter of a NPN transistor.
The NPN transistor can be a small PN2222A.
The flyback diode can be a 1N4148 diode. Those little things can take a punch.