pdf-icon

Unit Buzzer

SKU:U132

描述

Unit Buzzer 是一款基于无源蜂鸣器的高效声音反馈单元。它通过外部 PWM 方波信号驱动振膜振动发声,可实现蜂鸣报警与自定义提示音播放。该单元采用 Grove HY2.0-4P 接口通信,内置带保护电路的 NPN 三极管驱动,支持 4KHz 推荐驱动频率与 72dB 清晰声压,并采用 LEGO 兼容孔设计,便于灵活对接 LEGO 结构或使用螺丝固定。适用于报警系统、用户交互提示、智能设备反馈等应用场景。

产品特性

  • 蜂鸣器类型:无源蜂鸣器(需外部 PWM 驱动)
  • 声压等级:72dB(10cm 距离,5V 供电)
  • 驱动方式: PWM 方波信号(严禁直流高电平)
  • 推荐频率:4KHz
  • 响应速度:快速启动 / 停止
  • 通信接口:Grove HY2.0-4P
  • 2 x LEGO 兼容孔
  • 开发平台
    • UiFlow1
    • UiFlow2
    • Arduino IDE

包装内容

  • 1 x Unit Buzzer
  • 1 x HY2.0-4P Grove 连接线 (5cm)

应用场景

  • 蜂鸣报警 / 提示

规格参数

规格 参数
驱动频率 4KHz 1/2duty 方波
功耗 5V@86mA
产品尺寸 24.0 x 24.0 x 8.0mm
产品重量 3.3g
包装尺寸 138.0 x 93.0 x 9.0mm
毛重 6.8g

原理图

管脚映射

Unit Buzzer

HY2.0-4P Black Red Yellow White
PORT.B GND 5V Signal /

尺寸图

软件开发

Arduino


#include <Arduino.h>

#define buzzer_pin 26
int freq = 4000;
int ledChannel = 0;
int resolution = 10;

void setup() {
  ledcSetup(ledChannel, freq, resolution);  //Sets the frequency and number of counts corresponding to the channel.  设置通道对应的频率和计数位数
  ledcAttachPin(buzzer_pin, ledChannel); //Binds the specified channel to the specified I/O port for output.  将指定通道绑定到指定 IO 口上以实现输出
  ledcWrite(ledChannel, 512);  //Output PWM.  输出PWM
}

void loop() {
    ledcWrite(ledChannel, 512);  //Output PWM.  输出PWM
    delay(3000);
    ledcWrite(ledChannel, 0);  //Output PWM.  输出PWM
    delay(3000);
}

UiFlow1

UiFlow2

相关视频