Skip to the content
PCBKitNew board
2 layers99 × 54.9 mmKasa Remote Controller Schematic, the printed circuit board in 3D

Kasa Remote Controller Schematic

justin-ham61/SmartBulbController

The goal of this project was to create a remote control device for Kasa Smart Lighting system within local network in order to eliminate the need for a smart phone app for lighting control.

Size
99 × 54.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
39
Pads
99
Tracks, vias
169, 6
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
8 Aug 2024
Updated
14 Jan 2025

Overview

Kasa Remote Controller Schematic is an open-source printed circuit board by justin-ham61, from the justin-ham61/SmartBulbController repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 99 × 54.9 mm with 16 parts on 39 nets, routed with 169 tracks and 6 vias.

Its parts include 7 resistors, 7 switches, 1 IC and 1 connector. It belongs with the ESP32 boards of this library.

README

README.md

SmartBulbController

SmartBulbController is an open-source input device built for the ESP32 microcontroller for controlling Smart Bulbs using the TP-Link Smart Home Protocol.

The goal of this project was to create a remote control device for Kasa Smart Lighting system within local network in order to eliminate the need for a smart phone app for lighting control.

Dependencies

Several libraries are required for the device to work.

  • Adafruit_SSD1306 by Adafruit
  • Adafruit_BusIO by Adafruit
  • Adafruit_GFX_Library by Adafruit
  • Ai_Esp32_Rotary_Encoder by Igor Antolic
  • KasaSmartPlug updated by Justin Ham
    • Modified version of the KasaSmartPlug library by Kris Jearakul to be compatible with Smart Bulbs and Smart Plugs.
  • ArduinoJson by Benoit Blanchon

Features

  • Quick communication with light bulbs using the TP-Link Smart Home Protocol which is a TCP/IP Protocol that sends JSON payloads to devices.
  • Rotary Knob allows the control of brightness for multiple bulbs at the same time which is not available in the Kasa app.
  • Built on FreeRTOS for efficient and responsive device interaction.
  • OLED Display for bulb management and view of device states such as (On, Off, Error).

FreeRTOS

  • WiFi related tasks are managed using Semaphores and prohibits reliant tasks from running unless a connection is successfully made.
  • User inputs are handled with ISR's that interact with RTOS queues.
  • All tasks only operate when items are added to the queue and executes them promptly.
  • Tasks notify lower priority tasks such as display task in order to update display.

Designs

Device Render

Device was designed with Fusion and prototype was printed using an Ender 3 Pro 3D Printer.

Device Render

First Working Prototype

First working prototype of the controller with a custom PCB and the 3D printed case.

Prototype Image

OLED Display

  • Menu
    • List of all bulbs and a dedicated "Reset" command for the ESP32 microcontroller.
      • Although the firmware has auto update for dynamic IP assignment, it may have issue updating to the most recent IP address of the bulb.
      • The reset button can be used to restart the device and connect to the new IP.
  • Bulbs show the current state of the bulb
    • On
    • Off
    • Error (Exclamation icon)
  • Changing the brightness will show the current brightness as a progress bar.

Inputs

  • 2 Rotary Encoders
    • 1 Encoder for menu navigation
    • 1 Encoder for On/Off and brightness control
  • 5 Switches (MX Style)
    • Quick toggle for individual bulbs

Control Options

User can control their light bulbs in several different ways

  1. Use the quick use rotary encoder
    • Press encoder button to toggle On/Off for all bulbs
    • Rotate encoder knob to change the brightness for all bulbs
  2. Quck individual bulb toggle
    • The 5 switches allow the users to quickly turn on and off individual bulbs
  3. Menu Select toggle
    • Navigate and select desired bulb on the menu in order to toggle and change the brightness of a specific bulb.

Set Up Guide

  1. Gather all materials listed in the parts document, you can order the PCB using the provided files or wire the device with a breadboard following the schematics.
  2. Prepare config file before flashing the device (Instruction shown below).
  3. Once the device is put together, flash the device with the firmware and required libraries using the Arduino IDE.
  4. Device set up will run automatically on initial start up.
    • This step includes the device searching for bulbs as outlined in the config file on the local wifi network.
    • Having the device connected to a computer and reading the Serial output will help with any connectivity issues.
    • Notes about better connection below
  5. Once set up, all lightbulbs named in the config file should show up on the main menu.
  6. The first 5 lights can be toggled with the 5 switches.

Config File Instruction

In order to flash the ESP32 module with the firmware, the user must update the config file with some information.

  • Home Wifi SSID (name) and Password
  • Names of all light bulbs they want
    • Name must match the name set for the bulb during set up exactly.
  • Total number of bulbs
c++
#ifndef CONFIG_H
#define CONFIG_H

const char* SSID = "<User WiFi SSID>";
const char* PASSWORD = "<User WiFi Password>";

//List of all user bulb names
char* aliases[] = {
  "<User Bulb Name 1>",
  "<User Bulb Name 2>",
  "<User Bulb Name 3>"
};

//Total number of bulbs, needs to match the number of bulb names above.
const int size = 0;

//Time between inactivity and sleep
const int inactivity_time = 15000;

//Minimum and Maximum brightness
const int min_brightness = 0;
const int max_brightness = 100;

#endif

On start up, the ESP32 will begin to look for bulbs that are active and add them to the device's list of bulbs if the name is included in the config file.

For best results, please turn the smart bulb on with a phone during the set up.

Future Plans

  • Light temperature and color control.
  • Custom group creations to group certain bulbs with another.
  • Better rotary knob control between menu and controlling bulbs.
  • Compatibility with devices that require Kasa Authentication such as light strips.

Parts

16
QtyValueFootprintReferences
7R_Small_USResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1, R2, R3, R4, R5, R6, R7
5KeyswitchScottoKeebs_MX:MX_PCB_1.00uS1, S2, S3, S4, S5
2RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mmSW1, SW2
1ESP32-DEVKITC-32DESP32-DEVKITC-32D:MODULE_ESP32-DEVKITC-32DU1
1OLED_128x64DM-OLED096-636:MODULE_DM-OLED096-636J1

Questions

How big is the Kasa Remote Controller Schematic PCB?

It measures 99 × 54.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Kasa Remote Controller Schematic use?

16 parts. 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 Kasa Remote Controller Schematic KiCad files?

From the justin-ham61/SmartBulbController repository on GitHub, at the commit this page was made from: the board is schematic/Kasa-Remote-Controller-Schematic.kicad_pcb and its schematic schematic/Kasa-Remote-Controller-Schematic.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Kasa Remote Controller Schematic design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers140.5 × 30 mmType e, the printed circuit board in 3D

    Type e

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    16 parts3kApache-2.0
  • 2 layers41.4 × 14.5 mmU2f zero, the printed circuit board in 3D

    U2f zero

    conorpp/u2f-zero

    U2F USB token optimized for physical security, affordability, and style

    16 parts2.4k
  • 2 layers122 × 37 mmV0-UmbilicalBoard, the printed circuit board in 3D

    V0-UmbilicalBoard

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    16 parts1.1kGPL-3.0
  • 2 layers152 × 57.6 mmVideoslotadapter, the printed circuit board in 3D

    Videoslotadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    16 parts1kGPL-3.0
  • 2 layers36 × 63.4 mmSmart ringfinal layout, the printed circuit board in 3D

    Smart ringfinal layout

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    16 parts915
  • 2 layers60 × 40 mmHASwitchPlate, the printed circuit board in 3D

    HASwitchPlate

    aderusha/HASwitchPlate

    LCD touchscreen for Home Automation

    16 parts738MIT
  • 2 layers21.1 × 26.9 mmDemo, the printed circuit board in 3D

    Demo

    easyw/kicadStepUpMod

    kicadStepUp: ECAD to MCAD FreeCAD WorkBench

    16 parts704