frud0
Posts: 14
Joined: Sat Jul 08, 2017 3:58 am

[SOLVED] Portable Raspberry Pi - Battery issues

Sat Jul 08, 2017 4:42 am

Hello,

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.
Last edited by frud0 on Sun Jul 09, 2017 9:57 pm, edited 1 time in total.

frud0
Posts: 14
Joined: Sat Jul 08, 2017 3:58 am

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 4:59 am

Sorry... is it too stupid a question. Can someone help me out please?

Sorry for bumping the post, but it is really reigning my life right now. Parts here in India take time to deliver.

I am a quick learner and promise to give back to this amazing community.

As far as thinking about some solution:

I am thinking of purchasing a DC-DC buck regulator that gets 6-24v as input, and gives a (so they claim) 5.1-5.2v with 3A at max load.

I am thinking of making a parallel connection to the 7.4v battery with this and powering the Pi (just the Pi) with this power. Will it work?

SeeGreatness
Posts: 12
Joined: Mon Feb 20, 2017 11:28 pm

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 5:13 am

diodes?
dont kill me but i have no idea what i am talking about but i do know that diodes do isolate current in one direction and if you had them pointed toward ground it might work....
also ....just use 2 portable battery2 (like one that you may use for your phone) and have another pi (i suggest the pi 1 becuse its cheep and well it works) to monitor the the packs so that one is charging one is chaged and is being used. You may have it be solar powered and when one is about to die just reboot and set your servo program load on boot and vola crows be gone (or you know you could just hire me to be the scare crow since i cant find any job in my economy)
Last edited by SeeGreatness on Sun Jul 09, 2017 5:11 pm, edited 1 time in total.

frud0
Posts: 14
Joined: Sat Jul 08, 2017 3:58 am

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 5:23 am

You, Sir, are very funny. I hope the last sentence was a joke and that you are doing well.

One thing I forgot to mention is, weight is an issue for me. The whole system is going to be resting on servos (3 axis setup), so not only do I have to control how much weight I am putting on these platforms,

I also have to make sure to balance them so that the centre of gravity is at the servo-shaft.

In such a case, adding a battery, just adds unnecessary weight. Plus a little shoddy implementation wise (each time to power on open the system, make these 2 connections; each time to charge remove both and charge them)

Thank you so much for the reply... What is it with diodes were you suggesting? Can you explain more in detail?

W. H. Heydt
Posts: 13644
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 5:34 am

First, whatever you do, don't supply the Pi with anything over 5.25v.

Have you checked to see what the output current limit is for your battery? And your voltage converters? Are you sure your power circuits can provide enough current for all demands at the same time?

And last...bumping a thread less than 20 minutes after posting is poor form. We're all volunteers here. The time stamp on your second post is just before 10PM where I live, so the odds are very good that most people--particularly the ones with the greatest Pi expertise (they mostly live in the UK) are asleep.

frud0
Posts: 14
Joined: Sat Jul 08, 2017 3:58 am

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 5:41 am

Hello,

Yes, keeping that in mind that nothing more than 5.25v for the Pi. The UBEC (Universal Battery Eliminator Circuit) gets the 7.4v down to 5.23v so its good.

I am worried that my problem lies in the area you are trying to highlight... but my servos are driven directly by the battery (only their SIGNAL wire is part of my main circuit.

Is there any way to measure how much current my Pi is using right now? I know it could be the dumbest question you`ve heard around here.

P.S. My post was from yesterday... sorry if I sound arrogant when I highlight this.

frud0
Posts: 14
Joined: Sat Jul 08, 2017 3:58 am

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 2:56 pm

Ok I think I destroyed my Pi.

Can someone please answer this one question for me?

While trying different permutations for reducing connections in my system, I accidentally connected my +5.25v supply ground to the SCL pin of my Pi.

I didnt notice - but did notice my OLED not working. I tried running it using a test software I had. When I got I/O error that is when I realized my mistake...

Is my bus gone? Now when I connect correctly I don't see any devices connected with i2cdetect.

Can I salvage this? Or time to get a new Pi? Please help me.

SeeGreatness
Posts: 12
Joined: Mon Feb 20, 2017 11:28 pm

Re: Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 8:00 pm

i have no Idea how lol and no idea what happened as this is something a newb never encounters ....(oh wait yes it does as a pro would know not to do that and why lol) anyway a newb like me wouldnt know these things are probably Impossible but I know its possible if you believe Image

frud0
Posts: 14
Joined: Sat Jul 08, 2017 3:58 am

Re: [SOLVED] Portable Raspberry Pi - Battery issues

Sun Jul 09, 2017 9:59 pm

Thanks for all the lovely help people.

The problem was with the stupid PCA9685. Actually it is me who was stupid...

The power for the servo motor - was grounding itself through the Pi. That is why the Pi kept restarting. I have isolated the Pi now.

Thanks a lot!

P.S. - To all those who are volunteering with such advance level of help - I have absolutely no words... huge huge regard for time and effort! Love you.

Return to “Beginners”