I know it’s not quite on topic, but I like fire almost as much as I like colored lights. And maybe even more when it comes to the sound it makes =)
Sorry about the ad, it matched some song I’ve never heard of and I don’t have the wherewithal to get rid of the song it’s complaining about. If anyone knows how to not remove, but distort audio to be unrecognizable send me a note! I don’t want to add some other sound track because then you won’t be able to hear the fire wooooshing…
I put together a general purpose firmware that lets you define specific LED sources as CIE-LUV coordinates, and then abstracts it away so that you can use hue, saturation, and intensity with optimal selection and mixing of the available sources to get the desired CIE-LCH value (hue based instead of coordinate based).
and then you add them to the colorspace like this:
// Create a colorspace object that will be put into the abstract lamp.
std::shared_ptr colorspace (new Colorspace(white));
// Add the CIE LED definitions to the colorspace.
colorspace->addLED(red);
colorspace->addLED(amber);
colorspace->addLED(green);
colorspace->addLED(cyan);
colorspace->addLED(blue);
Then all you need to do is ask the colorspace to return the proper values and output them to the PWM pins defined in the CIELED object.
Code example showing this alongside USB control, and several types of LED effects you can use is here:
This was a fun project. I got a sample of the new LEDEngin LZ7 LED, which has on a single chip red, amber, green, cyan, blue, violet, and white. While I already have a great algorithm for converting HSI to RGBW, this is a much more complex challenge – converting from HSI to RAGCBVW.
The constraint I used is that the color must use only 2 individual LED wavelengths, plus white for saturation control.
To do this, I used the CIE LUV colorspace, shown below. This provides uniform perceptual color changes in hue and linear perceptual brightness as hue changes.
The results are very nice, you can check them out in this video. Unfortunately the CCD (and your monitor) can’t actually represent the violet, amber, and cyan colors accurately, but so it goes.
This week I learned about a really neat trick to speed up current sinks built out of BJTs. There is an issue with getting them to turn on and off really fast, which is that if the impedance to the driver is too high impedance, it has a very long turn on time.
In comes something called RCTL logic – Resistor-Capacitor-Transistor. The concept is actually surprisingly simple, instead of using just a resistor between your driver and the base of the BJT, you use a bypass capacitor as well so that when the driver signal changes suddenly, that signal makes it with low impedance to the BJT base without requiring a large static current for steady state operation.
With this, I managed to design a system that will let you switch 700mA of current directly from a Teensy 3.1 with a fast enough rise time to make 100ns pulses workable. With 100ns pulses, this means the new design can support full 16-bit PWM at 150Hz, or 8-bit PWM at 39kHz!
Using the ZXT1053AK, I developed this model circuit to demonstrate how it works.
The basic idea principle of operation is the same as the SaikoLED super inexpensive linear current regulator. The sense resistor at the setpoint 700mA provides 700mV at the emitter. The BJT Vbe is about 0.7V, so the idea is to set the base at about 1.4V using the resistor divider, which defines a feedback loop. It’s not very precise, but it is cheap. In this circuit model, the resistor values are shifted from a 1.4V divider because of current going into the base of the BJT, and are selected using this spice model. The old SaikoLED linear current sink just had this resistor divider.
The limiting factor on BJT switching speed in this circuit is the amount of charge I can deliver to the base of the BJT, in other words, the impedance to the driver. However, lowering the resistor divider values by 10x won’t work because now the digital controller is being asked to provide too much current. You can try to work around this using buffers, but there’s a better way!
By adding in the bypass capacitor, a sudden change in the driver signal is passed to the BJT base through a low impedance path, which can be set independently of R2 and R3. So now instead of having to choose between drawing a lot of current from my digital IC and a slow switching time, I can get both!
Check out the simulation results, for 100ns pulses, 1us pulses, and the driver current below.
100ns Pulse Response 1us Pulse Response Driver Current
These are some pretty neat effects made by 李和和’s traditional chinese papercuts on top of the SaikoLED 40W illumination table. Let us know if it gives you any ideas!
This is an extremely cool project that SaikoLED has been advising on, the first wirelessly controllable system that lets you control 3 RGBW LED light bulbs while also using the same system to control your music. It’s really a fantastic design, and for way less than I could have possibly imagined.
Router runs openwrt, so easily hackable, it integrates with streaming music services, does automatic light shows, and you can even hack on additional functionality using arduino or other external systems! I’m super excited!
For those of you who have worked with LED star boards, you’re probably very familiar with things that look like this.
No matter how careful and clean you are, it’s time consuming and super messy. This isn’t even as bad as it could be, for that setup four of the pads are connected together!
For this post, I’m going to show you how to turn that wire ratsnest into this beautiful connectorized board.