I am trying to vary the strength of the vibration on an Adafruit mini vibrating disk (ADA1201), depending on a distance result I recieve from an ultrasonic sensor.
Im nearly sure I have my code all correct however I cant get any vibrations. The component is supposed to work between 2 and 5V. I have 3V coming to it at the minute and it wont work.
When I test it going straight to the 5V output on the arduino MKR1000 it works perfectly.
Is it possible to get a 5V output from one of the I/O pins on the arduino? Or any ideas how I could achieve this?
I doubt if it's the voltage that's the issue, but one of insufficient current.
An Arduino i/o pin's only good for 20mA or so: adafruit's page says it draws 100mA at 5V, 60mA at 3V.
It also says this:
If you want to reduce the current draw/strength (for example, to control it directly from an Arduino pin) try putting a resistor (100 to 1000 ohms) in series. For full power control, a small PN2222 transistor can control a motor easily, some experimentation may be required!
As on the Adafruit page: use a transistor to control the motor current; use a PWM output of the Arduino to control the transistor. From the looks of it, it's basically a miniature DC motor.
Here is the tutorial that Adafruit provides for controlling a small DC motor (like the Vibrating Mini Motor Disc) from an Arduino pin.