A vibration motor is a system that generates vibrations by means of a rotary, linear or electromagnetic mechanism.
In our case, we’ll be using a motor with a rotating mechanism. Its vibratory intensity is driven by the centrifugal force of the eccentric mass and the speed of rotation.
This motor is ubiquitous in telephones and video game controllers.
The vibration engine allows you to make your project vibrate, for example to vibrate a joystick, an alarm or to simulate the arrival of a notification.
The vibration motor has two pins:
Now we’ll explain how to connect this vibrating motor to your Arduino board to make it work. Simply connect the vibrating motor to the 5V and GND pins on your Arduino board.
To switch your vibration motor on and off, we’re going to use one of the controllable pins on the Arduino board. Here’s the new circuit diagram:
To regulate the current of your vibration motor, we’ll use the analogWrite function. This allows us to vary the motor voltage from 0V to 5V. The schematic remains identical to the one above.