Reading dimmer level with microcontroller (Arduino)

Uncle Dirtnap

Active Member
This one is a head scratcher, at least for me. I am trying to figure out a way to read the the level of a dimmer using something like an Arduino. If it was just modifying the voltage when dimming, that would be easy enough, but SCR dimmers (and these are definitely 1975 vintage SCR dimmer packs) use phase-cut dimming. That lowers the EFFECTIVE voltage by messing with the waveform, and between the 60hz power and the smoothing nature incandescent it works great for lights, but not so much for digital reading of the signal.

(Ultimately, my plan is to control a few wireless on stage devices using RF from some a patch panel off stage. If the dimmer is at 10% then I'll set the device to 10%, etc. Board op can control things! I just happen to have a handful of batteries, arduinos, and RF modules, so it seemed like a fun project that could be useful later on. With a few channels I could control other things - color, etc. I know I could just run some DMX, or use one of the 8000 wireless standards arond now to do it, but I was trying to do it with what I have and it is, after all, a juicy problem.)

Any ideas?

-rj
 
If you stop thinking of it as a voltage level and start thinking of it as 60Hz PWM, then the answer may become clearer. What you're looking for is an analog circuit that converts the line voltage waveform into something that can be more easily sampled by the micro while preserving the time characteristics rather than the RMS voltage. This can be pretty simple, but there's definitely some nuance--and significant safety concerns--in the design of the circuit. Possibly not a good choice as a first project for someone new to analog electronic design? I agree that it's an interesting concept to dig into and learn about, but I'm hesitant to go into too much detail here.

Another thing to consider is that dimmers (especially old ones) don't necessarily behave properly with little to no load. You may need a dummy load or to use a circuit that otherwise already has fixtures on it for your control signal.
 
You could try adapting a zero crossing detector and measuring the time from when the waveform crosses from zero to non zero then back to zero again. That will give you the on time, and for 60Hz a full half-cycle would be 8.333 ms (10 ms for 50Hz Europe) so you can then simply divide the on time by 8.333 to get a percentage. This essentially what @Malabaristo was alluding to about treating it as PWM. You're not so much worried about absolute voltages, just when it's non zero. It won't be entirely accurate, but it might be good enough.
 
Oh, that would be MUCH easier- There is just no way of getting DMX where I need it. Setting it up as an art-net endpoint would be pretty simple too, but all that is cheating ;)
If you can get 120V to the fixture you can get DMX or CAT5e to the fixture. Seriously.

If for whatever reason "it's too difficult" then I suggest the RC4 wireless DMX transmitters/receivers.
 
Let me also chime in to the "you can't get there from here" squad: the output of a dimmer of any time is unlikely to be sufficiently reliably for you to use a decoding of it to control other things based on the numerical setting of the dimmer behind the waveform.

It's not even recommended to use this for most forms of remote control *if you're reading the raw numbers out of the DMX packets*, this extra level of indirection certainly doesn't seem like a safe target, for nearly anything you might try to use it for.

I'd recommend wireless DMX as well.
 
hmmm. I wonder how much of a hack a small incandescent bulb and photoresistor in a box is.....
...and this is why I was hesitant to give any more details. If you don't already know what an optocoupler is and how to properly design with them, then you should probably shift away from considering anything that interfaces with line-voltage as a control signal. Also, if it's the only load on the dimmer, that incandescent lamp would need to be about 100W to make sure the dimmer fires reliably, and that's a whole lot of heat to contain in a box.

Good wireless DMX is still pretty expensive, but I've had surprisingly good luck with these products (or something very similar). I 3D printed weatherproof enclosures for them and used them successfully for an outdoor installation that recently ran four nights a week for about two months over distances in the 100-200' range. Granted, there was not a lot of other sources of RF in that area, so I can't comment on how they behave in a noisier environment. Still, not bad for the price.

If you want to use RF modules that you already have, then getting DMX into an Arduino with a transmitter attached is much easier and safer than anything that interfaces with a dimmer. It would also be a better learning experience since knowing how to interpret DMX with an Arduino opens up a whole host of potential future projects.
 
My dream was to have some some box I could plug into a circuit with little or no work and simply replicate the level wirelessly on a fixture on stage. The use case is almost laughably simple- lighting an led Xmas tree without having a cord or having stagehands listen for a queue. Actually having to run DMX, running cables , or setting up some sort of wireless nonsense. I thought it would be super useful in the context of a low or no budget community theatre that is chronically understaffed/undervolunteered. It seems that 'magic box' may be a little more magic than I hoped. In the end, I think getting them off AMX may be a better first priority :)
 
Last edited:
KInda crazy, right? They have a DMX to AMX converter to talk to their TTI Modular Dimming System. They still have the original AMX 2 scene crossfade board too (Chameleon?). It's fun. I never got to really design with non-cyc scoops before - when I started it was all source4s and a few fresnels and pars. I have another thread on here about a flickering issue they are having, but I digress-

-rj
 
KInda crazy, right? They have a DMX to AMX converter to talk to their TTI Modular Dimming System.
Although the Dove Systems protocol converter, is named "Decoder AMX/DMX", AMX192 is not really part of the equation here. It's a DMX-to-analog device (could also be used as an AMX-to-analog, but not in this case). Your dimmers are 0-10v analog, not AMX. The tell-tale sign is the number of wires on the output. AMX uses four wires (two twisted pairs) on either XLR4 or TA4 connectors. Analog uses one wire per dimmer plus a common for every six dimmers usually.

20211003_132710-jpg.22385

 
Although the Dove Systems protocol converter, is named "Decoder AMX/DMX", AMX192 is not really part of the equation here. It's a DMX-to-analog device (could also be used as an AMX-to-analog, but not in this case). Your dimmers are 0-10v analog, not AMX. The tell-tale sign is the number of wires on the output. AMX uses four wires (two twisted pairs) on either XLR4 or TA4 connectors. Analog uses one wire per dimmer plus a common for every six dimmers usually.

20211003_132710-jpg.22385

Curiously enough, it seems like THAT signal would be incredibly easy to read with an Arduino. And we have now gone full circle :)

-rj
 
If you're going to the bother of getting DMX to a DMX->Analogue demux then reading the analog signals, it seems it would be just as easy (and more reliable, given the settling time of the A/D converters on an Arduino) to just read and decode the DMX directly using a standard library, as has already been suggested.
 
That would be easiest- and not too hard. I've done it before using DMX to control a strobe unit that used pulses from a 1/4 phono jack. I had the values modify the sync between strobes,making a 'lopsided' strobe for my haunted attraction years ago. Great fun. It also sent DMX to trigger some LED blacklights, although that experiment didn't work out well.


Honestly, I'm probably not going to do any of it and just have someone backstage listen for a cue and plug in the Xmas tree. The intial idea was simplicity- plug a box into a channel, have something 50 feet away respond to that channel. As far as I can tell, the theatre has a single 20' DMX cable, and that's from the board to the converter.
 
Last edited:

Users who are viewing this thread

Back