I am an ex-engineer - so quite possible what I speak may sound like utter nonsense... but please bear with me for the next few lines.
I am building a scarecrow with a robotic head. The insides are as follows:
1 - Raspberry Pi - 1B
2 - TP-Link TL-WN725N 150Mbps Wireless N Nano USB Adapter (Easy wireless, I couldn't get myself down to hardwiring and programming wireless)
3 - MPU6050 (3-axis gyro+accelerometer) on an Adafruit-clone Gy-521 board (through I2C)
4 - PCA9685 PWM servo driver running on 3.3v (through I2C again)
5 - SSD1306 OLED 128x64 display (I love I2C)
6 - 2xMG995 (fuxxing clones) servos ,connected to PCA9685 (powered directly by 7.4v)
7 - Beast Power 7.4v 4000mAh capacity 2S LiPo
8 - an UBEC to step down the 7.4v to 5.25v for the Pi and other VCCs (3A standard output, 5A max)
9 - a 5v to 3.3v DC-DC step-down regulator, 800mA max output (to power the PCA9685 and other LEDs if at all)
Sorry, I know that is a lot of description (painful), but I had to because my problem is such.
In a nutshell - I bought the huge battery, and the UBEC - since the robot had to be wireless. Also, I had read that it is not safe and advisable to draw huge currents from the Pi's GPIO, since that will make it restart. I am running servos so my current draw is huge, plus I am going to add more. I am only prototyping yet.
So I isolate my circuits
1. 7.4v powering only the servos, and my UBEC (to convert to 5.25v)
2. 5.25v from my UBEC powering my Pi, SSD1306, MPU6050 boards, also to the 5v-3.3v DC-DC regulator
3. 3.3v DC-DC regulator powering my PCA9685 (it is a like a multiplexer of servos, can run 16 at once, using the power SEPARATELY provided on the board, in my case 7.4v)
Although I say these 3 circuits are isolated, they all have a common ground, which finds its way back to the battery. I was thinking that would not be a problem (like I said, ex-engineer).
But when I have all these connected and powered, I can login to SSH and everything just fine, but as soon as I run a code to power the servo, the Pi restarts.
How do I totally ISOLATE the Pi - like Rapunzel? So that her dreaded (loved) locks are the I2C bus that can be connected to the outside world, with my Pi living high up in the tower, not bothered by peoples lowly GROUNDs and their pricey CURRENT draws?
Don't kill me please. If its for the last sentence, I totally understand.