0
\$\begingroup\$

Do port expanders use MOSFETS internally to switch the pins high/low?

My project is using a Raspberry Pi and a MCP 23017 port expander to sink some current (to GND through the port expander) from a variable resistor (200-400 ohm) at (3,3 volts from the Pi).

I have noticed that the port expander is not a perfect short circuit to GND and have measured a voltage drop between the pin of the port expander and GND. This voltage drop increases when a higher current is sunk through it to GND. Stupidly, I was expecting the only voltage drop to be across the variable resistor (or most of it.)

Sourcing and sinking current through the GPIO of the Pi works as I thought, with a 3,3V drop across the resistor.

In the MCP 23017 datasheet, (under param No. D080) it says when MCP is operating at "Output-Low-Voltage" the voltage drop across the MCP23017 pin to GND will be 0,6V when the Iol (sunk current) is 8mA and the Vdd (supply voltage of MCP) is 4,5V. This would explain my problem.

I'm looking for literature / links explaining the basics of (I/O) port expanders which I can reference in my bachelor thesis which explains this.

So far the only thing Ihave come across is this link.

From my understanding a MOSFET has a set (Rds on) resistance when on, but the port expander resistance changes based on the current sunk or sourced. Why? Do they internally use MOSFETs?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

, do they use MOSFETS internally to switch the Pins high/low?

probably? Most digital circuitry these days is CMOS.

I have noticed that the Port Expander is not a perfect short circuit to GND and have measured a voltage drop between the pin of the Port expander and GND, this voltage drop increasing when a higher current sunk through it to GND

Well, that will be specified in your port expander's datasheet. Reading that gives you more information than speculating what kind of transistors are used on the die of that IC.

In the MCP 23017 datasheet, (under param No. D080) it says when MCP is operating at "Output-Low-Voltage" the voltage drop across the MCP23017 pin to GND will be 0,6V when the Iol (sunk current) is 8mA and the Vdd (supply voltage of MCP) is 4,5V. This would explain my Problem.

Exactly!

Im looking for literature / links explaining the basics of (I/O) Port Expanders which i can reference in my bachelor thesis which explain this.

There's nothing you need to explain in your bachelor thesis: the low-pulling output transistor, whatever kind of transistor that is, has a non-zero forward voltage under current. Like anything in this universe that isn't a superconductor (I'm sure your advisor is familiar with Ohm's law...).

But from my understanding a MOSFET has a set (Rds on) resistance when on, but the Port expander Resistance changes based on the current sunk or sourced, why? So do they internally use Mosfets?

Again, whether or not they internally use MOSFETs or not doesn't matter to your application: every transistor has an effective resistance that is not zero. The question of how close you get the resistance to zero is a question of size, speed and cost. The result of the design is what is specified in the datasheet - nothing more to add to that.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you for clarifying. So Port expanders should generally not be used to source or sink currents? So a better solution would be to make the Port expander control a MOSFET to switch the Resistor current to GND, in this case the resistance drop of the MOSFET Rdson is also known? Thanks! \$\endgroup\$ Dec 11, 2020 at 12:44
  • \$\begingroup\$ no such general statements should be made. You can source and sink as much current as your datasheet says is OK. If you need more, then you'd use a beefier port expander (if available) or e.g. a beefier output stage made from higher-current transistors that you control with the IO expander. This, again, has absolutely nothing to do with things being BJT or MOSFET or JFET or little green men pulling levers on switches inside the IO expander. \$\endgroup\$ Dec 11, 2020 at 12:57
  • \$\begingroup\$ Sorry i should have said for my situation, where i am measuring the Vout of a voltage divider where 1 resistor is variable, it is important that the voltage supplied to the voltage divider is constant, regardless of the current. Since the Port expander has an "internal resistance" depending on current through it and thus is not good to use, my idea to solve this would be to use port expander to control MOSFETS to switch the voltage divider on or off, while voltage divider is powered from an external, steady power supply. Advantage here is voltage is constant and the Rdson is known. Correct? \$\endgroup\$ Dec 11, 2020 at 14:04
  • 1
    \$\begingroup\$ @BetweenBeltSizes95 sounds right \$\endgroup\$ Dec 11, 2020 at 14:42
2
\$\begingroup\$

IO port expanders are not any different than digital IO ports on any other devices. Or to put it another way, they have just as much differences than IO pins between any other devices. So you don't need to explicitly study IO stages of IO expanders, it would be false to say these are somehow special and different from IO stages of other ICs with GPIO pins.

Any device with IO has some drive strength, and some devices have weaker drive strength than others. So it will not be a perfect short circuit to GND in any case.

So digital output stengths of two devices can be compared and they will be different. Thus for the same load you will get different current.

The pin is guaranteed to be 0.6V or below, when 8mA is pulled out, and supply voltage is 4.5V. More current can be drawn, but at the same time the voltage is not guaranteed, it can be over 0.6V. And since you are using the chip at 3.3V supply, the current driving ability will be less.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you for your help. My confusion is to why the Pi GPIO is able to not "lose" any voltage to "internal resistance" while the port expander does. The maximum ratings of Pi state 16mA per pin sourced or sunk, the port expander mcp says 25mA. But only the Port expander states there will be a voltage drop depending how much current, while the Pi i have not noticed a voltage drop internally. If they both use MOSFETS, what is the difference between the ones in the Pi and the port expander? are the MOSFETS inside the port expander weaker and smaller and thus have a larger "internal resistance"? \$\endgroup\$ Dec 11, 2020 at 14:09
  • 1
    \$\begingroup\$ The absolute maximum IO pin current does not necessarily mean the strength or output impedance. So you are absolutely correct, the PI has stronger drivers and has better output impedance. I am not even sure if the official electrical specs of Pi GPIO pins is ever published, but it seems that 16mA is not the maximum rating, it is the maximum strength and it even has configurable strength. For what I gather, a certain version of the Pi computing module can sink 17mA with 0.4V output voltage when used with 2.7V VDDIO supply. It means the Pi is stronger by a factor of 3 on the output impedances. \$\endgroup\$
    – Justme
    Dec 11, 2020 at 14:35
  • \$\begingroup\$ I have a follow up question: Does a MOSFET have a steady Rdson resistance at a certain GateSource voltage? Because the port expander voltage drop seems to change with current sunk or sourced, but does a normal MOSFET behave the same way? or is the resistance set when gate has a set voltage? \$\endgroup\$ Dec 21, 2020 at 10:43
  • \$\begingroup\$ Then do a new follow up question that can be separately answered and accepted, don't ask in comments. \$\endgroup\$
    – Justme
    Dec 21, 2020 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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