I am planning to control a heating coil by using a transistor (i.e., TIP126) connected to one of the Arduino's PWM outputs. I plan to rectify the 120V @ 60Hz mains and use it directly to power the coil (i.e., not smoothed). I was wondering if the 120Hz rectified voltage would cause a problem with Arduino's processor, since the base current on the transistor (and thus through the PWM port) would vary at 120Hz.
Also, the best suitable transistor I can find has a maximum current of 5A. I'd like to do around 13A @ 120VDC. Instead of using multiple transistors, can anyone recommend a way to switch (and control the power usage of) the heating coil?
I am planning to control a heating coil by using a transistor (i.e., TIP126) connected to one of the Arduino's PWM outputs
You're gonna get seriously ugly EMI switching in the middle of a cycle. Well behaved circuits such as you describe are typically designed with zero crossing detectors (only switch on/off when the AC is at 0V) to avoid such problems. You may need to redesign your Arduino code to set the duty cycle by selecting X out of Y 60Hz cycles to operate instead of simple PWM switching.
I'd like to do around 13A @ 120VDC. Instead of using multiple transistors, can anyone recommend a way to switch (and control the power usage of) the heating coil?
Solid State Relay (SSR)? Not sure if they are designed to switch at Arduino PWM speeds, though, for the reason described above.
I could modify the code so that it does as you say (but at 120Hz, since the waveform is rectified AC), but I'm wondering about the mechanism of the EMI you refer to. I could build in a zero-crossing detector, but it might just be easier to use a large smoothing cap.
This is produced when ever current changes rapidly. This causes an electromagnetic wave to be generated. This then induces voltages in other parts of the circuit and generally causes things to not work as they should. With 13A you are going to produce one hell of a lot of it and your system will act as a transmitter probably taking out AM radios over some distance. This would be consider illegal in most countries.
However, as it is heating there is no need to switch at anything like this frequency as the thermal time constant in your system makes the simple on / off duty cycle over say two seconds just as effective as anything else. This gives you 120 cycles to play with and should give you plenty of resolution for control.
Also do not connect the arduino however indirectly to the mains, use an opto isolator. Finally why rectify the AC why not use a triac as that does the turning off at zero crossing detection for you.