0
\$\begingroup\$

I have a switch and want to read digital input pull up state from arduino.

enter image description here

how can the key open the pc 817 optocoupler and trigger the pnp gate to read inputpullup pin from digital arduino.

That make me crasy my new update work good on a digital input of esp32 but it do not work on a imput of mcp23017 i don't understand why . any comment are welcom

\$\endgroup\$
6
  • \$\begingroup\$ You have used an NPN symbol for Q5 - please change it to PNP. I think you need a pull-up resistor on Q5 base. \$\endgroup\$ Commented Jun 13, 2023 at 15:51
  • \$\begingroup\$ Q5 isn’t adding much value to your circuit. You can simplify it by connecting pin4 of the pc817 to 5V and pin3 to R4/digital input. R3,5 and Q5 are removed. \$\endgroup\$ Commented Jun 14, 2023 at 12:57
  • \$\begingroup\$ Thank you for your advises i have made an error on my testing board about one resistor near the optocoupler witch have make me a to high voltage drop. \$\endgroup\$ Commented Jun 15, 2023 at 12:10
  • \$\begingroup\$ the pnp is allready implemented in the 16 channel board i have buy so i will not remove it. \$\endgroup\$ Commented Jun 15, 2023 at 12:12
  • \$\begingroup\$ I have 24 volt on switch side and 5 volt on mcu side witch will enter in a mcp23017. \$\endgroup\$ Commented Jun 15, 2023 at 12:14

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.