DMX Dimmer - Triac Boards Finally Arrived - Page 1
Forum section: electronics / projects

author: kolbep
author_rank: Frequent Contributor
timestamp: September 07, 2014, 06:46:06 pm
content: HiPlease could you just do a spot check on this Schematic that I have made up.I just want a double check before I make the PCB, just to make sure that I have not made any stupid/dangerous errors.I am experienced with Mains voltages, so I know about clearances, etc, so I will be safe with making/testing/using this.I know I have the wrong symbols for the Optotriac and the Triac, but that is because Express Schematic does not have anything suitable in it's library.Much appreciated. P

author: SeanB
author_rank: Super Contributor
timestamp: September 07, 2014, 07:25:44 pm
content: Nothing wrong with it, it should work, though you probably could use a 6V transformer to reduce power dissipation in the regulator. You probably would like to place snubbers ( 100n 400V class X in series with 47R 0.5W) across the triacs to reduce false triggering of them.

author: kolbep
author_rank: Frequent Contributor
timestamp: September 07, 2014, 08:02:42 pm
content: Quote from: SeanB on September 07, 2014, 07:25:44 pmThanks for that. I am so used to working with 12v circuits, and then in the past 2 years or so, working with 5v Micros, that 3.3v circuits are new to me (This is the first chip I am using that is 3.3v), as such I did not even think about a smaller transformer.At the moment I just have the Max485, and the uC running 2 LED's on PWM Channels, so not a lot of dissipation at the moment. [I know the Max485 is rated for 4.7v min, but it is working for now]QuoteGood Idea. I have actually reverse-engineered a JBSystems DSP-12 Stage dimmer's output stage, and plan just to use that anyway.

author: penfold
author_rank: Frequent Contributor
timestamp: September 07, 2014, 08:05:28 pm
content: As long as you've got some decoupling and get the layout right, there's nothing I can see wrong with it

author: wraper
author_rank: Unknown
timestamp: September 07, 2014, 08:25:25 pm
content: First: R10A, R11A should have higher resistance. I have seen tons of EUROLITE dimmers with blown/degraded(so they start to open intermittently by themselves in certain conditions) optocouplers because those idiots used 100 ohm resistors, therefore peak current exceeding max allowed 1A. It is safe to use around 360 ohm resistors for 220-240V. Second, better use MOC 3021-3023 rather than MOC3020 with very high (up to 30mA) trigger current. You can't drive them from 3.3V with 180 ohm resistors. And I'm not even sure if this mcu can output such current, lazy to check the datasheet.Check this datasheet (typical application circuit):http://www.microcontrolador.com.br/datasheets/MOC3023.pdfUsing snubber is also highly recommended and EMF suppressing LC filter as well, not only coil.

author: miceuz
author_rank: Frequent Contributor
timestamp: September 07, 2014, 08:45:58 pm
content: Note that R7 will dissipate a lot of heat. Also, you can use just one diode instead of the diode bridge for zero crossing detection.

author: wraper
author_rank: Unknown
timestamp: September 07, 2014, 08:51:30 pm
content: BTW seeing previous answer, better use H11AA4 (higher CTR than others). Edit: Thou CTR don't matter so much as if you would sense directly from mains, not after transformer.http://www.classiccmp.org/rtellason/chipdata/h11aa1.pdfYou don't need to use rectifier with it.Edit:Another possible solution is to not use optocoupler at all. Just add one more diode in series between BR1 "+" and C1. And sense mains from BR1 output with resistor + voltage limiting zener connected to the mcu pin.

author: salbayeng
author_rank: Frequent Contributor
timestamp: September 08, 2014, 03:18:33 am
content: I was going to say this too...Quote from: wraper on September 07, 2014, 08:51:30 pmor just a resistive divider with 10k or more total impedance, and rely on ESD diodes in the MCU to suck up rare transients, kind of depends on the "threshold" you define for zero crossing.Check the pinouts on your Triacs, they are usually back to front compared to a MOSFET , e.g. the Gate might be on the right ( instead of the left for a MOSFET).

