image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

Go Back   Physics Forums > Engineering > Electrical Engineering


Reply

image Interfaceless USB driven relay Share It Thread Tools Search this Thread image
Old Nov3-09, 04:37 PM                  #1
barderer

barderer is Offline:
Posts: 3
Interfaceless USB driven relay

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
  Reply With Quote
Old Nov3-09, 04:49 PM                  #2
MATLABdude

MATLABdude is Offline:
Posts: 875
Re: Interfaceless USB driven relay

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!
  Reply With Quote
Old Nov3-09, 04:53 PM       Last edited by barderer; Nov3-09 at 04:59 PM..            #3
barderer

barderer is Offline:
Posts: 3
Re: Interfaceless USB driven relay

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/...CYPRESS3700911

Do they have something that is a little more human friendly that I don't need machines to solder with.
  Reply With Quote
Old Nov3-09, 04:54 PM                  #4
waht
 
waht's Avatar

waht is Offline:
Posts: 1,148
Recognitions:
PF Contributor PF Contributor
Re: Interfaceless USB driven relay

This thread discusses the same thing:

http://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-Ca...item35a38af991

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

  Reply With Quote
Old Nov3-09, 04:55 PM                  #5
waht
 
waht's Avatar

waht is Offline:
Posts: 1,148
Recognitions:
PF Contributor PF Contributor
Re: Interfaceless USB driven relay

ahh MATLABdude, you beat me to it.
  Reply With Quote
Old Nov3-09, 05:21 PM                  #6
barderer

barderer is Offline:
Posts: 3
Re: Interfaceless USB driven relay

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?
  Reply With Quote
Old Nov3-09, 11:41 PM                  #7
waht
 
waht's Avatar

waht is Offline:
Posts: 1,148
Recognitions:
PF Contributor PF Contributor
Re: Interfaceless USB driven relay

Originally Posted by barderer View Post
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/pro...oducts_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.
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Interfaceless USB driven relay
Thread Thread Starter Forum Replies Last Post
step relay????? ahmedahmed Electrical Engineering 4 Jul16-09 05:45 PM
help me in relay ahmedahmed Electrical Engineering 5 Jul2-09 03:46 AM
Continuity Relay denni89627 Electrical Engineering 5 Sep30-06 11:06 PM
Help with Relay circuit neuralJ Electrical Engineering 3 Jul6-06 09:34 AM
Relay Neurones garytse86 Biology 2 Jun6-05 11:31 AM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image