Showing posts with label Falcon Pi. Show all posts
Showing posts with label Falcon Pi. Show all posts

Tuesday, January 12, 2016

Light Show Control Panel

My light show is ran from a Raspberry Pi, and I wanted to add the ability to start the show without using a WiFi enabled device. I picked up a few arcade buttons from Fry's Electronics, but you can easily find them on Amazon as well. I would have preferred to have a different color for each button, but Fry's only had the three colors. If you build one yourself, use different color buttons so you can tell a kid "Push the green button to start the show".

I didn't want to be tethered to the main controller box either, and because ethernet cables are already used everywhere else, I wanted to use the same type of cable so the control panel can be anywhere.



The box is made from Pine wood bought from the local hardware store. I used 1 1/2 wood screws for the main edges, and 1 1/4 wood screws for the wood pieces that holds the control panel itself. The panel is a recycled piece of 1/4 wood, with a thin piece of plexiglass on the top. DO NOT apply any pressure to the drill when making the holes on the plexiglass, other than the weight of the drill.

I had everything built, but only one button worked initially. After some research, I added the Pull Up Resisters (10k Ohm) to the RJ45 box so the Raspberry Pi could get a better reading on the switch position. The security key switch is used to interrupt the common ground to all of the switches, so I can disable the control panel if needed.


I used an old IDE cable to plug into the Raspberry Pi. The notch on the cable will face the CPU when plugged into the Raspberry Pi.

RJ45 box, so I can use Ethernet cabling between the controller box and the Control Panel.

Wiring for the buttons

Pull Up Resister diagram

RJ45 Box with the Pull Up Resister, and the Pin 1 with 3.3v going to the resister network I created.

Their are other ways of using the Pull Up Resisters, but I wanted minimal extra parts in the control box.  I had to grab pin 1 (3.3v) and connect that to a spider of resisters, each one connected to the GPIO wire. When the buttons are used, they will simply short the GPIO to Ground, which will drop the voltage on the GPIO pin.

The only disadvantage to this design, if the cable gets unplugged or plugged in, it can make the Raspberry Pi think you hit a button when you didn't. For this reason, I used the falling setting on the GPIO Input Settings, so I could start the show, and disable the panel without restarting the show.
Linking it all together. Get scripts from https://github.com/FalconChristmas/fpp-scripts
Download the scripts you want and upload them to the FPP. Then create "Events" to trigger the scripts.
Assign the events to the GPIO inputs

Monday, August 18, 2014

Raspberry Pi Install - SunFounder DS3231 RTC Real Time Clock

SunFounder DS3231 RTC Real Time Clock Module High Precision for Raspberry Pi Arduino R3 Mega 2560

SunFounders RTC Clock is cheap ($8.99) and easy to use, but the instructions are a little weird, especially of you are a beginner on Linux/Raspberry Pi/Arduino. Here are the steps I did to get this low cost RTC functional on my Raspberry Pi.






#De-Blacklist the RTC
sudo sed -i 's/blacklist i2c-bcm2708/#blacklist i2c-bcm2708/' /etc/modprobe.d/raspi-blacklist.conf

# Load the module now 
sudo modprobe i2c-bcm2708

# Notify Linux of the Dallas RTC device
sudo bash
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
exit

# Test whether Linux can see our RTC module. 
sudo hwclock

# Use to see if the RTC shows on the i2c bus
sudo i2cdetect -y -a

# Set the time on the RTC
sudo hwclock --systohc

# Update config to get time from RTC on boot
sudo nano /etc/rc.local
     # Add the following lines, before the "Exit"
     sudo modprobe i2c-bcm2708
     echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device          
     hwclock -s

# Check the RTC Vs Local Time (After a reboot)
sudo hwclock -r
date