Welcome, %1$s. Please login or register. - Did you miss your activation email?

Login with username, password and session length
 

Author Topic: [5-volt Activated Relay] Turn Models On / Off With USB-equipped Device  (Read 557 times)

Offline Gadgetron_3000

  • Admiral
  • *****
  • Posts: 1161
Hi, Everyone!

Have you ever wanted to have a model build (with electronics) sit next to a TV, a PC, or some other USB port-equipped device and have that model turn on or off when that device turns on or off?  I have, and it's actually quite simple to do.  All you need is an inexpensive 5-volt activated relay module.

I got mine from a Chinese seller on eBay.  The ones with handy screw terminals usually cost between $2.50 to $3.50 U.S.D. with free shipping.  The one I got was listed as "5V 1-Channel Relay Module Low Level Trigger," and it looks like this...



Here is a connection diagram I drew up as a guide for using this relay module...



So what I did was...

  • Use a USB 2.0 cable that has the large, flat, male Type A plug on one end.  I cut off the other end to expose the internal wires.  There are four colored wires.  The white and green ones are the data wires and will not be used.  All you want are the red (positive "+") and the black (negative "-") wires.  Use a wire stripper to expose the leads of the red and black wires.  Tin the leads with a soldering iron and solder, if desired.
  • Plug the USB black (negative "-") wire to the screw terminal marked "DC -".
  • Plug one end of a resistor (100 ohm / 1/4 watt or higher) lead to the screw terminal marked "CL1".
  • Plug the other end of the resistor lead to the screw terminal marked "DC -".
  • Plug the USB red (positive "+") wire to the screw terminal marked "DC +".
  • From the power supply of the model build, you will leave the negative (-) connection alone.  That will continue straight to your model electronics setup.
  • Plug the positive (+) wire of the model build power supply to the screw terminal marked "NO".
  • Plug a positive (+) wire that will go to your model electronics setup from the screw terminal marked "COM".
  • Screw all the terminals down and check that everything is nice and tight.
  • Connect the male USB Type A plug to a powered-off TV, PC, or other USB port-equipped device.
  • Plug in the model build power supply to the wall power outlet.

Now for the test...

  • Power-on the TV, PC, or other USB port-equipped device.  That device's USB port should then receive voltage which gets sent to the relay module.  The module's red and blue LED indicators should come on and you should hear the relay make a click sound.  Power from your model build power supply should now go to the model electronics setup.
  • Power-off the TV, PC, or other USB port-equipped device.  That device's USB port should then have its voltage disconnected which then turns off the relay module.  The module's red and blue LED indicators should turn off.  Power from your model build power supply should now be cut off from the model electronics setup.

And that's it.  Don't let the number of steps fool you because it really is quite simple.  Also, the relay itself can handle quite a bit of power (AC: up to 250-volts / 10-amps and DC: up to 30-volts / 10-amps), so the module should easily handle most of your 5-, 9-, and 12-volt electronics projects.

Not too bad!  Easy!

I was inspired by this YouTube video: https://youtu.be/TBfbVb1y3jg

I hope this is helpful.  Let me know if you have any questions.  :)
"They've done studies, you know.  60% of the time, it works every time."

-----

Google+: https://plus.google.com/109660073537038906328

Offline Armandodlc

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1857
  • I am the beginning. The end. The one who is many.
    • DLC Model Builders on Google +
Re: [5-volt Activated Relay] Turn Models On / Off With USB-equipped Device
« Reply #1 on: January 31, 2017, 07:48:37 pm »
Hmmm...interesting. So in essence, whenever you turn on your USB device, it turns on your model also?

Armando
My youtube channel: DLC Model Builders is at http://www.youtube.com/channel/UCCmRSBxKoouCslj6_-bOPcQ

Offline Gadgetron_3000

  • Admiral
  • *****
  • Posts: 1161
Re: [5-volt Activated Relay] Turn Models On / Off With USB-equipped Device
« Reply #2 on: February 01, 2017, 03:07:18 am »
Hmmm...interesting. So in essence, whenever you turn on your USB device, it turns on your model also?

Yep.

:)
"They've done studies, you know.  60% of the time, it works every time."

-----

Google+: https://plus.google.com/109660073537038906328

 




Enterprise © Bloc