Running 2 triac 4-channel from one Arduino

Hi all,
I saw an older thread similar, but.....

I have an Arduino Uno powering a 4-channel dimming triac board. It has the following wiring (sorry no pictorial)
Arduino pin 3 for zero-crossing to triac
Pin 4 for triac channel 1, pin 5-7 similarly
Vdc and ground configured properly
This configuration works fine

BUT...if I add a 2nd board for more channels, the 2nd board is not energized
I split Arduino pin 3 to zero crossing input on both triac boards
I ran 5Vdc to both boards
I ran Arduino pins 8-11 to triac for channels 5,6,7,8

The 1st Triac board runs fine, the 2nd board is dead. If I swap wiring around the 2nd board works for outputs 1-4, but the original board is inactive for channels 5-8...

Do I need to do something differently for each board with the power or zero crossing?

I suggest you spend some time thinking about this as the mains power can and will kill you if you goof. There are many boards out there that will work. Me being on the lazy side I use some 4 channel boards from KRIDA Electronics. I am at about 5 years of operation without any problems. I like them because they are smart and I communicate with I2C, they have a small micro that does all the processing etc, you control them similar to the PWM part of the Arduino. They have both leading and trailing edge dimmers. If LED lighting is involved I suggest you start with trailing edge.

Sorry but without a schematic and component listing I am not going to comment on your design. I do not know your resources and skill set to do a design like this.

Can you provide a link to this board.

Each board is very similar to this one....It has Vcc and ground, a zero-crossing connection and four triac control lines

Hi gilshultz,
Yes, I am using the 4-channel board from Krida.....One board runs fine (uses Arduino 3 for zero-crossing, pins 4-7 for PWM control

BUT, if I add a 2nd board and split the zero crossing signal to both boards, the 2nd board doesn't work. I'll create a schematic

It is my understanding of the Krida board that the zero crossing is an output from the board and is read by an interrupt on the Arduino.

What do you mean by the "to"?

Can you post your code. Are you using Timer1 ticks to drive the phase cutting?

I would think that one zero crossing signal to the Arduino and then 8 outputs from a Timer1 tick would work.

Did you connect the 2nd board's logic ground to Arduino GND?

1 Like

Hi all,
yes, I should have been clearer in my O.P.

Yes, I'm using the timer1 library. The original code was written for me using a state machine and runs fine with one four-channel output. Arduino pin 3 is the zero crossing to triac board, pins 4-7 go directly to the triacs

If I put another triac board in parallel (Vcc, ground, and pin 3), and then route Arduino pins 8-11 to the 2nd board, it doesn't even light up the on-board LEDs

It is a zero crossing signal from the triac board which triggers an interrupt on the Arduino.

Only bring the wire from one board to pin 3. The AC in both boards will have the same phase.

1 Like

Be sure you connect the AC the same on both boards. L1 to L1 and L2 to L2. Changing this will cause it to fail but not damage the board. I have this board but elected to get the fancier one that had the processor on because of the load on the Arduino. You should be able to use one of the zero cross inputs as they should be the same.

Hi gilshultz,

Yes, I think I got this thing working. Connecting the zero crossing signal FROM the Arduino to ONLY ONE of the triac boards fixed most of it.

Yes, the AC main is identical on both Triac boards (hot 120VAC and neutral)

So, I now have code running on all eight (8) channels. My light test routine stopped working, but not a problem

Using tool bar " < code > " post your code.
Uno Some pins isn't PWM.

You mean;

The triac board supplies the signal that occurs at zero crossing, the code then uses that signal as an INPUT to phase OUTPUTs to the triac trigger circuit.

Tom.. :grinning: :+1: :coffee: :australia:

Thanks for all the replies.

In summary, I have one Arduino Uno now driving two separate 4-channel Krida triac boards. The Arduino zero crossing INPUT is on pin 3. Triac board #1 is pinMode "OUTPUT" on pins 4-7, triac board#2 is pinMode "OUTPUT" on pins 8-11...

Yes, the zero crossing is an INPUT on pin 3 that comes from either of the triac boards.

The board as you show on the images does not look particularly safe to me.

Of course it's a bare PCB, that has to go in a suitable enclosure, but my main concern is that there is seemingly very little separation between the mains side and the low voltage side. There's a bridge rectifier, followed by a bunch of tiny components (that's all at mains voltage), and a bit further I see something that looks like an optocoupler.

The Arduino connector is very close to the high voltage section, with no clear separation. Just a few mm of PCB - no anti-tracking slots. Also there is no such slot under the optocoupler.

I hope there are four more optocouplers on the board, to drive the gates of the TRIACs. Those I don't see. If not, the board is utterly unsafe and everything connected to it - including the Arduino - should be considered at mains potential.

So is everything working OK or do you still have a problem?

Hi all,
Thanks for the feedback.

  1. In order to use the zero crossing signal (Used in the timerone.h library), the ONLY wire goes from one of the Triac boards to the Arduino Uno as an input (pin 3).

  2. The Triac boards are from Krida Electronics and have all the appropriate isolation from 120VAC to low signal circuitry.

The purpose of this year's project expansion was to drive eight (8) Triac outputs instead of the original four (4) outputs. The software uses a "state machine" and the Timerone library to count clock ticks that drives the fading function from one channel to another.

The only problems I have been incurring are:

  • The gate impulse from the timer function is set to five(5) and that may be a problem when the code was expanded to eight clock pulses. I have to research further.

  • This whole fading function doesn't behave well with LED lights versus incandescent

Until next year, happy new year! Be safe around electricity if you're doing anything with line voltages!

If you post the code and explain the issue with changing from 5 to 8 pulses you can get some help from the group.

This whole fading function doesn't behave well with LED lights versus incandescent

An internet search indicates that an ac led will dim better with trailing edge phase cutting. Are you doing that, or phase cutting at the leading edge (sine wave rising from 0)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.