0
\$\begingroup\$

I would like to connect various MCP23S17 datasheet devices to the Raspberry Pi3 MB SPI port. But first I would like to start making some test with a single connection: only one chip. After this I will add more than one expanser to the SPI net. First I will try to connect a LED to the output pins (aprox 20mA).

I have some questions regardless electrical characteristics of this device. About outputs there are two instructions:

1."output current sourced by any output pin.. 25mA"

2.and "output clamp current, IOK...20mA".

  • What is the difference between 2 both expressions? If 20mA is a damaging value how is it possible that they could give until 25mA?

  • Could I connect a load to these output pins when current load requirements are closer or bigger than 20mA?

  • If not, How could I do it? Things I was thinking as a solution for this:

    1. using current drivers
    2. single transistors working in active zone
  • Have you any other option suggestion?

\$\endgroup\$
1
  • \$\begingroup\$ Ah, in the old days LEDs need 20mA. Now thereare bright and superbright LEDs which needs 5mA or less. \$\endgroup\$ – tlfong01 Jul 31 '20 at 9:36
1
\$\begingroup\$

If you use the GPIO as output pin, the output buffer can sink current in to ground, or source current out from supply voltage, up to the damaging limit of 25mA. The nominal values for typical usage is far below that, and you also can't exceed the total supply pin current limits either.

If you use the GPIO as input pin, and feed it voltages beyond the safe limits, then current flows in or out via the protective clamping diodes, and the damaging limit is 20mA. In general, these diodes are the last line of protection and a design should not rely on them in normal use.

So, based on above, yes you can put a load like a LED of up to 25mA to an output pin, but you really should not. Doing so would allow you to drive only 4 or 5 LEDs before the total damaging current limit is exceeded.

To allow driving higher loads you must use transistors or buffers or whatever with the expander pins.

\$\endgroup\$
1
  • \$\begingroup\$ Thansk, Justme, this is the fact. Having various LEDs = ON at once. Expanser has its own consumption limitation. As I am familiar using ULN2803 drivers I've thought about this as my prefer solution.I will have an external source. The idea is that LEDs could take current from ground thanks to the darlington configuration, instead from the control circuitry. \$\endgroup\$ – Suvi_Eu Jun 5 '20 at 7:58

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.