- No limitation in ports. You can always use Arduino Mega, or even use an array of them.
- Physical separation of controller and Arduino.
- It's not that scary to burn another Arduino for $10 rather than Raspbery Pi for $35.
So the general connection schema using I2C looks like this:
Unfortunately, you cannot insert wires from Arduino to Raspberry Pi. The problem is the I2C bus does not strictly specify the signal levels. As a result we have 5V for Arduino's I2C implementation, and 3.3V for Raspberry Pi's one. And if you connect the I2C pins directly, you're in great danger of burning your Raspberry Pi (or at least part of it). So we have to use an I2C bridge, or level shifter. You can buy a ready one or create you own, as I did. And the schema for the bridge is pretty simple:
After soldering I got this:
And the common connection scheme using the I2C bridge now looks like:
Scheme of pins for Raspberry Pi can be found here. And for Arduino SDA is A4, SCL is A5.
That's it with the hardware part. In this post I describe the software part of connecting Arduino and Raspberry Pi.
No comments:
Post a Comment