0
\$\begingroup\$

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?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Mar 10, 2015 at 16:12
  • \$\begingroup\$ 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? \$\endgroup\$
    – tmsimont
    Mar 10, 2015 at 16:20
  • \$\begingroup\$ 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. \$\endgroup\$ Mar 10, 2015 at 17:04
  • \$\begingroup\$ Also, the inputs to the microcontroller must be limited to 5 volts. \$\endgroup\$ Mar 10, 2015 at 17:05

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$
6
  • \$\begingroup\$ 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. \$\endgroup\$
    – tmsimont
    Mar 10, 2015 at 16:18
  • \$\begingroup\$ 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). \$\endgroup\$ Mar 10, 2015 at 16:52
  • \$\begingroup\$ thanks for your help! would I still need a transistor with this relay? \$\endgroup\$
    – tmsimont
    Mar 19, 2015 at 15:03
  • 1
    \$\begingroup\$ @tmsimont: The coil needs 90mA, so yes, a transistor would be needed. \$\endgroup\$ Mar 19, 2015 at 15:30
  • \$\begingroup\$ it kind of looks like this thing has the relay, transistor and diode all on one board... is this all i need? \$\endgroup\$
    – tmsimont
    Mar 19, 2015 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.