Can a USB Relay Be Controlled Without a Microcontroller?

  • Thread starter barderer
  • Start date
  • Tags
    Relay Usb
In summary: The most important thing is to have an interest in programming and electronics, otherwise you will not stick with it. Programming and electronics are both very interesting subjects, but without an interest in either, it is difficult to stick with them.
  • #1
barderer
4
0
Hello,

I want to make simple USB driven relay but I am wondering if it can be done without having a USB device on the other end. Most solutions I have seen thus far have a microcontroller that drives a relay. I was wondering if I could use a library like libusb to send data directly to the usb port which simply switches a MOSFET or MOSFET relay combo. E.G. I just say, raise power line on USB port 1, that line hooks up to the gate, relay on. Can this be done? Or does USB require a interface with a driver etc. The end goal here is to be able to build this for 5 dollars.

Nick
 
Engineering news on Phys.org
  • #2
I've done this with one of the USB to serial conversion ICs (FTDI FT232BM). We used one of the flow control lines (RTS? CTS?) that was offered by the conversion chip, but wasn't being used for anything. Worked pretty well, actually (although it was only driving a very low-current miniature telecom relay).

There are microcontrollers that have built-in USB support that would probably work really well for this sort of application (you can get drivers that just make them look like serial ports--send a little string to them, and have them turn on; you should be able to wrap a driver around them based on a programmable USB device ID that I think you can put onto the EEPROM). Really cheap, too.

Alternately, you might be able to do something with the USB host IC's power sourcing capabilities (but I think that in some ICs, this doesn't control the current so much as trigger a warning when certain thresholds are exceeded).

EDIT: ...And welcome to PhysicsForums!
 
  • #3
MATLABdude,

Thanks for the response and the welcome. So are you saying get a USB supported controller for sayyyy a usb mouse, and just hack it to drive the relay? You think this can be done for under 5 dollars? I found a solution that uses a PIC but then I need a PIC programmer...

EE knowledge and skill - 1
Programming skill - 9

:)

are you talking about something like this?
http://www.futureelectronics.com/en/Technologies/Product.aspx?ProductID=CY7C63813SXCCYPRESS3700911

Do they have something that is a little more human friendly that I don't need machines to solder with.
 
Last edited:
  • #4
This thread discusses the same thing:

https://www.physicsforums.com/showthread.php?t=351234

There is plenty of microcontrollers that can handle usb, but they require more complicated programming.

As an alternate, you can get a cheap $3.49 USB to serial converter. All you have to do is devise a simple serial interface that turns on a relay. If you are using windows, you can send commands to the serial through the hyper terminal in the accessories menu, or code a simple app in C or C++ or any language of choice to send data to the serial port.

Here is the converter:
http://cgi.ebay.com/USB-to-Serial-Cable-RS232-DB9-Magellan-Garmin-PC-new_W0QQitemZ230377060753QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item35a38af991

And the schematic prototype: this whole thing should cost you less that $5 bucks

relais.gif
 
  • #5
ahh MATLABdude, you beat me to it. :smile:
 
  • #6
waht,

That seems like a good approach. Curious, what is the limit on how many relays could be controlled using this method? Right now I only want one, but I am just saying. I would like to have everything in one package, e.g. the usb port/relay/power in and out etc. Would it be smarter to go with the micro controller method or the serial port method if this is the end goal?
 
  • #7
barderer said:
Curious, what is the limit on how many relays could be controlled using this method? Right now I only want one, but I am just saying.

That depends how much current you can draw from the serial port or from the converter, I'm not sure how much though.

But a USB port can supply up to 500 mA of current.


I would like to have everything in one package, e.g. the usb port/relay/power in and out etc. Would it be smarter to go with the micro controller method or the serial port method if this is the end goal?

If you just need a simple switch, then go for the converter, but if you are into programming consider getting a programmer, and a development board. It will take more work and time to figure it out, but the learning experience will open up a world of new possibilities.

Here is a suggested PIC development board based on PIC18F4550

Pic development board
http://www.sparkfun.com/commerce/product_info.php?products_id=8561

Pic programmer
http://www.futurlec.com/PIC_Programmer.shtml

It's a bit pricey but well worth it, if you seriously considering learning it.
 
  • #8
what,

How should I choose which tech to learn? I see starter kits for things like this

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2615&dDocName=en535536

that seem to be more powerful for the same price. I am serious about learning, but I want to start with something that will be very versatile . soo many options!
 
Last edited by a moderator:
  • #9
Have you considered the parallel port? If it is available with you, its a lot more easier to programm and control.
 

FAQ: Can a USB Relay Be Controlled Without a Microcontroller?

What is an interfaceless USB driven relay?

An interfaceless USB driven relay is a type of relay that can be controlled directly through a USB connection without the need for a separate interface or controller. It allows for easy and convenient control of devices through a computer or other USB-enabled device.

How does an interfaceless USB driven relay work?

An interfaceless USB driven relay typically has a USB port for connection to a computer or device, and a set of relay outputs to control devices. When a command is sent through the USB connection, it triggers the corresponding relay output to turn on or off, allowing for remote control of devices.

What are the benefits of using an interfaceless USB driven relay?

The main benefit of using an interfaceless USB driven relay is its simplicity and convenience. It eliminates the need for a separate interface or controller, making it easier and more cost-effective to control devices. It also allows for remote control of devices through a computer or other USB-enabled device.

What types of devices can be controlled with an interfaceless USB driven relay?

An interfaceless USB driven relay can be used to control a wide range of devices, including lights, motors, appliances, and other electronic equipment. It is commonly used in home automation, industrial control, and hobbyist projects.

Are there any limitations to using an interfaceless USB driven relay?

One potential limitation of using an interfaceless USB driven relay is that it may not be suitable for high-power or high-voltage applications. It is important to check the specifications of the relay to ensure it can handle the required load. Additionally, some devices may require additional circuitry or components to be controlled effectively.

Back
Top