0
\$\begingroup\$

I have this smart plug that allows for a separate ON/OF control of the USB ports. The idea is to use this USB switch to switch another device (230 V/ 500 mA).

For a good price I found these relay modules on Amazon that are meant for Arduino.

My problem: the relay module has 5V input, I guess pins GND and VCC but also a Signal pin. What do I connect to the signal pin from my USB plug?

Thank you for your time.

relay module

Connection, I guess to some controller

\$\endgroup\$
7
  • \$\begingroup\$ The relays (or solid-state relays) are already in those "smart plugs" and can switch 16 A. Why do you want external ones? \$\endgroup\$
    – Transistor
    Nov 15, 2020 at 9:40
  • \$\begingroup\$ My English lets me down today, so I meant: What USB pin do I connect to the Signal pin on the relay module? \$\endgroup\$
    – B. Anders
    Nov 15, 2020 at 10:00
  • \$\begingroup\$ @Transistor I already use the 16A Plug to control one device, I need the USB to control another device and because of space (and budget) limitations, I can't add another plug. \$\endgroup\$
    – B. Anders
    Nov 15, 2020 at 10:03
  • \$\begingroup\$ Then the smart relay is not relevant to your question. You are just asking how to switch on a relay module with a 5 V signal. Maybe you should edit your question. \$\endgroup\$
    – Transistor
    Nov 15, 2020 at 10:25
  • \$\begingroup\$ @ Transistor As you can see, I'm new here, so I hope I didn't break any rules as I articulated my problem, but I tried to explain what I don't get: what USB pin to what relay module pin. I added the devices to make it more clear, therefore I think it is fairly relevant and if you don't mind I will let the question as it is for now. Now to get back to business: what do I connect to the signal pin on the relay module, please? \$\endgroup\$
    – B. Anders
    Nov 15, 2020 at 10:45

2 Answers 2

0
\$\begingroup\$

If you are using the switchable USB power outlets as controls then you simply power the module from the USB +5 V and GND lines and tie the relay control input to +5 V.

My concern was that if I tie the USB +5V to both the VCC and IN pin on the relay module there is a short that would fry the circuit or the USB on my plug.

No. It is designed to be driven by a logic signal that switches from 0 V to 5 V. Connecting directly to +5 V does the same thing.

Alternatively, could that work if I connect the USB DATA + to the signal input (IN) on the relay module?

No. DATA+ is a signal line, but not a logic signal and, most likely, it isn't even connected in the USB socket.

\$\endgroup\$
4
  • \$\begingroup\$ You mean I should tie the USB +5V twice on the relay module? Once for power and once for signal? \$\endgroup\$
    – B. Anders
    Nov 15, 2020 at 13:00
  • \$\begingroup\$ Yes. I'm not going to look at the Amazon ad because it is unlikely that there will be a datasheet. ("No datasheet? No sale!") Most of them have a jumper to select how the logic works and you won't damage the module by trying connecting to +5 or GND. \$\endgroup\$
    – Transistor
    Nov 15, 2020 at 13:03
  • \$\begingroup\$ I updated the post with product images so that the Amazon product links won't be needed. As you see there is no jumper. My concern was that if I tie the USB +5V to both the VCC and IN pin on the relay module there is a short that would fry the circuit or the USB on my plug. Alternatively, could that work if I connect the USB DATA + to the signal input (IN) on the relay module? \$\endgroup\$
    – B. Anders
    Nov 15, 2020 at 13:21
  • \$\begingroup\$ See the update. \$\endgroup\$
    – Transistor
    Nov 15, 2020 at 13:50
0
\$\begingroup\$

First, you should be aware of what is low level trigger and what is high level trigger.

Does this relay will be closed on HIGH or LOW? First you answer this.

After that you said it is a 5 V relay. So yes you can feed it with 5 v directly to make it closed.

If it triggers with ground, then you should connect the signal pin to ground to make the relay closed.

\$\endgroup\$
1
  • \$\begingroup\$ I'm not sure what you mean, but I am aware of how the relay functions. If you look at the pic above you can see that the relay can be used both normally closed and open. The only concern was the 5V trigger signal, which Transistor kindly answered. \$\endgroup\$
    – B. Anders
    Nov 15, 2020 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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