# Graphing / visualizing power tree?

I'm interested in generating a chart / diagram of power usage for a system, as well as some sort of tree digram of voltage rails.

For example, you might have a PMIC connected to VBAT, the output of which is connected to a 3V3 LDO, 5V SMPS, etc etc.

Keeping track of all the rails, and where they connect to would be very handy.

Additionally, being able to assign powers to each rail would aid in visualizing where the power is going.

Any thoughts on how to create something like this easily?

Ideally, I'd like a tool that could generate a chart automatically -- I don't want to create a tree diagram manually with 50 boxes if I can do it programatically.

Thanks!

-

## 3 Answers

Nearly a one word answer: Graphviz.

You just have to get the tree that you're trying to visualize into the DOT language.

VBAT going to PMIC, which goes to 3V3LDO, and 5VSMPS:

$cat power.gv digraph power { VBAT -> PMIC PMIC -> "3V3LDO" PMIC -> "5VSMPS" }$ dot -Tpng power.gv -o power.png


power.png contents:

-
Oh, that looks awesome indeed. I'm assuming it's too much to ask if there's a way to hook excel to Graphviz? EDIT: looks like there is an excel plugin. Awesome++ – hex4def6 Jan 11 '13 at 0:51
You can probably write some VBScript or whatever to generate the graph language, or else some text processing scriptology to massage exported CSV data. – Kaz Jan 11 '13 at 0:54

Visio has trees that I have used in the past. However that won't help with visualizing power or avoiding the manual work.

-

OmniGraffle is a tool for macs that you could use for this, but to solve the automation issue you would have to write a script. It does integrate with AppleScripts, but unless you are doing it repeatedly that won't be worth it.

-