meminoglu
Posts: 29
Joined: Sun Mar 05, 2017 3:15 pm

Long SPI distance problem with 2 Slaves.

Thu Dec 06, 2018 3:18 pm

I Have 2 SPI modules on Raspberry SPI0.

When i connected 1 Short cable slave it is working
When i connected 2 Short cables slave it is working
When i connected 1 Long cable(7 meters) slave it is working
When i connected 1 Short, 1 Long Slave, both are not working!

if distance is problem, why 1 Long Cable is working? What is changing 1 Long 1 short cable situation?

User avatar
mikronauts
Posts: 2678
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Long SPI distance problem with 2 Slaves.

Thu Dec 06, 2018 5:48 pm

SPI is meant for short distances (examples: on the same pcb, or daughter board plugged into pcb)

Sometimes (if running at a low enough data rate) you can abuse the spec and run faster, but you will be very susceptible to corrupted data due to electrical noise.

Simplest solution for you is to use two pi's connected via ethernet or wifi
meminoglu wrote:
Thu Dec 06, 2018 3:18 pm
I Have 2 SPI modules on Raspberry SPI0.

When i connected 1 Short cable slave it is working
When i connected 2 Short cables slave it is working
When i connected 1 Long cable(7 meters) slave it is working
When i connected 1 Short, 1 Long Slave, both are not working!

if distance is problem, why 1 Long Cable is working? What is changing 1 Long 1 short cable situation?
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

Return to “Interfacing (DSI, CSI, I2C, etc.)”