The MASM Forum

Miscellaneous => Miscellaneous Projects => Topic started by: Magnum on November 12, 2013, 09:26:54 AM

Title: Use a usb port to power on some 120 V devices
Post by: Magnum on November 12, 2013, 09:26:54 AM
Is there a way that I could use a usb port to power on some 120 V devices ?

All I could think of is a relay that used the usb voltage for power.

I want other things to go on and off along with my laptop.

------------------------------------------------------------------------

I have been looking at the various offerings for a rear turn signal light.

I see many for $6 - 10, but feel that you get what you pay for.

Most drivers/LEOs don't even know the turn signal hand signs.

Any recommendations would be appreciated or even other options for visibility.

I have plenty of candle power on my front. :-)

Anyone used one of those rear lights that have 2 laser beams ?

Thanks,
         Andy
Title: Re: Use a usb port to power on some 120 V devices
Post by: Siekmanski on November 12, 2013, 10:28:01 AM
USB -> FTDI chip -> microcontroller (ATmega) -> optocoupler -> relay -> 120 V device.

Write a windows application and write a program for the microcontroller to communicate with each other to control the relay.
Title: Re: Use a usb port to power on some 120 V devices
Post by: Magnum on November 12, 2013, 10:52:02 AM
Thanks, it's an interesting method.

Andy
Title: Re: Use a usb port to power on some 120 V devices
Post by: dedndave on November 12, 2013, 10:57:20 AM
before laptops, they made devices that sensed current flow in the 120 vac line
so - you turn your computer on - and the monitor came on with it
of course, many computers back then had aux 120 vac outputs on the power supply

what you want is called an SSR - solid state relay
it already has the optocoupler that Marinus mentions, built-in
they may be controlled by logic-circuit DC voltage levels
and - they may switch larger DC and/or AC loads

USB is a 0 to +5 VDC thing - so you want something in that range

"high" power example
http://www.digikey.com/product-detail/en/DC60S3/CC1126-ND/221844?WT.mc_id=PLA_221844 (http://www.digikey.com/product-detail/en/DC60S3/CC1126-ND/221844?WT.mc_id=PLA_221844)

low power example
http://www.mouser.com/Search/Refine.aspx?N=4292890524+18383556 (http://www.mouser.com/Search/Refine.aspx?N=4292890524+18383556)
Title: Re: Use a usb port to power on some 120 V devices
Post by: dedndave on November 12, 2013, 11:07:06 AM
oh - and if you already happen to have a mechanical relay on hand....
use a low-power SSR to turn that off and on
then use the mechanical relay to control the load
that way, you get the click sound you are so badly looking for   :P
Title: Re: Use a usb port to power on some 120 V devices
Post by: Magnum on November 12, 2013, 11:10:35 AM
Thanks, I drew a blank on the contact form and output device columns.

It would probably just be used for a small computer case cooling fan.

But if the price isn't that much more, I would use a 10 A model.

I just thought of something. Could I step up the usb voltage to power that fan ?

It draws .14 Amp.

Andy
Title: Re: Use a usb port to power on some 120 V devices
Post by: Siekmanski on November 12, 2013, 11:28:18 AM
you can set the FTDI chip to get 0.5 A  from the USB port.
Title: Re: Use a usb port to power on some 120 V devices
Post by: dedndave on November 12, 2013, 11:32:27 AM
i believe the USB port only provides +5VDC, though
i would guess the fan runs on +12VDC, or maybe 120VAC
Title: Re: Use a usb port to power on some 120 V devices
Post by: dedndave on November 12, 2013, 11:50:50 AM
of course, you could just buy a laptop fan that is designed to be run on 5VDC   :P

http://3acyber.en.alibaba.com/product/258040462-200936039/USB_Folding_Fan_Laptop_Cooler_Pad.html (http://3acyber.en.alibaba.com/product/258040462-200936039/USB_Folding_Fan_Laptop_Cooler_Pad.html)

here's one that has a feed-thru USB

http://www.dhgate.com/product/usb-mini-octopus-laptop-notebook-2-fan-cooler/141104033.html (http://www.dhgate.com/product/usb-mini-octopus-laptop-notebook-2-fan-cooler/141104033.html)
Title: Re: Use a usb port to power on some 120 V devices
Post by: Magnum on November 12, 2013, 02:53:31 PM
I already have a custom cooler that uses a Class 2 transformer, it ain't pretty but works.

Dave,

I think a step up transformer and some zener diodes might get er done.

Andy
Title: Re: Use a usb port to power on some 120 V devices
Post by: dedndave on November 13, 2013, 06:16:26 AM
ok - be sure to wear safety glasses - lol
Title: Re: Use a usb port to power on some 120 V devices
Post by: Magnum on November 13, 2013, 10:26:25 AM
Do you wear safety glasses when soldering ?

I wear regular glasses all the time.

Andy
Title: Re: Use a usb port to power on some 120 V devices
Post by: dedndave on November 13, 2013, 10:47:34 AM
no - i'm sure i've violated most safety rules, as related to electronics - lol
but - i wasn't talking about soldering - i was talking about when you plug it in