1
\$\begingroup\$

For this project I am using a NUCLEO-F429ZI which interfacing with PCF8575 over I2C. I am operating the PCF8575 only as output. I have tested the PCF with NUCLEO and it works without any issues. But, the main part of this project is to further use a switching circuitry to get 24 V output on the corresponding pin of the PCF8575. For this purpose I have designed a switching circuit which switches a 24 V rail for that particular pin.

24 V Output Driver Circuitry using Isolator and MOSFET Schematic for output 24 V switching module

The issue is that when all three NUCLEO, PCF and this board are connected together and I try to switch any HIGH any pins I observe a drop of two volts and as a result there is not 24 V output.

Am I missing something in the circuit? What is the cause for this issue? Thanks in advance. Let me know if there is any more information that you need.

P.S. I haven't tried out those 24 V relay modules yet. I am hesitant because they are bulky and I think they won't be ideal for the final PCB.

html.alldatasheet.com/html-pdf/43370/SHARP/PC817A/125/1/… (Isolator) alldatasheet.com/datasheet-pdf/pdf/68336/IRF/IRF9640.html (MOSFET) nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf (PCF8575)

\$\endgroup\$
14
  • \$\begingroup\$ Is it possible the IRF9640 isn't fully saturated at just -7,5V? \$\endgroup\$
    – S_G
    Commented Jul 2 at 10:25
  • 1
    \$\begingroup\$ This can never happen: the main part of this project is to further use a switching circuitry to get 24 V output on the corresponding pin of the PCF8575 <-- the absolute maximum voltage is 7 volts. Please add data sheet links for the main components and explain where the PCF8575 fits into things circuit-wise. \$\endgroup\$
    – Andy aka
    Commented Jul 2 at 10:25
  • \$\begingroup\$ @Andyaka html.alldatasheet.com/html-pdf/43370/SHARP/PC817A/125/1/… (Isolator) alldatasheet.com/datasheet-pdf/pdf/68336/IRF/IRF9640.html (MOSFET) nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf (PCF8575) The PCF sits in-between the NUCLEO and this assembled circuit. The NUCLEO and PCF communicate over I2C (which works without any issue). Basically I am using the PCF's 8-bit outputs (3.3 V) to switch on MOSFETs through an isolator. These MOSFETS switch on to 24 V rail. \$\endgroup\$
    – naman
    Commented Jul 2 at 10:42
  • 1
    \$\begingroup\$ Is there a reason why you are using optocouplers? \$\endgroup\$
    – Lundin
    Commented Jul 2 at 11:32
  • 1
    \$\begingroup\$ @naman "I need isolation" is not a reason. Do you have reason to believe there are lots of surges in supply, lots of ground currents, shaky ground potentials (maritime etc) or what's the actual reason? \$\endgroup\$
    – Lundin
    Commented Jul 2 at 15:44

1 Answer 1

1
\$\begingroup\$

You are not telling how exactly you are connecting the optoisolator LED input to the IO expander.

Since it does not work, it is a safe guess that you connected the anode to IO pin and cathode to GND.

This will not work as that specific IO expander cannot source enough current to light up the LED.

\$\endgroup\$
3
  • \$\begingroup\$ Actually, I first tested the assembled board with just the NUCLEO and no PCF in-between. When I was switching a pin HIGH through the isolator on the output I was getting 24 V. The board and PCF work well individually with NUCLEO, it is only after integrating all three that I am facing the issue. Thanks for your input. Can you suggest how I can source enough current? @Justme \$\endgroup\$
    – naman
    Commented Jul 2 at 11:26
  • \$\begingroup\$ @naman Of course you could source enough current directly with MCU IO pin, but you can't do that with PCF8575 because it has weak "quasi-bidirectional" high output. You need to either change to another IO expander or change the circuit to sink current instead. \$\endgroup\$
    – Justme
    Commented Jul 2 at 12:49
  • \$\begingroup\$ Thanks for your advice. \$\endgroup\$
    – naman
    Commented Jul 2 at 14:48

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.