User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 569
Joined: Sat Nov 02, 2013 2:06 pm

Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Sat Dec 23, 2017 3:21 pm

Hi;

I have just assembled a MonsterBorg which comes with a Thunderborg Motor Driver. The setup (MonsterBorg / ThunderBorg and Raspberry Pi) is powered by 10 x AA batteries. The Pi receives its power from the ThunderBorg via the GPIO (the first 6 pins are connected to the ThunderBorg).
Removing the battery pack is troublesome but I want to do some testing and software installations on the Pi without wasting battery life.

Question:

With the ThunderBorg / Battery Pack still attached to the Raspberry Pi GPIO (but switched off) can I connect and power up the RPi as normal using a mains AC adaptor? Without causing any damage to the ThunderBorg?

Just wanted to check to avoid any damage!!!
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

wh7qq
Posts: 1340
Joined: Thu Oct 09, 2014 2:50 am

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Sat Dec 23, 2017 7:01 pm

The RPi itself is pretty bullet proof to switching the power off but the real hazard is to the uSD card which may be caught out in the middle of a write cycle. The FAT32 boot partition is the most vulnerable here. For the sake of your uSD card and time, do a proper shutdown before disconnecting power.

Code: Select all

sudo halt or sudo poweroff or sudo shutdown
or the shutdown menu on the desktop's main menu. It may go against your impatience but it will save you the time of having to replace or reload a uSD card.

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 569
Joined: Sat Nov 02, 2013 2:06 pm

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Sat Dec 23, 2017 7:25 pm

Thanks for the reply but that wasn't the question :-)
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

Delipunch
Posts: 10
Joined: Tue Mar 31, 2015 11:21 pm

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Sat Dec 23, 2017 8:41 pm

Main problem will be power supply contention, where two power supplies with even only slightly different voltages will cause high currents to flow from to another if directly connected, limited by parasitic cable resistance. If the add-on board has a series diode on the 5V rail, it should be fine (but please don't blame me if it turns out that I'm wrong), and this is assuming the wall wort has a diode in it, too.

If not, make a adapter board with female and male micro usb breakout boards, and a diode of your choice.
if unsure, try 1N4001. (https://www.sparkfun.com/products/12035 and https://www.sparkfun.com/products/10031 for example)

pcmanbob
Posts: 7134
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Sat Dec 23, 2017 9:31 pm

Why not ask the product maker/supplier after all it's there product design they should know rather than expecting some on on the forum to have done what you want to do.

Not every possible bit of kit and every way of using it will have been tested by someone on the forum.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 569
Joined: Sat Nov 02, 2013 2:06 pm

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Wed Dec 27, 2017 5:55 pm

Delipunch wrote:
Sat Dec 23, 2017 8:41 pm
Main problem will be power supply contention, where two power supplies with even only slightly different voltages will cause high currents to flow from to another if directly connected, limited by parasitic cable resistance. If the add-on board has a series diode on the 5V rail, it should be fine (but please don't blame me if it turns out that I'm wrong), and this is assuming the wall wort has a diode in it, too.

If not, make a adapter board with female and male micro usb breakout boards, and a diode of your choice.
if unsure, try 1N4001. (https://www.sparkfun.com/products/12035 and https://www.sparkfun.com/products/10031 for example)
Ah some electronics - the intention would be only to power the Pi from the mains if the battery pack that powers the robot (and ergo the Pi through Pin 2 (I Think) ) was switched off. But with my limited knowledge of electronics and understanding that a diode only lets electricity flow in one direction this is what you man. That if the 5v rail on the add on board (The Motor Controller) has a diode then any electricity coming from the Pi would be blocked.

I don’t quite follow how the board you linked would help? I assume a diode would need to be placed in series on the VCC but would it be better to add the diode protection where the RPi GPIO interface with the add on board?
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 569
Joined: Sat Nov 02, 2013 2:06 pm

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Wed Dec 27, 2017 5:57 pm

pcmanbob wrote:
Sat Dec 23, 2017 9:31 pm
Why not ask the product maker/supplier after all it's there product design they should know rather than expecting some on on the forum to have done what you want to do.

Not every possible bit of kit and every way of using it will have been tested by someone on the forum.
I have asked the product manufacturers but in. Are they could not respond quickly I posted the question to several places. I though someone on here must have a MonsterBorg or other similar robot and may have wanted to power the Pi from the mains for tasting?
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 569
Joined: Sat Nov 02, 2013 2:06 pm

Re: Powering a Pi with Mains AC / DC Adaptor with Battery Pack Attached

Fri Dec 29, 2017 6:32 pm

So a reply from PiBorg said that it should be ok, so I tested it and it was fine.
Just make sure you switch off (and or) disconnect any battery / power supply to motor driver board before applying power to the Raspberry Pi.
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

Return to “Advanced users”