Friday, November 30, 2012

Introducing LightingPi




As a companion to my pixelPi software and I've started work on an output device which works with OLA (Open Lighting Architecture).  This allows the Raspberry Pi to be use to control; servos; dimmers; relays and pixels (via pixelPi) all controlled over standardized lighting/prop control protocols supported by OLA.  This would essentially be a configurable node which drives hardware and can be controlled with Artnet; E1.31; ESP Net; Pathport; Sandnet; Shownet.

https://github.com/LightingPi/lightingPi

Features:

  • Control strings of LED pixels with a raspberry Pi
  • Control strings of analog RGB LED strings (up to 16 channels per PWM board)
  • Control Incandessent lighting via SSR boards (work in progress)
  • Control servo position
  • Control of all fixtures provided over all major lighting protocols Artnet / E1.31/ OSC ...via OLA

Overview:

DMX based protocols are quite flexible.  The LightingPi software is a client which allows control of a large variety of light fixtures attached to the Raspberry Pi



Hardware:

(1) RaspberryPi
(2) PWM Hardware (Needed for Analog RGB Pixels and Servos)
(3) Something to play with (Servo motor; LED strips; LED pixels, SSRs)

Wiring Diagram:


No rocket science here:
Dimmer and RGB analog control provided by an I2C PWM generator
Led Pixel support provided by SPI bus directly on the raspberry pi


RGB LED strings driven by passing the PWM output to FET drivers (in the form of "RGB String Amplifiers cheaply available from ebay)

Servos are directly driven from the PWM IC

SSRs for dimmers are directly driven from PWM IC

Software:

lightingPi:

Grab the latest version here: https://github.com/scottjgibson/lightingPi

Configuring the peripherals:

Have a look at config.ini; its pretty self explanitory

OLA:

Install via apt; sudo apt-get install ola





Tuesday, November 27, 2012

Sunday, October 28, 2012

PixelPi Update

So lots has been going on with PixelPi since my last update:


Rearchitecture:
I've forked (https://github.com/mostley/PixelPi) github fork into the PixelPi/PixelPi trunk.  It significantly changes the architecture of the project.  Now there is a simple controller.py file which simply receives pixel data (currently raw (pixel invaders) type;

DMX/Artnet/OLA Support:
 I have added on proper IP protocol support using OLA Open Lighting Architecture.  This allows support of standardized lighting protocols and allow you to control your pictures from many more applications.

There is now a shim layer which interfaces the output of OLA to the pixels; I'm still learning about the OLA package; its quite impressive and I think it will suite these needs perfectly.

Pixel Grouping:
I've added support for grouping pixels so they can be controlled with a single group of RGB DMX data.


Getting organized:
So right now the new pixel pi implementation is missing much of the test mode stuff in the original.  I'll be adding it over time.


Issues and contributions:
I've added an issues page to  the PixelPi github page; please feel free to make a new issue for any changes, bugs, enhancements.

Thursday, August 16, 2012

Raspberry Pi and the WS2801



Update (October 29th):
Big update here:
http://thegreatgeekery.blogspot.ca/2012/10/pixelpi-update.html

Update (August 19th):
 - Pixel Invaders support provided in the 1.3.0-Beta4 release of pixel controller (Here: https://github.com/neophob/PixelController/downloads)
- Tested and working with the latest checked in version of PixelPi
- Run it like this: " sudo python pixelpi.py --chip WS2801 --mode all_off "
- It works by sending the pixel data to the pixelPi software using a UDP network connection.  So in pixelcontroller you must setup a UDP output device with the IP set to the IP address of your Raspberry Pi board  (Keep the port set at 6803)
- The PixelPi software receives the packet and sets the pixels accordingly.

Update (august 17th):
- Just added preliminary support for pixel invaders; Neophob (from http://www.pixelinvaders.ch) just added UDP support so the pixelcontroller software can talk to the Raspberry Pi (https://github.com/neophob/PixelController/issues/23)  Its still a work in progress but should be functional(ish)


What it does so far:
- Supports POV LED Strip (Like the original Adafruit Software)
- Now Support matrix displays (2D Panels)
- Added some test modes (fade and chase modes)
- Supports pixel remapping (by using a CSV file with the location of your pixels in the array)
- Adjustable refresh rate / chase rate
- All options selectable by command line args (no python tweaking required (hopefully))
 
What's up next.
 - panning on large images across the pixel array.  Ideally I was thinking it would be cool to pass in some images from vgamaps.com and have it pan around them.
- animation support (maybe animated GIF)
- TCP/IP support (support sending display data from another PC)





Installation:

Grab the python file:
git clone git://github.com/scottjgibson/PixelPi.git

Install Python Image library:
sudo aptitude install python-imaging-tk

UsageL
pi@raspberrypi ~/git/PixelPi $ sudo python pixelpi.py  --help
usage: pixelpi.py [-h] [-v] [--chip {WS2801,LDP8806}] --filename FILENAME
                  --mode {strip,array,fade,chase} [--verbose]
                  [--array_width ARRAY_WIDTH] [--array_height ARRAY_HEIGHT]
                  [--spi_dev SPI_DEV_NAME] [--refresh_rate REFRESH_RATE]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --chip {WS2801,LDP8806}
                        Specify chip type LDP8806 or WS2801
  --filename FILENAME   Specify the image file eg: hello.png
  --mode {strip,array,fade,chase}
                        Choose the display mode, either POV strip or 2D array,
                        color, chase
  --verbose             enable verbose mode
  --array_width ARRAY_WIDTH
                        Set the X dimension of your pixel array (width)
  --array_height ARRAY_HEIGHT
                        Set the Y dimension of your pixel array (height)
  --spi_dev SPI_DEV_NAME
                        Set the SPI device descriptor
  --refresh_rate REFRESH_RATE
                        Set the refresh rate in ms (default 500ms)


Test with a fade:
sudo python pixelpi.py  --chip WS2801 --mode fade --refresh_rate 1

Test with a chase:
sudo python pixelpi.py  --chip WS2801 --mode chase--refresh_rate 1

Display an image (POV mode):
sudo python pixelpi.py  --chip WS2801 --mode strip --filename test.png --refresh_rate 1

Display an image (Array mode):
sudo python pixelpi.py  --chip WS2801 --mode array --filename test.png --refresh_rate 1


Wire up the RGB LED string:
I did something similar to this:
http://learn.adafruit.com/light-painting-with-raspberry-pi/hardware

My starting point:
http://learn.adafruit.com/light-painting-with-raspberry-pi/software