Skip to the content
PCBKitNew board
2 layers88.9 × 46.2 mmLed controller, the printed circuit board in 3D

Led controller

cruzsbrian/aurora3

An addressable LED controller with graphical interface, audio input, and patterns programmed on an SD card.

Size
88.9 × 46.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
84
Nets
57
Pads
210
Tracks, vias
300, 184
Pours
2
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
16 Jun 2022
Updated
21 Jul 2024

Overview

Led controller is an open-source printed circuit board by cruzsbrian, from the cruzsbrian/aurora repository on GitHub. It is a 2-layer board of 88.9 × 46.2 mm with 84 parts on 57 nets, routed with 300 tracks and 184 vias.

It is built around the 74HCT245PW, CL-SB-13A-01T and CMA-4544PF-W, with the SJ-3524-SMT-TR among its other parts. Its parts include 22 resistors, 13 capacitors, 10 connectors, 4 ICs and 2 switches. It belongs with the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

4

README

README.md

Aurora

Aurora is an addressable LED controller with a graphical interface, audio input, and patterns programmed on an SD card. It controls up to 8 WS2811-style LED strips in parallel. A microphone and audio jack can be used for music visualization. LED patterns are programmed in Lua and can be modified without rebooting by replacing the SD card.

Interactive PCB BOM viewer

Configuring LED Strips

aurora_sw/src/lights.h contains configuration for the number of strips and their lengths and directions.

N_STRIPS is the total number of strips (starting from the top connector).
LEDS_PER_STRIP the maximum number of LEDs on a single strip.
N_LEDS is the total number of LEDs (the sum of all the strip lengths, less than or equal to N_STRIPS * LEDS_PER_STRIP).
n_leds[N_STRIPS] is an array of the strip lengths.
led_dirs[N_STRIPS] is an array of the strip directions. 1 indicates the strip should start from its first LED, -1 indicates it should start from its last LED.

Writing Patterns

When an SD card is inserted, Aurora interprets each Lua file in its root directory as a pattern. The title of a pattern is its filename, minus the .lua extension.

Every pattern must define an update() function to display one frame of its animation, which will be called at 50 Hz.

Patterns can set LED colors with the setRGB(i, r, g, b) and setHSV(i, h, s, v) functions, where i is the index of the LED (starting at 1 to follow the Lua convention) and the other parameters specify the color (all values ranging from 0 to 1). Patterns can also inspect the current color of an LED with getRGB(i), which returns the red, green, and blue values from 0 to 1.

Calling print(arg1, arg2, ...) from Lua prints to the serial console.

A pattern can specify any number of "parameters" for itself, which appear as sliders in the UI, with add_param(name, min, max, step, default), where name is a string, and max, min, step, default are floating point numbers. The parameter will then be available as a global variable in the Lua environment for that pattern (so name must be a valid Lua variable name).

Here is an example pattern which displays a rainbow repeated a configurable number of times (set by cycles) moving at a configurable speed:

Lua
add_param("speed", 0, 1, 0.05, 0.15)
add_param("cycles", 1, 10, 1, 1)

start = 0

function update()
    for i=1,N_LEDS do
        -- Calculate hue based on LED position, rainbow start position, and number of cycles.
        h = ((i - start) * cycles / N_LEDS) % 1
        
        -- Set LED to calculated hue, full saturation, 25% brightness.
        setHSV(i, h, 1, 0.25)
    end

    start = start + speed
end

Compile / Upload:

Site Customization: :

Although you can run the Aurora firmware as-is, you will probably want to go in and customize the LED settings to match the specific layout of your installation. This customization is done in the aurora_sw/src/lights.h file as follows. Examples are included for a few different possible configurations.

Important Parameters:

  • LED_BRIGHTNESS: How bright should "full" brightness be. Higher values will provide more light and color depth, but will also increase current use and may introduce color aberration on longer strips when many LEDs are lit. A default value of 100 will work in most environments.
  • N_STRIPS: How many different led strips there are. In this context a strip is defined as a group of LEDs which all share one signal line.
  • LEDS_PER_STRIP: The maximum number of LEDs on any one strip.
  • N_LEDS: The total number of LEDs, this should be the sum of "n_leds".
  • n_leds: How many LEDs there are in each strip. For custom installations it may be nessary to count, or to upload debug patterns to precisely determine this number. Incorrect values with result in lost pixels.
  • led_dirs: Which direction each strip runs relative to the direction of signal. You can pick either clockwise or counter-clockwise as the logic direction, but it must remain consistent to prevent animation jumps. Clockwise is a good default.

