Connecting to higher-voltage lighting
I am hoping to connect a max patch to some higher-voltage equipment and am a bit confused as to the best way to approach the problem. To make things easy, lets say I want to turn a 100v light on and off using the audio signal from someone clicking their fingers through a max patch: they click their fingers and the light flicks on/off.
I've searched the various forums and it seems there are a number of ways to achieve this. I'm sure a lot of people have experience with this kind of thing so i'd be grateful for any advice.
The important thing is that there is very little delay between the finger click and the light flicking on/off.
The two options i'm considering are:
1. DMX interface. Seems a little over-the-top for one on/off light connection.
2. Arduino connected to a relay. Haven't tried this before and i'm worried that it may be a bit slow in reaction time.
Any advice or comments greatly appreciated! Many thanks...
The Arduino + relay solution would be my recommendation. It should be plenty fast assuming the serial rate setting is reasonably high.
Arduino + relay would be a good way to do this. The limiting factor would not the serial rate, but the rate at which the relays can fire. Solid state relays will be faster than traditional electro-mechanical ones.
The serial speed is how fast your computer is going to communicate with the Arduino. At 9600 baud, if you're sending an ASCII '0' or '1' followed by a newline and carriage return (via Serial.println()), that's 3 bytes, or 24 bits per message. With nothing else going on, that's 400 messages a second, far faster than most relays will be able to operate. Timing delays in transmission will occur based on how frequently you read the buffer and any other instructions the Arduino is executing.
No problem with Arduino and the like (Phidgets). Tons of tutorials for that on the net. Though be sure to be comfortable with working with mains power, especially the safety aspects. Mains is dangerous.
If you 'd rather stay away fro tinkering with high voltage current you could surely find DMX/MIDI/ethernet/USB controlled boxes with integrated relays, though it will be more expensive than DIY. Please note that dimming or switching a light is different business than switching a motor (just to name something). Be sure to choose the right type of circuitry for your load.
Great advice, thank you all for your replies.
I'm able to borrow a MIDI controlled unit so I think i'll give that a try this time. The risk of death by electrocution is a bit off-putting too.
@loadmess: out of interest, what would be the difference between switching a light and switching a motor? IS the idea of a single pulse of current as opposed to a constant flow?
A lamp is a resistive load while a motor is an inductive load. Resistive loads are generally very simple to deal with, inductive not so. For example switching on/off a motor will likely cause a blowback voltage spike that the circuitry has to be protected for. When switchig on it will also pull an initial current peak that is several times the rated current (for example: a car wiper motor rated around 5A can have an initial spike of 30 of 40A). This is why it's a very bad idea to connect motors are other unintended devices to for example a light dimmer. When going DIY with relays and motors blowback filtering has to be included. Usually with a diode I believe. Though I'm not an authority on the matter (burned a fair deal of circuits ;). Lots of info on the net.
If you go the arduino way I strongly suggest you pick up a Teensy 3. I've been using this for a while and the serial rate is much faster (12mbps) than a regular arduino.
You can also configure it as a usb midi device which makes communication a breeze.
Here's a midi to dmx box I made, very cheap and super reliable, been touring all over germany with it for a month:
https://github.com/natcl/dmx_midi
@loadmess...thanks for the advice.
@Nat...the Teensy 3 looks pretty awesome and your device seems amazing. I'm going to stick with the ready-mades for now for fear of sudden death. BTW I bumped a python thread that you were active in from 3 years ago...