Go Down

Topic: Arduino and multiple vibration motors (Read 5460 times) previous topic - next topic

ProfFrink

Hi all,

Newbie here. I've been working with the Arduino for several months and I've been learning a lot, and I want to start by thanking everyone who contributes to this awesome community. Newbs like me are greatly appreciative :)

Now, onto my project...
Basically, I'd like to control multiple (probably 4 or 5) vibration motors with my Arduino Uno, with the ability to turn individual motors on/off at different time points. I've done some searches to figure out what this would entail, and I think I've got most of it figured out, but I've never worked with motors before, so I have some questions...

1) Based on what I've read, it seems I will need a transistor for each vibration motor. But how am I supposed to know exactly what kind of transistor to use? There are so many types, and I can't figure out which transistors are meant to be used in which situations. Here's a link to the vibration motors I plan to use: https://catalog.precisionmicrodrives.com/order-parts/product/307-100-9mm-vibration-motor-25mm-type
The motors are rated to run on 3V, and they draw ~130mA. Any suggestions for which transistor would be appropriate? I'm thinking maybe an N-channel MOSFET, but then there are still many sub-types, so I'm not sure.

2) Since these vibration motors are rated to run on 3V, should I use my Arduino Uno's 3.3V pin?  Or does anyone have a different suggestion for powering these vibration motors?

3) The datasheet for this vibration motor says that the rise time of its vibration is ~23ms and the stop time is ~57ms. What can I do to ensure that I get the motors to perform at approximately these response times? I ask because I assume these motor response times might be affected by how I wire them up to the Arduino. I'm a grad student working in a lab where we study human sensation/perception, and so it's important to us to get the timings of our stimuli as precise and consistent as we can. So any suggestions about things I can do to ensure precision/accuracy in the response times of my motors would be appreciated.

I have a feeling more questions will come up as a I move forward with this project, but for now these are things that I'm wondering about. Thanks in advance to anyone who has any input/suggestions!!


sdturner

The max operating voltage is 4V, so the 3.3V supply will be fine, however the Arduino can't supply that kind of current. You will need a seperate voltage supply. One motor can draw up to 430mA. Multiply that by 4 or 5 and that is a lot of current. Also the motors will probably be pretty noisy, so it would be better to seperate the motors' and Arduino power supplies.

The data sheet only spec's 'typical' numbers. I don't think there is any way to gurantee the motors rise and fall times will be consistent without verifying each motor you use.

An N-channel FET should work well. Connect the Arduino pin to the gate, usually through a resistor (100 to 1K), but it's probably not necessary. Connect the motor between the power supply (3V or 3.3V) and the drain of the FET and connect the source of the FET to your common ground. Both power supplies must be connected to the same ground.

You want a resistor (10K or more) between the gate and the source to make sure the FET is off when the Arduino pin is not configured as an output (such as in reset).


Almost any N channel FET will work for you. Look at the rated current. Any logoic level FET rated for at least 1A (2A or more would be better) should be fine.

Steve

ProfFrink

Steve, thanks very much for your feedback! I have a couple follow-up questions...


however the Arduino can't supply that kind of current. You will need a seperate voltage supply. One motor can draw up to 430mA. Multiply that by 4 or 5 and that is a lot of current.

Admittedly, I am very new to these things so I might have a misunderstanding, but based on what I've read I was under the impression that one of the functions of a transistor is to allow a high-power device (like a DC motor) to be able to safely draw more current from a relatively low-power device (like the Arduino). Or am I confusing things?


Also the motors will probably be pretty noisy, so it would be better to seperate the motors' and Arduino power supplies.

Hmm, interesting point. Would there maybe be a way to prevent any noise from the motors from affecting the Arduino?  If I recall correctly, I think I've seen circuits described that have safeguards in place (e.g., diodes and/or capacitors) that prevent noise from a motor from affecting the Arduino. Any thoughts on this? Or is this not really an option since I'll be using multiple motors (i.e., just too much noise)?


retrolefty

#3
Sep 01, 2012, 03:18 am Last Edit: Sep 01, 2012, 03:43 am by retrolefty Reason: 1
Quote
Admittedly, I am very new to these things so I might have a misunderstanding, but based on what I've read I was under the impression that one of the functions of a transistor is to allow a high-power device (like a DC motor) to be able to safely draw more current from a relatively low-power device (like the Arduino). Or am I confusing things?


A more proper statement might read:

