4

I'd like to connect my Raspberry Pi and my Arduino Uno with SPI. I saw a solution here, but sy wrote at the end that this is wrong, because Raspberry Pi transmitting/recieving 3,3V on the pins and Arduino on 5V.

So I made up my mind to solve this. This is what I have in mind:

schematic

simulate this circuit – Schematic created using CircuitLab

Is it OK?


UPDATE 1:

Here I read that Arduino input pins are high-impedence inputs, they draw about 1uA current. Also logical HIGH is above 2V (to be sure 2,7V). And 3,3V is above it. So a simple cable from a Raspberry output to Arduino input is suitable.

Here I read that "never source or sink more than 0.5 mA into an input pin" (on Raspberry Pi). So R=5V/0.5mA = 10K resistors is needed in the voltage divider.

asked Dec 17, 2015 at 20:16
3
  • Hi! Are those buffers separate entities or part of the Pi/Arduino? Commented Dec 17, 2015 at 20:21
  • Hi! I used those buffer symbols as input/output symbols. Commented Dec 17, 2015 at 20:24
  • 1
    You might also consider a logic level shifter such as: learn.sparkfun.com/tutorials/… Commented Dec 19, 2015 at 10:38

1 Answer 1

1

That may be way over the top for what you need.

The Pi only acts as the SPI master which means that slave select (CEx), clock (SCLK), and MOSI are outputs from the Pi and inputs to the Arduino. You probably don't need any conditioning on those signals. You can connect pin to pin (with a series resistor if you are of a nervous or careless disposition).

The Arduino output line will be 5V and is not safe to feed into the Pi's 3V3 MISO GPIO. For that line a voltage divider (e.g. a simple resistor divider) is all that is needed to cut the 5V to 3V3.

answered Dec 17, 2015 at 20:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.