Hi, I'm new to this and hope this isn't a newby question. I have a coin style vibrator that has to at least have 2.3v to spin and has a max voltage of 3.6v. If I want to ramp it up I'm guessing I want a loop something like this
Hi, I'm new to this and hope this makes sense. I want to control a coin type vibration motor that needs 2.3 volts to start up and has 3.6v max. I want it to slowly ramp up from the lowest to highest. Will this do it?
This is the unformatted spec sheet on it. I'm just following my beginner instructions and assumed I would plug this thing in instead of an LED in the Fade Excercise.
Physical Specification PARAMETER CONDITIONS SPECIFICATION
Body Diameter Max body diameter or max face dimension where noncircular
8 mm [+/- 0.1]
Body Length Excl. shafts, leads and terminals 2.15 mm [+/- 0.1] Unit Weight 1 g
Construction Specification PARAMETER CONDITIONS SPECIFICATION
No. of Poles 6
Leads & Connectors Specification PARAMETER CONDITIONS SPECIFICATION
Lead Length Lead lengths defined as total length or between motor and connector
100 mm [+/- 2]
Lead Strip Length 1.5 mm [+/- 1.5] Lead Wire Gauge 32 AWG Lead Configuration Straight
Operational Specification PARAMETER CONDITIONS SPECIFICATION
Rated Operating Voltage 3 V Rated Vibration Speed At rated voltage using the inertial test load 17,000 rpm [+/- 5,500] Max. Rated Operating Current At rated voltage using the inertial test load 100 mA Rated Inertial Test Load Mass of rated load standard test sled 100 g Max. Start Voltage Certified starting voltage. Measured at no load, where applicable 2.3 V Min. Vibration Amplitude Peak-to-peak value at rated voltage using the inertial test load 0.45 G Max. Operating Voltage 3.6 V Max. Start Current At rated voltage 160 mA
mad_ukrainian:
Look closely. The voltage is 2.3 and 3.6. Not 23 and 36.Thanks
Don't look now, but 23 to 36 in steps of 1 is the same as 2.3 to 3.6 in steps of 0.1, in terms of the number of steps.
You'll still need to scale that to values between 0 and 255 that give the outputs you require before it's useful for 'analogWrite()'.
Maybe something like:-
analogWrite(pin,255); outputs 5 volts (or whatever your reference voltage is).
analogWrite(pin,0); outputs 0 volts.
So (again, assuming you have not specified a different reference voltage) use ratios to get:
analogWrite(pin,117); outputs 2.3 volts, and analogWrite(pin,184) gives you 3.6 volts.
So your for loop could look like:
for (byte x = 117; x<185; x++) {analogWrite(pin,x);}
and the PWM equivalent voltage on pin would rise from 2.3 to 3.6 as your sketch steps through this.
A start voltage is not the same as the lowest run voltage.
Once it is running it may continue to run on a much lower voltage.
You might need to experiment some if you'd like a lower speed.
It looks like one could write a PID to control the speed.
One could connect a analog read to the motor leads.
One would read the voltage and ignore those that were full
voltage and read the floating voltage. This would indicate the speed
of the motor as a feed back.
With this you could never use a 100% on PWM duty cycle as you'd
have no feedback.
Just a thought.
Dwight