Is there a generic way workaround R4's 8 mA current limit

I have a lot of circuits from my old UNO that require 15-20 mA and some that use up to 30. Generally drivinig a relay of "LED"'s as a light source.

Give the R4's pins are limited to 8 mA I am assuming there is a significant problem many folks will be facing when using "advice" or designs from the WWW based on the older UNO's.

I am not a hardware expert so I am hoping someone has and easy solution to this.

Objective: Meet the same electrical conditions on digital (OUTPUT) pins as the orignal UNO

Spec: 5v and 20 mA Ideally a little more say 30 mA.

General purpose circuit with primary configuration values.

For Example:
I am exploring the use of 817 optocouplers, the PC817C specifically. I have some on order to test and understand.

Primary Configuration values:

  1. CTR = Ratio of input current (from pin) to Output Current across device.
  2. Ensure Voltage, Current maximums meet criteria.

PC817C the CTR is in the range 200 to 400 % ( 8 mA -> 16 to 32 mA)
PC817D the CTR is in the range 300 to 600% ( 8 mA -> 24 to 48 mA)

I believe this approach is not ideal. These devices are not really designed to increase current.
They isolate voltages which does make it possible to apply increased voltage on the output side which is sufficient in some cases like relay acctuation.
The advantage lies in the simplictiy of design and use.
Problem really hard to find in DIP configuration.

I know that transistors or MOSFETs can be used, but the wiring starts to get a bit complex to breadboard when you use a lot of pins.

Is anyone aware of a simple solution?
A dedicated Integrated Circuit or Add-on board perhaps?

I can envisage a shield that plugs into the R4 Uno that provides duplicate output sockets on the top and takes the required R4 outputs and buffers them to allow more current to be taken from the shield sockets.

It would, however, be quite complicated and power hungry and would need to be configured to suit the output pins actually being used so is impractical but possible

You may want to have a look at line drivers / bus buffer IC's

This one can drive 8 pins with 34mA max.

And available as breadboard friendly PDIP.

1 Like

Or the SN54BCT541.
In my opinion it has an easier configuration with all the inputs on one side and the outputs on the opposite side.

Thank you! Based on my limited knowledge this looks very promising.
Now just to find a supplier that deals in low quantities.

You’d probably find a 74ac541 or even a 74hc541 more commonly available, and perhaps more similar in behavior to the AVR outputs.

Note that these are output chips, so you lose the bidirectional and tri-state capabilities of the avr.

Corrected
The SN74BCT541 chips meet the spec per the data sheet.

In my case the supplier substituted SN74HCT541 which has a Max. reccomended output is 6 mA. That is less that the R4 WiFi. pins. I should learn to read more carefully before I spend my $10 plus $20 shipping.

The SN74BCT757 will perform, it has the higher output of 128 mA of sink current.

I investigated further and found the following.
ULN2803: 8 Channel Darlington Driver (Solenoid/Unipolar Stepper) [ULN2803A] : ID 970 : $3.95 : Adafruit Industries, Unique & fun DIY electronics and kits
This device provides up to 350 mA on a 10% duty cycle. So it is more versitile.

Take care folks.

But the ULN2803 can only sink current and it has a high saturation voltage.

Ok, do you have a better alternative?

Using a GPIO properly. Do not try to imitate a power supply by MCU.
In most cases 8ma is enough for control signals and LEDs.

What is it that requires current at those levels ?

@UKHelliBob There are many UNO shields that require 20-30 mA. Most are motor drivers or relay sets. Too many to list here. Worse a lot of them require you to dig into the data sheets of chip sets to find the values. In some cases there is no documentation at all. I have also seen various web "teaching sites" with circuits that draw >20 mA.

@b707 please read the post before posting irrelevant advice. Many of the shields are drawing >20 mA as a signal, not a power lead.

Switching relays and motors directly from GPIO is not a good idea even for Uno R3. Due to the inductive characteristic, such a load interferes with the Arduino, which can cause the controller to freeze and overload.

Whether you like it or not, powerful microcontroller pins are becoming a thing of the past. In the newest generations of controllers, the logic level is more often found, not even 3.3, but 1.8V and the output load capacity is 2-3 mA

If a shield consumes more than is described in the specification for the controller, it is simply an incorrectly designed shield, and not a reason to turn the board into a power plant :slight_smile:

Also take into account that none of the methods proposed above will allow you to use such "power-hungry" shields directly on the board, that is, as a shield. In any case, they will have to be located separately or some kind of adapter board will have to be developed for them. That is, there is no more talk about convenience and ease of use. So is it even worth continuing to use them?
I think that the most correct conclusion is to use these shields only on uno r3

Now I am confused. I read in the datasheet it can typically source 27mA and sink 47mA.
Where did you read the 6 mA?

74ACT240N
It can sink and source 24mA (4ma more than the 328P) with the same or better Voh and Vol than the 328P
Absolute max is 50mA, 10mA more than the 328P

$8.07 (USD) for 10 from Mouser

Thank you, I trust this will provide an additional option for future readers of the post.

Thank you, now I share your puzzlement. The 6 mA refrence came from a design note I consulted when I was confirming my circuit. I will go back and find it, it could be my error.

I believe you are missing my point. It has been common practice for vendors to supply out of spec Arduino devices for years. I am simply looking for a straight forward means to adapt to the R4 specification, which is 70% lower than the R3. UNO devices that draw up to 4X the R4 spec are clearly in the range to seriously damage the R4 board.

In a perfect and cost free world, I would gleefully upgrade to all new devices. Magically upgrade the worlds inventories. Then I would imediately update all of the "Web"s maker and tutorial sites, damn where is that magic wand when you need it.

I used the term shield too loosely. I meant the more general case of pre-made circuit boards connected to the UNO through leads. You are correct UNO form factor shields will have to be replaced or removed reconnected differently.

For many folks, reusing what they have is only option. For example, I have some physically embedded boards that would result in very expensive (>$1000) mechanical rework should I be forced swap them out. Yet I can add a small daughter board and that would be perfectly feasible adaptation.

It seems presumptuous to demand folks purchase new books (none published yet), find web sites with dedicated R4 circuits, or risk blowing up thier R4 simply because it is not backward compatible.
I assume this issue will be around for a while and adaptation would be an effective short term strategy. I do not see the market responding quickly to the new spec.

So yes, you are correct , yet I prefer to adapt until economics and supply are more favourable.

Please! No one is talking about inductive loads here. We are using the GPIO's "normally" as was common practice with the UNO. I don't like it but it is the enviroment we live in.

I generally use 3.3v Raspi, MEGA and 3.3 v teensy boards and even an old Intel Edison @ 1.8v so I am familiar