I have a Raspberry Pi that is controlling LEDs and a servo. When I power the Pi via usb which is connected to a computer, I can control the servo directly without any problems. However, when using a separate usb adapter the Pi shuts down at the moment the servo should be turning. My conclusion: the servo draws too much current to control via GPIO.
So, I had this idea of powering the servo externally. I bought a micro usb split cable. One end into the Pi, the other end stripped to it's +5V and GRND, and connected to the servo. The data line is connected between the Pi and the servo. If I power up the Pi all is fine, until the moment I plug in the GRND of the servo (in fact connecting both the grounds of both circuits, through the usb splitter). Then the whole thing shuts down. This even happens when the servo isn't controlled at all.
I'm confused, because I thought connecting both grounds would be the way to go. What am I doing wrong? What is the right way to power the Raspberry Pi and a servo using one power source?
The purpose of my setup is an automatic cat feeding machine so I'd rather have one power adapter to connect to my power grid, instead of two.
Thanks in advance!