1
\$\begingroup\$

Setup:
An Arduino
A Raspberry Pi with pin 20 setup as INPUT_PULLUP.
The Arduino and the Raspberry Pi are on different power supplies.

Question:
Is it possible to pull down pin 20 on the Raspberry Pi using the Arduino?

Many thanks!

\$\endgroup\$
6
  • \$\begingroup\$ If the Arduino pin is an output, just drive it low. \$\endgroup\$ Apr 5 '18 at 7:22
  • \$\begingroup\$ Yes, but how about going high? I understand that the pi can only take 3.3v logic. \$\endgroup\$ Apr 5 '18 at 7:25
  • 1
    \$\begingroup\$ But its already pulled up by Pi. Then why you wanna drive it high from arduino ? \$\endgroup\$
    – Mitu Raj
    Apr 5 '18 at 7:39
  • \$\begingroup\$ @zergbot1274 Either a level shifter, or set the Arduino IO pin to an input so the pull-up resistor drives it high. \$\endgroup\$ Apr 5 '18 at 7:42
  • 1
    \$\begingroup\$ @MITURAJ Well, say I pulled down the GPIO pin of the Pi. This makes the Pi do some action. Now, I need it "primed" for the next time it will be pulled down. I can't just tell the Arduino to go up high, right? It would give 5V to the GPIO pin of the Pi which is not good for the Pi. \$\endgroup\$ Apr 5 '18 at 7:49
1
\$\begingroup\$

Use Open-Drain Configuration. As far as I know, there is no method to set a digital pin of UNO in open-drain mode. You can use an external MOSFET in open drain configuration like this:

schematic

simulate this circuit – Schematic created using CircuitLab

  • Dout = Digital output pin of UNO

    Din = Digital input of Pi, in internal pull-up mode.

  • When Dout of UNO = '1', N-MOSFET will turn on and pull down the Din of Pi to '0'.

  • When Dout of UNO = '0', N-MOSFET will turn off and the Din of Pi will get pulled up by the internal pull-up of Pi.
\$\endgroup\$
0
\$\begingroup\$

If I understand your setup correctly, you want to send a signal from the Arduino to the Raspberry Pi.

The raspi is set as input pullup, and the GPIO is powered by a 3.3 V supply, while the Arduino is powered via a 5 V supply.

You have two possibilities:

Set the Arduino pin as open drain, so that it can only pull the raspi low

Set the Arduino to push pull, and drive it low, and when you want to release the line you set it as an input.

I would definitely go with the first option, it is simple and clean.

\$\endgroup\$

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.