0

Basically the title, but I have been looking into SPI as I am working on a project that basically requires a Serial connection between a Raspberry Pi (as a master) and an Arduino (slave); I intended on having the Pi act as a master but still have the Arduino freely communicate back to the Pi (communication such as notification of errors or completion of a task, etc.)

Though my research in this SPI thing has been a little conflicting because one source either says it is a must that I use logic level converters, and others just do a direct connection. Which would it be? I only plan on using one Raspberry Pi and one Arduino, the Arduino in which sends updates at how machinery is running and requests to enable that machinery, along with the Pi receiving the data and sending commands on what to do.

1 Answer 1

1

The Pi's GPIO are all 3V3.

If the Arduino being used is also 3V3 you will not need logic level converters between the Pi and Arduino GPIO.

If the Arduino being used is 5V you will need a logic level converted to drop any signals going from the Arduino to the Pi from 5V to 3V3. If the Pi is the SPI bus master this is only the MISO line.

You suggest you need to signal the Pi when the Arduino has a condition. Simplest would be an interrupt line connecting an Arduino GPIO to a Pi GPIO. This line would also need logic level conversion to drop 5V to 3V3.

4
  • Hi thanks for your response Joan! Seeing as this is the case, would I2C better support my bi-directional requirements?
    – Thanos
    Commented Feb 10, 2022 at 14:40
  • It is probably simplest to use a serial USB dongle.
    – joan
    Commented Feb 10, 2022 at 14:46
  • Would like to, but the conditions in my group project negate the use of USB due to them being used by other devices. But as you mentioned, I would basically need resistors between the MISO pin
    – Thanos
    Commented Feb 10, 2022 at 16:55
  • In that case I would use serial and drop the Arduino TX line to 3V3.
    – joan
    Commented Feb 10, 2022 at 17:43

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.