{
  "metadata": {
    "id": "tactile-pushbutton-6mm",
    "name": "6 mm Through-Hole Tactile Pushbutton (SPST momentary)",
    "type": "electromechanical",
    "description": "Through-hole 6.0 x 6.0 x 4.3 mm tactile momentary pushbutton, SPST normally-open. Four leads in a 2.54 mm (within-row) x 6.5 mm (between-row) breadboard-friendly footprint; the two pins on each side of the body are internally shorted (1<->2, 3<->4). Pressing the plunger closes the contact, connecting the two pairs. Canonical industrial reference is Omron B3F-1000; mechanically/electrically equivalent to Adafruit 367 and the generic 6 mm tactile clones used in hobbyist kits. On the AquaSense leak detector this part is the mute / test button: short press silences the active alarm, long press triggers a self-test cycle.",
    "manufacturer": "Omron Electronics",
    "part_number": "B3F-1000",
    "datasheet_url": "https://omronfs.omron.com/en_US/ecb/products/pdf/en-b3f.pdf",
    "tags": [
      "tactile",
      "pushbutton",
      "switch",
      "momentary",
      "spst",
      "through-hole",
      "breadboard",
      "6mm",
      "input",
      "user-interface"
    ],
    "schema_version": "1.5.0",
    "version": "1.0",
    "taxonomy": [
      "sensor.touch"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "resources": [
        {
          "id": "pin1_a1",
          "name": "Pin 1 (Side A, signal)",
          "description": "Side-A pin 1. Internally shorted to pin 2. When the plunger is depressed, this side is electrically connected to side-B (pins 3, 4) through the SPST contact. Acts as the signal line read by an MCU GPIO with an external or internal pull-up.",
          "functions": [
            {
              "name": "Side A",
              "direction": "bidirectional",
              "shareable_with": [
                "pin2_a2"
              ],
              "signal_class": "data"
            }
          ],
          "connector_type": "through_hole"
        },
        {
          "id": "pin2_a2",
          "name": "Pin 2 (Side A, signal, shorted to Pin 1)",
          "description": "Side-A pin 2. Internally tied to pin 1 inside the switch body; either A-side pin can be used as the signal lead, the other left unsoldered or used for mechanical robustness.",
          "functions": [
            {
              "name": "Side A",
              "direction": "bidirectional",
              "shareable_with": [
                "pin1_a1"
              ],
              "signal_class": "data"
            }
          ],
          "connector_type": "through_hole"
        },
        {
          "id": "pin3_b1",
          "name": "Pin 3 (Side B, common / ground return)",
          "description": "Side-B pin 1. Internally shorted to pin 4. This side is wired to GND on the host PCB; when the plunger is depressed the SPST contact closes and pulls the side-A signal line down to GND through this pin.",
          "functions": [
            {
              "name": "Side B",
              "direction": "sink",
              "shareable_with": [
                "pin4_b2"
              ],
              "signal_class": "ground"
            }
          ],
          "connector_type": "through_hole"
        },
        {
          "id": "pin4_b2",
          "name": "Pin 4 (Side B, common, shorted to Pin 3)",
          "description": "Side-B pin 2. Internally tied to pin 3 inside the switch body; either B-side pin can be used as the GND return, the other left unsoldered or used for mechanical robustness.",
          "functions": [
            {
              "name": "Side B",
              "direction": "sink",
              "shareable_with": [
                "pin3_b1"
              ],
              "signal_class": "ground"
            }
          ],
          "connector_type": "through_hole"
        }
      ],
      "interfaces": [
        {
          "id": "signal_input",
          "name": "Signal Input (to MCU GPIO)",
          "protocol": {
            "type": "digital",
            "role": "input"
          },
          "max_instances": 2,
          "requires": [
            {
              "function": "Side A",
              "count": 1
            }
          ],
          "description": "SPST momentary contact signal. Wire to a digital GPIO with a pull-up (internal or external 10 k typical). Reads logic-high when the button is released and logic-low when pressed.",
          "recommendations": "Enable the MCU's internal pull-up (most parts including Heltec V3 / ESP32 support this) or fit a 10 k external pull-up to VCC. Add a 100 nF ceramic across the contacts or debounce in firmware (10-30 ms) to suppress the <=5 ms contact bounce."
        },
        {
          "id": "Side B",
          "name": "Side B",
          "protocol": {
            "type": "power",
            "role": "sink"
          },
          "max_instances": 2,
          "requires": [
            {
              "function": "Side B",
              "count": 1
            }
          ],
          "description": "Common-return side of the SPST contact. Tie to system GND on the host board. When pressed, the switch shorts this rail to the signal_input pin, pulling the GPIO low."
        }
      ],
      "supply_voltage_V": [
        0,
        12
      ],
      "pin_count": 4,
      "metadata": {
        "package_type": "Through-hole 4-lead (6.5 mm x 4.5 mm pin envelope, 2.54 mm row spacing on breadboard-friendly variants)"
      }
    },
    {
      "domain": "mechanical",
      "resources": [],
      "interfaces": [],
      "package_type": "TH-4 tactile switch, 6.0 x 6.0 x 4.3 mm body",
      "dimensions_mm": {
        "length": 6,
        "width": 6,
        "height": 4.3
      },
      "weight_g": 0.6,
      "metadata": {
        "mounting_method": "through_hole_pcb",
        "field_serviceable": false,
        "requires_special_tools": false,
        "mechanical_life_cycles": 100000
      }
    },
    {
      "domain": "thermal",
      "resources": [],
      "interfaces": [],
      "operating_temperature_C": [
        -25,
        70
      ],
      "metadata": {
        "requires_thermal_management": false,
        "thermal_monitoring_available": false
      }
    }
  ],
  "design_rules": [
    "Wire one Side-A pin (pin 1 OR pin 2) to the host MCU GPIO; the other A-side hole may be left empty or soldered for mechanical robustness only.",
    "Wire one Side-B pin (pin 3 OR pin 4) to system GND; the other B-side hole follows the same convention.",
    "Enable a pull-up on the GPIO line (internal MCU pull-up is sufficient for typical 3.3 V / 5 V logic). Default state is logic-high; pressing reads logic-low.",
    "Debounce: filter contact bounce of up to 5 ms either with a 100 nF ceramic across the contacts plus a series 1-10 k resistor, or in firmware (10-30 ms typical).",
    "Do not exceed 50 mA through the contact at 12 V DC; the part is rated for low-signal switching only, not power switching.",
    "Through-hole footprint: pin envelope 6.5 mm row x 2.54 mm pin (breadboard-friendly variant). For canonical Omron B3F-1000 use 6.5 x 4.5 mm. Confirm before laying out the PCB."
  ],
  "usage_notes": "Standard human-interface input for prototypes and consumer-grade products. Acts as a single SPST momentary contact regardless of which A-side hole and which B-side hole are populated, since each pair is internally shorted. The 4-pin layout exists primarily for mechanical retention - solder all four for kits or rough handling, solder a diagonal pair for breadboard work. Bounce time <=5 ms means firmware short-press / long-press detection (e.g. AquaSense's 'mute vs self-test' decode) is straightforward at any reasonable polling interval.",
  "application_examples": [
    "Mute / test button on the AquaSense residential leak detector (short press = silence active alarm; long press = trigger self-test cycle).",
    "Reset / mode buttons on Arduino / ESP32 / Heltec breadboard prototypes.",
    "Front-panel input on consumer enclosures with a soft silicone or ABS keycap glued to the plunger."
  ],
  "compatibility_notes": "Mates with any digital GPIO that supports a pull-up (internal or external). Heltec V3 / ESP32-S3 / ESP32-C3 / RP2040 / ATmega328p / nRF52 all qualify. The 2.54 mm pin spacing fits standard 0.1-inch breadboards and perfboards directly.",
  "warnings": [
    "Contact rating is 50 mA at 12 V DC max - this is a SIGNAL switch, not a power switch. Do not use it to break inductive or high-current loads.",
    "The 4 pins are 2 internally-shorted pairs - never expect 4 isolated terminals. A multimeter beep test between the two pins on the same side will read closed even with the plunger up.",
    "Prolonged contact bounce on debounce-free firmware will register as multiple presses. Always debounce."
  ]
}