L2: Vibromotors

Table of Contents

  1. Vibromotors
    1. Eccentric Rotating Mass (ERM) Motors
      1. Vibration frequency and amplitude
      2. ERM form factors
      3. Example ERM motors
      4. Coin vibration ERM motors
  2. Wiring ERM motors with Arduino
    1. Transistors
    2. Wiring up the Adafruit ERM motor with 2N2222 Transistor
  3. Haptic motor drivers
  4. Prototyping journal activities
  5. Resources
    1. Vibromotor resources
    2. Using transistors with Arduino
    3. Videos

Haptic or tactile actuator technology provides feedback to the user via touch by force, motion, or temperature. In this lesson, we will learn about vibration motors, which are commonly used to provide haptic feedback in game controllers, mobile phones, and smart watches.

Figure. Examples of eccentric rotating mass (ERM) motors and linear resonant actuators (LRA) in mobile phones and watches. Images from NFP Motors and Sosav

Vibromotors

There are two common types of vibration motors: eccentric rotating mass (ERM) motors that have a small unbalanced mass attached to the DC motor axle that creates a displacement force when rotating and linear resonant actuators (LRA) that contain a small internal mass attached to a spring, which vibrates in a reciprocating linear motion with an applied AC signal. ERMs vibrate along two axes while LRAs are single-axis vibrators. We will be using ERM motors in this lesson. The video excerpt below from Precision Microdrives shows how ERMs and LRAs vibrate.

Video. A video from Precision Microdrives showing the two most common types of vibration motors: eccentric rotating mass (ERM) motors and linear resonant actuators (LRA). ERM motors vibrate in two directions due to the centripetal force of the unbalanced mass attached to the DC motor axle. LRAs are similar in design to speakers:

ERMs are built with DC motors and an off-centered mass: they are cheap, provide a strong vibration, and are pervasive in toys, game controllers, mobile phones, and watches; however, they have a comparatively long startup time (~20-30ms) and limited controllability. For ERMs, you cannot individually control the frequency of the vibration (i.e., how fast the mass is spinning) and the amplitude of that vibration—they are tied together. As the applied DC voltage increases, the frequency and amplitude of the vibration linearly increases, which is perceived as overall vibration intensity.

In contrast to ERMs, LRAs do not spin. They linearly move a mass (up and down) attached to a spring using a magnetic voice coil. LRAs require a smooth sine wave voltage signal (aka an AC signal) driven at specific resonant frequencies—usually 150-200Hz—which controls how often the mass moves and, therefore, the vibration oscillation. They are increasingly common in smartphones, watches, and trackpads to mimic the feeling of a click. For example, newer Apple MacBooks and iPhones feature the Apple Taptic Engine, which uses LRA technology. While LRAs are more responsive than ERMs (~15-25ms startup times), their vibration strength is more minimal and the wiring circuitry more complicated. Moreover, their vibration frequency is strongest at a single frequency (the resonant frequency).

If a vibromotor is fully enclosed in a shell, you cannot necessarily tell whether it is ERM or LRA even though the technologies are fundamentally different. Below, we are showing “coin” (or “pancake”) form factors of both ERM and LRA.

Figure. Depending on their enclosure and form factor, some ERMs and LRAs can look similar even though they are fundamentally different technologies. They require different driver circuits and actuation methods (DC for ERM and AC for LRA). Images from Precision Microdrives.

Eccentric Rotating Mass (ERM) Motors

Eccentric rotating mass (ERM) motors have an unbalanced mass attached to their axle. When the ERM motor spins, the rotating mass’s centripetal force causes displacement. By attaching an ERM to an object—like a smartphone or game controller—the rotating irregular mass causes the motor and attached device to shake. The larger the object, the more force is needed to modulate the vibration onto the object.

Video. A video from Precision Microdrives demonstrating how eccentric rotating mass (ERM) motors work. The idea is quite simple: attach an asymmetric or unbalanced mass to the DC motor’s axle. When it rotates, the weight shifts causing a vibration.

Vibration frequency and amplitude

There are two main characteristics of a vibration: the vibration frequency, which is how fast the mass is spinning and the vibration amplitude, which is the strength of the vibration force. For ERM motors, you cannot vary the vibration frequency and amplitude independently—both increase linearly with the applied voltage.

DC motors spin at a rate proportional to the applied voltage. We measure “spin rate” in revolutions per minute (RPM); however, we measure vibration frequency in Hz (cycles per second). So, to convert RPM to the vibration frequency \(V_F\) in Hz, we simply divide by 60:

\[V_F = \frac{RPM}{60}\]

The strength of the force generated by the ERM motor is:

\[F = m \cdot r \cdot ω^2\]

Where \(F\) is the centripetal force in Newtons (N), \(m\) is the mass of the eccentric mass (in kg), \(r\) is the radius of the eccentric mass (in meters), and \(ω\) is the angular velocity in radians/second (i.e., the speed of the motor).

Figure. The strength of the force generated by the ERM motor is: \(F = m \cdot r \cdot ω^2\) where \(F\) is the centripetal force in Newtons (N), \(m\) is the mass of the eccentric mass (in kg), \(r\) is the radius of the eccentric mass (in meters), and \(ω\) is the angular velocity in radians/second. Image based on video from Precision Microdrives.

When attached to an object, the vibration amplitude is also affected by the size of that object. This should make intuitive sense. For example, the small ERM motor in your mobile phone (used for alerts and notifications) would not cause much displacement when attached to a larger object like a laptop or an office desk. If you know the size of the target object, you can use this to inform the size and operating characteristics of your ERM motor.

Video. An ERM’s vibration amplitude is not just a function of motor speed and eccentric mass size but also the size of the attached object. A larger object requires more force to vibrate. Notice how the vibration displacement is greater with the smaller attached mass compared to the larger attached mass. Video from Precision Microdrives.

ERM form factors

There are a variety of ERM form factors—see the figure below—from the basic cylindrical “pager” motor, which can be mounted directly to a PCB, to fully encapsulated waterproof versions, to the popular coin or “pancake” forms. The coin ERMs are compact, easy-to-use, and come with strong adhesive backing for mounting. Don’t be confused: many LRAs also come in a coin form factor but are fundamentally different technology.

Figure. Example ERM motors, including the cylindrical (or pager) ERM and the coin or pancake ERM. Images from Precision Microdrives.

Example ERM motors

Below, we’ve highlighted example ERM motors from a popular supplier: Precision Microdrives. For each ERM motor, we include the body diameter and length, the eccentric mass radius and length, the operating voltage and current, and the motor speed and vibration frequency at that voltage/current. We specifically selected small ERMs that are common in handheld devices but they can get much larger.

Because vibration amplitude is dependent not just on the speed of the ERM motor and the size of its eccentric mass but also the size of the affixed target object (e.g., smartphone or watch), vibromotor datasheets often quote a “normalized vibration amplitude”, which is the ERM’s motor performance at its rated voltage when attached to a fixed mass. The Precision Microdrive datasheets, for example, use a fixed mass of 100g to calculate a normalized vibration amplitude for its motors.

Model Body Diameter Body Length Eccentric Weight Radius Eccentric Weight Length Operating Voltage Operating Current Motor Speed Vibration Frequency Normalized Amplitude
4.1mm 6.8mm 1.4mm 3mm 2.5V 25mA 11,000 rpm 183 Hz 0.25G
4.5mm 11mm 2mm 3mm 1.5V 17mA 9,100 rpm 152 Hz 0.4G
8mm 3.4mm 3V 66mA 12,500 rpm 208 Hz 1.13G
10mm 2.1mm 3V 60mA 14,000 rpm 233 Hz 1.1G
7mm 24.5mm 3V 50mA 13,800 rpm 230 Hz 1.84G
8.7mm 25.1mm 3V 100mA 13,800 rpm 230 Hz 7G
24.3mm 12.5mm 9mm 4.8mm 12V 148mA 5,500 rpm 92 Hz 13G

