USB powered relay for mains voltage?

Collapse
X
Collapse
+ More Options
Posts
 
  • Time
  • Show
Clear All
new posts
  • mattbatt
    Member
    • Jul 2017
    • 18
    • USA

    #1

    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.
  • joshnz
    Badcaps Veteran
    • Feb 2011
    • 969
    • New Zealand

    #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

    • budm
      Badcaps Legend
      • Feb 2010
      • 40746
      • USA

      #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

      • stj
        Great Sage 齊天大聖
        • Dec 2009
        • 30977
        • Albion

        #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

        • joshnz
          Badcaps Veteran
          • Feb 2011
          • 969
          • New Zealand

          #5
          Re: USB powered relay for mains voltage?

          Originally posted by stj
          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

          • joshnz
            Badcaps Veteran
            • Feb 2011
            • 969
            • New Zealand

            #6
            Re: USB powered relay for mains voltage?

            Originally posted by budm
            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

            • mattbatt
              Member
              • Jul 2017
              • 18
              • USA

              #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

              • goontron
                5000!
                • Dec 2011
                • 4108
                • US

                #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

                • sofTest
                  Badcaps Veteran
                  • Aug 2008
                  • 361

                  #9
                  Re: USB powered relay for mains voltage?

                  Originally posted by stj
                  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

                  • goontron
                    5000!
                    • Dec 2011
                    • 4108
                    • US

                    #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

                    • sofTest
                      Badcaps Veteran
                      • Aug 2008
                      • 361

                      #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

                      • stj
                        Great Sage 齊天大聖
                        • Dec 2009
                        • 30977
                        • Albion

                        #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

                        • Curious.George
                          Badcaps Legend
                          • Nov 2011
                          • 2305
                          • Unknown

                          #13
                          Re: USB powered relay for mains voltage?

                          Originally posted by mattbatt
                          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

                          Related Topics

                          Collapse

                          • CuriousJohn
                            Burco boiler power problem
                            by CuriousJohn
                            Burco BCPLSAFWM5L 5 Litre Wall Mounted Automatic Water Boiler With Filtration UK 240v

                            Does anybody have any experience with these Burco units at all there is no record of them on the forum lol and a proper service manual would be nice. I invite you all to pesuade me not to botch repair it with a 5v relay, read on.

                            This unit was rescued from a skip 3 years ago, the only fault it had then was no backight display (plus it wanted a new probe set and top seal) but the screen was never an issue you can still see the screen as is and I just use it to get 5 Litres of very hot...
                            12-22-2024, 10:25 AM
                          • valvashon
                            Repair Success! Middle Atlantic UPS2200R-IP
                            by valvashon
                            Yesterday I successfully repaired a Middle Atlantic UPS2200R-IP that had inadvertently been used as a surge suppressor at our transmitter site. It has already been replaced with an updated one but it's coming home with me now instead of being e-cycled. To be specific, this is the MA model that has the blue backlit display and has been discontinued, although this design may have been used in many UPS units including the smaller Middle Atlantic ones in this series.



                            Here's what happened: We experienced a brownout/surge at the site, which damaged the UPS and took our broadcasting...
                            02-06-2024, 12:54 PM
                          • Tynan Dill
                            Vizio e601i-A3 - Has Sound and Display, But No Backlight - Bad Power Supply Board or Bad LED Bulbs ?
                            by Tynan Dill
                            I was given this TV from my great uncle. He said it just wouldn't turn on one day out of nowhere, replaced the TV, and gave it to me to possibly fix and use for myself.

                            Upon bringing it home and plugging it up, it showed a standby light.

                            I powered it on and without a flashlight, the display showed the "V" but the lighting is very dim, but visible.

                            The screen seems to blackout and stay black, but with a flashlight I can see the display.

                            With my Playstation 4 connected via HDMI, and running a game I can hear sound.

                            Assuming...
                            11-22-2024, 01:46 PM
                          • Document Archive
                            MT3608 Step-Up Converter IC Datasheet
                            by Document Archive
                            The MT3608 is a constant frequency, 6-pin SOT23 current mode step-up converter intended for small, low power applications. The MT3608 switches at 1.2MHz and allows the use of tiny, low cost capacitors and inductors 2mm or less in height.

                            Internal soft-start results in small inrush current and extends battery life.

                            The MT3608 features automatic shifting to pulse frequency modulation mode at light loads. The MT3608 includes under-voltage lockout, current limiting, and thermal overload protection to prevent damage in the event of an output overload. The MT3608 is available...
                            10-07-2024, 05:02 AM
                          • Instafixx
                            Macbook A2179 820-01958
                            by Instafixx
                            Hi,
                            Have a Macbook A2179 with liquid damage. Customer showed it some shop which has done an ultrasonic cleaning of the board.
                            The board pulls 0V but doesnt turn on. No Fan SPIN. NOT IN DFU.

                            I checked the Power Sequences below and found this -


                            Once a valid external power source (Charger or battery) is connected, the following rails will come online.
                            PPBUS_G3H: Normal voltage is ~12.6v on the charger with the battery disconnected. Produced from the ISL9240 (U7000, which uses PPDCIN_G3H as its VIN.
                            PP3v3_G3H_RTC: Normal voltage is ~3.3v. Produced...
                            05-20-2023, 05:19 AM
                          • Loading...
                          • No more items.
                          Working...