 |
Search Sci.Electronics.Basics |
|
 |
 |
|
|
|
 |
|
|
Sci.Electronics.Basics -> Help Building a USB-Controlled USB Outlet?
There are 8 messages in this thread.
You are currently looking at messages 1 to 8.
|
|
|
I am a novice and would like to build a 120V AC outlet which can be switched
on and off by USB. I'm not sure what all I will need and want to make sure
that I'm not trying to do something much harder than it sounds. My end goal
is to have a single plug where I could plugin a lamp, TV, power strip, etc
and have the power to that device controller by a PC via USB port. Now I've
seen some devices out there like X10-compliant home automation controls and
there has always been a severe limitation in one way or another. I would
love the pulg to be grounded but it doesn't have to be if that is a
complicating factor.
It seems to me that I need a relay which can switch the 120V on/off and then
need a USB controller to control the relay. And I have seen USB controllers
which have serial interfaces on them but then how to get from a pin or two
of a serial port to the relay is where it breaks down in my head. I'm not
sure what I need between the two or if that would even work. I can handle
the software part of it once I get a hardware solution idenfitied.
Can any of you pros offer advice to get me going in the right direction?
Thanks!
Frank
|
|
|
|
|
|
Easiest way I can think of - get a FTDI 232R chip, hook up DTR to an
opto-isolated triac driver, to a triac, to the power.
Then, at least on Linux, you can toggle DTR just by changing the baud
rate to 0 (dtr off) or anything else (dtr on) via "stty" or the
termios() functions.
The FTDI chips also have some GPIO pins you can use; in theory you can
control six outlets with one chip that way (four GPIO, plus DTR, and
RTS). You'd need to use their DLL and API to do that, though. Not a
big deal if you know how to do any programming; the API is pretty
straight-forward.
You can even get a vanilla USB to Serial adapter cable, and use DTR
off that.
I have some triac circuits here:
http://www.delorie.com/house/furnace/
But the opto-triac-power circuit is pretty common; you should be able
to find schematics all over the web. I think the triac data sheets
usually have schematics too.
Beware - messing with 120v power is dangerous. This isn't a
beginner's project, although I think most beginners successfully pull
it off anyway. I know I did :-)
|
|
|
|
Author: Bob MonsenDate: 23:42 02-01-08
|
|
<noreply@noreply.net> wrote in message
news:K_udnQr1k4NwjOHanZ2dnUVZ_oimnZ2d@giganews.com...
>I am a novice and would like to build a 120V AC outlet which can be
>switched
> on and off by USB. I'm not sure what all I will need and want to make
> sure
> that I'm not trying to do something much harder than it sounds. My end
> goal
> is to have a single plug where I could plugin a lamp, TV, power strip, etc
> and have the power to that device controller by a PC via USB port. Now
> I've
> seen some devices out there like X10-compliant home automation controls
> and
> there has always been a severe limitation in one way or another. I would
> love the pulg to be grounded but it doesn't have to be if that is a
> complicating factor.
>
> It seems to me that I need a relay which can switch the 120V on/off and
> then
> need a USB controller to control the relay. And I have seen USB
> controllers
> which have serial interfaces on them but then how to get from a pin or two
> of a serial port to the relay is where it breaks down in my head. I'm not
> sure what I need between the two or if that would even work. I can handle
> the software part of it once I get a hardware solution idenfitied.
>
> Can any of you pros offer advice to get me going in the right direction?
>
> Thanks!
> Frank
http://www.futurlec.com/Relay_4.shtml
and
http://www.futurlec.com/USB.shtml
You will also need a 5V wall adapter to power the relay board.
About $50 not counting the adapter.
The problem will be building the interface between the USB module and the
relay card.
I can't tell from the specs in the link, but the USB module can probably be
programmed to make pins go up and down. They claim to have "Easy Setup and
Full Instructions".
I'm also guessing here, but the relay card probably uses a single pin per
relay as control. When it goes to 5V, the relay closes, when it goes back to
ground, the relay opens.
If you are lucky, the USB card will output enough power for the relay card,
and you won't need the adapter/plug.
Send a question to the Futurlec guys here:
http://www.futurlec.com/Help.html
They have been very helpful to me in the past.
Good luck.
Regards,
Bob Monsen
|
|
|
|
Author: TonyRDate: 19:55 30-01-08
|
|
Have a look at Diolan.com
On Wed, 02 Jan 2008 22:36:29 +0000, noreply wrote:
> I am a novice and would like to build a 120V AC outlet which can be switched
> on and off by USB. I'm not sure what all I will need and want to make sure
> that I'm not trying to do something much harder than it sounds. My end goal
> is to have a single plug where I could plugin a lamp, TV, power strip, etc
> and have the power to that device controller by a PC via USB port. Now I've
> seen some devices out there like X10-compliant home automation controls and
> there has always been a severe limitation in one way or another. I would
> love the pulg to be grounded but it doesn't have to be if that is a
> complicating factor.
>
> It seems to me that I need a relay which can switch the 120V on/off and then
> need a USB controller to control the relay. And I have seen USB controllers
> which have serial interfaces on them but then how to get from a pin or two
> of a serial port to the relay is where it breaks down in my head. I'm not
> sure what I need between the two or if that would even work. I can handle
> the software part of it once I get a hardware solution idenfitied.
>
> Can any of you pros offer advice to get me going in the right direction?
>
> Thanks!
> Frank
|
|
|
|
Author: Earl KiosterudDate: 14:10 27-05-08
|
|
<noreply@noreply.net> wrote in message news:K_udnQr1k4NwjOHanZ2dnUVZ_oimnZ2d@giganews.com...
>I am a novice and would like to build a 120V AC outlet which can be switched
> on and off by USB. I'm not sure what all I will need and want to make sure
> that I'm not trying to do something much harder than it sounds. My end goal
> is to have a single plug where I could plugin a lamp, TV, power strip, etc
> and have the power to that device controller by a PC via USB port. Now I've
> seen some devices out there like X10-compliant home automation controls and
> there has always been a severe limitation in one way or another. I would
> love the pulg to be grounded but it doesn't have to be if that is a
> complicating factor.
>
> It seems to me that I need a relay which can switch the 120V on/off and then
> need a USB controller to control the relay. And I have seen USB controllers
> which have serial interfaces on them but then how to get from a pin or two
> of a serial port to the relay is where it breaks down in my head. I'm not
> sure what I need between the two or if that would even work. I can handle
> the software part of it once I get a hardware solution idenfitied.
>
> Can any of you pros offer advice to get me going in the right direction?
>
> Thanks!
> Frank
You can use phidgets (www.phidgets.com) for software-controlled switched output via USB.
You'd write your own program in C, .net, VBA, etc., and they give you the API to control the
phidget output. I don't know if there are isolated outputs, but you could use an
opto-isolator with a triac to switch the 120V power.
Do be careful -- you're messing with the 120 V main, and your computer and other gear is
grounded. It'd be a good idea to power it from a ground-fault circuit while you're
developing it.
--
Earl
|
|
|
|
Author: ArtDate: 16:36 27-05-08
|
|
"Earl Kiosterud" <someone@nowhere.com> wrote in message
news:Q8Y_j.2959$4c.2681@trnddc08...
>
> <noreply@noreply.net> wrote in message
> news:K_udnQr1k4NwjOHanZ2dnUVZ_oimnZ2d@giganews.com...
>>I am a novice and would like to build a 120V AC outlet which can be
>>switched
>> on and off by USB. I'm not sure what all I will need and want to make
>> sure
>> that I'm not trying to do something much harder than it sounds. My end
>> goal
>> is to have a single plug where I could plugin a lamp, TV, power strip,
>> etc
>> and have the power to that device controller by a PC via USB port. Now
>> I've
>> seen some devices out there like X10-compliant home automation controls
>> and
>> there has always been a severe limitation in one way or another. I would
>> love the pulg to be grounded but it doesn't have to be if that is a
>> complicating factor.
>>
>> It seems to me that I need a relay which can switch the 120V on/off and
>> then
>> need a USB controller to control the relay. And I have seen USB
>> controllers
>> which have serial interfaces on them but then how to get from a pin or
>> two
>> of a serial port to the relay is where it breaks down in my head. I'm
>> not
>> sure what I need between the two or if that would even work. I can
>> handle
>> the software part of it once I get a hardware solution idenfitied.
>>
>> Can any of you pros offer advice to get me going in the right direction?
>>
>> Thanks!
>> Frank
>
> You can use phidgets (www.phidgets.com) for software-controlled switched
> output via USB. You'd write your own program in C, .net, VBA, etc., and
> they give you the API to control the phidget output. I don't know if
> there are isolated outputs, but you could use an opto-isolator with a
> triac to switch the 120V power.
>
> Do be careful -- you're messing with the 120 V main, and your computer and
> other gear is grounded. It'd be a good idea to power it from a
> ground-fault circuit while you're developing it.
>
> --
> Earl
>Use an Isolation Transformer during the development to make absolutely sure
>you do not have any path for the hot side of the AC 120V to find it's way
>to the computer. Confirm that after development, there is no pathway for
>excessive AC current to find it's way back through the USB Cable into the
>PC you are using. Both very important for your safety and longevity.
|
|
|
|
Author: Bob MonsenDate: 19:16 27-05-08
|
|
Frank wrote:
> <noreply@noreply.net> wrote in message
> news:K_udnQr1k4NwjOHanZ2dnUVZ_oimnZ2d@giganews.com...
>>I am a novice and would like to build a 120V AC outlet which can be
>>switched
>> on and off by USB. I'm not sure what all I will need and want to make
>> sure
>> that I'm not trying to do something much harder than it sounds. My end
>> goal
>> is to have a single plug where I could plugin a lamp, TV, power strip,
>> etc
>> and have the power to that device controller by a PC via USB port. Now
>> I've
>> seen some devices out there like X10-compliant home automation controls
>> and
>> there has always been a severe limitation in one way or another. I would
>> love the pulg to be grounded but it doesn't have to be if that is a
>> complicating factor.
>>
>> It seems to me that I need a relay which can switch the 120V on/off and
>> then
>> need a USB controller to control the relay. And I have seen USB
>> controllers
>> which have serial interfaces on them but then how to get from a pin or
>> two
>> of a serial port to the relay is where it breaks down in my head. I'm
>> not
>> sure what I need between the two or if that would even work. I can
>> handle
>> the software part of it once I get a hardware solution idenfitied.
>>
>> Can any of you pros offer advice to get me going in the right direction?
>>
>> Thanks!
>> Frank
>
If you instead use your serial port, you can control a solid state relay
(see http://en.wikipedia.org/wiki/Solid_state_relay) with a modem control
signal, DTR. Up = on, Down = off. The program to do this is trivial. You
could even use one of these to make it easier to build:
http://www.futurlec.com/Mini_RS232_TTL_5V.shtml
If you get ambitious, you could even build something that would live on the
serial line, and allow control of multiple devices using a multidrop.
If you really need it to be USB, you could go with something like one of
these:
http://www.futurlec.com/USB.shtml
Here is a nice solid state relay you could use:
http://cgi.ebay.com/Solid-State-Relay-SSR-24-220V-DC-40A-Heat-Sink_W0QQitemZ230254622839 QQihZ013QQcategoryZ36328QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
Regards,
Bob Monsen
|
|
|
|
Author: CDESCDate: 16:07 28-05-08
|
|
I'd suggest to hook-up a PIC 18F2550 (or something similar) to a solid state
relay. You can have plenty of outlets controlled separately with only one
USB input. Pros; well the USB stack is provided by microchip (many compilers
provide their own as well) and it's going to be a breeze to control with a
custom software (C#).
I can give you a few quick lines on where to look and what to do if you need
details.
"Earl Kiosterud" <someone@nowhere.com> wrote in message
news:Q8Y_j.2959$4c.2681@trnddc08...
>
> <noreply@noreply.net> wrote in message
> news:K_udnQr1k4NwjOHanZ2dnUVZ_oimnZ2d@giganews.com...
>>I am a novice and would like to build a 120V AC outlet which can be
>>switched
>> on and off by USB. I'm not sure what all I will need and want to make
>> sure
>> that I'm not trying to do something much harder than it sounds. My end
>> goal
>> is to have a single plug where I could plugin a lamp, TV, power strip,
>> etc
>> and have the power to that device controller by a PC via USB port. Now
>> I've
>> seen some devices out there like X10-compliant home automation controls
>> and
>> there has always been a severe limitation in one way or another. I would
>> love the pulg to be grounded but it doesn't have to be if that is a
>> complicating factor.
>>
>> It seems to me that I need a relay which can switch the 120V on/off and
>> then
>> need a USB controller to control the relay. And I have seen USB
>> controllers
>> which have serial interfaces on them but then how to get from a pin or
>> two
>> of a serial port to the relay is where it breaks down in my head. I'm
>> not
>> sure what I need between the two or if that would even work. I can
>> handle
>> the software part of it once I get a hardware solution idenfitied.
>>
>> Can any of you pros offer advice to get me going in the right direction?
>>
>> Thanks!
>> Frank
>
> You can use phidgets (www.phidgets.com) for software-controlled switched
> output via USB. You'd write your own program in C, .net, VBA, etc., and
> they give you the API to control the phidget output. I don't know if
> there are isolated outputs, but you could use an opto-isolator with a
> triac to switch the 120V power.
>
> Do be careful -- you're messing with the 120 V main, and your computer and
> other gear is grounded. It'd be a good idea to power it from a
> ground-fault circuit while you're developing it.
>
> --
> Earl
>
|
|
|
|
1 | |
|
|
|
Contact | Electronic Portal
|
|
|