Showing posts with label cool neon. Show all posts
Showing posts with label cool neon. Show all posts

03 March 2014

LightWalker 2.0

My first shot at LightWalker was way more involved and elaborate than I originally planned and definitely more involved on the hardware side than I thought I could deal with. But, it did actually work. Mostly.

I don't know how most people face difficult problems they've never handled before, but whether it's rebuilding an engine, repairing a hole I put in the wall, or something like LightWalker, I usually do it once just to figure out what the hell is going on and then immediately do it again to do it correctly. Now, I'm definitely still a noob when it comes to hardware and embedded stuff, so I'm not going to claim that I'm doing everything correctly here, but I do think it's a step in the right direction.

Main complaints from LightWalker 1.0
  • Difficulty producing desired results in the RGB color space
  • Lack of memory available
  • Limited frame rates possible with the Arduino Mega (ATmega2560)
  • Overall bulkiness of the unit
  • My own half-baked software design

So, here's LightWalker 2.0 so far:
Initial  build of LightWalker 2.0
  • Hardware
    • Teensy 3.1 (32-bit ARM Cortex m4, 72Mhz, 256Kb Flash, 64Kb RAM)
    • Schmartboard SMT to DIP board sporting a TI PCA9546A I2C multiplixer allowing communication to four ADXL345 ±16 g accelerometers
    • Bluefruit EZ-Link bluetooth
    • Electret microphone
  • Software
    • Moved away from Cool Neon and Chris De Vrie's TCL Arduino library for controlling lights and to FastLED 2.1
    • I also removed my MSEQ7 shield and am doing audio processing in software now. This allows me to do a bit of max/min adjustment on the fly instead of having to cover the microphone in hot glue to deal with being within a half mile of an 85k watt stereo.
This is currently all on a blank perf board and wire wrapped together. Not sure if I'm going to just throw some solder on top of it and call it good or re-do on a better breadboard PCB or what. And, this is also still controlled/configured by a revamped android application running on Android KitKat.

As you can see, this is way more compact than an Arduino mega with two shields and a separate bluetooth breakout board. Hell, the whole thing is smaller than the mega alone! But, the main advantage to this new unit is speed and lighting effects.

Before I get into the speed portion, I've gotta say that using FastLED to work in the HSV color space is amazing. I've only touched the surface of what you can do, but it is extremely simple to create smooth and subtle LED effects when working with HSV. You can easily create transitions between colors instead of just doing a hard switch from one to the other. And making things smooth and subtle is the name of the game when it comes to LEDs. Otherwise they hurt your eyeballs. 

Now for the speed thing. This is kinda interesting to me...


configuration/modeequalizer (fps)gravity* (fps)sparkle* (fps)pulse (fps)bubble* (fps)rainbow* (fps)zebra* (fps)
LightWalker 1.0, arduino, TCL877189316n/an/a
LW 2.0, arduino, fastLED 236715135162532
LW 2.0, arduino, fastLED 2.135715135162533
LW 2.0, teensy 3.1, FastLED 2988681173908573
LW 2.0, teensy 3.1, FastLED 2.1250124130465134123100
[Update] Note that all of these tests are done against a strand of 352 P9813 driven RGB LEDs (AKA Total Control Lighting)

Couple things to keep in mind:
  • The equalizer mode on the arduino is using hardware to calculate "loudness". The teensy configurations are using software to calculate the same. Obviously something is off with the equalizer stuff in 2.0 as the frame rate was chopped in half when it should have stayed the same or gone up. It's on my to-do list to look into it.
  • FastLED 2.0 does *not* officially support the P9813 chip that I'm using in my Cool Neon TCL strands, but I was able to port the 2.1 code for that chipset to the 2.0 release. That's what my FastLED 2 testing was run against. That was not an official FastLED 2 release.
  • The different modes obviously do a bunch of different lighting effects and some are more complex and slower than others.
  • The modes marked with an asterisk read data from four different accelerometers and perform calculations  on the data *for each frame*. This is why the pulse mode is so much quicker than the others, it is not reading any sensor data for it's effects.
Some conclusions
  • The obvious result is that it pays to be on the new hardware and on FastLED 2.1. Now hopefully 2.1 is officially released soon...
  • I think it's fairly interesting that the arduino based platform didn't benefit from the move to FastLED 2.1 from a speed perspective. The no-sensor-reading pulse mode did see about a 40% increase on the TCL -> FastLED 2 move, so my guess is that the sensor reading and calculations I'm doing are so slow on the arduino that the LED writing speed is negligible.
  • The 100+ average frame-rate is really really nice for doing smooth LED transitions and effects. I'm really happy to see this kind of improvement and am already adding new effects based on the new abilities.
The code is up at https://github.com/gerstle/LightWalker if you want to check it out. Think that's all I've got for now, but now that I have two full LightWalker controllers...

06 September 2013

birth of the playa creature

LightWalker's true birth happened this past week in Black Rock City, Nevada on the playa of Burning Man 2013. I won't bother you with words...









07 June 2013

Total Control Lighting tips

I'm sure anyone reading this blog has noticed that I use a lot of stuff from Cool Neon. It all stems from a random meetup at a laundry mat with a fellow vanagon geek. It was raining out and I was making coffee and cleaning the inside of my van, Siobhan, while my laundry dried. Another van pulled up and we eventually got to chatting and checking out each other's rigs. The other fellow's van had Cool Neon RBG LED ribbon lighting covering the inside that was all controlled by a little remote control. I loved it. Instantly wanted to do the same inside Siobhan. That was about 2 years ago. I have failed miserably at that. *shrugs*
One of my life's loves... Siobhan

