Pages: [1]   Go Down
Author Topic: PowerSSR Tail and ZeroCross Tail without interrupts?  (Read 3585 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a way to use the PowerSSR Tail and ZeroCross Tail products to dim AC lights with Arduino without using interrupts?  ( I have a shield that is occupying the interrupt pins. )
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Links:
http://www.powerswitchtail.com/Pages/PowerSSRTail.aspx
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230333861/0

Using an interrupt is needed to dim the AC controller. There is no other way.

Okay, maybe, perhaps.
Originally the ATmega8 has INT0 and INT1 as interrupt inputs.
http://arduino.cc/hu/Hacking/PinMapping
The Arduino function attachInterrupt() is for those two pins.
http://arduino.cc/it/Reference/AttachInterrupt
But the newer ATmega168 ... ATmega328p have interrupts on almost every pin: PCINT0 ... PCINT23.
http://arduino.cc/en/Hacking/Atmega168Hardware
As far as I know, those PCINT pins can also be set a pin-change-interrupt. So it should be possible. But you might have to write your own interrupt routine.
I think that using this will work: http://arduino.cc/playground/Main/PcInt
« Last Edit: July 14, 2012, 08:45:41 am by Krodal » Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2509
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The PowerSSR is just for on/off and needs no Interrupt.
The ZeroCross variant is for fading, so the zero-cross signal is crucial.
A Mega-2560 has 6 interrupt pins.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Greater Boston, MA, USA
Offline Offline
Newbie
*
Karma: 1
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Links:
http://www.powerswitchtail.com/Pages/PowerSSRTail.aspx
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230333861/0

Using an interrupt is needed to dim the AC controller. There is no other way.

Okay, maybe, perhaps.
Originally the ATmega8 has INT0 and INT1 as interrupt inputs.
http://arduino.cc/hu/Hacking/PinMapping
The Arduino function attachInterrupt() is for those two pins.
http://arduino.cc/it/Reference/AttachInterrupt
But the newer ATmega168 ... ATmega328p have interrupts on almost every pin: PCINT0 ... PCINT23.
http://arduino.cc/en/Hacking/Atmega168Hardware
As far as I know, those PCINT pins can also be set a pin-change-interrupt. So it should be possible. But you might have to write your own interrupt routine.
I think that using this will work: http://arduino.cc/playground/Main/PcInt

@Krodal,

Thanks for pointing out how many more interrupts the 328P has -- WOOT.  If those are usable without terrible Arduino S/W gymnastics, this will greatly simplify AC phase control.  It appears that the http://www.powerswitchtail.com/Pages/PowerSSRTail.aspx can do AC phase control (dimming) of a non-inductive load, provided one has a time reference for zero crossings.  It might be possible to add in a more robust snubber, and use this thing to drive small inductive loads.  Not certain, but may be worth a try. 
I't not clear to me that this product has a UL listing.  If anybody knows about  that, either way, please post the details.  The disclaimer makes me wonder about this.

 For a zero-crossing reference pulse, one could buy one of their  http://www.powerswitchtail.com/Pages/ZeroCrossTail.aspx  devices.  However, it's pretty easy to make your own zero crossing detector, for much less.  The http://arduino.cc/playground/Code/ACPhaseControl example has a schematic for making a zero-cross reference -- and code to do a basic form of phase control/dimming.  (That code has a delay loop in its ISR, so I don't like it so much.  But it does do the job, albeit not elegantly.) 

AC phase control is even easier if you use an AC (transformer-based)  wallwart as the basis of your Arduino's power supply -- you can easily and safely get the zero-crossing pulse using an AC opto-isolator.   Using transformer isolated/stepped down AC also lets you stay away from connecting your zero-cross detector directly to the AC_hot and AC_neutral to drive your phase control.  Happy and safe.

Krodal -- thanks again for posting those helpful links; I appreciate your taking the  time and initiative to do so. smiley-grin

PiJoy
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That zero-cross example is not elegant indeed.
This one seems better: http://arduino.cc/playground/Main/ACPhaseControl

I don't mind using high voltages, but if I had to make a zero-crossing detector, I would use a bridge rectifier.
If the power supply is already in use, a second bridge amplifier could be added, next to the existing one.
This circuit uses a diode to seperate the 100Hz signal from the rest.
http://www.edaboard.com/thread219109.html#post930566
In that circuit I would first try to remove R1, C1 and filter some noise in the Arduino with software.
R2 could be needed to remove the charge from the capacitance of the diodes.

->added: That's funny. I just read this post: http://arduino.cc/forum/index.php/topic,114451.msg861082.html#msg861082 which mentioned this link: http://pcbheaven.com/circuitpages/Voltage_Controlled_AC_Light_Dimmer/ and it contains the same schematic.
« Last Edit: July 16, 2012, 08:43:03 am by Krodal » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34152
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get proportional mains controllers that do not need zero crossing control.
These simply use PWM to feed a proportional control input.
Logged

Pages: [1]   Go Up
Jump to: