Skip to main content

KNIFE-008 – v9 / v9L: whistle to sing (ESP32 + microphone)

danger

Problematic breadboard and PCB design - Not ready nor used, proper dedicated breadboard KNIFEs are KNIFE-018 and onwards.

📅 2026-10-12 · stav: rozpracované · priorita: vysoká · ✍️ Ondrej Špánik

  • goal: with the button held, the bird sings only when you whistle; without the button, whistling does nothing → sound = button held AND whistle
  • no extra chip: the ESP32 does the detection itself (8 kHz sampling, Goertzel filters 0.9–3.5 kHz). The only new hardware is a MAX9814 microphone module (analog out, automatic gain control) and a switch for the player
  • v9 (LELEK_board_v9.fzz, battery: 3.7 V LiPo via TP4056) and v9L (LELEK_board_v9L.fzz, 5 V from the LOLIN ESP32 dev board's USB VBUS), built on v8 / v8L (fuse F1, C1, R1∥R2 or R1–R4 unchanged and in the same PCB places → the Nightjar bay still fits)
  • how it switches: Q1 IRLB4030 (logic-level N-MOSFET, TO-220 laid flat) sits in the DFPlayer Pro's ground (net DGND), after the button. On a whistle the ESP32 drives CTRL high for 7 s → the player gets power, boots and plays the 6.0 s churr exactly as on every power-up since v6. R5 100k holds Q1 off while the ESP32 boots
    • why not AT commands over the player's UART: switching its power keeps the tested "plays when powered" behaviour and needs no serial wiring
    • why IRLB4030: techfun.sk's other MOSFET, IRFZ44N, needs ~10 V on its gate; the ESP32 gives 3.3 V
  • v9 only: U3 MCP1700 (3.3 V low-dropout regulator) + C2 / C3 1 µF make 3.3 V from the switched battery line for the ESP32 and the mic → the ESP32 only runs while the button is held (standby unchanged: nothing powered between presses). techfun.sk / LaskaKit only sell AMS1117 (≈ 1 V dropout, useless from a 3.7 V cell) → U3 from another shop
  • v9L: the ESP32 runs from its USB all the time; J1 grows to 5 wire pads (5V, GND, 3V3, CTRL, MIC)
v9 (battery)v9L (ESP32 USB)
New partsQ1, R5, U3, C2, C3, J2 (ESP32), J3 (mic)Q1, R5, J3 (mic); J1 → 5 pads
Nets11 / 11 match12 / 12 match
Min copper gap12.1 mil12.7 mil
Sim, held + whistleVSW 3.68 V, 3V3 3.30 V, player on, ≈ 0.17 A from the cellVSW 4.97 V, player on, speaker path 1.3 V as v8L
Sim, held, no whistle / releasedsilent / everything offsilent / silent
Cost (without ESP32)≈ 26.12 EUR + U3 + 2 caps≈ 21.01 EUR
  • detector tested in Python with the firmware's constants (firmware/whistle/whistle_sim.py): whistle and faint whistle → plays after 0.26 s; 150 ms chirp, room noise, speech-like sound, claps, the churr itself → nothing; a steady 2 kHz beep → plays (a known limit of a tone detector)
  • verified: breadboard nets = schematic nets (simcheck_v9*.py), ngspice in all three states, PCB copper = schematic (pcbcheck.py), both files open in Fritzing 1.0.8 (breadboard / schematic below are its exports)
  • not yet done: firmware not compiled or run on hardware; thresholds from synthetic sounds, not the real mic in wood; boot delays not measured; no Gerbers; no sound hole / ESP32 place in the enclosure yet. v9: the tact switch now carries 0.06–0.17 A, and the dev board's USB must not be plugged in while the battery is connected and the button held (two 3.3 V regulators)
  • details: docs/v9_parts.md, docs/v9L_parts.md in ST-017-MOTHERBOARD

v9 (battery) schematic, breadboard and PCB

v9 schematic

v9 breadboard

v9 PCB

v9L (ESP32 USB) schematic, breadboard and PCB

v9L schematic

v9L breadboard

v9L PCB


← KNIFE-007 · ↩️ Všetky KNIFE príspevky · KNIFE-009 →