Led Pillar: An LED covered pillar showing animations
This projects shows animations on a strip of WS281x LEDs wrapped around a pipe. A Raspberry Pi Zero WH computes the animations and provides a web interface. I got inspiration for this project from stuff I saw in the Blinkenlights area at some Chaos Communication Congress.
Here is a video showing three effects. The first effect shows flowing colors. The second effect, starting at 01:17, shows a fire in blue and green. The last effect, starting at 02:42 shows a good old cellular-automaton. Apologies for the poor quality; the camera of my mobile phone cannot do any better. In reality, the effects look a lot better.
For this project, a WS281x LED strip is wrapped around a cylindrical object creating a pillar of LEDs. The data line of the LED strip is connected to ta Raspberry Pi Zero WH (see software configuration below for setting the GPIO pin). In the video, a 5 m LED strip with 144 LEDs/m was wrapped around a drain pipe with 7 cm diameter, resulting in a pillar height of approx. 26.5 cm.
WARNING: When running at full power, the pillar gets uncomfortably warm. Therefore I chained a 5 A fuse into the power line. I strongly recommend you do the same in your design in order to prevent your construction from intentional or non-intentional overheating!
EXTRA WARNING: There seems to be a bug in the SPI part of the WS281x driver. Even when set to low intensity, the driver may set all LEDs to full power. This may result in a fire hazard. Seriously, chain a fuse in the power line!
Due to the 5 A fuse, the whole system draws around 26 W max. Thus the 110 W power supply is ridiculously overpowered. When you rebuild the system you may want to use a power supply with less power.
Clone the repository including submodules into your home directory:
git clone --recurse-submodules https://git.frombelow.net/led_pillar.git
Install required packages:
apt-get -y install python3-flask
apt-get -y install python3-pip python3-rpi.gpio
apt-get -y install python3-pygame xvfb
pip3 install rpi_ws281x
All configuration options are defined by variables at the top of main.py. Since the LED strip wraps around the pillar, it may be tricky to determine the correct width and length of the LED field. To find the correct values, run the system with a reasonable guess and choose animation “Test Pattern”. Adjust the width and height parameters until the animation approximates a vertical and a horizontal line.
Fire up the LED pillar manually with
sudo FLASK_APP=main.py flask run --host=0.0.0.0
To start it automatically, add
cd /home/pi/led_pillar/; FLASK_APP=main.py nohup flask run --host=0.0.0.0 &
The web interface is accessible at
Printing a Case
case/ contains an OpenSCAD file for 3D printing a case for
the power supply and the Raspberry Pi.
When connecting LED strip via SPI (Pin 10), some patterns turn the LED strip on with full power. Do not use! Chain a 5 A fuse in the power line of LED strip to prevent overheating!
First public version.
Copyright and License
© 2021 Gerd Beuster email@example.com for everything else. The following applies to everything but PyIgnition:
This project is free soft- and hardware: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This project is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this project. If not, see http://www.gnu.org/licenses/.