Toggle Nav

Interfacing YwRobot Vibration Motor Module with Arduino

Table of Contents

YwRobot Vibration Motor Features

This small built-in module uses a high-quality vibration motor. You can make some interesting Arduino projects such as an alarm, a notifier or even a vibrating robot! When the input is high, the motor will vibrate just like your cell phone. You can control the ON/OFF or vibration intensity through digital signal or PWM signal.

The module adopts a high-quality mobile phone vibration motor; the vibration effect is evident; it is amplified and suitable as a non-audible indicator. The module can easily complete the conversion of the electrical signal to mechanical vibration.

YwRobot Vibration Motor Module Pinout

This sensor has 4 pins:

  • 5V: Module power supply –2.4 V to 5 V
  • GND: Ground
  • OUT: Output

You can see pinout of this module in the image below.

Required Materials

Hardware Components

Arduino UNO R3 × 1
YwRobot Vibration Sensor × 1
Male to Female jumper wire × 1

Software Apps

Arduino IDE

Interfacing YwRobot Vibration Motor Module with Arduino

Step 1: Circuit

The following circuit shows how you should connect Arduino to this sensor. Connect wires accordingly.

Step 2: Code

Upload the following code to your Arduino.


    /*
  modified on Sep 8, 2020
  Modified by MohammedDamirchi from Arduino Examples
  https://electropeak.com/learn/
*/


// the setup routine runs once when you press reset:
void setup() {
  pinMode(2, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(2, HIGH);
  delay(500);
  digitalWrite(2, LOW);
  delay(1000);
 
}

Liked What you see?

Get updates and learn from the best

More To Explore

Leave a Reply

Your email address will not be published. Required fields are marked *