Connect a micro dc motor direct to photon?

Hi, I bought this https://www.amazon.com/Vibration-1-5-3V-14000RP-Vibrator-Massage/dp/B00RQ7ANIY/ref=sr_1_1?ie=UTF8&qid=1472262852&sr=8-1&keywords=3pcs+micro+vibration+motor to connect to a photon. It says it is 100mA at 3v, which is supposed to be the current handling capability of the 3V3 pin on the photon and I had planned to connect the motor up direct. However, when I was looking up code samples for running a motor, I found that most folks are incorporating additional components in the motor circuit, such as a diode and transistor. The motors in those examples are typically larger though, so I’d like to get some opinions on whether it would be safe to run this micro motor straight off the 3V3 pin with no additional components.

Thanks!

1 Like

The GPIO pins can only sink something like 20mA which calls for an external component like a transistor if you want to use a 100mA component.

And the fly-back/free-wheel diodes are there to cut off the voltage spikes induced by coils when suddenly switched off, so I’d not go without it (100mA @ 3V can produce quite a spike).

Pololu motor controllers are cheap but you could also get away with a simple transistor switch circuit. Every Radioshack still sells transistors!

Thanks for all the answers guys! I’m sure you just saved me from blowing up my photon! :smile: So one more quick question, since the 3V3 pin does say it can handle a max load of 100mA per the spec sheet, do you think I could use this pin with just the fly-back diode and the 100mA motor? The trouble is that the VIN pin is already being used to drive a hall effect transducer and I’m not sure how that function would be impacted if I tap off the VIN to run the motor. Also, the VIN is 4.8v, whereas the motor is rated for 3v. Anyway, if its safe to use the 3V3 pin with a diode, it seems like it would be the most simple route. What do you think?

How do you plan to control this motor? Do you want to control the speed, or only on/off? The 3V3 pin is always powered, as long as the Photon itself is, so your motor would always be running. Is that what you want?

Oh, no, I didn’t realize that. The plan is to have it run one second on, one second off. Guess I’ll have to use a transistor after all. Could I still feed it from the 3V3pin though?

I would be leery of doing that. I don’t know what the specs for that motor mean when it says 100 ma. Is that the current at normal running speed? DC motors have an inrush current at startup that’s greater than their normal running current; this also happen if the motor stalls. I would probably power it with the Vin pin through a voltage regulator, like the LD1117 which is capable of 800 ma at 3 volts. Use a transistor connected to one of the GPIO pins to turn it on and off, and definitely use a fly-back diode to control voltage spikes.

Awesome, will do. Thx a lot!