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.

migrated from electronics.stackexchange.com Dec 17 '15 at 20:19

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • Hi! Are those buffers separate entities or part of the Pi/Arduino? – Ghanima Dec 17 '15 at 20:21
  • Hi! I used those buffer symbols as input/output symbols. – adtewa Dec 17 '15 at 20:24
  • 1
    You might also consider a logic level shifter such as: learn.sparkfun.com/tutorials/… – Kolban Dec 19 '15 at 10:38
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.

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.