Close

Grounding issue with Raspberry Pi

A project log for Browser-Controlled Tracked Robot

A tracked vehicle for playing around with. Controlled from laptop for ubiqutousness, educational value and ... uh... data.

OldCrowOldCrow 01/13/2015 at 17:350 Comments

So I got the server part working a-OK on the PC. OK.

And I got the Control Board to spin the motors through browser commands. OK.

And I got the service running on he Pi. OK.

But as soon as I connected the the Control Board and the Pi, the Control Board goes nuts.

And when I tried again, it stayed alive only until I connected the Cat5 (I'm planning to debug via Ethernet before going Wi-Fi).

The problem

I spoke with a friend with more experience. His opinion is that there is a grounding issue, caused by the thin USB cable power wires. See the picture attached.

Since the USB GND wire is so thin, the my MCU would actually create a different ground potential and thus apparently pull a bit too much current in the wrong place. Or so we think.

The Pi's arrangement of only having a Micro-USB connector for power input is, well, bad. There just aren't many Micro-USB cables to be found that would have a reasonably sized ground wire. Or maybe I'm just unlucky.

The fix

Since this is likely not the last bug with this board, I'm not going to make a new board yet. Instead, I'm going to add a smaller board that will take the ground-signal interaction further away from the ControlBoard and, more crucially, away from the AT32 MCU's own pin.

This could be done in a variety of ways. For example, I could just add a pair of buffers somewhere close to the Pi's power input and wire those to suitably beefy power cables. But this would be a one-off board with no other uses. And when the minimum quantity of PCB orders from China is 5 or 10 pieces, I don't want that.

Instead, I'm going to make an optocoupler board. That will have a variety of uses even after this project is over and done with. Or rather, I've already designed the board in Eagle and sent it off to the fabhouse. I'll update again when they come.

I'll make a separate project page for the OptoCoupler board soon.

Discussions