Skip to content
Snippets Groups Projects
Commit bbee7f1b authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Update Output module BOM with 10 Ω

parent 262ddc56
Branches
No related tags found
No related merge requests found
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
# Change these values to calculate the needed values # Change these values to calculate the needed values
requirements = {"inputs": 8, "outputs":8} requirements = {"inputs": 8, "outputs":8}
# Do not edit below this Point unless you know what you are doing # Do not edit below this Point unless you know what you are doing
data = { data = {
"mami-input": { "mami-input": {
"input-channels": 2, "input-channels": 2,
"parts": [ "parts": [
{"MPN": "PJ301M-12", "n": 2}, {"MPN": "PJ301M-12", "n": 2},
{"MPN": "Subminiature On-Off-(On) Toggle switch", "n": 2}, {"MPN": "Subminiature On-Off-(On) Toggle switch", "n": 2},
] ]
}, },
"mami-output": { "mami-output": {
"output-channels": 2, "output-channels": 2,
"parts": [ "parts": [
{"MPN": "LME49720", "n": 2}, {"MPN": "LME49720", "n": 2},
{"MPN": "100nF 0605 25V", "n": 4}, {"MPN": "100nF 0605 25V", "n": 4},
{"MPN": "100k 0805", "n": 8}, {"MPN": "100k 0805", "n": 6},
{"MPN": "100R 0805", "n": 2},
{"MPN": "PJ301M-12", "n": 2} {"MPN": "PJ301M-12", "n": 2}
] ]
}, },
"mami-quad": { "mami-quad": {
"input-channels":2, "output-channels":2, "input-channels":2, "output-channels":2,
"parts": [ "parts": [
{"MPN": "P0915N-FC15BR100K", "n": 4}, {"MPN": "P0915N-FC15BR100K", "n": 4},
{"MPN": "Knob", "n": 4}, {"MPN": "Knob", "n": 4},
{"MPN": "100k 0805", "n": 4} {"MPN": "100k 0805", "n": 4}
] ]
} }
} }
# Calculate how many PCBs are needed # Calculate how many PCBs are needed
n_input_modules = int(requirements["inputs"] / data["mami-input"]["input-channels"]) n_input_modules = int(requirements["inputs"] / data["mami-input"]["input-channels"])
n_output_modules = int(requirements["outputs"] / data["mami-output"]["output-channels"]) n_output_modules = int(requirements["outputs"] / data["mami-output"]["output-channels"])
n_quad_modules = int((requirements["inputs"] * requirements["outputs"]) / (data["mami-output"]["output-channels"] * data["mami-input"]["input-channels"])) n_quad_modules = int((requirements["inputs"] * requirements["outputs"]) / (data["mami-output"]["output-channels"] * data["mami-input"]["input-channels"]))
Print the PCB Print the PCB
print("Needed for a {}x{} Matrix Mixer".format(requirements["inputs"], requirements["outputs"])) print("Needed for a {}x{} Matrix Mixer".format(requirements["inputs"], requirements["outputs"]))
print("{}".format("="*50)) print("{}".format("="*50))
print("{0:>5}x MAMI-INPUT-Module".format(n_input_modules)) print("{0:>5}x MAMI-INPUT-Module".format(n_input_modules))
print("{0:>5}x MAMI-OUTPUT-Module".format(n_output_modules)) print("{0:>5}x MAMI-OUTPUT-Module".format(n_output_modules))
print("{0:>5}x MAMI-QUAD-Module\n".format(n_quad_modules)) print("{0:>5}x MAMI-QUAD-Module\n".format(n_quad_modules))
# Collect all the parts # Collect all the parts
bom = {} bom = {}
for part in data["mami-input"]["parts"]*n_input_modules + data["mami-quad"]["parts"]*n_quad_modules + data["mami-output"]["parts"]*n_output_modules: for part in data["mami-input"]["parts"]*n_input_modules + data["mami-quad"]["parts"]*n_quad_modules + data["mami-output"]["parts"]*n_output_modules:
if part["MPN"] in bom: if part["MPN"] in bom:
bom[part["MPN"]] += part["n"] bom[part["MPN"]] += part["n"]
else: else:
bom[part["MPN"]] = part["n"] bom[part["MPN"]] = part["n"]
# Print the BOM # Print the BOM
print("Parts\n{}".format("="*50)) print("Parts\n{}".format("="*50))
for key, value in bom.items(): for key, value in bom.items():
print("{:>5}x {}".format(value, key)) print("{:>5}x {}".format(value, key))
``` ```
%% Output %% Output
Needed for a 8x8 Matrix Mixer: Needed for a 8x8 Matrix Mixer:
================================================== ==================================================
4x MAMI-INPUT-Module 4x MAMI-INPUT-Module
4x MAMI-OUTPUT-Module 4x MAMI-OUTPUT-Module
16x MAMI-QUAD-Module 16x MAMI-QUAD-Module
Parts Parts
================================================== ==================================================
16x PJ301M-12 16x PJ301M-12
8x Subminiature On-Off-(On) Toggle switch 8x Subminiature On-Off-(On) Toggle switch
64x P0915N-FC15BR100K 64x P0915N-FC15BR100K
64x Knob 64x Knob
96x 100k 0805 96x 100k 0805
8x LME49720 8x LME49720
16x 100nF 0605 25V 16x 100nF 0605 25V
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment