Electronic – Direct connecting 5v relay interface board to usb

relayusb

I'm absolutely noob in electronics but I have this relay and I want to connect it to USB.
When PC switches on usb VCC has +5v. Can I connect USB VCC to Relay Board "VCC" and "IN" wires to open relay (and GND to GND)? I need open relay when PC switches on and close relay when it switches off.

upd:
1-Channel Relay interface board info:

  • Each one needs 15-20mA Driver Current
  • Equiped with high-current relay : DC30V 10A AC250V 10A
  • Standard interface that can be controlled directly by microcontroller (Arduino , 8051, AVR, PIC, DSP, ARM)

enter image description here

Best Answer

Each module uses 15-20mA of current from the USB's 5V, which is safe. If you want the relay to switch on when power is applied, connect the input to ground. (You don't want the relay to switch off when power is applied, because then it will always be off.) Notice that the relay's contacts are switchover, so you can use it either as normally-open or normally-closed.

You can save some power if you disconnect the power indication LED (at the right on the schematic.)