Examples · examples/fan-bulb/v0.1

Lark

A ceiling-fan bulb you talk to

Lark is an A19 light bulb for a ceiling fan's light kit. It screws into the fan's E26 socket, hangs base-up, and takes 120 V mains like any bulb. Its light is 16 LEDs in 2 strings, warm (2700 K) and cool (5000 K), each driven with a steady current, so the light shows no 120 Hz ripple and no PWM: under a fan's turning blades a ripple shows as a strobe. It is built to be talked to: 2 microphones at the dome's tip face the room, and an ESP32-S3 with 8 MB of PSRAM runs Espressif's ESP-SR wake word and command models inside the bulb, with no hub, no app and no network. A 3-place slider on the neck sets what else it joins: Alexa (Zigbee 3.0, to an Echo with a Zigbee hub in it), nothing (voice only), or Apple Home (HomeKit over Thread, to a HomePod or an Apple TV). An ESP32-C6 module runs that radio and the light.

  • v0.1
  • 4 boards
  • GREEN on all 4 boards

Drag to turn the board. KiCad's render of it, 36 views, 10 degrees apart.

The hard parts

What's hard about it, and where each part is

A bulb's inside is a cone, a sphere and a 20 mm tube, and a mains supply, 2 LED drivers, 2 processors and 2 microphones must fit in it

4 boards in 2 directions: 2 stand at 90 degrees to each other, 2 lie across them, joined by soldered tongues through slots. bulb.py holds the housing as numbers and every part's height, and stops a design whose part leaves the housing or meets another board

Every node of a non-isolated bulb sits at mains potential

IPC-2221B spacings in rules/lark.kicad_dru: 0.8 mm between the mains nets and the logic on the outer layers, 0.2 mm inside the board; the housing is the insulation

A fan's blades turn any light ripple into a strobe

average-current bucks with analog dimming (no PWM at the LEDs), and 9.9 uF of bulk that holds the bus over the strings' highest voltage through every 120 Hz valley: 117.0 V at the worst corner against the 103.3 V the controllers need

A switch on the side of a mains-powered bulb

the slider is a magnet outside the sealed housing over 2 Hall switches inside it: no contact, no hole, no insulation to bridge

Voice in the bulb, with no cloud

an ESP32-S3 with 8 MB of PSRAM for ESP-SR's front end, wake word and command models; its own radio is not wired, and it reaches the network only through the C6's UART, which carries commands, never sound

The microphones in a hot, closed dome

the ear at the dome's tip, the coolest place in a bulb that hangs base-up; SPH0641LU4H-1, rated to 100 C at 3.6 V

The boards, track by track

Every track and part of the routed boards, drawn from their files

Lark is four boards, each in a folder of its own. You can pick a board, point at a pad to see its part, and click a track, a via or a pad to follow its connection across the board.

examples/fan-bulb/v0.1/driver/lark_driver.kicad_pcb: four copper layers, 56 parts, 380 track segments, 65 vias and 33 nets, 45 × 57.8 mm.

You can drag to move around, and pinch or hold Ctrl and scroll to zoom.

Checks

The four checks on Lark v0.1

The verdict of the last run, as its gates report records it: GREEN on all 4 boards.

  • driverGREEN with 5 warnings
  • lightGREEN
  • brainGREEN with 5 warnings
  • earGREEN with 2 warnings

How it was built

Every step of the design, with what it changed

Each step as the README's "What changed" sections (v0.1/README.md) records it, oldest first.

  1. v0.1

    The first bulb

    The owner asked for a bulb for a ceiling fan that takes mains power, joins Alexa or Apple's home with a switch on its side, and takes voice in the bulb itself as the main way to work it, because their Matter devices did not work well. Then: make it as compact as it can be to fit the bulb, and grow it, or stack boards in more than 1 direction, where it cannot fit. ../LOOP.md has each pass.

What is open

What's still left to do on this board

  • Standby power: about 0.9 W from the mains with the voice front end running, over Title 20's 0.2 W. A wake-word chip that listens at a few mW, waking the S3, is the candidate.
  • The microphones' spacing: 10.4 mm, against the 4 to 6.5 cm ESP-SR's 2-microphone front end is tuned for. Its beamforming gains little at 10.4 mm; a single-microphone front end, or the 2 microphones across the dome's width, is the choice to make.
  • A wake word of the bulb's own: ESP-SR ships "Hi ESP", "Computer" and others; "Alexa" is one, and would wake the owner's Echo too. Espressif trains a custom word as a service.
  • A parts catalog with each line's distributor number (parts.csv), then workcenter sources per board and workcenter costs for 1 bulb and 10; and the verification package (P28).
  • The fan's own control: many fan light kits dim with a triac or switch the light from a remote's receiver. v0.1 expects a steady 120 V at the socket; a phase-cut input is not handled.
  • 230 V mains: the bus, the LinkSwitch's ratings and the spacings are for 120 V rms.
  • The firmware: ESP-SR on the S3, the UART protocol, Zigbee and HomeKit on the C6.
  • The housing: the neck's ribs that hold the driver, the disc's ledge, the gasket rings at the microphones' holes, and the slider's track, drawn from bulb.py's numbers.

One more in its README.