0

I'm trying to create a simple computer-controlled switch for some speakers that plug into my home 120V outlets.

I was thinking I could cut a surge protector or extension cord open, and wire this relay to the cables.

I'd want to then plug this controller into my computer, and then write some simple driver that would let me turn the relay on and off.

I have no experience with relays. I read up on them and know that's what I need, but I don't know how to tell how much Amperage or Voltage you would need to use to power the change between an open and close circuit here.

Controller specs:

Processor:  ATmega32U4 @ 16 MHz
RAM size:   2560 bytes
Program memory size:    32 Kbytes
Motor channels: 0
User I/O lines: 15
Minimum operating voltage:  5.5 V
Maximum operating voltage:  15 V
Logic voltage:  5 V
Reverse voltage protection?:    Y

Relay:

American Zettler, Inc. 
AZ2280-1A-120AF RELAY; 
POWER; 
MINIATURE; 
30A; 
SPST; 
120VAC; 
1 FORM A;

Given the specs of the relay and the controller.. Would this work? How can I tell?

tmsimont
  • 135
  • 6
  • 1
    Note that the A-Star 32U4 Micro board can be operated from 5.5 to 12 volts, the microcontroller itself is operated from a regulated 5 volts generated on the board, so the voltage on its I/O pins must be limited to 5 volts. – Peter Bennett Mar 10 '15 at 16:12
  • so that means I should expect no more than 5 volts coming out of thie I/O pins, yes? And therefore I need a relay that has a 5V coil? – tmsimont Mar 10 '15 at 16:20
  • Yes - the maximum output voltage from the micro will be 5 volts, but you will probably need to use that to drive a transitor to handle the current needed to drive the relay. – Peter Bennett Mar 10 '15 at 17:04
  • Also, the inputs to the microcontroller must be limited to 5 volts. – Peter Bennett Mar 10 '15 at 17:05

1 Answers1

1

As the datasheet says, the -120AF has a 120VAC coil. Unfortunately you won't be able to activate this with a GPIO. Find a -5DF instead, and use the normal combination of transistor and flyback diode to run it off 5V and your GPIO.

Ignacio Vazquez-Abrams
  • 48,282
  • 4
  • 73
  • 102
  • Am I correct that I need a 120V coil here, since this is going to be plugged into my home AC? Does the amperage sound OK? I was thinking 15-30 Amps should do it. – tmsimont Mar 10 '15 at 16:18
  • Your contacts must be rated for mains voltage. Your coil needs to be rated for control voltage. A NEMA 5-15R outlet is rated for (surprise!) 15A, so that part is covered (since form A can switch 30A). – Ignacio Vazquez-Abrams Mar 10 '15 at 16:52
  • thanks for your help! would I still need a transistor with [this relay](http://www.amazon.com/gp/product/B00HR8NSNE/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1)? – tmsimont Mar 19 '15 at 15:03
  • 1
    @tmsimont: The coil needs 90mA, so yes, a transistor would be needed. – Ignacio Vazquez-Abrams Mar 19 '15 at 15:30
  • it kind of looks like [this thing](http://www.amazon.com/gp/product/B008MU1OBY/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A1THAZDOWP300U) has the relay, transistor and diode all on one board... is this all i need? – tmsimont Mar 19 '15 at 19:10
  • The sole reviewer claims that it works with a RPi, so I believe that it would be. A schematic would seal the deal. – Ignacio Vazquez-Abrams Mar 19 '15 at 21:10