Powering Project via USB: Any Limitations?

Hello all! First off, I'm a newbie to the Arduino, and to microcontrollers in general. However, I have a good amount of design experience and knowledge when it comes to analog circuitry and digital logic hardware. I can't wait to start exploring into the microcontroller, microprocessor and FPGA realms!

One of my first projects for a new Arduino Uno (Sparkfun Redboard clone) is building a NIR-spectrum non-contact tachometer for use in repairing things and calibrating machinery around the house. Now, at this point I don't have any stand-alone displays in stock, so I was planning on bringing my laptop around with the tachometer to read the data obtained.

Since the laptop will be there anyways, I thought, why not just power the whole thing via USB and save myself the excess bulk and hassle of using an external battery or wall-wart power source? I've tried to do some research on the limitations of the Arduino's capacity to deliver power to projects internally, and cannot find much information past the "40mA per pin, 500mA USB current draw shutoff" specifications. The entire project won't draw more than 70mA or so externally, so it seems like it should work out just fine. I'm anticipating ~45mA for the IR LED and level control circuitry, ~10mA for the phototransistor and associated filtration, and ~15mA max for the 74 series logic. Does anyone know how much power the processing and board switching circuitry uses, worst case scenario (assuming no current drawn from the pins)?

Now, the redboard apparently uses a different type of USB interface chipset, but outside of that, it looks as though the power input stages are quite similar in design, even though the redboard does away with the comparators.

Here are the links to both schematics:

Redboard- http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/RedBoard-v21.pdf

Arduino Uno- http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

From what I can tell, the USB VCC (hopefully already around 5V if your source is regulated well) enters the board through the jack, passes through the 500mA fusible link and ends up on the drain side of the MOSFET, bypassing the transistor through the equivalent diode (does the VCC supply experience a voltage drop here? I'm not very experienced with FET technology), and directly routing to the 5V rail and branching off to power the LDO 3.3V regulator as well. Current will then flow through the 5V rail tap and 10K resistor before the MOSFET's gate, but this is apparently directed to ground through the barrel jack's connector (in the unplugged state), and thus will not activate the MOSFET. In the Arduino Uno, it looks as though this is replaced with the 3.3v output swinging the comparator U5A Low when the board is powered via USB, and thus keeping the MOSFET quiet.

So, it looks as though there is nothing really restricting the board from getting the benefits of the full 500mA potential from the USB hub, apart from how it gets from the USB VCC to the actual project. From what I can see, it looks like pins 4 and 7 on the power header (Pins 2 and 5 on the Arduino Uno) should be available to tap into the 5V rail directly from the USB. Is this the case, and is it safe to do so? Also, it looks like the ICSP header can provide 5V from pin 2. But, on the Arduino, it looks like this is also keeping the chip Reset function high, which I imagine COULD be potentially triggered by fluctuations on the 5V rail, in extreme circumstances (which would be a good thing to combat glitching I think?). (EDIT: I think this was just a matter of schematics drafting, as the Redboard inevitably does this in the same manner).

As mentioned earlier, I am planning on implementing a few stages of signal processing in both passive LC filtration and 74 series hardware, so I will also be putting noise suppression capacitors across the 74 power pins to help combat the rapid switching fluctuations the 5v rails will likely see... Will this be detrimental at all? At the moment, I don't have access to a proper oscilloscope, so my ability to observe and correct for proper circuit operation is limited. I've gotta get it done in the design phase I suppose!

Any other ideas, or things to watch out for in powering the project?

You should be fine. Wikipedia says up to 500mA for USB1 & USB2 and up to 900mA for USB3.

When running from USB, the current is not passing through the Arduino's voltage regulator so the Arduino itself doesn't matter as long as you don't exceed the I/O current limits (40mA per pin or 200mA total).

74HC hardware, don't forget 0.1uF decoupling cap from Vcc pin to Gnd on each device (what you called "noise suppression capacitors"). Don't let any unused inputs float - either tie to Vcc or to Gnd.

There definitely are.

Things can quickly get marginal when using USB power, no matter what Wikipedia says. A Uno with a few sensors should be fine. Add an ethernet shield or an LCD, and you could get grief.

One of the most frustrating problems I ever had with Arduino occurred when I changed the motherboard in my PC.

RedneckPhysics: I'm anticipating ~45mA for the IR LED and level control circuitry, ~10mA for the phototransistor and associated filtration, and ~15mA max for the 74 series logic. Does anyone know how much power the processing and board switching circuitry uses, worst case scenario (assuming no current drawn from the pins)?

I grabbed an Uno and plugged it into my laptop through a USB power meter, and loaded a blank sketch. The meter tells me the Uno is drawing 0.05 A. So I imagine you should be in good shape, provided your external stuff uses one of the CMOS versions of 7400 logic.

On the UNO a 500 mA polyfuse will disconnect USB power if you try to draw more than 500 mA. I usually budget 100 mA for an Arduino UNO, leaving 400 mA for all peripherals.

Wow, thank you all for the great replies!!

Sounds like it is indeed a safe bet to power the peripheral circuitry from USB, via the board. From the individual current measurements I've taken thus far, it seems like I'll be able to keep it under 150mA, no problem.

CrossRoads: 74HC hardware, don't forget 0.1uF decoupling cap from Vcc pin to Gnd on each device (what you called "noise suppression capacitors"). Don't let any unused inputs float - either tie to Vcc or to Gnd.

Yes indeed, Thanks! Got those in there. I'm using 1/6 of a 74LS14 (what I had on hand, that worked for the application), so I tied everything else Low. Definitely saves power too. At the moment, its only purpose is for filtering through the Schmitt trigger, driving an LED during debugging and signal amplification. I might try to make a custom Schmitt trigger from discrete components eventually, but this was a quick and dirty way to do it.

Dave_D_in_PA: I grabbed an Uno and plugged it into my laptop through a USB power meter, and loaded a blank sketch. The meter tells me the Uno is drawing 0.05 A. So I imagine you should be in good shape, provided your external stuff uses one of the CMOS versions of 7400 logic.

Awesome Dave, thanks for doing that!! 50mA isn't too shabby. I will be using BJT logic, but only enough for about 24mA max (including the dimly lit LED).

johnwasser: On the UNO a 500 mA polyfuse will disconnect USB power if you try to draw more than 500 mA. I usually budget 100 mA for an Arduino UNO, leaving 400 mA for all peripherals.

Thanks John, sounds like a good rule of thumb to go by.

Again, thanks for the help. Let's hope she works!

Also, keep in mind that a fuse has some resistance (which can be up to a few ohms depending on its breaking capacity) and will induce a voltage drop which can be relatively high when the load is drawing much current.