Go Down

Topic: My power circuit for raspberry pi, arduino and loads. Help needed (Read 2 times) previous topic - next topic

liomry

Hi guys,

I'm new to electronics and here's a circuit I've put together for powering  a pi / arduino and related gear.

9.6v battery pack 1 -> 5v BEC -> USB port -> Raspberry pi (via mini-usb) -> Arduino Mega (via usb)

On the arduino mega I have 2 signal pins, 8 and 9, going to two continuous rotation servos. The ground for one of these servos goes to the arduino ground. I then connected the arduino ground via another pin to my breadboard and the second servo is grounded here.

On the breadboard  I have a second 9.6v battery pack which is going to the breadboard's power terminal and sharing ground with the arduino. Both servos are powered from this board (the +5v from the second battery pack)

This works and the BEC's are protected against reverse voltage, however when I just connect the battery pack for the pi/arduino I see a light come on on my BEC regulating the servo +5v. The servos will not run until I connect my second battery pack, however I still feel that this is less than ideal and I might do damage to some components long-term.

Is there a safer way to do this circuit? Apologies for not having a diagram but I sort of threw this together as I went and I did try to draw a diagram but I got quite confused with how to draw the grounds


majenko

Powering the Mega from the Pi is not what I would call a good idea.

The USB chip on the Pi is incredibly weak, and struggles to power more than a simple keyboard and mouse.  Any more than that and you are liable to kill the USB chip (as many people, including myself on my first Pi, have found).

Power the Mega direct from an external power source, and don't use the Pi's power for anything at all - it can barely run itself without asking it to power other things.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

liomry

It seems to be running fine for the moment, were you using the 1 usb port or 2 for the pi?

If I were to power the arduino directly, how would you suggest I deal with communicating the pi? Additionally would it be possible to power the pi and the arduino from one battery pack? I'm already pushing my weight tolerances with 2 9.6v battery packs

majenko

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10


liomry

Looking at the Pi specs it says "The onboard USB ports are designed for USB devices using one "unit load" (100 mA) of current"

From http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1280873480 I was allowing a 35mA draw for the Arduino on its own and guesstimating ~ 20 mA per output port, 2 of which will be on at the same time all the time = 75mA draw, allowing me to add a ping sensor or similar (output and input only, power drawn from second battery) and stay beneath the 100mA for the usb port

Docedison

It's generally a poor idea to design something that  "Only" uses 95% of the available power,, Particularly when the 5% might mean the failure of one or more items in the design. One of my more successful Design Guidelines is... "Murphy was an Optimist"...

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Grumpy_Mike

Yes but the guidelines of 100mA take that into account. There is a seriese poly fuse that "goes" at 180mA so you can use it right to the wire of 100mA and still have margin.

majenko

Except on the Pi where it's the USB chip that goes not the polyfuse.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Grumpy_Mike

Quote
Except on the Pi where it's the USB chip that goes not the polyfuse.

No.
The current draw from the USB socket has no effect on the chip.

majenko


Quote
Except on the Pi where it's the USB chip that goes not the polyfuse.

No.
The current draw from the USB socket has no effect on the chip.

So why have so many people got a Pi with a dead USB/Ethernet chip then?  And it's not the poly fuse - the crystal attached to the chip stops oscillating, so the chip isn't working.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Grumpy_Mike

Absolutely nothing to do with the USB current draw.

My suspicion would be a bad crystal. Crystals are notorious for being very variable and the Pi team being very new to mass production probably believed the manufacturers when they said the crystal would work. In general the factories in China tell you what they think you want to here not what is the truth.

pluggy

If you're only using 2 pins, why bother with a Mega ? a vanilla Uno will draw less power.  Hooking a Pi up is going to give you all the computing grunt you'll need.  The Pi is tetchy on power and current draw, I'd give it a mile headroom......
http://pluggy.is-a-geek.com/index.html

Docedison

Something occurred to me, in reading all this thread and spouting my usual conservatisn I remembered a Polyfuse data sheet I read once and there was a caution about ambient temperature. It seems that the polyfuse is a temperature sensor of a sort as it's internal temperature and not the current as such that triggers the polyfuse. Rather the effects of the current flow. If the ambient is above about 30C deg the fuse Must be derated. I don't know if this is pertinent to the issue at hand but I think it might be a point of consideration. I also think that this is a major design flaw in the Raspberry Pi in that IF the thing has a USB port it should comply with the Port Standard Definition which apparently the Pi doesn't... Another thought just occurred to me and that is If the board wasn't laid out properly there might an issue with being able to cool the polyfuse properly and that might cause the poly fuse to be damaged or in other words the layout might well have converted the poly fuse to a real fuse...
I just traded a new Pi... Still unopened from Newark... for a new 64 Bit PC motherboard.
I think I got the better of the deal...

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Grumpy_Mike

Quote
I also think that this is a major design flaw in the Raspberry Pi in that IF the thing has a USB port it should comply with the Port Standard Definition which apparently the Pi doesn't

Well it is permitted under USB standards to have a port that only supplies 100mA, it is called a one unit load.

Yes that is right about the poly fuse, I have never been a fan of them, the main use is to prevent fires when idiots wire things up wrong. I used them on access control equipment.

However, all this is well known and well discussed over on the Raspberry Forum. Most problems are blamed on the Poly fuses but in fact most problems are the actual software.

Go Up