Close

Light output

A project log for Sound and Light Show

Demonstrates control of LED strips and synchronises with music

keithKeith 08/06/2024 at 15:420 Comments

Programmable LED strips provide a large array of lights for very few control pins.

There are two common serial buses used; SPI (two wires) and PWM (one wire).

The latter are simpler and cheaper to make, so most LED strips are this type.

Choices of LED strip

Voltage

Individual LEDs need less than 5V forward voltage so 5V is used for individually programmable LED strips.

The higher-voltage strips (12V or 24V)  wire LEDs in series so that each RGB controller chip drives multiple LEDs.

The benefit is higher light power for the same current.

The downside is that the LEDs are controlled in groups, rather than individually.

I wanted individual RGB LED control, so a 5V PSU was needed.

Structure

Early LED light bulbs converted high-voltage mains to a lower voltage to drive a few LEDs in series. More recent LED light bulbs use many LEDs in series so they can be driven directly from rectified mains voltage. A 230 volt bulb would typically have four small sub-strips of 57.5 volts each. Some programmable strips use this technology but are programmable in multiples of sub-strip length, typically 10 cm.

I wanted individual RGB LED control, so a 5V PSU was needed.

Controller

I chose the Raspberry Pi.

Limitations

The Raspberry Pi uses its PWM audio pin to drive the one-wire bus, so it cannot drive it and PWM audio at the same time.

Tutorials

Connect and control WS2801 RGB LED strips (SPI)

Connect and control WS2812 RGB LED strips (PWM)

My R-Pi failed to install scons with this line:

sudo apt-get install gcc make build-essential python-dev git scons swig

I guessed it was an obsolete thing but it managed to install on my floor-top Linux PC.

SCons is a software build tool. I don't know why they did not just use 'make'.

Fortunately there seem to be many other examples so I shall try those.

I installed a more recent Raspbian OS on an SD card, then tried this one:

https://core-electronics.com.au/guides/fully-addressable-rgb-raspberry-pi/

This worked, after disabling sound in the boot config.txt file and running the demos as super user.

Discussions