Improve the organization of the BOM by moving aluminum extrusion to table

This commit is contained in:
Matt McWilliams 2024-11-28 14:26:04 -05:00
parent e2f3ccd324
commit 0be2509dbd
5 changed files with 17 additions and 19 deletions

View File

@ -1,6 +1,6 @@
module,quantity,part,part_id,description module,quantity,part,part_id,description
contact_printer,4,2020 Aluminum extrusion 260mm,N/A,Sides and central frame contact_printer,1040,2020 Aluminum extrusion mm,N/A,Sides and central frame 4x 260mm
contact_printer,2,2020 Aluminum extrusion 420mm,N/A,Top and bottom frame contact_printer,840,2020 Aluminum extrusion mm,N/A,Top and bottom frame 2x 420mm
electronics_panel,4,M3 hex cap bolt 6mm,N/A,Attach the GPIO breakout board to the panel electronics_panel,4,M3 hex cap bolt 6mm,N/A,Attach the GPIO breakout board to the panel
electronics_panel,1,ESP32 GPIO breakout board,N/A,To make the ESP32 dev board easier to wire electronics_panel,1,ESP32 GPIO breakout board,N/A,To make the ESP32 dev board easier to wire
electronics_panel,6,M3 sliding t slot nut,N/A,Attach the frame to the electronics_panel electronics_panel,6,M3 sliding t slot nut,N/A,Attach the frame to the electronics_panel

1 module quantity part part_id description
2 contact_printer 4 1040 2020 Aluminum extrusion 260mm 2020 Aluminum extrusion mm N/A Sides and central frame Sides and central frame 4x 260mm
3 contact_printer 2 840 2020 Aluminum extrusion 420mm 2020 Aluminum extrusion mm N/A Top and bottom frame Top and bottom frame 2x 420mm
4 electronics_panel 4 M3 hex cap bolt 6mm N/A Attach the GPIO breakout board to the panel
5 electronics_panel 1 ESP32 GPIO breakout board N/A To make the ESP32 dev board easier to wire
6 electronics_panel 6 M3 sliding t slot nut N/A Attach the frame to the electronics_panel

View File

@ -1,15 +1,14 @@
quantity,part,part_id,price quantity,part,part_id,price
4,"M4 hex bolt 40mm",N/A,240 4,"M4 hex bolt 40mm",N/A,244
25,"M3 sliding t slot nut",N/A,125 25,"M3 sliding t slot nut",N/A,143
25,"M3 hex cap bolt 8mm",N/A,200 25,"M3 hex cap bolt 8mm",N/A,225
8,"M3 hex cap bolt 6mm",N/A,56 8,"M3 hex cap bolt 6mm",N/A,59
1,"M3 hex cap bolt 12mm",N/A,8 1,"M3 hex cap bolt 12mm",N/A,9
1,"L298N Motor driver module",N/A,287 1,"L298N Motor driver module",N/A,288
1,"ESP32 GPIO breakout board",N/A,599 1,"ESP32 GPIO breakout board",N/A,600
1,"ESP32 Dev board",N/A,666 1,"ESP32 Dev board",N/A,667
1,"608-RS Ball Bearing",608-RS,17 1,"608-RS Ball Bearing",608-RS,18
2,"250RPM DC geared motor",JSX40-370,2998 2,"250RPM DC geared motor",JSX40-370,2998
2,"2020 Aluminum extrusion 420mm",N/A,510 1880,"2020 Aluminum extrusion mm",N/A,1141
4,"2020 Aluminum extrusion 260mm",N/A,640
1,"100RPM DC geared motor with encoder",N/A,1619 1,"100RPM DC geared motor with encoder",N/A,1619
76,TOTAL,N/A,7965 1950,TOTAL,N/A,8011

1 quantity part part_id price
2 4 M4 hex bolt 40mm N/A 240 244
3 25 M3 sliding t slot nut N/A 125 143
4 25 M3 hex cap bolt 8mm N/A 200 225
5 8 M3 hex cap bolt 6mm N/A 56 59
6 1 M3 hex cap bolt 12mm N/A 8 9
7 1 L298N Motor driver module N/A 287 288
8 1 ESP32 GPIO breakout board N/A 599 600
9 1 ESP32 Dev board N/A 666 667
10 1 608-RS Ball Bearing 608-RS 17 18
11 2 250RPM DC geared motor JSX40-370 2998
12 2 1880 2020 Aluminum extrusion 420mm 2020 Aluminum extrusion mm N/A 510 1141
4 2020 Aluminum extrusion 260mm N/A 640
13 1 100RPM DC geared motor with encoder N/A 1619
14 76 1950 TOTAL N/A 7965 8011