Windows Setup:

Write-up Coming Soon!

Linux Setup:

The Linux install instructions assume that you have Version 1.x.x of the Arduino IDE installed, along with teensyduino which is used to upload code to the Teensy. Instructions for installing teensyduino (and links to arduino installers) can be found here: https://www.pjrc.com/teensy/teensyduino.html. It is definitely worth checking that your install works by uploading one of the teensy example scripts before proceeding.

Setting up the build environment is pretty straightforward, but it does involve mucking around in the arduino libraries folder. If you have any questions definitely feel free to reach out.

Using the arduino IDE Install: (Sketch -> Include Library -> Manage Libraries...)

  • SD
  • TFT_eSPI
  • lvgl
  • arduinoFFT (for debugging, optional)

Navigate to your a libraries folder (likely /home/[name]/Arduino/libraries) and clone the arduinoLua repo.

Now copy the lv_conf.h file from /aurora_sw/src/ to the top level of your Arduino libraries folder. This configures the GUI generator.

In your arduino libraries folder, replace TFT_eSPI/User_Setup.h with the User_Setup.h file provided in aurora_sw/src/. This configures the pins and dimensions of the display itself.

Rename /aurora_sw/src/main.cpp to /aurora_sw/src/main.ino so that it will be detected by the Arduino IDE.

You can now open src.ino with the Arduino IDE.

Before uploading you will need to set the optimizer (tools -> optimize) to "Smallest Code".

You are now ready to upload!

Hardware Setup / Assembly:

Tips:

  • The MAX9814 is the board's most fiddly component, so if you are going to use the microphone, it pays to solder that first.
  • The fft_debug script can be used to check if the audio components are correctly installed. To use it install the script, and then play tones from your phone. The tones played and the tones reported on the serial monitor should match to within 1hz or so over 200hz - 4000hz.

Parts

84
QtyValueFootprintReferences
8100Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR13, R14, R15, R16, R17, R18, R19, R20
8Conn_01x03Connector_JST:JST_PH_S3B-PH-K_1x03_P2.00mm_HorizontalJ3, J4, J5, J6, J7, J8, J9, J10
8G***kibuzzard-62AD6AECkibuzzard-62AD6AEC, kibuzzard-62AD6AEC1, kibuzzard-62AD6AEC2, kibuzzard-62AD6AEC3, kibuzzard-62AD6AEC4, kibuzzard-62AD6AEC5, kibuzzard-62AD6AEC6, kibuzzard-62AD6AEC7
8G***kibuzzard-62AD6B04kibuzzard-62AD6B1, kibuzzard-62AD6B2, kibuzzard-62AD6B3, kibuzzard-62AD6B04, kibuzzard-62AD6B4, kibuzzard-62AD6B5, kibuzzard-62AD6B6, kibuzzard-62AD6B7
7100kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2, R4, R5, R6, R7, R22
410kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR9, R10, R11, R12
410uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C3, C13
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_ISO14580_PadH1, H2, H3, H4
20.47uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4, C5
210nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC9, C10
247nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC7, C8
10.1uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC11
1150kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR21
11MResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR8
11uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC12
12.2kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3
12.2uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6
174HCT245PWPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU2
1Adafruit_TFT_1in3_ST7789displays:Adafruit_TFT_1in3_ST7789U4
1CL-SB-13A-01TSP3T-CL-SB-13A-01T:CL-SB-13A-01TSW2
1CMA-4544PF-WCMA-4544PF-W:MIC_CMA-4544PF-WMK1
1G***kibuzzard-62AD6C16kibuzzard-62AD6C16
1G***kibuzzard-62AD6C27kibuzzard-62AD6C27
1G***kibuzzard-62AD66A7kibuzzard-62AD66A7
1G***kibuzzard-62AD6BA8kibuzzard-62AD6BA8
1G***kibuzzard-62AD6BC2kibuzzard-62AD6BC2
1G***kibuzzard-62AD5F1Dkibuzzard-62AD5F1D
1G***kibuzzard-62AD6C4Ckibuzzard-62AD6C4C
1G***kibuzzard-62AD66B6kibuzzard-62AD66B6
1G***kibuzzard-62AD5F34kibuzzard-62AD5F34
1G***kibuzzard-62AD6C38kibuzzard-62AD6C38
1G***kibuzzard-62AD6B13kibuzzard-62AD6B13
1G***kibuzzard-62AD6C62kibuzzard-62AD6C62
1MAX9814Package_DFN_QFN:TDFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm_ThermalViasU1
1RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW1
1SJ-3524-SMTSJ-3524-SMT:CUI_SJ-3524-SMTJ2
1Screw_Terminal_01x02terminal_block:TerminalBlock_Molex_393570002_1x02_P3.50mm_HorizontalJ1
1Teensy4.0teensy_library:Teensy40U3

