Shop OBEX P1 Docs P2 Docs Learn Events
Getting Power from USB — Parallax Forums

Getting Power from USB

logan996logan996 Posts: 281
edited 2010-10-13 18:21 in BASIC Stamp
Hi, i know that of course USB provides +5 volts but would it be possible to splice a extra one up and use it to directly power a BOE? Is there any way i could add some kind of diode or something so that if i accidentally short the usb wires out that it wont fry my pc ?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-10 05:47
    SparkFun has a USB power adapter that includes a PTC that acts as a "circuit breaker" to prevent too much current from being drawn. This adapter is more than you need since it provides +5V directly from USB plus +3.3V via a voltage regulator, but you could start with their schematic and adapt it for your needs. Keep in mind that you can't tie the +5V to Vin on your BOE because that goes through the 5V regulator on the board. You'll have to tie it to Vdd. Also keep in mind that the Stamp itself is connected to Vin. You'll have to connect its Vdd to the USB +5V supply too.
  • ercoerco Posts: 20,256
    edited 2010-10-10 06:44
    Typical USB specs say that you can draw about 500 mA, but that varies widely based on individual computers. I always chuckle when I see various USB-powered accessories, including the coffee mug warmer below. SHEESH! That will kill your laptop battery quickly!

    http://cgi.ebay.com/Coffee-Tea-Cup-Warmer-Heater-PAD-OFFICE-4-Port-USB-Hub-/260601942368?pt=LH_DefaultDomain_0&hash=item3cad161160
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-10 10:21
    A few things to consider:

    1. Despite Mike's caveat -- and he's certainly right in theory -- you may be still able to get by with running the +5V into Vin. The reason is that the LM2940 regulator has an extremely low dropout voltage at low currents, so you may not lose much on the output side.

    2. On the cautionary side, though -- and this could be the killer -- the BOE's +5V circuit sports two huge filter caps (1000uF each). These will cause a very large inrush current when the USB is first connected, possibly causing a problem for your PC. The USB specs require a soft-start circuit to limit inrush currents. The SparkFun adapter does not provide this circuitry, and the PTC current limiter would repsond too slowly to be of any use in this capacity.

    3. Don't even think about connecting servos to your BOE when it's powered from the USB port. Their stall current will be well beyond the limits of the USB port, and I don't really trust the PTC to respond quickly enough to prevent damage to your PC.

    -Phil
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-11 07:45
    As Erco said, a USB port can only supply about 500mA's. That might not be enough to supply power to a robot...Splicing a USB cord is no hard feat though. I had to repair my sister's USB powered laptop cooler. There was no special circuitry inside. Just a direct power connection to the USB port...

    @Erco...They actually have USB power hand warmers to...I am not kidding.
  • ercoerco Posts: 20,256
    edited 2010-10-11 15:49
    Right you are, RK! Hard to believe...

    http://cgi.ebay.com/Brand-USB-Heating-Heated-Warmer-Hands-Gloves-09-/140463604904?pt=LH_DefaultDomain_0&hash=item20b44884a8

    Cold winter, the Office of the many white-collar workers all day long to reach out in the mouse, keyboard, swimming, so a lot of people's hands from the Health and frostbite. With "A Liwei" USB warming gloves accompanied me, whether it is playing files, programming, msn chat, play games, are no longer a cold! Warm winter starts, as soon as possible to buy it. . .
    Weather Haoleng it! How can you like the distinctive miss this good opportunity to fashion itself! ! ! Buy a pair of fast this year, most of Xuan gift to himself and the most beloved person it!
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-11 17:58
    @Erco...It is amazing the things people come up with, haha
  • ercoerco Posts: 20,256
    edited 2010-10-13 09:44
    Too bad this CAR HEATER isn't powered by USB: http://cgi.ebay.com/Trademark-Ultra-Car-Heater/370441092576?_trksid=p1468660.m2000037

    Some poor sap will get the idea to preheat his car's interior in cold weather by plugging this item in 15 minutes before he starts his car. He'll have a toasty interior and a dead battery!
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-13 18:21
    @ Erco... That is pretty intense...It doesn't really even have that much utility, because it doesn't take that long to get your car heater working(Unless you have a 1988 Lincoln like me, haha)
Sign In or Register to comment.