View File

@ -4,8 +4,7 @@ M3 hex cap bolt 6mm,N/A,726,100,https://amzn.to/3AwiZxo
M3 hex cap bolt 8mm,N/A,899,100,https://amzn.to/3YEvWNB M3 hex cap bolt 8mm,N/A,899,100,https://amzn.to/3YEvWNB
M3 hex cap bolt 12mm,N/A,836,100,https://amzn.to/48CGa5Y M3 hex cap bolt 12mm,N/A,836,100,https://amzn.to/48CGa5Y
M3 sliding t slot nut,N/A,599,105,https://amzn.to/48GRrSU M3 sliding t slot nut,N/A,599,105,https://amzn.to/48GRrSU
2020 Aluminum extrusion 260mm,N/A,7399,46,https://amzn.to/418OicC 2020 Aluminum extrusion mm,N/A,7399,12200,https://amzn.to/418OicC
2020 Aluminum extrusion 420mm,N/A,7399,29,https://amzn.to/418OicC
100RPM DC geared motor with encoder,N/A,1619,1,https://amzn.to/3UF707G 100RPM DC geared motor with encoder,N/A,1619,1,https://amzn.to/3UF707G
250RPM DC geared motor,JSX40-370,1499,1,https://amzn.to/3NWkcRL 250RPM DC geared motor,JSX40-370,1499,1,https://amzn.to/3NWkcRL
ESP32 Dev board,N/A,1999,3,https://amzn.to/3NXCvGj ESP32 Dev board,N/A,1999,3,https://amzn.to/3NXCvGj

1 part part_id price quantity url
4 M3 hex cap bolt 8mm N/A 899 100 https://amzn.to/3YEvWNB
5 M3 hex cap bolt 12mm N/A 836 100 https://amzn.to/48CGa5Y
6 M3 sliding t slot nut N/A 599 105 https://amzn.to/48GRrSU
7 2020 Aluminum extrusion 260mm 2020 Aluminum extrusion mm N/A 7399 46 12200 https://amzn.to/418OicC
2020 Aluminum extrusion 420mm N/A 7399 29 https://amzn.to/418OicC
8 100RPM DC geared motor with encoder N/A 1619 1 https://amzn.to/3UF707G
9 250RPM DC geared motor JSX40-370 1499 1 https://amzn.to/3NWkcRL
10 ESP32 Dev board N/A 1999 3 https://amzn.to/3NXCvGj

View File

@ -1600,8 +1600,8 @@ module debug_lamp () {
gate_carrier([0, -2.5, 11]); gate_carrier([0, -2.5, 11]);
} }
//BOM: 2, 2020 Aluminum extrusion 420mm,N/A,Top and bottom frame //BOM: 840, 2020 Aluminum extrusion mm,N/A,Top and bottom frame 2x 420mm
//BOM: 4, 2020 Aluminum extrusion 260mm,N/A,Sides and central frame //BOM: 1040, 2020 Aluminum extrusion mm,N/A,Sides and central frame 4x 260mm
module contact_printer () { module contact_printer () {
//debug module for BOM //debug module for BOM
} }

View File

@ -52,7 +52,7 @@ done
echo "quantity,part,part_id,price" > "${TOTAL}" echo "quantity,part,part_id,price" > "${TOTAL}"
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${DESTINATION} bom" -cmd ".import ${PRICES} prices"\ sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${DESTINATION} bom" -cmd ".import ${PRICES} prices"\
'SELECT SUM(quantity),part,part_id, SUM(quantity) * (COALESCE((SELECT CEIL(prices.price / prices.quantity) 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, CAST( CEIL( CAST(SUM(quantity) AS FLOAT) * (SELECT CAST(prices.price AS FLOAT) / CAST(prices.quantity AS FLOAT) FROM prices WHERE prices.part = bom.part LIMIT 1) ) AS INTEGER) as price FROM bom GROUP BY part ORDER BY part DESC;' >> "${TOTAL}"
sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom" -cmd ".import ${PRICES} prices" -cmd '.mode markdown' \ sqlite3 :memory: -cmd '.mode csv' -cmd ".import ${TOTAL} bom" -cmd ".import ${PRICES} prices" -cmd '.mode markdown' \
"SELECT part as Part, quantity as Qty, \ "SELECT part as Part, quantity as Qty, \