Separate power supplies for complex setup

Hi,

I recently built my DiddyBorg and added an UltraBorg with the 4 distance sensors and 2 servos to it.
In addition, I have a Pi Camera and a large number of sensors that I connected to the Pi.

Apparently this was a bit too much for the power supply chain - as soon as I connected everything and powered up the bot, I noticed that the red PWR LED of the Pi was completely off (although the Pi still worked and got readings from all sensors).
I disconnected all sensors (except the ones connected to the UltraBorg) and everything looked normal again.

This made me start to investigate what options do I have to use 2 power supplies (ideally a power bank only for the Pi and the sensors connected directly to it, and the 12V pack for the rest).
I stumbled across this - however, the setup there is simpler than mine and the provided answer doesn't answer all the questions that I have right now.

Thus, I'd like to suggest the following setup that I have in mind to solve my issue, along with some final questions in relation to the problem.
Hopefully these will also help others.

---

The setup I have in mind:

B1 = 7.4V, 2-cell LiIon
B2 = 12V, 10-cell NiMH

RPi = Raspberry Pi 2
PbRev = PicoBorg Reverse
Ub = Ultraborg
Bb = BattBorg

A. Power Supply 1

  1. Connect B1 to GND and V+ of Bb
  2. Connect the Bb on top of one of the 6-pin connectors of the Ub (as in the default configuration, but instead of the PbRev we have the Ub)
  3. Connect the other 6-pin connector of the Ub to the RPi

--- The RPi gets its 5V from the Ub which in turn gets it from the Bb, which gets 7.4V from B1. ---
--- The Ub gets 3V for the logic and SDA/SCL directly from RPi. ---

B. Power Supply 2

  1. Connect B2 to GND and V+ of PbRev
  2. Connect *ONLY* the PbRev's SDA, SCL, 3.3V and GND to the RPi for data communication (so only pins 1, 3, 5, 6 - no 5V!), since the RPi is already powered by the Bb through the Ub, and the PbRev provides its own 5V (from B2), but not its 3.3V for the logic.

--- The PbRev gets its 12V from B2. ---
--- The PbRev communicates to the RPi via I2C / 3.3V connection. ---
--- When using 2 batteries, we need to have a common GND line in between them. ---
--- This leaves me with a free 6-pin connector on the PbRev for other I2C sensors / purposes. ---

---

My questions:

  1. Is it possible to connect the Bb on top of the Ub as described at A.2. above?
  2. Does the PbRev need an external 5V supply, or does it generate it itself from the 12V input voltage (B2)?
  3. The PbRev *NEEDS* an external 3.3V from the RPi to power its logic - is that correct?
  4. If using 2 batteries, is it safe to have a common GND line?
  5. If my assumptions above are wrong, what is the solution to achieve the above results (but please explain in a bit more detail than in the comment I mentioned, if possible)?
  6. What is the best recipe for using 2 power supplies, 1 Bb, 1 PbRev and 1 Ub?
  7. Ultimately, is it possible to power (only) the RPi from a power bank via the micro-USB connector, and the rest from the provided 12V pack?
  8. ---

    Thank you and sorry for the wall of text and avalanche of questions!

piborg's picture

It can be tricky figuring out how two different batteries work in a single robot, I think you have a well thought out plan here.

In answer to your questions:

  1. Yes, the BattBorg will mount directly to the daisy-chain connector on UltraBorg in the same way it does for PicoBorg Reverse
  2. The PicoBorg Reverse does not need the 5V connections at all
    The connections are only there to allow another board using the daisy-chain connection to get to the 5V from the GPIO
    If you need 5V for any devices connected to the PicoBorg Reverse they will need to have it supplied by another board
  3. Yes, the 3.3V is used both to power the logic chip and as a reference for the voltage levels used by the I2C lines
  4. In this circuit there will need to be a common GND connection between the batteries
    This is to ensure that all of the I2C levels are the same and avoid errors
    It is perfectly fine to have the GNDs common in this case, and in most cases
  5. I do not think any of the assumptions above are wrong, just the note above regarding the PBR 5V lines
  6. It really depends on what you care about
    Given you are trying to isolate the supply to the Raspberry Pi I would say to see my answer to question 7 below
  7. Almost, there is a setup with the boards you have that will power only the logic on the boards from the Raspberry Pi
    The logic chips on both boards consume very little power on their own so they will have a very small effect on the running time of the power bank
    See below for the setup

What each battery will power

  • Power bank (via USB micro)
    1. Raspberry Pi
    2. Any USB modules attached to the Raspberry Pi (5V)
    3. PicoBorg Reverse logic (3.3V)
    4. UltraBorg logic (5V)
    5. Any other used GPIO or devices attached to the GPIO (3.3V or 5V)
    6. Any other sensor or device attached to the spare daisy-chain connector (3.3V or 5V)
  • Battery pack (12V in this case, at least 7V required)
    1. PicoBorg Reverse drive circuitry (12V)
    2. Motors attached to the PicoBorg Reverse (12V)
    3. BattBorg for the external 5V supply (12V, may be replaced with a 5V UBEC)
    4. Ultrasonic sensors attached to UltraBorg (5V from BattBorg)
    5. Servos attached to UltraBorg (5V from BattBorg)
    6. Any other device or sensor attached to the BattBorg

The connections

Starting from everything disconnected:

  1. Remove the 5V link jumper on the UltraBorg
  2. Connect the two 3-pin cables between the UltraBorg and the PicoBorg Reverse daisy-chain connector
  3. Connect the two 3-pin cables between the PicoBorg Reverse and the Raspberry Pi GPIO
  4. Connect GND from the BattBorg 6-slot header to GND on the UltraBorg 2-pin screw terminal (see image below for the correct slot)
  5. Connect 5V from the BattBorg 6-slot header to V+ on the UltraBorg 2-pin screw terminal (see image below for the correct slot)
  6. Connect the ultrasonic modules to the UltraBorg
  7. Connect the servos to the UltraBorg
  8. Connect the -ve connection (black) from the 12V battery pack cable to GND on both the BattBorg and PicoBorg Reverse screw terminals
  9. Connect the +ve connection (red) from the 12V battery pack cable to V+ on both the BattBorg and PicoBorg Reverse screw terminals
  10. When ready attach the power bank to the USB micro connector
  11. Finally attach the battery pack to the battery pack cable to power the motors et cetera

The connections from the BattBorg 6-slot header:

A million thanks! Your answer is really detailed and explanatory - I hope others will be able to build on top of this idea.
I'll try the setup tonight and let you know if I run in any troubles at all.

The setup above worked perfectly! Thanks again.

Subscribe to Comments for "Separate power supplies for complex setup"