Work on BOM. Add more to script. Experiment with table in markdown
This commit is contained in:
parent
2cc0503aa8
commit
a2bbe78c12
10
README.md
10
README.md
|
@ -20,13 +20,17 @@ Magnetic clutch design inspired by Clyde Shaffer's [Shaffer Linear Processor](ht
|
||||||
|
|
||||||
| Part | Qty | Cost (USD) |
|
| Part | Qty | Cost (USD) |
|
||||||
|-------------------------------------|-----|------------|
|
|-------------------------------------|-----|------------|
|
||||||
| M3 sliding t slot nut | 6 | 0.36 |
|
| M3 sliding t slot nut | 25 | 1.5 |
|
||||||
| M3 hex cap bolt 8mm | 6 | 0.54 |
|
| M3 hex cap bolt 8mm | 25 | 2.25 |
|
||||||
| M3 hex cap bolt 6mm | 4 | 0.28 |
|
| M3 hex cap bolt 6mm | 4 | 0.28 |
|
||||||
| ESP32 Dev board | 2 | 13.32 |
|
| L298N Motor driver module | 1 | 2.89 |
|
||||||
|
| ESP32 Dev board | 1 | 6.66 |
|
||||||
|
| 250RPM DC geared motor | 2 | 29.98 |
|
||||||
| 2020 Aluminum extrusion 420mm | 2 | 5.22 |
|
| 2020 Aluminum extrusion 420mm | 2 | 5.22 |
|
||||||
| 2020 Aluminum extrusion 260mm | 4 | 6.44 |
|
| 2020 Aluminum extrusion 260mm | 4 | 6.44 |
|
||||||
| 100RPM DC geared motor with encoder | 1 | 17.02 |
|
| 100RPM DC geared motor with encoder | 1 | 17.02 |
|
||||||
|
|---------|---------------|------------|
|
||||||
|
| TOTAL | 65 | 7224 |
|
||||||
|
|
||||||
<!-- /bom -->
|
<!-- /bom -->
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
module,quantity,part,part_id,description
|
||||||
|
contact_printer,4,2020 Aluminum extrusion 260mm,N/A,Sides and central frame
|
||||||
|
contact_printer,2,2020 Aluminum extrusion 420mm,N/A,Top and bottom frame
|
||||||
|
electronics_panel,6,M3 sliding t slot nut,N/A,Attach the frame to the electronics_panel
|
||||||
|
electronics_panel,6,M3 hex cap bolt 8mm,N/A,Attach the electronics_panel to the frame
|
||||||
|
electronics_panel,1,L298N Motor driver module,N/A,Control the 3 motors using 2 channels
|
||||||
|
electronics_panel,1,ESP32 Dev board,N/A,Control the contact_printer
|
||||||
|
takeup_panel_stock,6,M3 sliding t slot nut,N/A,Attach the frame to the takeup_panel_stock
|
||||||
|
takeup_panel_stock,6,M3 hex cap bolt 8mm,N/A,Attach the takeup_panel_stock to the frame
|
||||||
|
takeup_panel_stock,1,250RPM DC geared motor,JSX40-370,Drive the takeup of the stock pathway
|
||||||
|
takeup_panel_picture,7,M3 sliding t slot nut,N/A,Attach the frame to the takeup_panel_picture
|
||||||
|
takeup_panel_picture,7,M3 hex cap bolt 8mm,N/A,Attach the takeup_panel_picture to the frame
|
||||||
|
takeup_panel_picture,1,250RPM DC geared motor,JSX40-370,Drive the takeup of the picture pathway
|
||||||
|
panel,1,100RPM DC geared motor with encoder,N/A,Drive the sprocketed_roller
|
||||||
|
panel,6,M3 sliding t slot nut,N/A,Attach aluminum extrusions to panel
|
||||||
|
panel,6,M3 hex cap bolt 8mm,N/A,Attach panel to aluminum extrusions
|
||||||
|
panel,4,M3 hex cap bolt 6mm,N/A,Attach encoder motor to panel
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
quantity,part,part_id,price
|
||||||
|
25,"M3 sliding t slot nut",N/A,150
|
||||||
|
25,"M3 hex cap bolt 8mm",N/A,225
|
||||||
|
4,"M3 hex cap bolt 6mm",N/A,28
|
||||||
|
1,"L298N Motor driver module",N/A,289
|
||||||
|
1,"ESP32 Dev board",N/A,666
|
||||||
|
2,"250RPM DC geared motor",JSX40-370,2998
|
||||||
|
2,"2020 Aluminum extrusion 420mm",N/A,522
|
||||||
|
4,"2020 Aluminum extrusion 260mm",N/A,644
|
||||||
|
1,"100RPM DC geared motor with encoder",N/A,1702
|
||||||
|
65,N/A,TOTAL,7224
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
part,part_id,price,url
|
||||||
|
M3 hex nut,N/A,3,https://amzn.to/4hAnwjc
|
||||||
|
M3 hex cap bolt 6mm,N/A,7,https://amzn.to/3AwiZxo
|
||||||
|
M3 hex cap bolt 8mm,N/A,9,https://amzn.to/3YEvWNB
|
||||||
|
M3 sliding t slot nut,N/A,6,https://amzn.to/48GRrSU
|
||||||
|
2020 Aluminum extrusion 260mm,N/A,161,https://amzn.to/4ehSolE
|
||||||
|
2020 Aluminum extrusion 420mm,N/A,261,https://amzn.to/4ehSolE
|
||||||
|
100RPM DC geared motor with encoder,N/A,1702,https://amzn.to/3UF707G
|
||||||
|
250RPM DC geared motor,JSX40-370,1499,https://amzn.to/3NWkcRL
|
||||||
|
ESP32 Dev board,N/A,666,https://amzn.to/3NXCvGj
|
||||||
|
L298N Motor driver module,N/A,289,https://amzn.to/4ellssy
|
|
|
@ -838,6 +838,9 @@ module takeup_panel_motor_mount_pads (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//BOM: 1, 250RPM DC geared motor, JSX40-370, Drive the takeup of the picture pathway
|
||||||
|
//BOM: 7, M3 hex cap bolt 8mm,N/A,Attach the takeup_panel_picture to the frame
|
||||||
|
//BOM: 7, M3 sliding t slot nut,N/A,Attach the frame to the takeup_panel_picture
|
||||||
module takeup_panel_picture (pos = [0, 0, 0]) {
|
module takeup_panel_picture (pos = [0, 0, 0]) {
|
||||||
BoltX = (TakeupPanelX / 2) - 10;
|
BoltX = (TakeupPanelX / 2) - 10;
|
||||||
BoltY = (TakeupPanelY / 2) - 10;
|
BoltY = (TakeupPanelY / 2) - 10;
|
||||||
|
@ -908,6 +911,9 @@ module takeup_panel_picture_motor_mount (pos = [0, 0, 0] ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//BOM: 1, 250RPM DC geared motor, JSX40-370, Drive the takeup of the stock pathway
|
||||||
|
//BOM: 6, M3 hex cap bolt 8mm,N/A,Attach the takeup_panel_stock to the frame
|
||||||
|
//BOM: 6, M3 sliding t slot nut,N/A,Attach the frame to the takeup_panel_stock
|
||||||
module takeup_panel_stock (pos = [0, 0, 0]) {
|
module takeup_panel_stock (pos = [0, 0, 0]) {
|
||||||
BoltX = (TakeupPanelX / 2) - 10;
|
BoltX = (TakeupPanelX / 2) - 10;
|
||||||
BoltY = (TakeupPanelY / 2) - 10;
|
BoltY = (TakeupPanelY / 2) - 10;
|
||||||
|
@ -1378,7 +1384,9 @@ module button_void (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//BOM: 1, ESP32 Dev board,N/A,Control the contact_printer
|
//BOM: 1, ESP32 Dev board,N/A,Control the contact_printer
|
||||||
//BOM: 1, ESP32 Dev board,N/A,Control the contact_printer
|
//BOM: 1, L298N Motor driver module,N/A,Control the 3 motors using 2 channels
|
||||||
|
//BOM: 6, M3 hex cap bolt 8mm,N/A,Attach the electronics_panel to the frame
|
||||||
|
//BOM: 6, M3 sliding t slot nut,N/A,Attach the frame to the electronics_panel
|
||||||
module electronics_panel (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
module electronics_panel (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||||
X = PanelX - 40;
|
X = PanelX - 40;
|
||||||
Y = 100;
|
Y = 100;
|
||||||
|
|
|
@ -35,7 +35,7 @@ MODULE=""
|
||||||
echo "module,quantity,part,part_id,description" > "${DESTINATION}"
|
echo "module,quantity,part,part_id,description" > "${DESTINATION}"
|
||||||
|
|
||||||
tac "${1}" | while read line; do
|
tac "${1}" | while read line; do
|
||||||
module=$(echo "${line}" | grep 'module')
|
module=$(echo "${line}" | grep 'module ' | grep '(' | grep ')')
|
||||||
if [[ "${module}" != "" ]]; then
|
if [[ "${module}" != "" ]]; then
|
||||||
MODULE=$(echo "${module}" | xargs | awk '{print $2}' | awk -F'{' '{print $1}')
|
MODULE=$(echo "${module}" | xargs | awk '{print $2}' | awk -F'{' '{print $1}')
|
||||||
fi
|
fi
|
||||||
|
@ -55,4 +55,10 @@ sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${DESTINATION} bom" -cmd ".impor
|
||||||
'SELECT SUM(quantity),part,part_id, SUM(quantity) * (COALESCE((SELECT prices.price FROM prices WHERE prices.part = bom.part LIMIT 1), 0)) as price FROM bom GROUP BY part ORDER BY part DESC;' >> "${TOTAL}"
|
'SELECT SUM(quantity),part,part_id, SUM(quantity) * (COALESCE((SELECT prices.price FROM prices WHERE prices.part = bom.part LIMIT 1), 0)) as price FROM bom GROUP BY part ORDER BY part DESC;' >> "${TOTAL}"
|
||||||
|
|
||||||
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom" -cmd '.mode markdown' \
|
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom" -cmd '.mode markdown' \
|
||||||
'SELECT part as Part, quantity as Qty, CAST(price / 100.00 as MONEY) as "Cost (USD)" FROM bom ORDER BY part DESC;'
|
"SELECT part as Part, quantity as Qty, CAST(price / 100.00 as MONEY) as 'Cost (USD)' FROM bom ORDER BY part DESC;"
|
||||||
|
|
||||||
|
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom" -cmd '.mode markdown' \
|
||||||
|
"SELECT 'TOTAL', SUM(quantity), SUM(price) FROM bom;" | grep -v 'SUM('
|
||||||
|
|
||||||
|
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom"\
|
||||||
|
"SELECT SUM(quantity),'N/A','TOTAL', SUM(price) FROM bom;" | tr -d '"' >> "${TOTAL}"
|
Loading…
Reference in New Issue