1

After doing some research on Internet, I realized that maximum current draw for all pins combined in Raspberry Pi 3 is pathetic 50 mA. (BTW, in case of Arduino 101 "...maximum current draw is 1500 mA.") OK, I know that RPi is controller and you need some amplifier to run energy hungry devices. One practical solution for non-motor devices is the use of opto isolators. However opto isolators themselves require cca. 5 mA input current. Say you want to use all 17 pins using opto isolators. That means that you need at least 85 mA, not counting for current necessary for SPI and I2C communications.

Does this mean that RPi is just not fit for even for such semi-serious projects and you have to revert to Arduino? Or is there any other solution to use all pins without big fuss?

17
  • "current necessary for SPI and I2C communications: -> Without having looked it up I doubt that is much of anything, those are purely communication lines. How much resistance is in 6" of 24 gauge wire, etc? The devices are usually powered by separate 3.3V or 5V connections; on the pi I believe the former will supply at least 100mA and the latter 5-10 times that (but do double check that if you actually need to use them that much). – goldilocks Mar 21 '16 at 10:38
  • Also WRT "semi-serious": If you mean you want to build a self-driving car then probably more and more powerful hardware is required. It is exactly what it appears to be, no more no less. If it isn't appropriate to your needs, save your $35 toward something else. E.g., other people with other needs are going to say an Arduino is no good for anything semi-serious because it doesn't have a real microprocessor or any RAM. You can of course connect the two but now you are looking at upwards of $50-60 USD! That's a lot to pay for semi-seriousness! ;) – goldilocks Mar 21 '16 at 10:45
  • @goldilocks I am aware that there is enough power in 3.3V and 5V connectors. But let's say, for argument sake, that you want to play with 12 different devices that require 200 mA combined. There is more than enough current on 3.3V and 5V lines. However even by using common optocouplers you still need at least 60 mA to control them. Which makes things a bit absurd - why having 17 damn GPIO pins in the first place if you cannot use them? In this regard I strongly prefer Arduino. I even don't mind C++, but 2 kB of memory - are you serious?? I guess combination of both is the only solution. – Pygmalion Mar 21 '16 at 10:56
  • 1
    I don't think there is any problem in practice. I don't remember seeing any report of a problem caused by the 50 mA limit. I have connected 8 RGB LEDs (3 GPIO per LED) to the Pi and there was no problem. – joan Mar 21 '16 at 11:45
  • 1
    Dear all, please be reminded that comments are not for prolonged discussions but for clarifications with regard to the question itself... you might want to join our nice Bakery – Ghanima Mar 21 '16 at 12:44
1

This question was just resurrected. The discussion is interesting but the question is based on at least 2 fallacies.

  1. The "maximum current draw for all pins combined in Raspberry Pi 3 is pathetic 50 mA".

If so what is the reference? The electrical capabilities of the SoC have not been released, although there is an unofficial GPIO pads control Extracted from BCM2835 full data sheet Gert van Loo 2-August-2012 which shows the equivalent circuit programmable from 2-16mA.

The Pi 3.3V rail is widely assumed to provide 50mA, but AFAIK this is not officially documented for the Pi2 or the other recent Pi. The original Pi has an on-board linear regulator which was limited, but the B+ and later have a switch mode regulator which supplies more. The regulator chip (which supplies both 3.3V and 1.8V is rated at 1A).

  1. Arduino maximum current draw is NOT 1500 mA. Maximum current per pin is 40mA (recommended 20mA) and Absolute maximum for the entire package is 200mA.
2
  • If I got it right, one can safely dry 16mA from all 17 GPIOs, as total is far below presumed 1A limit? – Pygmalion Jul 29 '16 at 15:25
  • @Pygmalion Unfortunately things do not work that way. As I said there is no documentation other than Gert's extract, but I expect there would be an overall chip limit, such as the 200mA for the Arduino. There are more than 17 GPIO on the Pi3, but I am sure you can draw more - I personally wouldn't go over 250mA. – Milliways Jul 30 '16 at 0:16
3

At first let's consider the typical use case of the Pi (and nod to the fact that its processor is more or less comming from the mobile world). So both the design of the Pi and how most of the users are probably going to use it justify the constraints the current Pi imposes on its GPIO pins.

If a higher current needs to be controlled there are always options to do so, e.g. line drivers or switching transistors, such as the darlington transistor array ULN2803. Those of course come at additional cost and required board footprint.

If optocouplers are desired in the design, it's worth looking into low-current optocoupler as a way to overcome this issue. The use of low-current opto-isolators, operating at say 0.5 mA to 1 mA, would put it well within safe margins even when using all GPIO pins of the Pi.

E.g.

The Toshiba TLP182 and TLP183 are low input current-type transistor output photocouplers utilizing the SO6 package. By employing Toshiba's original high-output LED, these products guarantee not only a high-current-transfer ratio at the conventional input current of 5 mA, but also at the same current-transfer ratio at the low LED current of 0.5 mA. Especially when utilizing LED current at 100 VAC and other high voltages, these products significantly contribute to a reduction in power consumption by reducing the LED current of the photocoupler. [...]

  • Vishay - Low Input Current Optocouplers, such as the SFH618A which should be able to be used at 1 mA given its high CTR (Current Transfer Ratio).

  • PC817 is another generic opto-isolator with acceptable CTR down to 1 mA forward current and might fit the bill

4
  • These TLPs sound tempting except for the fact that I cannot find them on any typical RPi or Arduino related shop? – Pygmalion Mar 21 '16 at 11:00
  • 2
    @Pygmalion They are available on sites like Digikey (which do offer order quantities as low as one or two) at the order of less than $1 each. – nanofarad Mar 21 '16 at 11:24
  • 1
    The PC 817 optocoupler has been a fave of mine, in that it works well under 1ma, has good CTR, and is the most common thing out there: I'd say that half of all switching type "wall-warts" use them, as well as tons of other consumer stuff that uses AC power. Look for the 4 pin "DIP" style IC near where the AC cord enters the back panel. Just keep your eyes peeled on garbage day, and be willing to dive! – user39664 Jul 18 '16 at 14:12
  • @VIC-20, thanks for the hint. You're right it's a everyday optocoupler worth listing. – Ghanima Jul 18 '16 at 14:27
0

There's lots of micro-controllers out there, each optimized for a different use-case. There isn't a single one that is well-suited to everything, so whatever your project is, pick the micro-controller that is best-suited to it. Some have more RAM, some have more CPU power, some have more GPIOs, some are physically smaller, some are less power hungry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.