Thursday, 15 September 2011

Arduino Dome Control

I'm looking for a way to replace the AMX/Netlinx in the dome. This is as proprietary as it gets - AMX panel is expensive, the Netlinx is expensive, the SDK is expensive - and the whole shebang ends up completely non extensible without access to a £400 per day contractor.
The Netlinx  is basically a bunch of RS232 (and InfraRed) connections that talk to the Lights, Signage, Projector and Extron Matrix etc.

It occurred to me that the AMX panel is basically the same as the iOS/Android/WebOS tablets that are available at the moment - and that I could do RS232 with some arduinos. I have some Python code running on the boxes in the dome, which uses sockets to send commands. This has been working very successfully to start shows and for emergency shutdown - my plan was to modify this to send RS232 and InfraRed. I'm working from home at the moment, so the test bed was an LG LCD TV (which has RS232 on the back) and my Onkyo home cinema amp (via IR).

I started writing the app in the emulator that came with the Android SDK, but this seemed to have a problem with UDP sockets. It emulates a 3G connection, but not WiFi. So I got a shitty 7" Tablet from ebay for £26. I managed to write a small Android app with a few buttons that would trigger certain RS232/IR signals.

I dug my USB-RS232 adpater out. After a lot of pouring over manuals for RS232 codes I managed to get this working. You can test the strings they give you in the manual in a serial terminal - but there is no standard notation in the manuals, you never know if your sending ASCII, Hex etc. The python serial library works a treat though. There is an IR library for Arduino which encapsulates a lot of the codes for common devices - this didn't work for my 1st Gen Arduino, so off to ebay again, and £12 for an Arduino Nano...

It all works like a champ - Java is still a bad language, and I need to find a way to enumerate multiple USB-RS232 devices to make sure I know which one is plugged into which device...