380Views5Replies

Author Options:

Drawing current from a laptop computer... USB port? Answered

So here's what i want to be doing. I want to be able to draw current from my laptop's USB port, and control how much and for how long.

Something on the lines of hitting keys on the keyboard to be able to turn on a wired device and turn it off, not like a charger which is always on.

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
steveastrouk
steveastrouk

Best Answer 10 years ago

Yes, easy. Use an Arduino

0
themanwhosoldthe_world
themanwhosoldthe_world

Answer 9 years ago

Arduino seems the exact thing i needed!

now off to code it, while i wait for my device to be shipped :)

0
orksecurity
orksecurity

Answer 10 years ago

Though if you really want to control "how much", you'll need some analog circuitry in there to provide the programmable current limiter, rather than just a simple on/off switch.

"Hitting keys on the keyboard", of course, will require PC programming to recognize those keys and send the commands to the Arduino. How complicated that is depends on exactly how you want the controls to behave and whether you want them to be active while working with other programs or just in the device-control application.

0
frollard
frollard

Answer 10 years ago

It can be done in software to enable/disable the port - but generally only in lower level operating system like linux, not windows or macos.

0
oreodjr
oreodjr

10 years ago

I'm not 100%, but the power given by the USB port can't be controlled by the laptop's hardware - save turning it on and off.

you'll need something between the USB port and whatever you want to power, like an Arduino