Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

3pi to RPi serial connection

First off, my overall project is to bring life to several dozen 3pi robots (formerly used in a course) by connecting them to Raspberry Pi Zero’s using USB AVR Programmers (the original ones: https://www.pololu.com/product/1300).

I’ve been able to connect an RPi to a 3pi robot through the programmer just by connecting the RX/TX lines on the programmer to the 3pi’s PD0/PD1 pins. This connection works, however I’m worried that I won’t get a robust connection with just 2 wires. Should the programmer’s 5V and GND lines be tied to the corresponding pins on the 3pi? Or maybe just tie the grounds? What’s the best strategy for the 3.3V RPi to talk to the 5V 3pi using these programmers?

Note, I see others have used logic level shifters and that makes great sense. I’m just wondering if I can use my existing programmers because I have so many of them already. So it would just be much more efficient and less costly to re-use these versus purchasing (and worse, soldering) a bunch of logic level shifters.

Thanks for any help!
Andrew

Hello, Andrew.

It is not clear from your description, but it sounds like you are connecting to the Pololu USB AVR Programmer (product #1300) to the Raspberry Pi Zero via USB (probably using a Mini USB to Micro USB adapter, since the Raspberry Pi Zero has a Micro USB port) and are powering the Raspberry Pi from the 3pi robot. If so, you have a common ground in your system between the Raspberry Pi Zero and the power source on the 3pi robot, which should be sufficient for communicating between the boards. If your connections are different, can you post pictures showing how everything is connected between the Raspberry Pi, the 3pi robot, and the AVR programmer?

Do not connect the AVR programmer’s VBUS 5V line to the 3pi’s 5V line! They are both outputs and connecting them could result in damaging one or both devices. It shouldn’t hurt to have more ground connections between devices, so you can connect the GND lines between your Raspberry Pi, 3pi robot, and AVR programmer.

- Amanda

Thanks Amanda! Here’s a picture of my current setup:

image

As you can see the 3pi and RPi are independently powered. The 3pi is powered from its batteries while the RPi is connected to a wall wart. Meanwhile the plan is to power the RPi from a USB battery pack.
You’re 100% correct on the mini USB to micro adapter.

Just to reiterate my question, so far this 2-wire connection between the 3pi’s UART and the AVR programmer works. However, I wonder whether the grounds should be tied together or whether there are other concerns.

Cheers!
Andrew

You should have a ground connection between your 3pi robot and AVR programmer to ensure the proper communication via serial lines. It is surprising that you saw your setup working reliably, since there is no reference voltage for the serial lines.

- Amanda

Okay, I’ve tried it with the grounds connected and it still seems to work. So that’s good news! I’ll report back if there are problems, but right now I’m a happy camper!

Thanks for your help!
Andrew