Somewhat based on this project, see bottom of page
Added a separate Arduino because I had use in this previous project where I used an Arduino to detect the AC zero crossing and generate a PWM signal to control power based on the amplitude of the analog input.
I implemented the project above, but found the big power resistor gets very hot. Its ok for an espresso machine because the pump doesn't run very long, but for a roaster when you're running for around 10 mins, I didn't want to do this.
I added a transformer and bridge, so the voltage used for detection is much lower and the resistor doesn't get hot. I already had a 12V transformer on hand, so I used it.
I had bought the parts for the project linked to at top, but had used different parts for my previous project. So used the parts from the other project.
12VAC transformer. Old so don't have part number. Current/power rating do not matter, very little power used
rectifier bridge
HCPL-817-000E OptoCoupler datasheet
Crydom D2450-10 SSR (overkill for fan but I had it around so used it. Need a instant on type SSR)
4.7 ohm resistor
8.2k resistor
Schematics and Pinouts
HCPL-817
Crydom 1202 SSR
0.02 msec delay
8.3 msec = 1/2 of a 60 hz cycle
.02/8.3 = 0.24%
7-12 ma input current
arduino is 20 ma max current, so it can drive the SSR
Wiring
Opto Coupler/transformer/bridge
Arduino D2 to HCPL-817 pin 4
gnd to HCPL-817 pin 3
HCPL-817 pin 1 to 4.7k resistor to bridge +
HCPL-817 pin 2 to bridge -
bridge ac1 to 12VAC transformer - 1
bridge ac2 to 12VAC transformer - 2
SSR
Arduino D2 to SSR input 3 +
gnd to SSR input 4 -
132V AC Fan Power to SSR output 1
Fan AC switch - 1 to SSR output 2
Fan Switch
Fan AC switch - 1 to SSR output 2
Fan AC switch - 2 to Fan Outlet Line
Fan AC switch - 3 to Fan Dimmer AC - 2
Fan Dimmer
Fan Dimmer AC - 1 to AC Line
Fan Dimmer AC - 2 to Fan AC switch - 3