Using a Whadda Vibration Motor Module
What is a Whadda Vibration Motor Module vibration motor?
VibrationWe already have a tutorial on how to use a vibration motor ison its own. The Whadda Vibration Motor Module simplifies this process by integrating all the essential components—such as a DCtransistor, motorcapacitor, inand diode—into a compactsingle sizemodule thatalong is used to informwith the users by vibrating on receiving signals. It is commonly found inside a mobile phone. The one that is available in the lab is coin vibration motor.
It requires more currnet than an Arduino pin can provide, soensures a transistorsafe isand neededstable circuit, allowing you to switcheasily control the motor currentwithout onneeding andto off.worry Any NPN transistor can be used. In this tutorial, we are using 2N2222. The diode acts as a surge protector against voltage spikes thatabout the motorelectronic maysetup.
Wiring
These are the electronics used in the circuit.
vibrationGmotorto GND2N2222Vtransistorto(or any other NPN transistor)5V0.1µFScapacitorto 1N4001pindiode1KΩ resistor13
It is a quite complex circuit but try your best to follow!
Other NPN transistorsYou can use other NPN transistors for this tutorial, BUT, they may have a different pinout with 2N2222. Check the pinout of your transistor and make sure the pins go as the following.
1. Emitter (E) to Ground (GND)
2. Base (B) to Data pin (pin 3) with 1KΩ resistor
3. Collector (C) to Ground of the actuator (black wire of the motor)
Getting started
This code is getting the motor to vibrate for 1 second and stop for 1 second.
int motorPin = 3;13; //motor transistor is connected to pin 3
void setup()
{
pinMode(motorPin, OUTPUT);
}
void loop()
{
digitalWrite(motorPin, HIGH); //vibrate
delay(1000); // delay one second
digitalWrite(motorPin, LOW); //stop vibrating
delay(1000); //wait 50 seconds.
}