Powering off USB

I see that a few dev boards (April and Hannah) say you can power them from a USB port. However, a USB port only guarantees 100mA of current unless you enumerate and ask for more, which these boards don’t do.

Since the Electric Imp can draw up to 400mA, isn’t this a bad idea? Is this basically a “do it at your own risk” thing? I just tried this with my April board and it seemed to work fine. Has anybody had any issues with powering off USB?

Thanks!

That’s a good point. But in practice most USB hosts will just deliver up to 500mA with no questions asked. But you are right, it’s not according to specs, so your mileage may vary if you connect it to a PC.
On the other hand, many users (me included) will just use a wall wart (or mobile phone charger) with a USB host socket, which only provides power, leaving the USB data pins unconnected. In this case using a USB socket for power is just a convenient way to connect to a power source most people already have. I only wished the April board had a micro USB socket, which is much more common these days than mini.

You are right in that pre-enumeration, USB is only specced to supply 100mA… but so many devices expect to get 500mA these days (not least the novelty USB toys - fans, lights, hand-warmers, etc) that there’s generally no issue at all.

Makes sense, thanks!

Can our power the imp from a USB cable connected to an AC socket adapter rated
at 5V and 2.1 A?

@slibutti yes, that will work fine.

Thanks!

Hey guys. New to this so I apologize ahead of time is this a stupid problem. I’m trying to use the imp to wirelessly control my coffee pot. I have it set up similar to this project http://www.impcreations.com/2012/09/07/iphone-powered-coffee-pot-electric-imp/

For some odd reason, it works when the imp is powered via USB and my computer. But when I power it from a USB wall charger, it stops working. Any thoughts?

Got any different USB wall chargers to try? It’s possible the charger you’re using isn’t so good. Check the cable, too, some have very thin/bad cables.

I just switched them, now using an apple wall unit from my iphone, having same issues though. In the example from the link I posted, they were able to power the imp from a powered pin on the coffee makers circuit, therefore only needing one power cord. How might we do this? It wasn’t very clear in that example.

Also, on the coffee maker, there is a dedicated on and off button. I’m soldering to each of them, trying to give them each a dedicated pin (5 and 8) and 3.3v connection. We are splitting the wire coming out of the 3.3v imp output, which I believe may be a problem. How might we isolate that output voltage? Is there some sort of splitter? The problem in general seems to be that when we power one button, the other loses function.

Sorry this is a lot of type, I greatly appreciate the support!

You need to be very careful here; the coffee machine is likely non-isolated (ie, the internal circuits are directly tied to neutral as ground). A wiring fault in the socket into which you’re plugging the coffee machine could expose live AC on the imp.

Also, there’s no guarantee that the buttons within the coffee machine is using anything near 3.3v for its controls. You could easily blow up the imp here.

To be safe, you want to electrically isolate everything. The simplest way would be to use a relay (powered by the imp 5v supply) to give “dry contacts” (totally isolated) which connect to the coffee machine’s buttons.

I’m not understanding this, sorry, neither your project nor the impcreations one in your link. How did you determine that the existing switch, switches a 3v3-compatible signal? How did you work out which side of the switch to fix the imp’s output to? Why do you need to connect to the other side of the switch? Sorry for the basic questions, but I’m just a bit afraid that unless you did work all this out and just haven’t mentioned it, you’ve in fact built a circuit that’s not merely wrong, it’s actually dangerous.

Peter