Questions

How big is the Led controller PCB?

It measures 88.9 × 46.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Led controller use?

84 parts, built around the 74HCT245PW, CL-SB-13A-01T, CMA-4544PF-W and SJ-3524-SMT-TR. 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 Led controller KiCad files?

From the cruzsbrian/aurora repository on GitHub, at the commit this page was made from: the board is aurora_hw/led_controller.kicad_pcb and its schematic aurora_hw/led_controller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Led controller design in my own project?

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

More from cruzsbrian/aurora

1
  • 2 layers88.9 × 46.2 mmLed controller rounded, the printed circuit board in 3D

    Led controller rounded

    cruzsbrian/aurora

    An addressable LED controller with graphical interface, audio input, and patterns programmed on an SD card.

    83 parts3

Similar boards

  • 2 layers17.7 × 13.8 mmDebugger adapter, the printed circuit board in 3D

    Debugger adapter

    mdrobot7/debugger-adapters

    Aliexpress STLINKv2 debugger to standard connector adapters

    3 partsGPL-3.0
  • 4 layers74.2 × 42.7 mmRAM128, the printed circuit board in 3D

    RAM128

    garrettsworkshop/RAM128

    128 kB Saturn 128k-compatible RAM expansion card for Apple II

    57 parts22
  • 2 layers101 × 55 mmKCNC GRBL SHIELD PCB, the printed circuit board in 3D

    KCNC GRBL SHIELD PCB

    jdelahayes/KCNC-GRBL_SHIELD_PCB

    Ceci est un shield GRBL pour Arduino Uno adapté à la R-CNC (makerfr.com).

    60 parts1MIT
  • 4 layers96.7 × 114.1 mmBrucon hardware, the printed circuit board in 3D

    Brucon hardware

    jorisplusplus/brucon

    brucon badge

    702 parts
  • 2 layers71.4 × 138.1 mmMgBoard, the printed circuit board in 3D

    MgBoard

    periodboards/Magnesium

    A crappy 14 button macropad, 2 of which are rotary encoders

    116 parts
  • 4 layers60.5 × 60 mmBusPirate-5-rev10, the printed circuit board in 3D

    BusPirate-5-rev10

    DangerousPrototypes/BusPirate5-hardware

    Bus Pirate Hardware and accessories for v5 and higher

    220 parts125MIT
  • 2 layers100 × 100 mmMod1base mod1base, the printed circuit board in 3D

    Mod1base mod1base

    PCBench/PCBench

    resolution = [0.5, 0.5] pcbfolder = '../PCBs/' pcbnames = ["1Bitsy1bitsy"] iters = 30 env = PCBRoutingEnv(resolution=resolution, pcbfolder=pcbfolder, pcbnames=pcbnames) obs, info = env.reset() for in range(iters): act =…

    187 parts21MIT
  • 2 layers113.4 × 65 mmRt hw v1, the printed circuit board in 3D

    Rt hw v1

    ahsanu123/crumbs

    🍪 Crumbs - Collection of my DIY Electronic Module

    83 partsMIT