I'm more a computer programmer than an electronic specialist so my question might seem simple to you.

I have a speaker and some other devices, I wanted to turn them off when TV is turned off, so I thought maybe it's so easy, I could connect one of USB ports of TV to a 5V relay and when TV is turned off every other device would be turned off too.

But after searching a bit I realized it's possible that relay coil consumes more current than a USB port provides, moreover backlash can be harmful to host device, I know there are some USB modules for triggering relay through USB port but I'm not supposed to do amazing stuffs by that, also I wanted to know if it can be done using a simple circuit by a transistor and a diode?

Can you guide me or offer a link for that at least?

  • \$\begingroup\$ If you don't need to switch fast, you can use a capacitor to 'gather' energy over a period of time. Then once it is charged use it to control the relay. You must use a latching relay to switch the speaker as that type needs only a 'pulse' of energy to toggle on or off. \$\endgroup\$ – Oldfart Jul 24 at 14:50
  • \$\begingroup\$ Are your speaker and other devices also running on USB 5V power or are we talking about mains power for those devices? \$\endgroup\$ – nvuono Jul 24 at 19:13

You just need a solid-state relay (SSR). Choose one that can be activated with an input of 5V and can control ac power at the voltage of your local mains. Add up the current of all of the devices you want to control, and make sure that the selected SSR can handle that much current on its ac controlled side. The rest is just wires to connect everything.

Be advised that you may need to provide a heatsink for the SSR.

  • \$\begingroup\$ There is no backlash in that case? \$\endgroup\$ – Mohammad Musavi Jul 24 at 17:04
  • \$\begingroup\$ I don't know what you mean by "backlash", but the SSRs are designed to be used in exactly this way. \$\endgroup\$ – Elliot Alderson Jul 24 at 22:16
  • \$\begingroup\$ Thanks, but I want to know is it going to make some problems because of Solid State Relay Leakage? \$\endgroup\$ – Mohammad Musavi Jul 25 at 4:33
  • \$\begingroup\$ I think by backlash he means back emf produced from relay coil. There is no coil in SSR so no back emf is produced. \$\endgroup\$ – Hemal Chevli Jul 25 at 5:57


I found a good article which author resolved the same problem, I didn't try it but i think it's feasible.

  • \$\begingroup\$ You should summarise what the advantage of this circuit is over a relay connected directly to the USB port. \$\endgroup\$ – Transistor Jul 24 at 17:06
  • \$\begingroup\$ Yes, please summarise. And also give details of where that +5v supply is coming from. And what that complicated circuit actually does. \$\endgroup\$ – Kripacharya Jul 24 at 17:12
  • \$\begingroup\$ I had added a link to that article for more details. As for advantage, it's because direct connection is not recommended since coil consumes at least 320 mA while USB on TV provides 200 mA. \$\endgroup\$ – Mohammad Musavi Jul 24 at 17:18
  • \$\begingroup\$ That circuit is going to turn off after a certain amount of time (555 is a timer chip), not the same function as your original post. However you might be able to connect pin 4 of the opto to R6 to have it drive directly. \$\endgroup\$ – Aaron Jul 24 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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