A transistor allows a lower voltage or power signal like an arduino output pin to CONTROL the transistor such that it can turn  on and off a higher power device like a motor, solenoid, relay, etc. Another advantage is that a transistor switching circuit can have it's collector circuit operationg at a higher voltage (say +12vdc) while being CONTROLLED for a 5vdc signal like an arduino output pin. So keep in mind that controlling something and powering something are two different things, but both are required, proper voltage at proper current capacity and a proper control signal. An Arduino is great at CONTROLLING things by using its output pins and input pins under program control via your sketch, but these are just control signals. An arduino is only useful at powering things if they work at the +5vdc the arduino works at and even then there is only about 500ma or so of current available for external devices using that +5vdc voltage. External power supplies are the normal method to power external devices and circuits requiring other then +5vdc and at less then 500ma.

Lefty

ProfFrink

Hi, Lefty. Thanks very much for the clarification. I think I have a better understanding now.

So it sounds like a separate power source for the vibration motors will probably be the way to go. Can I just use a ~3V DC power adapter for the motors? If so, how many amps will it need to provide if I want to have the option of potentially running all 5 vibration motors at the same time? The vibration motor datasheet (found on the page I linked to in my original post) says that each motor can draw up to 430mA (although each has a typical operating current of ~130mA). So is it the case that the number of amps they require will sum? (e.g., 2 motors running simultaneously would need up to 860mA?) If so, then I'm guessing I'd need a power adapter that can provide over 2 amps, right? Or does it not work like that?


Chagrin

The 430ma rating is just when it's starting up; motors draw more current when they're under a load and starting from a standstill -- overcoming the inertia of the weight to get it spinning -- would be a type of load.

Driving the motor at an increasingly higher voltage will make it spin more quickly (be more responsive). You still have to make sure it stays under 130ma continuous; the typical method of doing this would be to use a PWM signal output to the base of the transistor. Lower PWM values result in less current and therefore a slower speed. In that respect you can use any voltage power supply you have available, but still you want something in the < 9V range.

Any inexpensive NPN transistor in a TO220 package should be fine for your requirements. You'll also need four ~220 ohm resistors (between the PWM output of the arduino and the gate of the transistor) and four diodes (any IN400x is fine).

See http://www.kpsec.freeuk.com/trancirc.htm#switching for wiring it up; it also shows the details for selecting a transistor.

sdturner

You can limit current by PWM, but it will add a little complexity. I think you just want to turn them on and off and not worry about protecting the motors. Use a 3V power supply (although 2V will probably work, so will 3.3V) and don't worry. If you want to adjust the vibration intensity for your experiment, use an adjustable power supply to adjust all motors at the same time. If you want to adjust each individual motor then PWMing or putting a sesistor in series is necessary.

The power supply requirements depend on how you are using the motors.

If only one motor will be on at one time then you only need 430mA. Find a supply with at least 500mA. It might be possible to use the Arduino power supply, but it is close to the limit.

If multiple motors will be on, but only one motor will start at a time, then the needed current is 4 * 130mA + 1 * 430mA = 950mA (for 5 motors). Find a power supply with 1A or more.

If multiple motors can start at the same time you will need 5 * 430mA = 2.15 A.

Best regards,
Steve

ProfFrink

Chagrin:  Thanks very much for the suggestions and the link. I will keep these things in mind as I move forward with my project.

Steve:  Yes, you're correct, I really only need to turn the motors on and off. Nothing fancy. I think I will start by trying out your suggestion of using a 3V power supply without PWM. I appreciate your points about controlling the vibration intensity, because there's a possibility I will need to do that somewhere down the line (but not yet). So thanks for that information. I might need to start all 5 motors at the same time, so I will look for a power supply with at least 2.15A.

Thanks to everyone for your responses. I think I've got the info I need to get started with my project, but if anyone else has any pointers, feel free to chime in.  Now I need to order some parts :D

DrOb

There's a couple of Application Bulletins on the site of your motor supplier that help explain (essentially what everyone else above has mentioned - the current and back EMF can damage your arduino):

See driving motors with PWM section here:
http://www.precisionmicrodrives.com/application-notes-technical-guides/application-bulletins/ab-012-driving-vibration-motors-with-pwm

ProfFrink


There's a couple of Application Bulletins on the site of your motor supplier that help explain (essentially what everyone else above has mentioned - the current and back EMF can damage your arduino):

See driving motors with PWM section here:
http://www.precisionmicrodrives.com/application-notes-technical-guides/application-bulletins/ab-012-driving-vibration-motors-with-pwm



Thanks for the link! I apologize if this is a naive question, but if I use separate power supplies for the Arduino and the motors, will that not be enough to prevent issues with noise and back EMF?

sdturner



Thanks for the link! I apologize if this is a naive question, but if I use separate power supplies for the Arduino and the motors, will that not be enough to prevent issues with noise and back EMF?



Yes, almost certainly. The motor supply will be noisy. The Arduino supply will not.

Go Up