Coin vibration ERM motors

In our teaching hardware kits, we often supply ERM motors in the coin form factor. These motors are also called pancake ERMs or vibrating mini-motor discs. Coin ERMs are compact, self-contained, and provide a strong vibration. Due to their small size, ease-of-use, and fully enclosed vibration mechanism, they are common in mobile phones, handheld devices (e.g., controllers), and medical applications.

Adafruit “Vibrating Mini-motor Disc” Digikey ERM Vibration Motor
Product #1201 $1.95 Product #316040001 $1.20

Coin vibration motors are ERMs and generally have the same operating and functional characteristics as their cylindrical counterparts; however, their construction is different. See video below. You can read about their construction on the Precision Microdrives website.

Video. A demonstration of an opened coin ERM from Tech Vision. There is another great video looking at a coin ERM with a microscope by Marty Jopson.

Wiring ERM motors with Arduino

Although many online tutorials and YouTube videos show ERM motors directly hooked up to Arduino GPIO pins—using wirings similar to how we connect LEDs—this is incorrect and could damage your microcontroller. Why?

Recall that Arduino GPIO pins can supply a maximum 40mA per pin with a safe continuous current of 20mA. This is sufficient to turn on LEDs with current limiting resistors but not enough for higher-current loads. In the table above, most ERM motors have operating currents of 50mA or beyond. Moreover, as electromechanical devices, ERMs require a higher startup current to initiate motor movement from rest (due to inertia). The coin ERM sold by Adafruit has an operating current of 75mA and a startup current of up to 120mA.

So, what do we do? We need to use a transistor.

Figure. Three example wirings for hooking up ERM motors to your Arduino. The incorrect wiring on the left directly connects the ERM to the GPIO Pin 3 (using a similar wiring as we did with LEDs). This is wrong and could damage your Arduino. GPIO pins can only supply up to 40mA of current but the ERM motor requires 75mA with a startup current of up to 120mA. The other two wirings use transistors as switches to connect the ERM motors to the 3.3V supply pins, which are capable of supplying 150mA. You can right-click on this image and select “Open Image in a New Tab” to enlarge. See also this “How to Build a Vibration Motor Circuit” by Learning about Electronics.


CAUTION:

The two wires on the Adafruit coin ERMs are extremely fragile and can easily break or snap off their solder joints. Be careful!


Transistors

Transistors are semiconductor devices used to amplify or switch electronic signals. They are the basic building blocks of computers and used in almost every modern electronic device from smartphones to headphone amplifiers. Transistors come in a variety of shapes, sizes, and operating specifications. There are two common designs: BJTs (Bipolar Junction Transistors), which we’ll use in this lesson, and MOSFETS (Metal-Oxide Semiconductor Field Effect Transistors), which are better suited for higher-current loads.

There are two primary “form factors” or packages for transistors: TO-92 packages and TO-220 packages; the latter is more common for higher-current loads due to the built-in heat sinks. You can find both BJT and MOSFET transistors in either package type and we’ve included examples of each below.

Figure. There are two primary “form factors” or packages for transistors: TO-92 packages and TO-220 packages. You can find both BJT and MOSFET transistors in either package type. Shown above: the 2N3904 NPN BJT and 2N7000 N-Channel MOSFET with TO-92 packaging and the TIP120 NPN BJT and IRLB8721 N-Channel MOSFET with TO-220 packaging. Images from Wikipedia and respective datasheets.

Transistors are a complex topic deserving of their own lesson; however, for our purposes here, two attributes are relevant:

  • First, transistors can work as electronically controlled switches. You can control transistors with small amounts of current (to turn them on and off) but the signal they control can be much larger. Thus, transistors are commonly used to control high-current loads with microcontrollers such as RGB LED strips and motors.
  • Second, because transistors can rapidly switch on and off, they can use pulse-width modulation. That is, your microcontroller can supply a PWM signal to the transistor’s control input, which will modulate the same PWM signal, but amplified, on the transistor’s output. Thus, we can use PWM via our transistor to control the vibration strength of our vibromotor.

Wiring up the Adafruit ERM motor with 2N2222 Transistor

The datasheet for the Adafruit vibrating mini-motor disc states the following operating specifications.

Attribute Rating
Rated operating voltage 3.0V
Voltage range ~2.5-3.8V
Rated operating current 75mA
Rated speed 11,000 ± 3,000rpm
Rated vibration frequency 183 ± 50 Hz
Starting voltage 2.3V
Starting current Up to ~120mA

Remember, the ERM vibromotor is a type of DC motor—though a very tiny one. You need to supply a starting voltage and current to initiate rotations from rest; these values are higher than the general operating voltage and current. While the operating range of the Adafruit ERMs are 2.5-3.8V, the Adafruit docs suggests that 2-5V works. Indeed, we have also found this to be the case with 5V resulting in stronger vibrations (as expected). However, for longitudinal use, the 3.3V supply is likely more prudent given the datasheet.

Figure. Two example wirings with an NPN BJT transistor. On the left, we are using the 3.3V supply pin and on the right, we’re using the 5V supply pin. If you have the components, you should also add in a flyback diode and capacitor as we’ve shown earlier. To zoom in, right-click on the image to “Open Image in a New Tab”

Specifically, the NPN bipolar transistors we use in our courses are the PN2222A transistors (and variants such as the 2N2222A). You need a resistor in series with the control input pin (base pin) on the transistor. In this case, a 1kΩ resistor works well.

Make sure you orient the transistor correctly. We created the abstract diagram below to help with assembly. In this diagram, the text on the transistor is facing us and the bulbous part is facing away.

Figure. An additional diagram to help you wire up this transistor-based circuit. Play close attention to the orientation of the transistor. The text on the transistor is facing us and the bulbous part is facing away from us. Diagram idea based on Learning About Electronics.

Haptic motor drivers

When haptics play a key role in your project, consider using a haptic motor driver, which makes it easier to interface with vibration motors and drive complex haptic patterns.

For example, Texas Instruments (TI) sells a variety of haptic motor drivers. The popular TI DRV2605 provides a I2C-based interface to control both ERM and LRA motors, generates its own the pulse-width modulated (PWM) waveforms, which relieves the host microcontroller of this responsibility saving hardware pins and reducing code complexity (e.g., setting precise timer interrupts for waveform generation), and includes an integrated library of 123 licensed haptic patterns, reducing the need to design and implement software to create custom haptic effects.

Figure. The TI DRV2605L includes a preprogrammed library of over 100 haptic waveform effects, including single, double, and triple clicks, alerts, and transitions. These haptic patterns are licensed from Immersion Corporation. See page 63 of the TI DRV2605L datasheet. Right-click on the image and select “Open image in new tab” to zoom in.

Both Adafruit and SparkFun provide custom breakout boards to interface with the TI DRV2605 IC.

SparkFun Haptic Breakout Board for TI DRV2605L Adafruit Haptic Breakout Board for TI DRV2605L
$8.50 from SparkFun $7.95 from Adafruit

You can also purchase breakout boards with the vibration motor and haptic driver integrated together like this SparkFun DA7280 Haptic Driver with Qwiic I2C connectors.

For more information on using haptic motor drivers with Arduino, see SparkFun’s Haptic Motor Driver Hook-up Guide.

Prototyping journal activities

For your prototyping journal, please complete the three ERM motor activities we began in lecture (see slides here). Take a video of your constructions and include a link to your video and code in your journal. Briefly describe what you did and what you learned.

Resources

Vibromotor resources

Using transistors with Arduino

Videos


This website was developed by Professor Jon E. Froehlich and the Makeability Lab using Just the Docs. If you found the website useful or use it in your teaching, we'd love to hear from you: jonf@cs.uw.edu. This website and all code is open source (website GitHub, Arduino GitHub, p5js GitHub). You can find the MakeabilityLab_Arduino_Library here. Found an error? File a GitHub Issue.