author: kolbep
author_rank: Frequent Contributor
timestamp: September 08, 2014, 07:29:58 pm
content: Quote from: wraper on September 07, 2014, 08:51:30 pmAm I understanding this right. Please check this (Also Learning Eagle now...)

author: wraper
author_rank: Unknown
timestamp: September 08, 2014, 08:58:47 pm
content: Quote from: kolbep on September 08, 2014, 07:29:58 pmExactly

author: wraper
author_rank: Unknown
timestamp: September 08, 2014, 09:13:11 pm
content: And yeah, I think that some resistor should be added in parallel to D3. Not to make a divider but to be sure that voltage actually goes to zero regardless of zener and diodes leakage. And of course small ceramic of film capacitor to suppress HF stuff (transients) on that pin to avoid false detecting.

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 09, 2014, 05:11:28 am
content: Do you need an inductor before the load on the output? It looks like it could cause more trouble than it's worth.

author: kolbep
author_rank: Frequent Contributor
timestamp: September 10, 2014, 05:35:35 am
content: I believe the inductor is used for suppression of interference that can be radiated because of the way the triac is fired at a different point in the mains cycle (as opposed to Zero cross, where there is no voltage).The code that I am modifying to run on this circuit is :http://dbprototyping.com/code/dmx512RX.cI have it breadboarded (no, not the mains side, just the ELV using the PWM outputs, to check DMX Commumications), and it would work fine, until I unplugged the Pickit2 from the breadboard. The power LED on my breadboard was still on (I have a transformer as a supply), but the system just hung, and refused to do anything.I then plugged the pickit back in, and pulled out wire after wire, until it stopped working.It was working fine with every wire removed, except for the power lines.I thought, Wait a minute, maybe this is why I need decoupling caps.Nope, scattering caps on the board did not help at all.Then I hooked my scope up to the power pins on the uC, (I was too lazy to fetch the DMM from the garage).When I unplugged the Pickit, there was a small drop in voltage, but I mean it went from just above 3v, down to about 2.9v, and that is when the uC hung again.Checked the datasheet, and saw that the uC I am using is stable at even less than 2v. Then after all that I checked the codeCode:BOREN = SBORDIS, BORV = 30The original coders for the source decided it was a good idea to have Brown Out reset enabled, with a threshold of 3v. Why they chose such a narrow margin between the Max and Cutoff is beyond me.Anyway, just changed toCode:BOREN = OFFand that sorted the bugger out.Now back to the layout...

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 10, 2014, 12:07:30 pm
content: Quote from: kolbep on September 10, 2014, 05:35:35 amIf you're worried about radiated EMI you might want to consider a common mode choke, cause you're not doing anything to filter the neutral at the moment.The potential problem I see with an inductor is that if the circuit is abruptly disconnected there is no freewheel path for the inductor current and potential to produce large voltages or switch arcing.The other effect is that since the triac turns off at the zero current crossing the output voltage will go negative for a short period due to the lagging current.

