2
$\begingroup$

Good day

I am currently implementing an autonomous quadcopter with stereo vision using raspberry Pi. One (Let's call this Pi_1) is responsible for stereo vision the other is responsible for motor control and trajectory planning (Pi_2). I was looking for a way to transfer a 480 element float vector via GPIO from Pi_1 to Pi_2. Pi_1 stereovision program runs at 2Hz while Pi_2 motor control runs at 210Hz.

Is there any protocol fast enough to deliver this amount of information to the second raspberry pi via GPIO?

I am currently looking at SPI but I saw that the Raspberry Pi cannot be turned to a Slave making it not an option. I also looked at UART however it is too slow for my needs. All the I2c ports on the Pi are currently being used by the stereo vision cameras and the IMU's. If the gpio option is not feasible, I am also open for other suggestions such as using other hardware (middle man) or wireless options.

$\endgroup$
4
  • 2
    $\begingroup$ What about Ethernet? $\endgroup$ Commented Jan 20, 2016 at 18:49
  • $\begingroup$ one of the raspi boards I am using is the raspberry pi compute module io board. :) Unfortunately it does not have an ethernet socket. :( $\endgroup$ Commented Jan 20, 2016 at 21:02
  • $\begingroup$ Same question posted on Raspberry pi SE. $\endgroup$
    – agold
    Commented Jan 21, 2016 at 11:05
  • 2
    $\begingroup$ The UART looks plenty fast enough, am I missing something? Are you transferring the vector at 2 Hz? Assuming 480 single-precision floats twice a second, that's a goodput of 30,720 bit/s. "How can I set the UART speed?" claims that the Raspberry Pi UART defaults to 115200 bit/s which seems more than adequate for a 2 Hz transfer rate. It also implies that (with difficulty) it can run at 32 Mbit/s (typo?), which is more than adequate for a 210 Hz rate. $\endgroup$
    – David Cary
    Commented Jan 21, 2016 at 16:53

2 Answers 2

1
$\begingroup$

I2C is a bus, not a particular direct connection. What's the problem with connecting the two over I2C? Actually, the Wikipedia page for I2C shows the image below, with two microcontrollers connected via the I2C bus.

I2C Bus

You might be able to transition your other devices from I2C to SPI and leave the I2C bus open for uC-uC comms.

$\endgroup$
2
  • $\begingroup$ I found out that the UART has a much higher speed on the raspberry pi compared to i2c. This fits my needs as I am sending a 480 element floating vector from Pi_1 to Pi_2 $\endgroup$ Commented Jan 21, 2016 at 3:36
  • 4
    $\begingroup$ @user123456098 - Great! You can actually make that an answer to your own question and then, a few days later I believe, you can accept it as the correct answer. $\endgroup$
    – Chuck
    Commented Jan 21, 2016 at 11:16
0
$\begingroup$

The Raspberry Pi's UART interface can handle up to 4Mbps which fits my needs as I am sending a 480 element floating vector from Pi_1 to Pi_2

$\endgroup$

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.