README.md (3738B)
1 This projects shows animations on a strip of WS281x LEDs wrapped 2 around a pipe. A Raspberry Pi Zero WH computes the animations 3 and provides a web interface. I got inspiration for this project from 4 stuff I saw in the Blinkenlights area at some Chaos Communication 5 Congress. 6 7 ## Hardware Setup 8 9 For this project, a WS281x LED strip is wrapped around a cylindrical 10 object creating a pillar of LEDs. The data line of the LED strip is 11 connected to ta Raspberry Pi Zero WH (see software configuration below 12 for setting the GPIO pin). In the video, a 5 m LED strip with 144 13 LEDs/m was wrapped around a drain pipe with 7 cm diameter, resulting 14 in a pillar height of approx. 26.5 cm. 15 16 WARNING: When running at full power, the pillar gets uncomfortably 17 warm. Therefore I chained a 5 A fuse into the power line. I strongly 18 recommend you do the same in your design in order to prevent your 19 construction from intentional or non-intentional overheating! 20 21 EXTRA WARNING: There seems to be a bug in the SPI part of the WS281x 22 driver. Even when set to low intensity, the driver may set all LEDs to 23 full power. This may result in a fire hazard. Seriously, chain a fuse 24 in the power line! 25 26 Due to the 5 A fuse, the whole system draws around 26 W max. Thus the 27 110 W power supply is ridiculously overpowered. When you rebuild the 28 system you may want to use a power supply with less power. 29 30 ## Software Setup 31 32 Clone the repository including submodules into your home directory: 33 34 `git clone --recurse-submodules https://git.frombelow.net/led_pillar.git` 35 36 Install required packages: 37 38 `apt-get -y install python3-flask` 39 `apt-get -y install python3-pip python3-rpi.gpio` 40 `apt-get -y install python3-pygame xvfb` 41 `pip3 install rpi_ws281x` 42 43 All configuration options are defined by variables at the top of 44 main.py. Since the LED strip wraps around the pillar, it may be tricky 45 to determine the correct width and length of the LED field. To find 46 the correct values, run the system with a reasonable guess and choose 47 animation "Test Pattern". Adjust the width and height parameters until 48 the animation approximates a vertical and a horizontal line. 49 50 Fire up the LED pillar manually with 51 52 `sudo FLASK_APP=main.py flask run --host=0.0.0.0` 53 54 To start it automatically, add 55 56 `cd /home/pi/led_pillar/; FLASK_APP=main.py nohup flask run --host=0.0.0.0 &` 57 58 to your `/etc/rc.local`. 59 60 The web interface is accessible at `http://localhost:5000/` 61 62 ## Printing a Case 63 64 Directory `case/` contains an OpenSCAD file for 3D printing a case for 65 the power supply and the Raspberry Pi. 66 67 ## BUGS 68 69 When connecting LED strip via SPI (Pin 10), some patterns turn the LED 70 strip on with full power. Do not use! Chain a 5 A fuse in the power line of 71 LED strip to prevent overheating! 72 73 ## Changelog 74 75 - v1.0 76 First public version. 77 78 ## Copyright and License 79 80 Copyright © 2015 David Barker for submodule PyIgnition 81 <https://github.com/animatinator/PyIgnition>. Gerd Beuster updated 82 PyIgnition for Python 3: <https://git.frombelow.net/PyIgnition/> 83 84 © 2021 Gerd Beuster <gerd@frombelow.net> for everything else. The 85 following applies to everything but PyIgnition: 86 87 This project is free soft- and hardware: you can redistribute it 88 and/or modify it under the terms of the GNU General Public License as 89 published by the Free Software Foundation, either version 3 of the 90 License, or (at your option) any later version. 91 92 This project is distributed in the hope that it will be useful, but 93 WITHOUT ANY WARRANTY; without even the implied warranty of 94 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 95 General Public License for more details. 96 97 You should have received a copy of the GNU General Public License 98 along with this project. If not, see <http://www.gnu.org/licenses/>.