A ptype mosfet can be driven directly from a PCF8574.
From the TI forums:
Tyler,
I am not trying to be contrary, i just want to be sure I have a proper outcome. There are some subtleties involved that may be explained below.
FROM: Understanding and Interpreting Standard-Logic Data Sheets
Application Report - SZZA036C – December 2002 – Revised June 2016
4.4.7 Output Clamp Current, IOK
This is the maximum current that can flow safely into an output terminal of the device at voltages above or
below the normal operating range.
Helpful Hint:
If there are clamp diodes between the device outputs and the VCC supply (see Figure 28), for ESD
protection or parasitic current paths in the output P-channel pullup transistor, there will be both a positive
and a negative absolute-maximum rating for the output clamp current. If there is only a negative absolute-
maximum rating, that implies that there is only a ground-clamp diode at the output, not a power-clamp
diode or a parasitic current path in the output P-channel pullup transistor.
FROM: APCF8574 datasheet
IOK Input/output clamp current VO < 0 or VO > VCC ±400 μa
I have done my best to analyze the circuit using "Circuit Lab" (https://www.circuitlab.com). The schematic is listed as public and is tagged withe both IRF9520 or PCF8574.
Based on the results below, the IOK would be ≈ 67ua - under the 400ua limit.
The turn on/off gate voltages appear to be appropriate.
I hope this is helpful. Let me know if I am in left field.
Thanks Barry
I am sure that you could tell me a half dozen ways to do a p-mosfet high side switch. I was not looking for alternatives.
My post only says that if you are using a PFC8574 anyway for other reasons AND you need a high side switch, then it can be done without an additional p-mosfet driver.
I would appreciate any comments you might have on what I actually posted.
Not to me.
The IRF9520 is not a logc level fet, so needs 10volt swing to properly turn on/off. The IRF9520 (diagram in post#1) needs 12 volt at the gate to switch off,which the PCF8574 can't supply. You need to add a small transistor between PCF and gate.
See diagram #3 on this page.
Leo..
Thanks for taking the time to share this information @barryfields.
In order to make all relevant information available to interested parties, I'll share a link to the original forum topic, which contains the mentioned response:
As pointed out in the TI forum and above, applying 12V to the I2C expander is a very bad idea. It is likely to malfunction and guaranteed to eventually fail, if not instantly.
The PCF8574 has a much higher tolerance for excess current into the output port.
With an Iok of ±400ua, it can handle 60ua of input current as in my example.
An Arduino port does not have that tolerance, therefore an isolation transistor is required.
Those diodes are there for transient ESD protection only. They should not be used for clipping or clamping input signals. Operation with continuous current through the diodes is unspecified.
After you have done a few designs, you will come to realize that these tricky circuits that rely on the use of the ESD diodes for clipping/clamping purposes will in the long run fail.
Doing it right would only require using one more transistor/MOSFET and you are guaranteed long term reliability.