Skip to the content
PCBKitNew board
2 layers67.4 × 28.6 mmLamp, the printed circuit board in 3D

An over-engineered light switch

Size
67.4 × 28.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
26
Nets
34
Pads
95
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 9.0 (file 20241229)
Created
9 Jun 2025
Updated
28 Feb 2026

Overview

Lamp is an open-source printed circuit board by PaulBone, from the PaulBone/lamp-smartener repository on GitHub. It is a 2-layer board of 67.4 × 28.6 mm with 26 parts on 34 nets.

It is built around the LM393, AO3401A and AO3400A. Its parts include 11 resistors, 5 transistors, 2 capacitors, 2 ICs and 2 connectors. It belongs with the lEDs and displays boards and the ESP32 and RISC-V boards of this library.

Main components

3

README

README.md

Lamp Smartener

This is the "Lamp Smartener" or "Overengineered Light Switch" it works on USB powered LED lights.

WIP

Component selection

  • the NE7000 can be substituted for any N-type with a Vth around 1-2 V. and can switch 5V,
  • The AO3400 can be substituted for any N-type that can handle 600mA of current, and switch 5V. And disipate 1.25W of heat.
  • Likewise AO3401 can be substituted for any P-type that can handle 600mA of current and switch 5V.
  • TODO resistor tollerance
  • TODO current limiter advice.

Assembly notes

Solder the small SMD components first, it's easier to reach them before you put the big ones in.

Solder the switches before mounting the USB ports, the usb port shield pin will interfere with switch soldering.

Do not confuse the mosfet types. They're different for good reasons. p-type and n-type just arnt' compatible. However, the NE7000 can be substituted with more AO3400 units (probably), but not the other way around.

TODO: Add alterantive 2 and 1 port versions with the current limiter.

Mount the uC with either pin headers or directly. for direct soldering try holding it in place with pins/wires in the through-holes then solder the edges.

Firmware

Firmware uses the esphome framework and can be compiled with, replace lamp-smartener.yaml with the name of the .yaml file to match your lamp smartener, single-lamp.yaml or double-lamp.yaml. If you're using single-lamp.yaml check the pin names in the file match what you've soldered on the board.

$ mkdir /tmp/esphome $ docker run --rm --privileged -v "${PWD}":/config -v "/tmp/esphome:/config/.esphome" --device=/dev/ttyACM0 -it ghcr.io/esphome/esphome run lamp-smartener.yaml

Assuming you have pluged the ESP32 module into your PC and it is connected at /dev/ttyACM0

Alternatlvely you can build and flash it in separete steps, this will erase any wifi credentials that may be on the device, the above method does not:

$ mkdir /tmp/esphome $ docker run --rm --privileged -v "${PWD}":/config -v "/tmp/esphome:/config/.esphome" -it ghcr.io/esphome/esphome compile lamp-smartener.yaml $ cp /tmp/esphome/build/lamp-smartener/.pioenvs/lamp-smartener/firmware.factory.bin . $ esptool.py write_flash 0x0 firmware.factory.bin

The device will reboot and create a new Wifi network with "Lamp Smartener" in its name. The password is "Overengineered Light Switch". Connect to it with something like your phone then visit http://192.168.4.1 Tell the page there what wifi network you'd like it to join.

Home assistant will be able to discover it, if you use (or would like to use) esphome's dashboard to maintain firmware updates (which is available as a HA addon) you can adopt the device there as well.

Using the device

Each button will twoggle it's lamp (if installed) or drive automations in Home Assistant. In the single lamp version by default the 2nd button does nothing directly, but it can be used to run automations in home assistant.

Pressing and holding both buttons together for 10 seconds will initiate a factory reset, the status light will glow orange and any lamps will flash, keep holding the buttons for another 5s to conform the factory reset, otherwise release buttons to cancel.

Each button can be "disconnected" from its light by turning the "direct" control switch off for that switch and lamp. Eg if the button should run a home assistant automation instead (which may turn on the lamp to 50% brightness if you touch the button after midnight, and full brightness otherwise). The "direct" setting will persisted across reboots.

Parts

26
QtyValueFootprintReferences
610KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2, R3, R4, R6, R11
2100Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR8, R10
22N7002Package_TO_SOT_SMD:SOT-23_HandsolderingQ1, Q3
2AO3401APackage_TO_SOT_SMD:SOT-23_HandsolderingQ2, Q4
2SW_PushMy footprints:SW_SMD_Tact_6mmSW1, SW2
2USB_AConnector_USB:USB_A_Receptacle_GCT_USB1046J1, J2
10Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR7
10.1Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR5
10.1uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC2
1100uFCapacitor_SMD:CP_Elec_5x5.7C1
14.7KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR9
1AO3400APackage_TO_SOT_SMD:SOT-23_HandsolderingQ5
1ESP32-C6_SUPERMINI_SMDMy footprints:MODULE_ESP32-C3_SUPERMINIU1
1LM393Package_SO:SOP-8_3.9x4.9mm_P1.27mmU2

The 24 most common of 26 parts.

Questions

How big is the Lamp PCB?

It measures 67.4 × 28.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Lamp use?

26 parts, built around the LM393, AO3401A and AO3400A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Lamp KiCad files?

From the PaulBone/lamp-smartener repository on GitHub, at the commit this page was made from: the board is electronics/Lamp.kicad_pcb and its schematic electronics/Lamp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Lamp design in my own project?

Its repository states no licence, so its author keeps all rights: ask PaulBone before reusing the design.

Similar boards

  • 4 layers189.4 × 59.1 mmFlippyDriver, the printed circuit board in 3D

    FlippyDriver

    NietoSkunk/FlippyDriver

    Driver board for Luminator MAX3000 Flip Dot Panels

    344 parts10MIT
  • 2 layers37 × 70.9 mmOpendiag, the printed circuit board in 3D

    Opendiag

    maximus64/opendiag-hardware

    OpenDIAG - Open Source OBD2 Interface (Hardware)

    148 parts5CERN-OHL-S-2.0
  • 2 layers57 × 50 mmBSPD, the printed circuit board in 3D

    BSPD

    HKUST-Red-Bird-Racing-EVRT/GEN5_ELEC

    Repository for RBR EVRT 2025 EE

    64 parts3
  • 4 layers72.4 × 44.4 mmBtmdpcb v04 eval, the printed circuit board in 3D

    Btmdpcb v04 eval

    17o2/bluetooth-minidisc

    Adding built-in bluetooth connectivity to a 20-year-old Mindisc player

    115 parts45
  • 4 layers90 × 90 mmNode prototype, the printed circuit board in 3D

    Node prototype

    tweedegolf/spaeter

    TDOA location detection device

    187 parts3
  • 4 layers39 × 67.3 mmNeptune, the printed circuit board in 3D

    Neptune

    jackbrad1ey/water_jet_tvc

    A water-propelled thrust vector control (TVC) testbed vehicle aiming to decrease the cost and time factors associated with developing TVC control algorithms

    69 parts1
  • 4 layers68.1 × 75 mmHomefire, the printed circuit board in 3D

    Homefire

    JhanqueliX/Smart-light-socket-for-fire-prevention

    117 parts1
  • 2 layers140 × 218 mmHelio-485, the printed circuit board in 3D

    Helio-485

    GrizJW/helio-485

    Helio-485 KiCad board: ESP32-C5, 2S 18650, solar input, 3.3 V, 12 V 2 A, RS-485 Modbus.

    106 parts