Thank you to the guys at HEGE supporting Badcaps [ HEGE ] [ HEGE DEX Chart ]

Announcement

Collapse
No announcement yet.

USB powered relay for mains voltage?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    USB powered relay for mains voltage?

    So I have a small LED light and a pair of amplified speakers that I only want turned on when my computer is on. I'm thinking that there must be a way to trigger a relay when USB power comes on. I just want to make sure I build it correctly. I would imagine there should be a transformer or something to isolate the Computer side from the mains power side.
    Am I crazy?
    Is there already a product like this? I haven't been able to find one.
    Thanks Guys.

    #2
    Re: USB powered relay for mains voltage?

    Very easy.
    U will need a 5v relay that is sutibale to switch mains,
    a diode,
    a usb cord,
    wire sutiable for mains,
    Mains Plug and socket,
    A case to hold relay and connections.
    Two cable grips to fit the enclosure.
    Good wiring practices and the relay provides the isolation.
    My pc
    CPU : AMD PHENOM II x4 @ 3.5Ghz
    MB : ASUS M4A89TD PRO USB3
    RAM : Kingston ValueRAM 16gb DDR3
    PSU : Cooler Master 850W Silent Pro
    GPU : ATI Radeon HD 6850

    Comment


      #3
      Re: USB powered relay for mains voltage?

      Or get smart outlets:
      Something like this
      https://www.amazon.com/TrickleStar-O...dp/B00JPDYYSM/
      Never stop learning
      Basic LCD TV and Monitor troubleshooting guides.
      http://www.badcaps.net/forum/showthr...956#post305956

      Voltage Regulator (LDO) testing:
      http://www.badcaps.net/forum/showthr...999#post300999

      Inverter testing using old CFL:
      http://www.badcaps.net/forum/showthr...er+testing+cfl

      Tear down pictures : Hit the ">" Show Albums and stories" on the left side
      http://s807.photobucket.com/user/budm/library/

      TV Factory reset codes listing:
      http://www.badcaps.net/forum/showthread.php?t=24809

      Comment


        #4
        Re: USB powered relay for mains voltage?

        or just grab an SSR from ebay.
        http://www.ebay.co.uk/itm/252999774991

        and build it into the speakers if you have room!

        Comment


          #5
          Re: USB powered relay for mains voltage?

          Originally posted by stj View Post
          or just grab an SSR from ebay.
          http://www.ebay.co.uk/itm/252999774991

          and build it into the speakers if you have room!
          I was thinking same but he mentioned led desk lamp or somthing like that.
          My pc
          CPU : AMD PHENOM II x4 @ 3.5Ghz
          MB : ASUS M4A89TD PRO USB3
          RAM : Kingston ValueRAM 16gb DDR3
          PSU : Cooler Master 850W Silent Pro
          GPU : ATI Radeon HD 6850

          Comment


            #6
            Re: USB powered relay for mains voltage?

            Originally posted by budm View Post
            Or get smart outlets:
            Something like this
            https://www.amazon.com/TrickleStar-O...dp/B00JPDYYSM/
            Nice
            My pc
            CPU : AMD PHENOM II x4 @ 3.5Ghz
            MB : ASUS M4A89TD PRO USB3
            RAM : Kingston ValueRAM 16gb DDR3
            PSU : Cooler Master 850W Silent Pro
            GPU : ATI Radeon HD 6850

            Comment


              #7
              Re: USB powered relay for mains voltage?

              Thanks guys that's exactly what I was thinking of. Solid State Relay I thought those were more expensive. I have some more research to do.
              Thank you.

              Comment


                #8
                Re: USB powered relay for mains voltage?

                If you are real anal about isolation, a triac, and opto-isolator are cheap.
                Last edited by goontron; 08-09-2017, 02:01 PM.
                Things I've fixed: anything from semis to crappy Chinese $2 radios, and now an IoT Dildo....

                "Dude, this is Wyoming, i hopped on and sent 'er. No fucking around." -- Me

                Excuse me while i do something dangerous


                You must have a sad, sad boring life if you hate on people harmlessly enjoying life with an animal costume.

                Sometimes you need to break shit to fix it.... Thats why my lawnmower doesn't have a deadman switch or engine brake anymore

                Follow the white rabbit.

                Comment


                  #9
                  Re: USB powered relay for mains voltage?

                  Originally posted by stj View Post
                  or just grab an SSR from ebay.
                  http://www.ebay.co.uk/itm/252999774991

                  and build it into the speakers if you have room!
                  One might want to be careful with what SSR one buys.

                  Teardown

                  One thing is overrating, but with that isolation distance, hardly CE compliant, if one care for such things.
                  ------------
                  Be a mensch

                  Comment


                    #10
                    Re: USB powered relay for mains voltage?

                    ^ Seems to be China Export compliant to me....

                    That european lab thing on the other hand....
                    Things I've fixed: anything from semis to crappy Chinese $2 radios, and now an IoT Dildo....

                    "Dude, this is Wyoming, i hopped on and sent 'er. No fucking around." -- Me

                    Excuse me while i do something dangerous


                    You must have a sad, sad boring life if you hate on people harmlessly enjoying life with an animal costume.

                    Sometimes you need to break shit to fix it.... Thats why my lawnmower doesn't have a deadman switch or engine brake anymore

                    Follow the white rabbit.

                    Comment


                      #11
                      Re: USB powered relay for mains voltage?

                      Clive also tested running a LED lamp from the SSR, as per OP requirement. Look what happened here. Speakers and blinking light, and you got a disco! ;-)
                      ------------
                      Be a mensch

                      Comment


                        #12
                        Re: USB powered relay for mains voltage?

                        i did see the teardown, the 25A bit is unimportant for most people,
                        and it's fine at 5v and with a decent load.

                        it's pretty stupid to use something like that for a few W.

                        Comment


                          #13
                          Re: USB powered relay for mains voltage?

                          Originally posted by mattbatt View Post
                          I would imagine there should be a transformer or something to isolate the Computer side from the mains power side.
                          Am I crazy?
                          Why bother with the AC mains at all? Will you remember to switch the hot and not the neutral? Will your gizmo get plugged in "backwards" (thereby moving the switch onto the neutral leg where it doesn't belong)? etc.

                          Chances are, your speakers are powered by a wall wart (which is what you were initially hoping to control by gating the mains). Insert a relay in the low voltage supply from the wall wart (instead of in the mains supply to the wall wart).

                          Note the output rating on the wall wart when sizing the relay contact(s) to ensure the load represented by the speakers can be handled. Note, also, that DC current switching capabilities of relays differ from AC loads. But, unless you're powering something "sizeable", this should still be an easy fit.

                          Depending on the speakers' power requirements, you can also just salvage a "PC power supply" to power the speakers and control it via your USB device (i.e., using the soft power-on control lead)

                          Comment

                          Working...
                          X