The Yocto-Relay device contains two USB-driven miniature unipolar relay switches. You can drive by software each relay input to one of two individual outputs (computer-driven switch). To make it easier to test your project, four leds positioned on the front side of the connector show the output currently active for each relay.
This product is designed to stand up to 55V and a current of 2A, but no more than 60W. Be aware that using a relay to drive inductive loads (motors, transformers) may lead to accelerated aging of the relay. Please refer to the documentation for hints on reducing this type of problems.
This device can be connected directly to an Ethernet network using a YoctoHub-Ethernet, to a WiFi network using a YoctoHub-Wireless-g, it can even be connected to a GSM network thanks to the YoctoHub-GSM.
USB cables and enclosures to be ordered separately.
My goal is to be able to programatically control external hard disk (power on/off).
The drive has 1 usb cable and a power adapter.
Is this possible? If so, what type will be appropriate, Yocto-Relay or Yocto-PowerRelay?
If you only want to be able to cut the disk power, a Yocto-PowerRelay will be fine*. However you'll have to check in the disk documentation if you are allowed to keep it connected to USB when not powered.
(*) since your power adapter is probably an inductive load, protecting the relay with a TVS diode might be a good idea, check the Yocto-PowerRelay doc for more info about use with inductive loads.
I tried using Python and it works perfect. But when I tried with C++ code, relay works only first time and after that it does not work without any error message.
Feel free to contact firstname.lastname@example.org and send us your code so that we can help you to fix it.
The C++ lib should definitely work as well as the Python version...
I compiled cpp sample code downloaded from this site using Visual Studio 2012 and ran "VisualStudio.exe any 1 A[or B]" on command line.
Actually, you are supposed to type:
VisualStudio.exe any A[or B]
VisualStudio.exe any 1 A[or B]
You are right.
Now it works. Thank you.
It is different from the way Python program is implemented.
In such case I need to make some change in the code since I have dual relay and I want to use both independently.
I think I can make change in the code to support that.
Thank you for your help.
It is amazing product anyway.
Awesome design and complete package of software support.
I'm retired but used to write a small amount of C++ at work where I had access to a compiler. Now I have no compiler but I would like to control the relay with my computer via USB. But rather than simple switching, I would like to have code to randomly switch back and forth with operator set limits on time. Could you provide this code since I can't compile anymore?
@yellow_jacket : There is free C++ compiler on each platform: on Linux you can use gcc, on OS X
you can use Xcode and on Windows there is a free version of Visual Studio (Visual Studio Community).
Is it possible to catch the relay state, if it changes with
@webjoy: yes with relay.get_State(). You can even set a callback on state change with relay.registerValueCallback().
I have bus ticketing app on android which activates turnstile via bluetooth.
I am having trouble with stability so i am looking for a wired alternative.
Can i code and control yocto-relay into my app and make it flash the relay?
Mind you this would go on about 600 - 1000 times a day.
For such a high switching frequency, electro-magnetic relays might not be the best answer. Contact Yoctopuce support.