Introduction: Raspberry Pi LightshowPi
In this instructable I am creating a Christmas display using a version of the LightshowPi loaded on a Raspberry Pi 3, 8 channel SSR, 4 outlets, and various wires. Video posted is a sample of what I did last year. If you like this instructable, vote for in the Raspberry Pi contest.
Step 1: List of Material:
- Raspberry Pi 3(any newer version works)
- 16GB or bigger micro memory card
- Hdmi Cable
- laptop or other computer to program the memory card
- 8 channel solid state relay(SSR)
- 4 outlets
- 4 outlet gang box
- 4 drywall anchors
- 4 small screws
- RJ45 jacks
- Ethernet Cable
- Ethernet Cable ends
- electrical tape and heat shrink tubing
- various wires
- small flat head
- Wire cutters
- Wire strippers
- RJ45 crimp tool to make longer Ethernet cable
- Punch down
- Box cutter or scissors
- Soldering iron with solder
Step 2: Raspberry Pi
By using the laptop load the newest version of Raspbian, there are many instructables and literature out there to load the memory card
On the Raspberry Pi plug in the monitor with the HDMI, mouse and keyboard
After Raspbian image has been loaded on the card, place it in the memory card slot on the Pi and plug in adequate power supply, turn on monitor if it is not.
Wait for it to boot up, after booting connect to Wi-Fi and will be installing LightshowPi.
To install Lightshow Pi, go to www.lightshowpi.org and click on Getting Started Guide under New User. The guide will instruct on how to load it on the Pi, I have put the steps below and if any confusion can relate to the website.
- open the terminal window type sudo su which is the root and will not have to type sudo before everything that requires sudo
- git clone https://firstname.lastname@example.org/togiles/lightshowpi.git
- cd lightshowpi
- git fetch && git checkout master
- ./install.sh (if did not use the sudo su, you will have to put sudo in front of the ./install.sh)
- reboot( again if did not use sudo su, need to put sudo in front of reboot)
- open the terminal window again and type sudo su
- cd lightshowpi
- python py/hardware_controller.py --state=flash(if did not use sudo su will need to put sudo in front of python)
- this is a test to see if the program loaded correctly
The following are things I have done by reading from the website
- in the terminal window and still in the lightshow directory
- cd config
- cp default.cfg overrides.cfg
- this command copies the default.cfg and paste in the same folder and changes name to overrides.cfg
- when making configuration changes use the overrides.cfg
- opens the override.cfg and can scroll through and change configurations.
- ctrl+O saves the changes
- ctrl+X closes the overrides.cfg
- to create a playlist create a folder in music folder
- can either use the terminal window or use the gui interface
- in the terminal window
- sudo su
- cd lightshowpi/music
- mkdir christmas
- will create a new folder
- move music into this folder
- cd ..
- this command will take you the previous folder
- cd tools
- python playlist_generator.py(use sudo in front of python if did not use the sudo su command)
- will ask for the full path to the folder of songs
- for example: /home/pi/lightshowpi/music/christmas
- then cd ..
- cd config
- nano overrides.cfg
- scroll down to where you see playlist_path = $SYNCHRONIZED_LIGHTS_HOME/music/sample/.playlist
- change the sample to christmas
- Ctrl+O to save
- Ctrl+x to exit
- stop_music_and_lights stops it
To be able to play music from a streaming source; in the website there is a link you can follow on how to play music.
For more customization and info can visit lightshowpi.org or the google community, there is a link to the community on the front of the website.
Step 3: Hardware
Starting with the 4 gang outlet box break 3 tabs (picture)
Take an outlet and on the bronze side is a tab that connects the 2 outlets together, with pliers break the tab to have 2 individual outlets,do this to the 3 remaining outlets, don't have to break the silver side.
With the outlet, take a piece of wire I used 14 gauge, and attach one wire to the bronze screw. Take another piece of wire and attach to the other bronze screw. Do that to the other 7 outlets, should have 8 wires total.
Then with another piece of wire cut 4 proximate equal lengths to basically daisy chain the neutrals (silver screws). Then on the last silver screw cut a piece of wire longer to hook up on neutral side of the plug .
Do the same with ground as you did with neutrals.
Take 4 of the hot (bronze screw side) wires and place through one of the broken tabs. With the 4 remaining wires, place through another broken tab. Then on the neutral wire and the ground wire stick through on the last broken tab.
With a phillps screwdriver or a square head screwdriver screw the outlets in the box
Now with the wires poking through the broken tab. Connect each of the hot wire to the SSR with a small flathead screwdriver. For example, all the top row of the outlets are odd and all the bottom outlets are even. With number one outlet being the top left, connect it to channel one on the ssr. Number two outlet being the bottom left, connect to channel two, and so fourth until all the wires are connected.
With the neutral, ground, and the hot coming from the relay board either put an plug end on like I did or add a wire with a plug on.
After the wires are connected, mount the SSR board to the back of the box. By taking a box cutter or pair of scissors and cutting drywall anchors in half to use as standoff. Place the standoffs where the mounting holes are and mount with small screws.
Step 4: Hardware Continued
On to the control side of the SSR:
- using a piece of Ethernet cable connect the wire as follow:
- Channel one connect white with orange strip
- Channel two connect solid orange
- Channel three connect white with green wire
- Channel four connect solid blue
- Channel five connect white with blue strip
- Channel six connect solid green
- Channel seven connect white with brown strip
- Channel eight connect solid brown
- With about a foot long piece of Ethernet cable connect an Rj45 jack using same as before
- On the other end of the cable with the jack strip the jacket with wire strippers, then strip each of the 8 individual wires about 1/4" and solder breadboard wires that has the female end to beable to connect to the Raspberry Pi.
- Make or find a various length Ethernet cable when making make sure use the T-568B protocol
Since this relay board is a 5vdc; connect a suitable 5vdc power supply to VCC(positive) and GND(negative).
The Raspberry Pi and the relay board has to share a ground, this can be done numerous of way. The way I did this was by using a modified computer power supply.
Step 5: Putting All Together
With the Raspberry Pi you would want to use the Wiringpi pin out
- With the female breadboard jumpers whatever color you used to solder the Ethernet cable you would want to connect to the WiringPi pin on the Raspberry Pi as follows:
- White with orange strip connect to 0 which is physical pin 11
- Solid orange connect to 1 which is physical pin 12
- White with green strip connect to 2 which is physical pin 13
- Solid blue connect to 3 which is physical pin 15
- White with blue strip connect to 4 which is physical pin 16
- Solid green connect to 5 which is physical pin 18
- White with brown strip connect to 6 which is physical pin 22
- Solid brown connect to 7 which is physical pin 7
- Connect 5v power to the relay board and plug the raspberry pi in(if already haven't) and power up the pi.
- Run the LightshowPi Program.
- On the relay board you can watch the led dance to the music.
- Plug in the relay board to power the outlets.
- Plug in Christmas lights and watch them move to the music.
Thanks for viewing this instructable.
russm313 made it!