Saturday, September 19, 2009

Arduino, Vmusic2, XPort -- Halloween Controllers


I've been working on advanced concepts in controlling Halloween displays for a long time. But I've only just started executing some of my concepts last year. The tentacle controller was the first, but it is still very specific to the tentacle. I hope to have a set of fundamental capabilities in every controller and a set specific to the particular exhibit/device.

My microprocessor platform of choice is still the arduino, I'm excited to see the broad range of variations available, especially the Arduino Mega, I need a lot of I/O. The most important feature of my controller concept is that they are networked and can be remotely controlled, configured, tuned, and monitored. That means adding an ethernet interface. I've been experimenting with the Lantronix XPort AR. This device is amazing, so many protocols built-in, including SSH, HTTPS, and email. The built-in web server appears advanced and there are numerous configurable pins. As these devices go, it is on the pricier side (~$65) but you get a lot of features. BUT.... the downside is that you need a software development tool kit to really modify the device for your project. You can drop basic files on the device that the web server will see, but there is some secret sauce in here to have the web server talk to the UARTs and configurable pins. Too bad, it was a promising device but I'm not going to buy the tools. I don't even know how much they cost, you have to talk to salesmen...ick. Come on Lantronix. Give us the razor and we'll buy your blades like crazy. I still haven't decided if I should stick with this device, or just go with a really basic ethernet to serial device like this one. Half the price, but I would have to move some capabilities into the Arduino, like email alerts. In the XPort AR, I can just trigger a pin high which in turn sends an email alert. I have to make this decision soon! Need to get a couple ordered.

The other thing so many Halloween props need is quality sound. I've been searching around for the right method and finally decided on the Vinculum Vmusic2. This is a slick device, a full MP3 player with a serial interface. It has a USB port for a USB fob with MP3s and a 1/8" mini stereo jack for output. Then a set of pins for the serial and power connections. It was frustrating getting it to fire up the first time, the docs are worthless. There is an excellent instructable here on getting this thing set up, but even that didn't point out the key step. Then I found this reference from the Garage of Evil -- fellow high-tech haunters and my problem became clear. By default the Vmusic2 is setup for a CTS/DTR hardware handshake. You can tweak the settings through their firmware editor to just do tx/rx. But I couldn't get the device to come alive, which was required to pull the new firmware from the USB stick. I was beginning to think the default firmware wasn't on the device. Others have alluded to this in numerous posts, which then requires you to jump through hoops with the right cables to talk to the device to flash it. But the trick is to tie CTS to ground, that's it. The device woke up, reflashed itself, and everything is good. I dropped a couple MP3s on a thumbdrive and was soon talking to it through a serial connection firing off music while tweaking the controls. Nice! So in moments I'll be wiring up the first one to the current controller I'm working on. The picture here is the in-progress shot. A chassis from an old Sun outboard SCSI drive (12v and 5V) supply built-in, Arduino, protoshield, several relays, the Vmusic2, and much more to come.

No comments: