Robus power management


#1

The community voted and the next robot off the month will be the Robotis shield. So we start working on it and we face a BIG problem, the power management.

Problem description

L0 are boards connected together using Robus. Each L0 run a Luos core and can manage different kind of specific hardware. To simplify, for now we can consider the specific hardware as an undefined shield on L0. The power between each L0 is shared and L0 also share the power to its shield :
Dessin%20sans%20titre

The questions are how to power the Network safely and how to manage different nominal voltage on different shields?

How to power the network

If we consider this network (again) :
Dessin%20sans%20titre
To have something on Vin we need to have one of the shield who is a provider module.
A provider module is a L0 with a shield (a specific electronics) who can send power to the network.
For example batteries, USB, or DCInput modules are typical providers modules.
Naturally others modules such as led, button, potentiometer for example are consumer modules.

To be clear we will use a concrete example.
Marc want to make awesome robots. To begin he just want to have leds on his network (ok this is not really a robot). So he take a 12V battery module and 2 leds modules and plug them together.
In this case the battery module is a provider module and led’s are consumer modules. the Vin value will be 12V on the entire network. The consumers modules (led) have to manage the Input voltage (12v) to something usable for leds.

After that Marc want to control his leds through a computer. To do that he add an USB module to link the Luos network to his computer.
Dessin%20sans%20titre%20(1)
But as we seen previously the USB module is a provider module such as the battery module! If we simply link the provider to the Vin we will probably have flames and pyrotechnics effects because the 5V is linked to 12V and it’s resulting on a 7V short circuit.
To manage power conccurency we have to define rules.

Generally on the Robus link we prefer to have high voltage that allowing us to transport more power with less heat dissipation and reduce the wire voltage dropout impact. So, by default we want to prioritize the higher voltage provided by all the providers modules.
Lucky we are, we have a perfect component to do that called diode ! If we add a Diode transferring the power from the provider module to the network, the network will keep the higher voltage of all providers modules and all lower voltage providers modules will be isolated :
Dessin%20sans%20titre%20(2)

This is a default and safe power management, this way you can’t burn anything.
Marc being a conscientious electronics engineer, he want to reduce heat loss on power converters of led modules. To do that he prefer to use the lower power available on every provider module and he want to be able to manage that by software. To do that providers modules will need to be able to isolate themself from the network using a software controled transistor :
Dessin%20sans%20titre%20(3)
In this case Mark isolate the battery so leds are powered by 5v, we can choose the main power of the network by isolating all the higher providers modules!

how to apply this symbolic schematic to a real circuit ?

So we have a simple concept using diodes and a thing to cut the power, how we can do it for real ?

The thing who would use to cut the power is a Mosfet. In our case we have to use N-mosfet instead of P-mosfet as I explain it in this post : Why we use N mosfet instead of P mosfet?

Usually on electronics all ground are linked. That’s why we call it ground, because nobody can’t go down the ground, ground is the common base.
To succeed with N-mosfet we have to reverse this logic and use the positive potential as common potential.
So we can just put the diode and the N-mos on ground line :
Module%20power%20management
Here the “power source” boc represent the alimentation into the provider module.

Low voltage module exception

Because of cables voltage drop and L0 power input tolerances we don’t want to provide a power less than 5V. As we seen it previously, the mosfet is used to isolate provider modules voltages. To have a given voltage you have to isolate all higher voltage source. But 5V is the minimum admissible voltage for Robus, so we don’t need to have the possibility to isolate it. You can omit the mosfet for those ones.

how to manage different nominal voltage on different shields

Now we mastering how to power the network using provider modules, we can face the other side of the problem, how to manage consumer modules.
Consumer modules don’t know the power they will have from the robus power.

power converter block

This is no big deal for small power modules such as small sensors. We can just use a small power converter to have something usable for those devices. There is no specific protection needed for those modules (except the converter).

over/under voltage protection block

The real problem come when we have to power a powerfull consumer module. In those type of module a power converter will need a big volume, a high price, and finally generate a lot of heat loss and reduce the dynamic of the consumer module by limiting the current.
To avoid this kind of power conversion we have to use directly the power provided by Robus.

To protect this kind of module from under-voltage and over-voltage we need to define protection allowing to isolate the circuit in case of trouble. The solution is to use comparator circuit for each limit.

Module%20power%20management%20(6)

The module Load represent the equipment to power, for example a motor or a speaker.

Now you can understand the importance to have the possibility of choosing the voltage of your Robus network. If all your motors work at 7v except one using 12V you will prefer to have your Robus voltage at 7V to be able to power them all with the same power source and power the only one using 12V separately.
In the future we will be able to make an “isolator module” that have 2 robus interfaces without common voltage on connectors. The result is 2 diferent network tension on each side able to communicate anyway.

As I said at the begining of this post, we face the power problem when we start designing the Dynamixel shield. Robotis have module managing power on the motor network. So the dynamixel Luos module can be a power source for the Robus network. If it can self power itself, it is a provider module, but we also want to be able to use the Robus power to run a non powered Robotis chain, in this case it is a consumer module!
As you can see here we face a really strange configuration. This module will need the electronics needed for providers modules but also needded by consumer module.

how to detect provider or consumer module mode

Hybride modules like the Dynamixel one will need to have provider module electronics and consumer module electronics combined together with a logic allowing to switch from one to another. To choose witch is the mode to enable we need to detect if we have a power source on the shield or not.

power source detection block

To switch from one to another we need to detect if we have a power source in the module or not, here is a solution to do that :
Dessin%20sans%20titre%20(8)
The action of plug the power into the shield is represented here by the button called plug.
This is simply a power plug detector, out is 1 if there is a power plugged and 0 if not.
This circuit is usefull if we have a power entry in the shield, and it will be the case of a majority of power shield.

current direction detection block

In the case of Robotis shield case the problem is even more complex because the user have the possibility to plug the power into the robotis chain. In other word if we use the last picture as reference the Input power come from the “Module Load” and this circuit doesn’t work anymore, we have to detect something else.

To solve this problem we need to detect the current direction, from Vmodule to load or from load to Vmodule :
Dessin%20sans%20titre%20(9)
As you can see here diodes allow us to detect if the power come from Vmodule or from the module load.

how to link all of this together to have an hybride module

Now we have a lot of different circuit for different situation how to put everything together to have a good hybride (provider+consumer) module.

here is a lit of block we have defined previously:

  • Provider Block
  • Consumer block (power converter or over/under voltage protection)
  • Mode detector (power source or current direction)


The P mosfet on this picture is used to bypass the provider block and switch into consumer mode. As you can see here we have a new block to link Conumer block and Detection block. To design this “Logic block” we have to make a truth table :

detection (1 = power from shield) consumer (1 = input not ok) Nmosfet (0 = blocked)
0 0 0
0 1 1
1 0 0
1 1 0

Now to have this result here is the logic block :
Module%20power%20management%20(10)

You have all blocks and possibilities now, you have to compose your own depending on the module purpose.

Pictures sources : https://docs.google.com/drawings/d/1ItviJl4WA9z784oMXtbky2mqQLwtgfz1BvxdbA4yZ_4/edit?usp=sharing


#2

I am not sure to understand, here you mean we can either power the motor via plugging a power source on the shield (Vmodule) or powering the bus via anywhere else on the bus (Module Load)? And sometime both are plugged at the same time?

Then what happens if Vmodule == VLoad?


Could you reexplain what you mean by Module Load?


#3

I will probably rewrite a big part of this post because we change a lot of things those days.

Yes we can have different power source on the network, for example if you have a xl320 chain (7v) and an AX one (12V) you can power both chain and the network will manage.
If you have 2x12V they will power the closest modules without compete with each other, so you can use multiple power source to dispatch current into your robot.

The module load is the part of the shield who consume the power. In case of the Robotis shield the module load are Robotis motors.

I will rewrite that to be clear, thanks.


Why we use N mosfet instead of P mosfet?