{
  "metadata": {
    "id": "PS1240P02BT",
    "name": "Active Piezo Buzzer (12.2 mm)",
    "type": "actuator",
    "manufacturer": "TDK",
    "part_number": "PS1240P02BT",
    "datasheet_url": "https://4donline.ihs.com/images/VipMasterIC/IC/TDKC/TDKCS08938/TDKCS08938-1.pdf?hkey=6D3A4C79FDBF58556ACFDE234799DDF0",
    "description": "Small ACTIVE 12.2 mm piezoelectric buzzer with a built-in oscillator/driver IC. Two leads (polarized: + / -). When DC is applied across the leads (rated 3 V, usable 3-5 V across the common 12.2 mm active-buzzer family), the part self-oscillates at its mechanical resonance (~2.7-3.5 kHz, ~85 dB SPL @ 10 cm) and emits a continuous audible tone until DC is removed. This is NOT a passive piezo element / piezo speaker — the host MCU does NOT need to generate a PWM/AC drive signal. A simple digital_write(HIGH/LOW) on the connected GPIO is enough to gate the tone on/off. Used as the local audible alarm in the AquaSense residential leak-detector design (driven from a Heltec V3 GPIO; if the chosen SKU draws more than the GPIO's strong-drive limit, an NPN transistor gate driver is implied).",
    "tags": [
      "active-piezo-buzzer",
      "buzzer",
      "audible-alarm",
      "annunciator",
      "internal-oscillator",
      "self-driven",
      "DC-driven",
      "no-pwm-required",
      "12.2mm",
      "through-hole",
      "polarized",
      "2-pin",
      "3V",
      "3-5V",
      "~85dB-SPL",
      "~3kHz-resonance",
      "leak-detector",
      "alarm-output",
      "aquasense",
      "TDK-PS1240P02BT",
      "Adafruit-1739"
    ],
    "schema_version": "1.4.0",
    "version": "1.0",
    "taxonomy": [
      "actuator"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "power_domains": [
        {
          "id": "buzzer_supply",
          "name": "Buzzer DC Supply",
          "nominal_voltage_V": 3,
          "voltage_range_V": [
            3,
            5
          ],
          "max_current_mA": 30,
          "ground_reference": "common",
          "description": "DC drive supply for the buzzer's internal oscillator/driver. Apply DC across the leads to enable the tone; remove DC to silence. No PWM is required."
        }
      ],
      "resources": [
        {
          "id": "lead_positive",
          "name": "Positive Lead (+)",
          "functions": [
            {
              "name": "power_input",
              "signal_class": "power",
              "direction": "sink"
            }
          ],
          "connector_type": "wire",
          "power_domain_id": "buzzer_supply",
          "description": "Anode lead (red wire / longer pin / + marking on the can). Connect to a host MCU GPIO when the GPIO can source the buzzer's current; otherwise connect to the collector/drain of a small NPN/N-MOSFET gate driver whose base/gate is tied to the GPIO."
        },
        {
          "id": "lead_negative",
          "name": "Negative Lead (-)",
          "functions": [
            {
              "name": "ground",
              "signal_class": "ground",
              "direction": "source"
            }
          ],
          "connector_type": "wire",
          "power_domain_id": "buzzer_supply",
          "description": "Cathode lead (black wire / shorter pin / - marking on the can). Connect to circuit ground."
        }
      ],
      "interfaces": [
        {
          "id": "buzzer_power",
          "name": "Buzzer DC Drive",
          "protocol": {
            "type": "power",
            "role": "sink"
          },
          "requires": [
            {
              "function": "power_input",
              "count": 1
            },
            {
              "function": "ground",
              "count": 1
            }
          ],
          "max_instances": 1,
          "power_delivery": {
            "max_voltage_V": 5,
            "max_current_mA": 30
          },
          "description": "DC on/off drive for the buzzer. Host asserts HIGH on the connected GPIO (or on the base of an NPN gate driver if the buzzer's current exceeds the GPIO's strong-drive limit) to enable the tone, LOW to silence. Because the buzzer contains its own oscillator, NO PWM signal is needed at this interface."
        }
      ],
      "supply_voltage_V": [
        3,
        5
      ],
      "power_consumption_mW": 90,
      "pin_count": 2,
      "metadata": {
        "package_type": "through-hole_round_can_12mm"
      }
    },
    {
      "domain": "mechanical",
      "resources": [
        {
          "id": "buzzer_body",
          "name": "Piezo Buzzer Body",
          "functions": [
            {
              "name": "mounting"
            }
          ],
          "connector_type": "through_hole",
          "description": "Cylindrical plastic-can body of the buzzer. Two leads exit from the bottom on a 6.5 mm pitch for through-hole soldering into a PCB or perfboard. The top has the sound-port hole; do not block it with adhesive, conformal coating, or labels."
        }
      ],
      "interfaces": [],
      "package_type": "through-hole_round_can_12mm",
      "dimensions_mm": {
        "length": 12,
        "width": 12,
        "height": 9.5
      },
      "weight_g": 2,
      "metadata": {
        "mounting_method": "through-hole",
        "field_serviceable": false
      }
    },
    {
      "domain": "thermal",
      "resources": [],
      "interfaces": [],
      "operating_temperature_C": [
        -20,
        70
      ],
      "metadata": {
        "thermal_design_power_W": 0.09,
        "requires_thermal_management": false,
        "cooling_method": "passive_ambient"
      }
    }
  ],
  "design_rules": [
    "This is the ACTIVE variety of piezo buzzer (built-in oscillator). Drive with DC, NOT PWM. Treat the GPIO as a digital on/off line.",
    "Verify the buzzer's continuous current draw against the host GPIO's strong-drive limit. On the AquaSense Heltec V3, the strong-drive GPIO limit is 40 mA. If the chosen SKU draws more (rare for 12 mm units, but possible at 5 V), interpose a small NPN (e.g. 2N3904) or N-MOSFET as a gate driver and add a ~1 kohm base/gate resistor.",
    "Polarity matters: connect + lead to the GPIO/transistor side and - lead to ground. Reversing the leads can damage the internal driver IC.",
    "Add a flyback / TVS diode across the leads only if you also intend to drive the buzzer with high-frequency PWM through a transistor (which you should NOT do for an active buzzer in normal operation). For pure DC on/off, no flyback is required because the load is primarily capacitive, not inductive.",
    "Keep the sound-port hole on the top of the can clear of adhesive, conformal coating, labels, or enclosure material — covering it dramatically reduces SPL."
  ],
  "validation_requirements": [
    "Confirm the supply rail can deliver up to 30 mA continuous at 3-5 V DC at the buzzer's leads.",
    "Confirm the GPIO connected to the buzzer is configured as OUTPUT (push-pull). Do NOT use an open-drain GPIO without an external pull-up sized for the buzzer's current.",
    "If a switching transistor is inserted between the GPIO and the buzzer, confirm Vbe / Vgs threshold and base/gate resistor are sized for the GPIO's logic level (3.3 V on the Heltec V3)."
  ],
  "usage_notes": "The buzzer's pitch is fixed by its mechanical resonance (~2.7-3.5 kHz on common 12 mm SKUs, 4.0 kHz nominal on the TDK PS1240P02BT). You cannot tune the pitch from firmware — you can only gate it on or off. To produce alarm patterns (beep-beep, slow chirp, S-O-S, etc.) toggle the GPIO with millisecond-scale software timing. For variable-pitch / chirped tones, choose the PASSIVE 'piezo speaker' variant instead and drive it with PWM at the desired frequency.",
  "application_examples": [
    "Local audible alarm on the AquaSense residential leak detector — Heltec V3 GPIO drives this buzzer when the optical leak sensor trips. The MCU produces an interrupted beep pattern (e.g. 250 ms on, 250 ms off) to differentiate the alarm from a continuous fault tone.",
    "Generic audible alarm on hobbyist Arduino / ESP32 / Raspberry Pi Pico projects — door / window intrusion alerts, smoke / gas / leak detectors, kitchen-timer-style countdown beeps.",
    "Audible feedback on a small robot or appliance — button-click confirmation tone, end-of-cycle chime, low-battery warning.",
    "Backup-tone / 'I am alive' chirp at boot for headless devices that have no other indicator."
  ],
  "compatibility_notes": "Drop-in compatible with any 3.3 V or 5 V MCU (ESP32 / ESP32-S3 incl. Heltec V3, Arduino UNO / Nano / Mega, Raspberry Pi Pico, Teensy, etc.) as long as the GPIO can source the buzzer's continuous current OR a small NPN/MOSFET gate driver is inserted. NOT compatible with PWM-only buzzer libraries that assume a passive piezo element — those try to feed an AC waveform and only the on/off envelope of that waveform actually controls this part. Pin-compatible with most 12 mm 6.5-mm-pitch through-hole footprints (TDK PS1240P02BT, Adafruit 1739, Murata PKM13EPYH4000-A0, CUI CMI-1295-0585T, generic clones).",
  "warnings": [
    "ACTIVE vs PASSIVE buzzer confusion: this part has a built-in oscillator and plays a tone when DC is applied. The visually-similar PASSIVE 'piezo element / piezo speaker' has NO oscillator and is silent on DC — it must be driven with PWM. Wiring a passive element where firmware expects an active buzzer (or vice versa) results in either no sound at all or a 'click' on transition rather than a tone.",
    "Polarity reversal can damage the internal driver IC. Always verify the + / - markings on the can before soldering.",
    "Continuous on-time should be limited to spare both the user's ears and the buzzer's driver IC. Aim for duty-cycled alarm patterns (e.g. 50% on/off) rather than steady-state on for longer than ~10 minutes.",
    "Do not paint over, flow-coat, or laminate the sound-port hole on the top of the can — SPL will collapse."
  ]
}