I've been trying to get an Arduino Uno talking with a Raspberry Pi over the UART pins. I connect one's Rx to the other's Tx and vice-versa.
To power the two boards I use a 6xAA pack and a voltage regulator. The batteries power the Arduino directly to Vin (up to 8.2V when fully charged) and the regulator powers the RPi, configured to output exactly 5V.
The problem is that I get a lot of garbage reading from the RPi and can't even send to the Arduino.
I suspect that the problem is the ground. I know that the UART requires the devices to share the ground, but how can I achieve that? The Arduino ground is from the batteries and the RPi is from the regulator's. Am I misunderstanding things?
CrossRoads, I thought about that, but won't I just be getting myself into all sorts of noise problems? I guess it's all about voltage references, and if my sensors are properly decoupled (which I think they are), then noise won't be a problem.
mart265, I also though about powering the Uno from the RPi USB. I only have one problem. I use an RPi A+ which only has a single USB port and, I wonder, can the RPi provide the power needed by the Arduino plus all the sensors and servo driving?