Intro: Arduino + WiFi, Music Responsive LED Light Fixture
Parts and complete fixtures can be found at http://saikoled.com along with additional media of the fixtures in action at http://saikoled.com/applications/.
We have also implemented open-source, high quality tools to provide powerful features missing in other LED light fixtures. Due to the open source nature of our tools, we encourage individuals using the Saiko5 LED Light Fixture to share their projects back with the community.
- Open-source example python server for controlling the lights using a locally running Open Sound Control server.
- Open-source example python GUI for light control written using wxpython.
- Open-source code for use with the powerful music analysis system, PureData which allows for easy music analysis in realtime, and communication with a locally running python server over Open Sound Control.
What we'd be really excited to see come of this is to be able to sell these systems on a hobbyist website like Sparkfun Electronics. They also sell the Arduino system, which has many sensor modules. Imagine how awesome it would be to have this connected up to, I don't know, a geiger counter and a microphone so you can have it flash red when it detects radiation, and then flash blue once it hears screams. Or maybe just have it flash red and blue on a curtain if a video camera detects motion.
Okay, maybe those are stupid ideas. But that's sort of the point. As a designer, I may be good at designing hardware, or perhaps someone else is good at writing software, but any one person can only have so many ideas on their own. We'd be thrilled to see people buy these, come up with awesome new uses for them by integrating them into their own projects, and then publish the code so that we can build up our cumulative open-source expertise. I'd love to see the day where there are a dozen or even a hundred individual hobbyists who've done crazy cool stuff with this light (or others like it) and published it online to inspire the rest of us! So, in that spirit, please let us know if you are psyched about getting involved in participating! We have lots of ideas, but I'm sure many of you have way cooler ones than me =)
You can also check out media and information on the places where this system has been used as a part of the Saiko5 WiFi LED Light Fixture in the Installations and Applications section. So far, it's been made to work with Arduino, the amazing Leaf Labs Maple Board, a higher processing power hobbyist board designed to be pin compatible with the Arduino, and the folks at Leaf Labs managed to make their Maple Board as well as the Arduino control the Saiko5 WiFi LED Light Fixture using an entirely wireless interface by using the async_labs WiShield as a basis and then improving stability. Check out the Light Shield and Firmware for more information about those code improvements, as well as our custom board for WiFi and power control.
Brian Neltner, R.J. Ryan, and Perry Hung also wrote software that allows a user to take advantage of the aubio library, a sweet sound analysis suite usable in C, Python, PureData, and other languages for analyzing realtime or pre-recorded music and extracting relevant features from the sound such as the beats, transients, and other cool stuff! Check out the Software page for more information about the control software.
The resulting LED board has:
- 1000+ lumens of light output.
- High quality heat sinking with custom built, attractive enclosures.
- Protected from damage by acrylic covers.
- Focusing optics to produce spotlights of varying sizes.
- LED Module is controllable using a simple five wire interface.
- Utilizes high efficiency switching regulators for constant current through each color of LED.
- Uses Royal Blue (450nm) instead of regular Blue (470nm) to produce nicer magentas and deep blues.
Step 2: LED Board (i.e. Light Brick 5) - Circuit Design
The basic design is fundamentally very similar to the Ultraluminous Illuminator developed by Brian Neltner in 2007, except with the power supply integrated into the LED board, and without a controller of any kind. Instead, the Light Brick 5 is designed to be controlled through a 5 wire interface. 24VDC is applied to the positive terminal, GND is applied to the ground wire, and then three control wires are used to turn on each color of LED as desired using TTL level signals.
The Light Brick uses the same design for the power circuitry as the Ultraluminous Illuminator. A National Semiconductor LM3404 is used as the basis of the power circuitry with a buck converter in order to provide a constant 700mA regardles of input power voltage (18-36VDC). The board has three colors of LED -- red, green, and royal blue Rebel Luxeons from Philips Lumiled, with four of each color LED per board. Each control pin is pulled down to ground so that the device defaults to "off", and connected to a five pin connector for external control.
Next, more input protection is added to protect against user error in connecting the device. Between a fuse, eight input protection resistors, three zener diodes on the digital lines, a large 5W zener diode on the power input line, and a full bridge rectifier, it should be possible for the user to plug the wires in backwards, connect line voltage to the device briefly, have a noisy signal line, or other usually nasty errors without completely destroying the board. Of course, there will be a somewhat difficult SMT fuse to desolder and replace to repair the board in the event of catastrophic failure, but that's a good sight better than replacing all of the tiny and expensive chips!
These circuit diagrams are available under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Full design files, including eagle files, are available at http://saikoled.com. Permissions beyond the scope of this license may be available at http://saikoled.com/contact/.
Step 3: LED Board (i.e. Light Brick 5) - Board Layout
As you can see, the schematics are fairly simple, limiting the ways the device can fail. The LED board layout (below) is designed so that the royal blue and red LEDs are on opposite sides of the pattern with four green LEDs in the middle. This layout allows for the placement of every electrical trace on the PCB in a single layer, and by using only SMT components, the back of the board is entirely bare of electrical contacts.
The advantages of laying out the board with all the traces in a single layer are significant. The biggest benefit is that because the Rebel LEDs are electrically isolated at their heat sink, a single, continuous heat sink on the back of the board can very easily cool the LEDs. Secondarily, without electrically connected traces on the back of the board, there is no risk of short circuiting through the aluminum case the board is bolted into, eliminating the need for an electrically insulating but thermally conductive adhesive on the bottom of the board. The bottom of the board is shown below, where every visible hole (via) is grounded and connected to the LED heat sinks.
These board layouts are available under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Full design files, including eagle files, are available at http://saikoled.com. Permissions beyond the scope of this license may be available at http://saikoled.com/contact/.
Step 4: LED Board (i.e. Light Brick 5) - Board Assembly
For initial prototyping, a Weller hot air rework station was used to make sure that the LEDs were soldered without any residual stresses that could make the joints come loose over thermal cycling. This is done by first putting down a small amount of solder paste on the thermal pad and the two pins, and then heating the entire board up using a two-output air nozzle. A better small scale production method is to use a solder stencil along with a hot plate to reflow the entire board simultaneously, and this is what is actually used for our production. For an example of how to carry out hot plate reflow soldering, see the Extreme Surface Mount Soldering Instructable.
This also serves the purpose of "replacing" the LEDs into their correct seating on the board as surface tension from the melted solder pulls the part into position. It's actually a fascinating thing to watch as the LEDs "jump" into their correct, centered position (this is important for making them correctly placed for the optics!). The first step to this method of soldering is to place solder paste onto the board, either using a syringe, or a stencil.
Next, I placed all of the LEDs and other components using tweezers.
Finally, it's time to heat the board on a hotplate in order to reflow and replace the components.
The last step in board assembly is then to attach the optics -- in this case OPC1 style optics from Dialight. They're great! There are three tabs to guide it into the correct position (which is good so long as your LEDs are centered properly from reflow soldering them), and they are adhesively backed so that they stay in place. They also look quite snazzy, in my opinion. A very attractive board!
Step 5: LED Board (i.e. Light Brick 5) - Board Testing
To power it on, I attach 20VDC or so across power and ground, and then touch the control pins with 5VDC (current limited, just in case on the digital lines!). Below you can see me manually touching the control pins for the red, green, and blue channels one at a time.
The final device puts out around 1000 lumens of light, assuming 80% optical efficiency (i.e. 20% of the light is lost to the optics and LED inefficiencies). These particular optics focus the beam down to a 7 degree cone, and even from this wide angle that the photos are taken from (around 45 degrees), it's pretty obvious that you wouldn't want to look straight into this one! I turned it on full white, and was able to basically replace the light output of the 60W incandescent overhead light in my room!
Step 6: LED Board (i.e. Light Brick 5) - Bill of Materials
The Light Brick 5 Digikey Bill of Materials can be downloaded here. This document can be uploaded at Digikey in order to easily get all of the components required for assembling a Light Shield 7 of your own. This Bill of Materials does not include the Rebel Luxeon LEDs from Philips Lumileds which can be ordered through Future Lighting Solutions.
Step 7: WiFi Arduino Shield (i.e. Light Shield 7) - Intro
- High efficiency switching power supply to convert 24VDC to 7.5VDC for use by the Arduino or Maple board.
- 24VDC passthrough to a 5-pin header compatible with the Light Brick 5.
- 3.3VDC regulated voltage derived from Arduino/Maple power supplies for powering the Microchip MRF24WB0MB integrated WiFi Module.
- Open-source Firmware available for both Arduino and Maple based on the async_labs WiShield offering significant improvements to the stability of the UDP stack as well as integrating Open Sound Control (liblo) functionality for easily controlling any device over wifi.
- Passthrough connection from either the Arduino or the Maple PWM output pins to the inner three connectors on a 5-pin header along with 24VDC and GND. These pins can also be used as general IO, or for PWM output to other devices such as motor control systems.
Step 8: WiFi Arduino Shield (i.e. Light Shield 7) - Circuit and Board Design
The design of the Light Shield 7 is loosely based on the WiShield from async_labs. All design files can be downloaded from our website's Downloads page.
The Light Shield extends the WiShield by adding a high efficiency 7.5VDC switching voltage converter to allow the Arduino and Maple to be operated from a 24VDC supply as well as using the more up to date versions of the WiFi module including external antenna, as well as a 5-pin header with passthroughs for the 24VDC power supply and PWM pins from the Arduino/Maple. Last, it includes a barrel power input plug to allow for more robust connections and the use of UL approved external power supplies.
The onboard high efficiency switching regulator uses the LM2675-ADJ from National Semiconductor. This 7.5VDC supply is connected to the V+ pin on the Arduino/Maple board in order to provide power to the onboard 5V/3.3V regulator on the controller board. The 5VDC regulated voltage is then taken back onto the Light Shield and used to power a 3.3VDC low dropout linear regulator to power the Microchip MRF24WB0MB integrated WiFi Module. This module takes advantage of a u.fl connector and external FCC approved antenna combination to provide a way to easily communicate with the Arduino/Maple over WiFi even when the board is mounted inside of our metal boxes. Additionally, the Light Shield incorporates a fuse and protection diode to help protect against user error in connecting powering the board. For reference, the distances which the Arduino UNO power connector and USB connectors stick out of the supporting board are marked. The design is such that our power connector should stick out further than the Arduino UNO connector, and when used with our case the USB and Light Shield power connectors will be exposed while the Arduino power connector will be blocked to prevent confusion.
Circuit diagrams and Board layouts are released under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Based on a work at asynclabs.com. Permissions beyond the scope of this license may be available at http://saikoled.com/contact/. Full design files, including eagle files, are available at http://saikoled.com.
Step 9: WiFi Arduino Shield (i.e. Light Shield 7) - Board Assembly
A solder stencil is used to place a thin layer of unleaded solder paste on the boards. We found that reflow soldering was mandatory to achieve good reliability. Soldering by hand often resulted in overheating of pads, as well as poor solder joints for the WiFi module. For more information about how to do reflow soldering, see the Extreme Surface Mount Soldering Instructable. In our case, we placed solder paste using a solder stencil, placed our components, and then used a tabletop hot plate to simultaneously reflow all components.
After reflow, the through-hole components are soldered onto the board, with the final result looking like this:
Step 10: WiFi Arduino Shield (i.e. Light Shield 7) - Bill of Materials
The Light Shield 7 Digikey Bill of Materials can be downloaded here. This document can be uploaded at Digikey in order to easily get all of the components required for assembling a Light Shield 7 of your own. This Bill of Materials does not include parts ordered directly from Microchip -- the MRF24WB0MB and the associated antenna, the TRF1001.
Step 11: Saiko5 Assembly - Intro
- Light Brick 5 Fixture with Case
- Light Shield 7 Board with Case
- Arduino UNO Hobbyist Board
- CUI ETSA240170UDC-P5P-SZ 24VDC 40W Power Supply
- Screwdriver, such as the Craftsman Screwdriver Set, Ratcheting from Sears
Step 12: Saiko5 Assembly - Step 1: Install Arduino
First, collect the parts needed to attach the Arduino UNO to the back plate of the Light Shield 7 case. Use three black oxide spacers, and three standoffs placed into the machined 4-40 holes in the case. The spacer will result in the threading on the standoffs being just long enough to reach the other side of the 1/8" thick aluminum and are necessary to avoid the threads sticking out of the back of the case. Next, place the arduino on the standoffs and attach using a plastic washer to protect the board, and the included 4-40 screws. Leave the screws loose in order to allow assembly of the cover.
Step 13: Saiko5 Assembly - Step 2: Align Case and Install Light Shield 7
Slide the edge of the cover between the Arduino UNO and the side of the back face. The rectangular holes on the cover should line up with the USB port on the Arduino UNO. After sliding the cover on, use a screwdriver to tighten the two screws which are easily accessible, and hand tighten the more difficult to reach screw near the USB port. When we do this, we make sure to squeeze the board and back face together so that there is no tension working against tightening. After the screws are tight, plug in the Light Shield 7 with the fuse and barrel jack on the side facing the rectangular holes. Be sure that you plug the header into the Arduino UNO fully, and that no pins are missing the hole they are intended to be attached to.
After the Arduino UNO and Light Shield 7 are installed, the case can be easily closed. The grooves on the flanges will align, the grooves on the lip will line up with the holes in the cover, and the USB port and barrel jack should stick out of the rectangular holes.
Step 14: Saiko5 Assembly - Step 3: Attach the Antenna
First the antenna mounting parts need to be modified in order to adapt them for use with 1/8" aluminum. They were designed for 1/16" aluminum cases, so the snap-in clips are positioned incorrectly for mounting on our case. The antenna package contains two different mounting pieces, one with a hexagonal cross section and the other circular. We take the circular piece, and pry off the snap-in clips with tweezers. This leaves us with two snaps, antenna, and a mounting piece with two holes where the snaps used to be.
The modified antenna mounting piece is then slid into the large circular hole opposite the USB and barrel jack rectangular holes. The "lip" of the antenna mounting piece should be facing towards the closer edge so that when it is mounted the antenna is free to rotate in the correct orientation.
The mounting piece can be pushed easily into the 7/16" hole in the case. Because there are no longer snaps to prevent the piece from falling back out, we place a small dab of epoxy on the mountin piece on each side to hold it in place. Next, the antenna wire is strung through the mounting piece from the outside of the case to the inside of the case.
The antenna is snapped into place by pushing it through the mounting piece. It will snap into place and should not be easily pulled back through. After pushing the antenna into place, the antenna can be bent using the outside joint and rotated through 180 degrees centered straight "up" when mounted on a wall.
Step 15: Saiko5 Assembly - Step 4: Mounting the Flex Arm
After threading wires (not included) through the flex arm from Moffatt and the controller case, the flex arm is threaded into the 1/4" NPS threaded hole in the center of the front face of the controller case. After threading through the hole, the flex arm is held in place by using the included washer and hex nut.
Next, the five wires must be terminated with an appropriate connector such as a 5-pin TDC MTA100 style IDC connector. The part we use for this purpose is the 3-640440-5 from Tyco Electronics. However, the pin header is standard 0.1", so any 0.1" should fit the header. Use the header to connect the wires to the 5-pin header on the Light Shield 7.
Step 16: Saiko5 Assembly - Step 5: Final Controller Case Assembly
The antenna u.fl connector can be attached from the antenna wire to the WiFi module. This should snap into place, but is a little tricky. Next, the six 1/4" 6-32 black oxide machine screws are used to close the case. There is one screw that goes into the middle of each flange (from the flex arm side of the case in), and two screws that go into the lip of the back face into the side of the cover. We put these screws in loosely first in order to ensure good alignment, and then tighten down. For tightening, start with the screws on the flanges, and then do the screws on the lip to ensure that the case closes all of the way. Due to the manufacturing method used to form the cases (computer aided bending), there is some intrinsic error in the accuracy of the bends. To adjust for the tolerance issues intrinsic in the machining process, the screws are designed to be matched up with a groove instead of two holes so that there is more freedom to realign the parts to make them match nicely.
Step 17: Saiko5 Assembly - Step 6: Attach Light Brick 7 to Back Plate
The Light Brick 7 with case is assembled by first attaching the populated Light Brick 7 to the back plate and heat sink. This piece is made of anodized aluminum, and so has high thermal conductivity to help prevent the LEDs on the board from overheating and being damaged. Use of the Light Brick 7 board without a heat sink will result in frequent thermal cycling of the solder joints and the semiconductor die, which causes LED burn out, LED decreases in brightness, and as solder joints are cyclically stressed, can cause soldering failure. Attaching the Light Brick 7 to the back plate requires four 1/2" black machine screws, four plastic washers, and four nuts.
To attach the LED board, line up the holes on the Light Brick 7 board with the aluminum back plate, and push through the machine screws from the back plate side. Next, use one plastic washer, and one nut in order to secure the board to the back plate. The connection here must be quite tight in order to achieve adequate thermal conductivity and heat sinking.
Step 18: Saiko5 Assembly - Step 7: Attach Board and Back Plate to Flex Arm
Attach the newly attached board and back plate to the flex arm, which should not be already attached to the Light Shield 7 case and have wires (unterminated) exposed. Tighten the flex arm to the board using included plastic washer and 1/4" NPS washer.
After firmly attaching the flex arm to the back plate with attached LED board, terminate the wires using a IDC connector such as the MTA100 style connectors from Tyco Electronics mentioned above. This will plug into the exposed header on the LED board. In order to avoid seeing shadows from the wiring, try to run the wiring along the board underneath the lenses in order to take up any remaining slack. You can also do this connection before sealing up the controller case and pull the slack through the flex arm in the other direction.
Step 19: Saiko5 Assembly - Step 8: Attach to Protective Cylinder and Acrylic Face Plate.
Attach the cylinder to the back plate with four 1/2" 6-32 black screws. Again, the connection must be tight in order to ensure good thermal conductivity. The screws have a bit of room to compensate for tolerances in the roundness of the cylinder, so you should attempt to center the cylinder as well as possible to avoid a lip from the back plate sticking out over the edge of the cylinder.
Finally, attach the acrylic protective shield (produced by http://ponoko.com) to the other side of the anodized aluminum cylinder in order to prevent damage to the LED board. Attach by using plastic washers and 1/2" 6-32 screws in order to avoid cracking. Use of metal washers will crack the acrylic shield if tightened too far. Additionally, acrylic will frost and become opaque or break if exposed to some solvents. Before attempting to wash the shield, make certain that your solvent is compatible with acrylic. In general, the shield does not need to be very clean in order to achieve excellent optical clarity in the spotlight beam itself.
Step 20: Installing Firmware
The firmware used in the Saiko5 WiFi LED Light Fixture is open source and freely available on our Downloads page. It is designed to run on either the arduino, or the maple hobbyist systems, and to integrate with the Light Shield WiFi extension board. The code is originally based on the async_labs WiShield, but with modifications to improve stability as well as add Open Sound Control library support to allow the board to receive commands over UDP in the Open Sound Control format.
To make use of the firmware files, download the saiko5 repository, as well as the WiShield repository and make sure that the WiShield repository is correctly placed in the libraries directory of the arduino-sketchbook folder. The arduino environment must be configured to use the arduino-sketchbook folder as it's sketchbook in order to ensure that the libraries are properly located.
In the arduino-sketchbook folder, located at /saiko5/firmware/arduino-sketchbook/, there are two project examples along with the libraries.
smooth_fade is a very basic example adapted from the arduino fading tutorial by David Mellis. In this simple program example, the way to change the PWM output connected to a red, green, and blue LED is demonstrated.
#define delaytime 5
#define fadestep 1
#define redPin 3
#define greenPin 5
#define bluePin 6
This block of code sets up the basic configuration variables. redPin, greenPin, and bluePin are defined to correspond to the arduino/maple pins which are connected to the LED light fixture through the five pin header on the Light Shield board. If you are not using this firmware with the Light Shield board, you can change which pins are used here. fadestep is the brightness increment per timestep, and delaytime is the delay per timestep. The remainder of the smooth_fade program fades the LED light from red to green to blue using the analogWrite function to set the PWM value on each output.
The LightBrick folder contains the two primary files for the Saiko5 firmware that is actually used in production, along with the liblo and WiShield libraries found in the libraries folder. The file LightBrick.pde contains all of the basic configuration and startup, including network configuration. In order to configure a device to connect to your own wireless network, the configuration information here must be updated. The setup function tells the light to initially shine low power red light, followed by WiFi initialization, and once WiFi initialization is finished and the device has successfully connected, it briefly flashed blue before turning off light output. Subsequently, it runs the WiFi.run() program to handle packet reception.
The file udpapp.c contains the actual event handler for receiving a UDP packet on port 2222. Not in particular the function udpapp_init, which configures the UDP server. The default setting tells the light fixture to only accept UDP packets on port 2222, originating from the IP address 192.168.1.2. If your actual server is located at another IP address, this *must* be changed or else the lights will ignore the data being sent to them.
After initial configuration of the network stack to accept packets as needed, the parse_msg function actually handles parsing UDP packets that are received. First, the incoming packet is deserialised using lo_message_deserialize, which converts the UDP packet into an OSC message. If the deserialization fails (i.e. a bad packet was received, or a non-OSC packet was received), it does nothing. Otherwise, the firmware pulls out the three floats attached to the OSC packet and puts them into the fRed, fGreen, and fBlue float values. Next, this value is written to the output pins using analogWrite. In the case of the Arduino, this value is made into an 8-bit integer by multiplying by 0xFF and recasting as an unsigned char. However, the Maple is also capable of 16-bit PWM, so this can be modified to multiplying by 0xFFFF for higher resolution PWM. The use of the Maple in 16-bit PWM mode allows for 281 trillion distinct colors to be produced, compared to the 17 million colors which are typical of 8-bit PWM displays (and most computer monitors). In our experience, 8-bit color generally looks "fine", but the smoothness of fades is better with 16-bit colors, especially for low intensities.
To install the firmware, you will need to first install the Arduino or Maple development environments. Please see the instructions and basic usage information available from the manufacturers for more information. In the case of a full Saiko5 fixture, the arduino programming USB port is exposed on the side of the case for easy modification.
Step 21: Using PureData or Other Software to Control the Saiko5
OSC Packet Format
Basic functionality can be easily accessed through the use of the liblo library, available for python, C, PureData, and other languages. Example code of basic python scripts for controlling lights can be found in the saiko5 archive available in the Downloads section, in the subfolder /saiko5/software/scripts/
Basic Example Code
address = liblo.Address("192.168.1.222", "2222")
liblo.send(address, '/light/color/set', ('f', 0.8), ('f', 0.0), ('f', 0.2))
In this code example, which is all that is required to control a Saiko5 fixture, there are three lines.
1. import liblo
This imports the liblo library. You will need to have python-liblo installed for this functionality to be activated.
2. address = liblo.Address("192.168.1.222", "2222")
This creates a liblo address object, which can be used to send packets over OSC to the light at the given IP address. The lights are programmed by default to listen on port 2222, and to the computer at 192.168.1.2. However, these settings can be changed easily by uploading a modified version of the firmware. Note that if you have multiple lights, you will need to send the commands to all lights to do updates.
3. liblo.send(address, '/light/color/set', ('f', 0.8), ('f', 0.0), ('f', 0.2))
This creates and sends an OSC packet. The specification that the lights are expecting is the path '/light/color/set', followed by three floats, which correspond to the RGB brightness between 0 and 1.
Note that this is configured to send commands out as RGB data. This is not the preferred colorspace for dealing with LED lighting, and we highly recommend the use of HSI (Hue, Saturation, Intensity) for the local representation of light color. Code is available for converting from HSI to RGB in python in the saiko5 software repository at /saiko5/software/puredata/server/HSI2RGB.py
Hue is an intuitive way to think about "color", with values ranging between 0 and 360 degrees, where 0 degrees and 360 degrees are red, and as the hue increases, it passes first through yellow, then green, then cyan, then blue, then magenta before returning to red. This representation allows for the straightforward coding of steady color changes.
Saturation is an intuitive way to think about the "whiteness" of a color, with a saturation of 1.0 meaning as pure as possible of a color, and a saturation of 0.0 meaning white regardless of the hue. The use of saturation values less than 1.0 allows for the easy display of pastel colors.
Intensity is the natural representation for the brightness of a LED light fixture. Intensity is defined here as the sum of the red, green, and blue channels, between 0.0 and 1.0. This is different than the "value" used in HSV, where the value is defined as the maximum value between the red, green, and blue channels. Although the use of intensity instead of value limits the maximum brightness of the light to the brightness of a single channel alone, we feel that this is a more natural way to use a color changing light fixture. For example, in HSI colorspace, a HSI value, if intensity is constant, and the hue is changed, the total power being put out by the light fixture remains constant. However, in HSV colorspace, if the value is constant, and the hue is changed, the power being put out by the light fixture changes.
This is especially evident in the example of going from red to yellow (or any primary to secondary color). In the case of red, a HSV value of (0, 1, 1) is equivalent to a RGB value of (1, 0, 0). This is the same result that would come from using the HSI value (0, 1, 1). However, for yellow, the HSV value of (60, 1, 1) would result in an RGB value of (1, 1, 0) while a HSI value of (60, 1, 1) would result in an RGB value of (0.5, 0.5, 0). In the case of constant value, the amount of light being put out is higher for yellow than red by a factor of two, while in teh case of constant intensity, the amount of light being put out is unchanged.
The Saiko5 Software
The Saiko5 Software was primarily developed on Ubuntu 10.04. We highly recommend that to be certain that your setup will function you download and use our LiveCD image which will provide a basic Ubuntu environment with our software preinstalled and set up. However, we understand that this isn't an ideal situation for all users, and so software is also provided on our Downloads page. The saiko5 repository is split into two main folders, /saiko5/firmware/ and /saiko5/software/. This documentation will discuss the software contained in the /saiko5/software/ folder.
The gui folder contains a graphical user interface written in python using wxpython for widgets. This software allows for basic control over the light fixtures using a point and click interface, including choosing a HSI color, picking IP addresses to send the commands to, and doing basic color cycling modes. To use this software, open the saikoControlGui.py in python.
The scripts folder contains basic example code for controlling the light fixtures using liblo in python. Note that using these will require manual configuration of the IP addresses of the lights you are attempting to control.
* colorcycle.py -- This is a basic color cycling program using 100% saturation and a constant rate of change.
* setpurple.py -- This is the very basic script shown above in three lines which will set the color of the chosen light to our favorite shade of purple.
* udpstresstest.py -- This script will stress test your network and the lights by sending udp packets to the lights. You can use this to determine how stable your wireless network is.
The puredata folder contains source code for doing audio analysis using puredata with an accompanying python server for actual communication with the Saiko5 light fixtures. This is the software that is used to make the videos of music response on the page. The screenshot shows the PureData + Python Server being used actively to control the Saiko5 Fixture.
* analyzer.pd -- This is the puredata analyzer. It requires pd-extended, as well as pd-aubio (the aubio music analysis library) to function.
* server/HSI2RGB.py -- This python script converts HSI values to RGB.
* server/lightconfiguration.py -- This python script contains the configuration information for the Saiko5 fixtures being controlled.
* server/lightevents.py -- This python script has the basic code for the python server. This is the code that will generally be modified to add new functionality to the server.
* server/lightserver.py -- This is the overall python script that must be running for the analyzer.pd software to function. It is designed to listen for OSC packets on port 2223, and those packets are provided by the puredata software.
Step 22: Completed Saiko5 High Power LED Light Fixture!
Finally, feel free to check out all of the awesome Photos and Videos from our installation at Burning Man 2010, as well as our testing of the new PureData music analysis system for controlling the lights.
Please, check us out at our website! We'd love to get more people involved in software, firmware, hardware, and music analysis development, and are always looking for new collaborators for bigger projects!