Skip to the content
2 layers15.2 × 15.2 mmRGB-5050-2, the printed circuit board in 3D

RGB-5050-2

jedp/RGB-5050-2

Chainable board for mounting RBG-5050 LEDs

Size
15.2 × 15.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
6
Nets
4
Pads
18
Tracks, vias
39, 0
Pours
5
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
29 Aug 2022
Updated
2 Jan 2024

Overview

RGB-5050-2 is an open-source printed circuit board by jedp, from the jedp/RGB-5050-2 repository on GitHub. It is a 2-layer board of 15.2 × 15.2 mm with 6 parts on 4 nets, routed with 39 tracks and 0 vias.

Its parts include 4 connectors and 1 capacitor. It belongs with the lEDs and displays boards of this library.

README

README.md

Yet Another RGB5050 Mount

A chainable board for mounting addressable RGB 5050 LEDs to things.

PCB Image

BOM

  • 5050 LED
  • 0.1μF 0805 ceramic capacitor

Bit-banging

These high-speed LEDs deal in ones and zeros at microsecond speed. One way to get this kind of speed out of an STM32 without tying up the CPU and/or writing a lot of custom assembly is to use SPI to transmit the data, possibly using DMA to send the data to SPI.

The RGB5050 encodes 0 and 1 values as high/low transitions like so:

text
0 -> 0.3µs high ± 0.15µs, 0.9µs low ± 0.15µs
1 -> 0.6µs high ± 0.15µs, 0.6µs low ± 0.15µs

My first attempt was to try a transfer rate of 2.5Mbps, since this would require the minimum number of encoded output bits (0 -> 0b100, 1 -> 0b110). This is obviously out of spec for the timings. It was worth a go, bit it didn't work reliably.

Bumping the transfer rate to 5Mbps doubles the number of bits required, but has the benefit of actually working:

text
0 -> 0b100000 (0.2µs high, 1.0µs low)
1 -> 0b111000 (0.6µs high, 0.6µs low)

To implement this, one could iterate over each source byte of and do some fancy bit arithmetic for every single byte (see previous commit), or one could follow the advice of the mighty Ross Glashan and just use a lookup table, since there are only 16 possible encodings of each nibble.

For example:

text
static uint32_t color_nibbles[16] = {
		0x820820, // 0b0000 -> 0b100000100000100000100000
		0x820838, // 0b0001 -> 0b100000100000100000111000
		0x820e20, // 0b0010 -> 0b100000100000111000100000
		0x820e38, // etc.
		0x838820,
		0x838838,
		0x838e20,
		0x838e38,
		0xe20820,
		0xe20838,
		0xe20e20,
		0xe20e38,
		0xe38820,
		0xe38838,
		0xe38e20,
		0xe38e38, // 0b1111 -> 0b111000111000111000111000
};

/*
 * Convert the pixel represented by (r, g, b), using the scheme described
 * at the head of this file, and pack it into buf in RGB 5050 order:
 * G, R, B; MSB first.
 */

So you could set a region of a buffer like this:

text
RGB5050_pixel_write(0xAB, 0xCD, 0xEF, (uint8_t*) (some_buffer + 18 * offset));

And then transmit that buffer over SPI:

text
HAL_SPI_Transmit(&hspi1, (uint8_t*) some_buffer, sizeof(some_buffer), 1);

After transmission, leave a reset cycle of at least 80µs before transmitting again.

Parts

6
QtyValueFootprintReferences
4Conn_01x03_FemaleConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ1, J2, J3, J4
10.1uFCapacitor_SMD:C_0805_2012MetricC1
1Inolux_IN-PI554FCHLED_SMD:LED_Inolux_IN-PI554FCH_PLCC4_5.0x5.0mm_P3.2mmRGB_1

Similar boards

  • 2 layers18.5 × 11.1 mmSwitch, the printed circuit board in 3D

    Switch

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    6 parts4.3kMIT
  • 2 layers14.6 × 33 mmBrain board SD Card 1, the printed circuit board in 3D

    Brain board SD Card 1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    6 parts1.2k
  • 2 layers9 × 9 mmDpoint, the printed circuit board in 3D

    Dpoint

    Jcparkyn/dpoint

    Open-source digital stylus using camera tracking and inertial measurements

    6 parts1.1kMIT
  • 2 layers51.5 × 16.6 mmMicroswitchXY Endstop, the printed circuit board in 3D

    MicroswitchXY Endstop

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    6 parts1.1kGPL-3.0
  • 2 layers21.9 × 76.7 mmAmiga External, the printed circuit board in 3D

    Amiga External

    hoglet67/RGBtoHDMI

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

    6 parts1kGPL-3.0
  • 2 layers88.9 × 50.8 mmBusinesscard, the printed circuit board in 3D

    Businesscard

    hackclub/OnBoard

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

    6 parts915
  • 2 layers20.3 × 15.2 mmL0 RGB led, the printed circuit board in 3D

    L0 RGB led

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    6 parts546MIT
  • 2 layers9 × 3.6 mmOpticalEncoder, the printed circuit board in 3D

    OpticalEncoder

    adamb314/ServoProject

    Getting the most out of your hobby servo

    6 parts545

Questions

How big is the RGB-5050-2 PCB?

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

What parts does the RGB-5050-2 use?

6 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 RGB-5050-2 KiCad files?

From the jedp/RGB-5050-2 repository on GitHub, at the commit this page was made from: the board is kicad/RGB_5050.2.kicad_pcb and its schematic kicad/RGB_5050.2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the RGB-5050-2 design in my own project?

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