340Views5Replies

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.

5 Replies

user
steveastroukBest Answer (author)2011-03-09

Yes, easy. Use an Arduino

Select as Best AnswerUndo Best Answer

user

Arduino seems the exact thing i needed!

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

Select as Best AnswerUndo Best Answer

user
orksecurity (author)steveastrouk2011-03-09

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.

Select as Best AnswerUndo Best Answer

user
frollard (author)steveastrouk2011-03-09

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.

Select as Best AnswerUndo Best Answer

user
oreodjr (author)2011-03-09

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

Select as Best AnswerUndo Best Answer