I was pretty impressed with what I saw and was pretty happy about my chance encounter. When I started having needs (yes, needs) for el-wire and more complex lighting, I turned to Cool Neon for the goods. So far, I've really liked working with a fun, bay area company; however, I have definitely learned some things about their products recently. Not bad things, just things a guy (or lady) would need to know in order to use them.

1. Controlling the lights

Total Control Lighting (TCL) is controlled over SPI. You can totally control the lights with straight Arduino C++ and not need any other software. You could also connect these lights up to *any* device that supports SPI. You do not have to use the Seeeduino that Cool Neon sells nor do you even have to use an Arduino compatible device. I haven't done it myself, but if you need more processing power and/or memory, you could even use Raspberry Pi. Or maybe the crazy cheap TI Launchpad?

Now, if you are using an Arduino compatible device, cool neon has some cool software to get you started. I definitely recommend using the TCL library from Chris De Vries. You can see it on his site or get it on github. It basically encapsulates all of the SPI controls and gives you simple functions like TCL.begin(), TCL.sendEmptyFrame(), and TCL.sendColor(r, g, b). Definitely handy.

If you're doing an LED Matrix setup for doing TV like effects and what not, they also have some handy Windows visualization software to help do your design. I have not played with this one much as I'm doing all my light effects driven by sensor inputs and algorithms as opposed to pre-stored "videos." This is a whole blog topic on itself...

2. Arduino shields, Arduino's, & SPI

As I mentioned, TCL uses SPI to communicate. Different Arduino devices use different pins for SPI!

You can read all the bloody (not as bad as the red wedding) details of Arduino's SPI implementation here. Specifically, check out the connections table a little past halfway down. It gives you the SPI pins for each Arduino model out there. Make sure to hook the TCLs up according to your device. The Seeeduino that cool neon sells is basically a Duemilanove (you need to know that for SPI stuff as well as working in the Arduino IDE). The Seeeduino Mega they sell is compatible with the Arduino Mega 1280 which uses different SPI pins (50, 51, 52, and 53 as opposed to the duemilanove's 12, 11, 13, and 10). I only had to switch from 11 and 13 to 51 and 52 when I switched from the seeeduino to an Arduino Mega.

Important! All of the above means that the shields that Cool Neon sells are *not* compatible with the Megas. They are connected directly to the duemilanove's pins and will not function on a Mega.

3. Power

Another tidbit I learned recently is that having multiple power sources -- one for your controller and one for your lights -- is a great idea!

When you do that, make sure to hook up the ground for the lights to the power supply for the lights *and* the controller's ground. I think Chris De Vries has a reference to this on his site and that's where I figured it out.

My understanding from Cool Neon is that the lights can be plugged directly into a power supply that's between 5V and 7 or 7.2V. I'm using a little 6V lead-acid deep cycle battery from batteries plus and it's working great.

4. Other Light Sources

So I don't feel too much like a little Cool Neon fan boy, I think I should mention that lights like the TCLs can be found elsewhere. I have not purchased any from other places as I like supporting a local, burner friendly company and the lights they sell have held up great for me. I also appreciate the customer service they offer.

I'm also becoming increasingly aware of the fact that a lot of cheap electrical components come from China and I do not like a lot of their labor or political practices (note that I have not looked into Cool Neon's component sources). Keep that in mind when you buy anything, but especially electrical goods. The cheap stuff is cheap! But, it usually comes from China and probably involves slave labor. If you want a good idea of how much decisions like this support the slave trade, check out http://slaveryfootprint.org.

[EDIT 13 Jun 2013] Just got a note from Cool Neon saying that they have been to the Seeed Studio factory in China that makes the arduino compatible boards they sell and that the factory conditions and ethics there seem top notch. Good to hear!

24 May 2013

Motivation Vitamins: Maker Faire

400 total control lighting pixels!
Wow, have you guys ever been to the maker faire?! It is amazing! Highlights include stilting around with the Stilt Factory crew, watching the life size mousetrap, listening to Arduino founder Massimo Banzi talk about what Arduino's working on, and chatting it up with Cool Neon.

Stilt frame sketches
And check out the little self-Santa'd Christmas present I got from Cool Neon this week! Oh yeah. I've completed the design for my stilt frames (check it out below) and will be building them out over the long weekend. And these bad boys are gonna be set into the stilt frames about every inch and a half. Thing's gonna light up like Vegas!

09 April 2013

bringing the beats

shot of the horribly messy
prototype hardware
Getting audio working on Lightwalker has been a huge pain. I played around with a few electret microphones (like this guy from sparkfun) and had some bad luck with getting it to do what I wanted. In fact, I couldn't get it to do anything worthwhile. I even went as far as switching to using my android phone as the microphone and sending volume commands to my arduino over bluetooth. Doing so requires you to calculate root mean square and count zero crossings and all sorts of audio processing that I haven't done before. Was really cool to play with and tweak. But, in the end, doing the calculations in software and sending over bluetooth turned out to be way too slow.

I ended up landing on using a spectrum shield from sparkun in conjunction with their electret micrphone breakout board. Thought the whole thing was shot when I got it. And then I realized their documentation is incorrect and you have to run the mic at 3.3v instead of 5v. Has been great since I switched it. I might end up switching to just using an MSGEQ7 instead of the entire shield, but this is fine for now.

Another challenge I ran into was trying to figure out how to make it deal with the quiet of deep playa and being on the edge of a major sound camp. Once again, moving averages to the rescue! By keeping a moving average, I can compare the current volume to the average and adjust what the peak is as I go. So, moving from a quiet environment to a loud one or vice-versa will allow the lights to react visually well in both settings.

Check out the video. The lights and music are a little more synchronized in real life, but you get a good idea.