Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Add tool for computing component values for BD9E302EFJ (voltage converter for the BMC)#2

Closed
twelho wants to merge 2 commits into
mainfrom
bd9e-tool
Closed

Add tool for computing component values for BD9E302EFJ (voltage converter for the BMC)#2
twelho wants to merge 2 commits into
mainfrom
bd9e-tool

Conversation

@twelho
Copy link
Copy Markdown
Member

@twelho twelho commented May 15, 2021

bd9e302efj.py is a helper for computing the correct values for peripheral components for ROHM's BD9E302EFJ. This chip will be performing the 12-24 volt input to 5.1 volt conversion on the compute unit BMC.

@twelho twelho requested review from chiplet and luxas May 15, 2021 18:30
@twelho
Copy link
Copy Markdown
Member Author

twelho commented May 15, 2021

I've just located some errors in the frequency values inferred from the datasheet which cause significant errors in the capacitance and resistance calculations. Those errors will need to be fixed before this gets merged, I'll do that soon, this is just a heads up for reviewers.

Copy link
Copy Markdown
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM 👍
Mostly minor, for the future comments

Comment thread tools/psu/bd9e302efj.py
return result


def resolve_V_out():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment what this resistor selection is for

Comment thread tools/psu/bd9e302efj.py


def C1_capacitance():
return 1 / (2 * math.pi * R1 * 20000)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a constant of 20000?

Comment thread tools/psu/bd9e302efj.py


def voltage_ripple():
return dI_L * (R_C_out + 1 / (8 * C_C_out * F_osc))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is 8?

Comment thread tools/psu/bd9e302efj.py


def C2_capacitance():
return min(1 / (2 * math.pi * R3_resistance() * F_z), 15E-9) # Upper limit from the datasheet
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constant of 15E-9?

Comment thread tools/psu/bd9e302efj.py

# Variables
# TODO: Take these as command line arguments?
V_in = 24 # Volts, input voltage
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V_in_max or V_in? We should probably somehow make it explicit that we're treating this as a range.
Maybe we could also output the min-max values of stuff, e.g. voltage ripple, such that the output has columns min, typical, max instead of just one value

Comment thread tools/psu/bd9e302efj.py
# TODO: Take these as command line arguments?
V_in = 24 # Volts, input voltage
A_max = 3 # Amperes, maximum output current
dI_L = 1.0 # Amperes, inductor ripple current
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clarify that this is the "typical" load that we expect.

Comment thread tools/psu/bd9e302efj.py
V_in = 24 # Volts, input voltage
A_max = 3 # Amperes, maximum output current
dI_L = 1.0 # Amperes, inductor ripple current
V_fb = 0.8 # Volts, feedback reference voltage
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we treat this as a constant as the datasheet says don't change

Comment thread tools/psu/bd9e302efj.py
A_max = 3 # Amperes, maximum output current
dI_L = 1.0 # Amperes, inductor ripple current
V_fb = 0.8 # Volts, feedback reference voltage
G_mp = 20 # A/V, current sense gain
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to constants instead of variables?

Comment thread tools/psu/bd9e302efj.py
def resolve_V_out():
resolved = False
(b_voltage, b_R1, b_R2) = (math.inf, 0, 0)
for d_R1, d_R2 in itertools.permutations(generate_resistors([10000, 100000]), 2):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing multipliers as multiples of thousands would improve readability

Suggested change
for d_R1, d_R2 in itertools.permutations(generate_resistors([10000, 100000]), 2):
for d_R1, d_R2 in itertools.permutations(generate_resistors([10E3, 100E3]), 2):

@chiplet
Copy link
Copy Markdown
Member

chiplet commented Jul 3, 2021

This PR is very outdated and superseded by both ICCC #4 and KiCad evaluator tooling #14 so I don't see a point in merging this anymore.

@chiplet chiplet closed this Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants