I have:
A Arduino Duemilanove w/ ATmega328
5 Vibration motors
Rated voltage 3.0 V DC
Operating voltage 2.7~3.3 V DC
Rated speed 9,000 rpm Min at rated voltage (150Hz)
Rated current 90 mA Max at rated voltage
Starting current 120 mA Max
Starting voltage 2.3 V DC Max, Motor is rotating at min starting voltage.
I want to control the vibration motors through Arduino for the input getting from a external c++ program. The external c++ program is to send the frequency for the vibration motors and how many motors to work at a given time. How do I write data to Arduino from external c++ program and how do I read data from Arduino program? I use Netbeans for c++ programming and Windows XP OS.
I read in the forum that motor speed could be controlled through PWM output pins using analogWrite() command. My question is how the motors could be driven for a given frequency(Hz)?
And also I've read that it is not safe to drive motors directly from Arduino board and should use a external power source. So in this do I have to connect a transistor for each motor or can I use a battery instead?
ex:
input frequency - f(Hz)
input no of motors - n
In this I want to drive n motors in f frequency until next input values are read.
Any help which can be given regarding this is greatly appreciated.
So in this do I have to connect a transistor for each motor
Yes
can I use a battery instead
Instead of what? You will always need a transistor, no matter what your source of power.
To communicate with other stuff use the serial port, it all looks like COM ports.
PWM allows you some control over the speed, however you will have to work out the relationship these motors have between PWM drive and the frequency it vibrates at.
Can you tell me if I will need 4 transistors or can I channel them all through the one ?
That depends on if you want to be able to control each one seperately or not. If you only need all four to turn on and off at the same time then one output pin controlling one switching transistor will work. Otherwise if you want independent control over the four motors then you will require four output pins and four transistors.
And can I power them all through through 5v input on the Arduino or will I need an external power supply?
Data sheet below says 85ma starting current and 75 ma running current for each motor when run from 3vdc. So current is not a problem for an arduino board if you aren't powering too much other stuff. More important is these are rated as 3vdc motors and should therefore not be run at 5vdc without some current limiting resistor in series with each motor. A 25 ohm resistor (one for each motor) should drop the voltage to a nominal 3vdc. Your 33 ohm resistor shownis also close enough, but remember to use one for each motor.
This is the schematic that I am currently going by.
I want to control them separately with digital write.Ok so, I will need four transistors, so i'm presuming I will four everything else aswell, i.e duplicate the above 4 times?
Data sheet below says 85ma starting current and 75 ma running current for each motor when run from 3vdc. So current is not a problem for an arduino board if you aren't powering too much other stuff. More important is these are rated as 3vdc motors and should therefore not be run at 5vdc without some current limiting resistor in series with each motor. A 25 ohm resistor (one for each motor) should drop the voltage to a nominal 3vdc. Your 33 ohm resistor shownis also close enough, but remember to use one for each motor.
I have a source for the 'older' type vibration motors with the visible shaft and off-center weight. Soon as I can test a couple and find the price (should be good in China) I'll post back. If anyone has already used that type motor please tell us what you saw...