The Uno R3 had a 20mA pin current limit ( third party boards say 40mA), the Datasheet for the Uno R4 says 8mA max per pin. Is that correct? It seems a backward step when a pin can't cope with a standard LED drawing 28mA
That is correct.
The classic Arduino Uno can output 20mA (up to 40mA is possible), which is useful for hobby projects with leds. However, that is a ridiculous amount of current for a processor.
The 8mA is a more reasonable amount for a processor.
Some leds are already visibly on with 1mA. The 8mA is good enough for a good quality led.
For high power leds, you need extra hardware.
With higher power and addressable LED's I feel this a natural evolution. The uProcessor being made more as a controller than a power source.
Would you fill a bathtub with a teaspoon, same difference, processors are designed for logic functions, not as a supply power. Hence rule #1 A Power Supply the Arduino is NOT! There is a trade off, the more logic etc the less silicon for power not discussing the process differences. Always follow the manufacturer's specification, many have the same name or same as but they are not.
When you say higher power, are you talking processing power? Yes the increase in processing power is a step forward. Not that well up on Arduino yet to understand the addressable LED element of the R4, but I have seen addressable LED projects done with the R3. Does the R4 have a specific function for addressable LEDs?
I understand where you are coming from and if I was building a permanent project, I would use external power with transistors, MOSFETs etc. However I have built prototype projects where LEDs or small servos have been powered from the output of Arduino pins, this would not be possible with the R4. Not really an issue, just a different approach to prototyping.
No, LED power. It seems to me like high wattage LED usage is becoming more common.
Processor pins are not designed for power. It may seem like a backwards step to you, but it is an outcome of progress. Smaller and smaller fabrication techniques result in greater speed, lower power consumption, smaller and cheaper Integrated Circuit dies, the increased density also allowing greater integration. It's a side effect that the smaller transistors can't supply as much power. It's a small price to pay for the huge and continuous improvements shown by Moore's Law.
All Arduinos use general purpose processors, but provisioned for educational prototyping and education. Not processors designed and built for that.
Haven’t looked at the chip datasheet but why not do sinking?
Um, sinking? What is the context? Hard to tell what exactly you are referring to...
The current sink capability of output pins are usually, but not always about the same as the sourcing capability.
Haven’t looked at the chip datasheet
Doing so would answer your question.
The information on the Arduino page for the Uno R4 might be wrong.
Both the Minima and the Wifi version use the Renesas RA4M1.
Manufacturer's page of the Renesas RA4M1: https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra4m1-32-bit-microcontrollers-48mhz-arm-cortex-m4-and-lcd-controller-and-cap-touch-hmi
In the datasheet at page 32 and further are the IOH and IOL. Some pins are 4mA, some can be set to 8mA and some are 20mA. Sometimes the IOH is the same as the IOL, but not always.
The drive strength can be set to to Low drive (4mA) or Middle drive (8mA).
I don't know if this is right, someone should check this:
D0 = P301, IOH=4mA, IOL = 4mA or 8mA
D1 = P302, IOH=4mA, IOL = 4mA or 8mA
D3 = P104, IOH=4mA, IOL = 4mA or 8mA
D4 = P103, IOH=4mA, IOL = 4mA or 8mA
D5 = P102, IOH=4mA, IOL = 4mA or 8mA
D6 = P106, IOH=4mA, IOL = 4mA or 8mA
D7 = P107, IOH=4mA, IOL = 4mA or 8mA
D8 = P304, IOH=4mA, IOL = 4mA or 8mA
D9 = P303, IOH=4mA, IOL = 4mA or 8mA
D10 = P112, IOH=4mA, IOL = 4mA or 8mA
D11 = P109, IOH=4mA, IOL = 4mA or 8mA
D12 = P110, IOH=4mA, IOL = 4mA or 8mA
D13 = P111, IOH=4mA, IOL = 4mA or 8mA
A0 = P014, IOH=4mA or 8mA, IOL = 4mA or 8mA
A1 = P000, IOH=4mA or 8mA, IOL = 4mA or 8mA
A2 = P001, IOH=4mA or 8mA, IOL = 4mA or 8mA
A3 = P002, IOH=4mA or 8mA, IOL = 4mA or 8mA
A4 = P101, IOH=4mA, IOL = 4mA or 8mA
A5 = P100, IOH=4mA, IOL = 4mA or 8mA
[EDIT] Something is wrong with this table. I missed D2 and it seems that the WiFi version is not the same as the Minima version ?
If this is right, then only pins A0 ... A3 are 8mA for IOH and IOL and for all other pins, the IOH is limited to 4mA and the information on the Arduino pages is wrong.
My understanding is that the current rating of the pins is the current that they can carry, whether that be by sourcing or sinking. Please correct me if I am wrong as my electronics knowledge is limited.
Unless specified otherwise, that is true
It's actually pretty common for microcontroller outputs to be asymmetric in terms of current, probably related to the fact that N-channel MOSFETs tend to have higher current capacities than P-channel MOSFETs. That's one of the reasons you often see LEDs connected to chips in "active low" configurations.
In any case, it's pretty much a non-issue for LEDs: 4mA is "plenty" for most modern "indicator" LEDs, and any "high power LED" probably needs an external driver anyway.
This sounds really disappointing. I am using my Arduino boards for automating and controlling led lights in buildings, street signals, street lighting, billboard signs, railroad track signal devices, etc. I do not know where an led that only draws 1mA can be found or even used for my application. From an electronics reference manual ...
"Like conventional PN junction diodes, light emitting diodes are current-dependent devices with its forward voltage drop VF, depending on the semiconductor compound (its light colour) and on the forward biased LED current. Most common LED’s require a forward operating voltage of between approximately 1.2 to 3.6 volts with a forward current rating of about 10 to 30 mA, with 12 to 20 mA being the most common range."
Most all of the led's I can buy are 10 to 20 mA including almost all pre-wired signals and accessories, which means replacing the leds with another type or rating is not possible. This tells me that the 4 to 8 mA pins on the R4 board will not power a single LED light found in my hobby. To use the R4 boards, I now must build transistor PCBs to run anything. If this is the case, it seems like I will have to keep using the R3 boards.
Nonsense. It may not power them as brightly as you expect, though. Use a suitable resistor to limit the port pin current to 4 or 8 mA, as appropriate.
It would be best to adjust to the new reality, and plan on using drivers to control the LEDs.
Don't think so. I read that the R3 pins can handle 40 mA, but should be limited to 30 so the pins are not maxed out. Does this mean that the 4 mA pins on the R4 should be limited to 3 mA's for the same reason? The R3 boards are working fine for me. I'm sure many aftermarket Uno boards will still be made long into the future. I realize how much faster the R4 board is, but it's like having a slower truck that can actually do some work and carry some load compared to a new Electric truck that can go reallllly fast, as long as there is only one person and no cargo in it! LOL.
Just out of curiosity, why does the RA4M1 include two high current pins?
General Purpose I/O Ports
- Up to 84 input/output pins
- Up to 3 CMOS input
- Up to 81 CMOS input/output
-- Up to 9 input/output 5-V tolerant
-- Up to 2 high current (20 mA)
What would they normally be used or intended for?