SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By cheesy
#14808
I'm working on a computer controlled kegerator (similar to the one at wiki.kegbot.org) and need to control a 120VAC solenoid. It needs a few hundred mA at 120VAC, so I got some suitable relays.

I'm mostly worried about the AC screwing with the microcontroller and other parts. Can it cause interference, etc.

Also, would it be a really bad idea to try running the AC on a breadboard for prototyping? The relays don't have quick connects so it's either that or soldering to the pins.

Thanks
By spacewrench
#14811
I'd say it's a pretty bad idea mixing 120VAC and low VDC on a prototyping breadboard. I'm sure we've all hooked something or other up to the wall with alligator clips, but if you're going to be working around it longer than a few minutes, you really don't want anything hot. Just put a LED where the solenoid goes and get your logic working with the light blinking on and off.
I can't tell you much about interference, except to say that you'll probably have some. I don't know whether it'll cause big problems with the uproc.
By wheeler
#14859
You may also want to look at using a triac instead of a relay, although relays are in general less finicky about what you do to them.

You will definitely want to optically isolate the line voltage from the logic voltage. I have used triacs (essentially two SCRs, also called an SSR - see MAC4DSMT4) with an isolator such as the MOC3043SM with good results. With a triac, the only trick is to snub some of the really high-rate transients using an appropriately rated cap and resistor that are in series with each other and in parallel with the load. 100 Ohms and 0.01uF work well for 120V stuff. You can alternatively use a varistor to do the same thing.
By beebop
#14860
Hi,

Why don't you build the relay circuit on a piece of proto board (you know, the PCB with evenly spaced holes?) Build it complete with opto-isolators, quick connects for the relays, and any other components you need, with a connector to your control circuit. Since this is a straight forward kind of circuit, it shouldn't present any problems as far as debugging is concerned. That way it IS isolated from your bread board. You can then use it for other experiments, or use it on your Kegerator the way it is.

In the past, I have done some pretty stupid things with higher voltages, but I don't think I'd ever run line voltage on a breadboard. I just know how my hands would end up with that feeling like they have been hit with a big hammer!

Regards
Robert