Menu
Microbots
0
  • Make
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Maker-Modules
    • Maker-Packs
    • Tools & Gears
    • Robots & Displays
  • About
    • Our Story
    • Reach Out
    • FAQs
  • English
  • Your Cart is Empty
Microbots
  • Make
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Maker-Modules
    • Maker-Packs
    • Tools & Gears
    • Robots & Displays
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Language

  • 0 0

Using DriveCell to Control Buzzing

DriveCell isn’t just for driving motors and actuators—it can also make them generate sound and vibrations. By sending a signal through the audible frequency range, DriveCell can create different tones that can be played on devices like piezo buzzers, CoilPads, FlatFlaps, and even motors. Making it useful for alert systems or interactive responses. In this guide, we’ll explore how DriveCell can generate buzzing tones, how to wire it, and how to use it for various applications, from piezo buzzers to CoilPad and motor vibrations.

How Buzzing Works with DriveCell

Buzzing is achieved by sending rapid electrical pulses to a device, causing it to oscillate within the audible frequency range (~20Hz–20kHz). DriveCell allows control over these pulses using PWM (Pulse Width Modulation), letting you generate tones, alerts and vibrations.

Wiring a Buzzer or Actuator to DriveCell

Basic Connection for a Buzzer or Actuator

Here’s how to wire a buzzer, CoilPad, or FlatFlap to DriveCell:

  1. Connect DriveCell Output Pins to the Device:
    • OUT1 → Device Positive (+)
    • OUT2 → Device Negative (-)
  2. Connect DriveCell Input Pins to the Microcontroller:
    • IN1 → Any digital pin
    • IN2 → Another digital pin
  3. Power Connections:
    • VCC → 5V maximum
    • GND → Common ground with the microcontroller

Controlling Buzzing with DriveCell Library

To generate buzzing tones, DriveCell provides Arduino-compatible functions for buzzing tones.

1. Installing the Library

  1. Open Arduino IDE
  2. Go to Library Manager
  3. Search for DriveCell and install it

2. Code Example for Generating a Buzzing 

The following example makes a buzzer, CoilPad, or FlatFlap buzz using DriveCell's library built-in function:

#include <DriveCell.h>

#define IN1_pin1 2
#define IN1_pin2 3

DriveCell myDriveCell(IN1_pin1, IN1_pin2);

void setup() {
  myDriveCell.Init(); /* Initialize DriveCell */
}

void loop() {
  myDriveCell.Buzz(100);  /* Buzz at 100 microseconds */
  delay(500);
  myDriveCell.Tone();  /* Play a fixed tone with varying frequencies */
  delay(500);
}

3. Understanding the Functions

  • Buzz(duration) → Generates a buzzing effect:
    • duration → Tone frequency in microseconds (adjust to change intensity)
  • Tone() → Plays a fixed tone built into the library

⚠ Note: Some sounds can also be played on DC motors, but check the datasheet and avoid running high-frequency buzzing on brushed motors continuously, as it may cause excessive wear.

Conclusion

The tiny DriveCell module makes buzzing simple! Check out the DriveCell GitHub Repository for more code examples and technical documentation!

  • Share:

Follow

Github

  • About
  • Software
  • Education
  • Contact
  • FAQs
  • Terms
  • Refund Policy
  • Privacy Policy

Join our Community ~ Be the first to know about new products and get exciting deals!

© 2025 Microbots.