author: kolbep
author_rank: Frequent Contributor
timestamp: December 10, 2014, 04:58:52 am
content: Well, I finally received my Triac Driver boards that I had Itead make up in September (Their 5x5cm 10 Board Prototype Service with 100% Etest.That means that the South African Post Office is slowly getting to the bottom of the pile after their strike.Here is the boards:And here is the decorations:And they work fine.... Now just to stick them (and my Veroboarded Microcontroller circuit) into a safe enclosure

author: kolbep
author_rank: Frequent Contributor
timestamp: December 15, 2014, 06:15:30 am
content: Well, The circuit on Epanorama.net worked great.Built up a 8 Channel dimmer using it.Used 6 Channels to run Halogen lighting for a Playschool concert on Saturday.2 Channels were each running 1Kw of QI Halogen lighting. The other 4 channels were each running 500w.There were a few glitches (but that is probably because I was driving it through 2x Runs of Microphone Cable (about 40m Total).All this was running off a 2.5mm^2 Cable and Decent rubber plugtop (plugged into a MES socket. Needless to say the socket is not the best. It was nice and toasty several hours later when the concert was over.I made up an OpenDMX dongle by butchering a car diagnoistics interface that had the FT232RL chip in it. I just cut the tracks in it (that go to the pic in the interface, and then deadbugged a MAX485 chip on it to provide the DMX signal.Next steps is to get (or build) a better interface.Thanks for all your help and suggestions....P

author: kolbep
author_rank: Frequent Contributor
timestamp: December 15, 2014, 09:12:39 pm
content: My Triac Output boards are still the ones that I designed (and sent to Itead) in September.I had 2 problems with the original uC systems though [And I needed this system for the 13 December, So I ran out of time with the problems I was experiencing, and had to go with the tried and tested method:1) Using the PIC18f2420, Could not get the USART to properly detect the Framing Error that is used to detect the start frame.2) Using the PIC18f26k20, DMX Receiving works fine. But just could not get my phase angle firing code right (It kept on missing half the waveform) in C18. With 2 weeks to go, I was really starting toSo I went with a system that was tried and tested. I used the circuit and software athttp://www.epanorama.net/digipack/.It used a PIC16f870 and was coded in ASM. I used this system with my triac boards. (but I built the low voltage uC circuit on Verobard)but I did make some changes to the code, and hardware :1) Did not need the Analogue Control inputs, so I left that hardware out.2) Original code (and hardware) was for 4 channels on RB1-RB4.I added code to allow for 8 Channels (RB1-RB7 and RA0)3) Removed the code for the analogue inputs4) The original code, if DMX input was lost, it reverted to the Analogue Inputs. I just made that section of code set all the outputs at 3/4 brightness. That way if my DMX Transmitter hung up (which happened alot on my old Dell D610 Laptop. But did not happen on my wifes newer compaq laptop), that the lighting would go to a suitable brigtness (i.e 3/4 of full) [This was mainly used for Videoing the concert, so having decent lighting level was a priority upon failure of the system]And I learned (rather Expensively), not to plug the PICKIT2 ICSP connector onto the board the wrong way around (cost me 2 pic's)I was running the system through Microphone cable, so the DMX error light was on quite a bit, but there was only glitching noticeable at very low lighting levels. But otherwise it worked a bomb... (No, It did not blow up like one).. With the wifes laptop, I did not have the interface hang at all.I did realise a problem with my Triac board layout. Guess what it is........wait for it..When the large heatsinks are on (taken from a UPS), they are in the way of the screw hole near the triac.And the screw hole at the other corner is too close to the limiting resistor for the optotriac. So I was forced to (and I really HATED that I had to do this) Hot Snot the boards in place.At least for future revisions I know what to look out for now. I guess for my first professionally produced board, it was a good shot.The main reason that my Triac boards could only have 2 channels, and have the screw holes too close to everything else, is because I was using the Itead 5x5cm 10 Board Prototyping service.To control the system, I used Freestyler DMX software operating using an OpenDmx Interface that was hacked together from an OBD Interface (It had the FT232RL chip already on the board, with the USB connector already) all I did was cut the TX line from the FT232 to the PIC that was on the Interface, and wired it to a MAX485 which I deadbugged on top of the board.I hope that has given you something to think about.And for Next year, I am hoping to use something similar to make a christmas lightshow like all the Yanks do...P

author: ajb
author_rank: Super Contributor
timestamp: December 16, 2014, 03:31:55 pm
content: Quote from: kolbep on December 15, 2014, 09:12:39 pmDMX shouldn't bethatbad over 40M of mic cable. I've certainly run control for LED fixtures (which make glitches MUCH more obvious) over much worse. I would suspect the software control first, the cheap FT232-based DMX interfaces sometimes have a hard time with Break/MAB timing. Better DMX interfaces use a micro to generate the timing.

author: 3roomlab
author_rank: Frequent Contributor
timestamp: December 16, 2014, 03:41:50 pm
content: or maybe its 75ohm termination? or was it 110ohm? i cant rememberi remember using cat5, just 1 of the twisted pair. it holds very well over 150m, or maybe i was lucky

author: Towger
author_rank: Super Contributor
timestamp: December 16, 2014, 03:45:41 pm
content: The timings with an OpenDMX dongle will not be the best. A couple of weeks ago I spent an afternoon cursing and trying to fix a 12 channel LED dimmer, only to find it worked fine with a better dongle. It worked fine with DMXKing's clone of the ENTTEC Prohttp://dmxking.com/usbdmx/ultradmxmicro

author: ajb
author_rank: Super Contributor
timestamp: December 16, 2014, 05:00:03 pm
content: DMX is 120 Ohm, but with only two nodes and one of them constantly driving the line reflections won't be much of an issue. If you had a longer run with many devices along it termination becomes much more important since devices in the middle could see primary signals and reflections more or less simultaneously. If you had something like RDM where at any given time any node or none might be driving the line you'd want to terminate both ends and bias the line so it floats to safe state.

author: ajb
author_rank: Super Contributor
timestamp: December 16, 2014, 05:38:36 pm
content: Also, it's not just the new PC-based control solutions that sometimes have trouble with timing. I once stood backstage and watched the DMX activity LED on some LED dimmers I'd built while listening to the board operator tapping keys on the Express 250 in the house. The activity LEDs would flicker and and stutter in time with the taps, with a BIG pause whenever she hit record. I'm not sure of the exact architecture of that console, but its family originated in ~1987, so I'm guessing it was a single microprocessor doing all of the fade calculations, saving to memory, running the UI, and controlling the UARTs that run the DMX outputs. Later on, while teching the last page of the show, we ran out of memory in the Express due to the sheer number of complex fades of dozens of channels of LEDs, so we wound up switching to an Expression 3, which was from the same console family, but was capable of a substantially higher refresh rate and had noticeably less stuttering in the DMX output while performing programming activities.

author: kolbep
author_rank: Frequent Contributor
timestamp: December 16, 2014, 08:32:12 pm
content: And Here are the pics of the Dimmer itself...Work in progress, but it is working

author: SeanB
author_rank: Super Contributor
timestamp: December 16, 2014, 08:42:09 pm
content: Looks nice Pieter, recycling old into new again. Box looks familiar, any idea short of asking Centsys where I can get those screws for them? I see you had enough HP printer leads around to make the wiring though.

author: kolbep
author_rank: Frequent Contributor
timestamp: December 16, 2014, 08:49:26 pm
content: Just picked up that box at a local electrical dealer for about R150.00I just hacked up a bunch of the M-F and normal PC powercords that I had lying around.Main reasons for using that type of connector are:The Chauvet 4 Channel Dimmer Packs use them (but they have the panel-mount ones, not the tails)Also, The town hall where I was using them had 3 Chauvet dimmers [all with blown triacs] backstage, and they had the female connectors on them, that tied back to normal 15A sockets up on the lighting truss. So all I had to do was unplug from their dead dimmers, and plug into my tailsBut all in all I am happy with it. I mean the Chauvet 4 channel dimmers (for 2 of them to make 8 channels) would have cost me over ZAR2700.00.This whole endevour ended up probably costing me at least R1500 in parts + my labour, but I have learned quite a bit, and I have something that I can customise further, and build on....

author: SeanB
author_rank: Super Contributor
timestamp: December 17, 2014, 08:39:33 pm
content: Make some more up for next years matric dance season then. You probably could moonlight as a stage lighting specialist.