From 2fe39a8b37b680a704cf2b845bc9efacc6f4efab Mon Sep 17 00:00:00 2001 From: Seth Fischer Date: Thu, 13 Jun 2024 22:07:16 +1200 Subject: [PATCH] feat: can ttl led indicators --- .../elec/layout/rpi-hat/rpi-hat.kicad_pcb | 996 ++++++++++++++++-- .../elec/src/lib/can-controller-trx.ato | 13 +- src/osr_elec/elec/src/lib/leds.ato | 18 +- 3 files changed, 965 insertions(+), 62 deletions(-) diff --git a/src/osr_elec/elec/layout/rpi-hat/rpi-hat.kicad_pcb b/src/osr_elec/elec/layout/rpi-hat/rpi-hat.kicad_pcb index e09fd08..dac37f7 100644 --- a/src/osr_elec/elec/layout/rpi-hat/rpi-hat.kicad_pcb +++ b/src/osr_elec/elec/layout/rpi-hat/rpi-hat.kicad_pcb @@ -237,6 +237,8 @@ (net 87 "uart_converter-rx") (net 88 "ideal_diode-vcc") (net 89 "rpi_header-vcc") + (net 90 "can_con_trx.led_tx.resistor-cathode") + (net 91 "can_con_trx.led_rx.resistor-cathode") (footprint "lib:Koa_Speer_RCWCTE_test_point" (layer "F.Cu") (uuid "010f3446-68de-4afd-b8b7-f111058e6d19") @@ -2663,6 +2665,236 @@ (uuid "45b3fd4c-7f8f-4336-8113-c12c814c2ec0") ) ) + (footprint "lib:LED_0603_1608Metric" + (layer "F.Cu") + (uuid "3210627b-467c-41a3-8b7e-5b04036b4a5e") + (at 75.345 25.485) + (descr "LED SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") + (tags "LED") + (property "Reference" "D6" + (at 0 -1.43 0) + (layer "F.SilkS") + (uuid "bed30be7-eea0-42f2-98e9-1b0ad87ad532") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "" + (at 0 1.43 0) + (layer "F.Fab") + (uuid "7fd3136f-8917-48fe-80ce-0813ed7e5fad") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "86aca5c2-2815-4980-9e15-022a2b2fc88a") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "999afe69-2b92-4e18-ad15-236efe633f83") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "517b8106-82c1-4cf0-b98c-49c7f2fac1c4") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (path "/a289e38a-2557-ce01-6766-05bd6560e453/a289e38a-2557-ce01-6766-05bd6560e453") + (attr smd) + (fp_line + (start -1.485 -0.735) + (end -1.485 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "cbddbac2-de13-4e8a-847d-b8e78736e89d") + ) + (fp_line + (start -1.485 0.735) + (end 0.8 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "d2c8406b-6a45-44b9-97c2-3d28d5416a34") + ) + (fp_line + (start 0.8 -0.735) + (end -1.485 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "d436b7fd-1264-411d-ba8b-3a94f50b5b59") + ) + (fp_line + (start -1.48 -0.73) + (end 1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "7fa1ace9-e846-4544-af43-43a957627ad1") + ) + (fp_line + (start -1.48 0.73) + (end -1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "296bf4f0-b258-46eb-8dc5-7729d7c5a67d") + ) + (fp_line + (start 1.48 -0.73) + (end 1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "5b3c6bdb-5318-44fe-8c6f-fe51e17b92a6") + ) + (fp_line + (start 1.48 0.73) + (end -1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "aad7fd76-9981-4f5b-af19-638771dfa9c7") + ) + (fp_line + (start -0.8 -0.1) + (end -0.8 0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "e3f05647-b7fe-4916-b796-fa8b07b0a388") + ) + (fp_line + (start -0.8 0.4) + (end 0.8 0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "16ef8346-c781-4a20-84ee-01be3f50751e") + ) + (fp_line + (start -0.5 -0.4) + (end -0.8 -0.1) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "4d5011a9-4eed-485c-b299-4e74431e743f") + ) + (fp_line + (start 0.8 -0.4) + (end -0.5 -0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6243a188-b4a0-4977-95ef-1a3d1ad7e7be") + ) + (fp_line + (start 0.8 0.4) + (end 0.8 -0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "5ca49bd2-515c-45da-9664-653a151e7478") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "3a5f4202-ba98-43b6-8c17-5f351ebecdd7") + (effects + (font + (size 0.4 0.4) + (thickness 0.06) + ) + ) + ) + (pad "1" smd roundrect + (at -0.7875 0) + (size 0.875 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 91 "can_con_trx.led_rx.resistor-cathode") + (pintype "stereo") + (uuid "0f15366d-eb00-470e-b9a3-17658115bc95") + ) + (pad "2" smd roundrect + (at 0.7875 0) + (size 0.875 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 27 "vcc") + (pintype "stereo") + (uuid "f038ab78-f095-4448-9e26-037ed6d87944") + ) + (model "${KIPRJMOD}/../../footprints/footprints.3dshapes/LED_0603_1608Metric.step" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) (footprint "lib:R0603" (layer "F.Cu") (uuid "3405dba6-4fb6-4210-a16f-8088797fc4d8") @@ -5966,16 +6198,16 @@ ) ) ) - (footprint "lib:R0603" + (footprint "lib:LED_0603_1608Metric" (layer "F.Cu") - (uuid "63ad9954-7648-4ee5-84dc-aef7af8d1fc3") - (at 163.60625 86.3425 -90) - (descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") - (tags "resistor") - (property "Reference" "R7" - (at 0 -1.43 -90) + (uuid "636b2e10-31ea-4c47-8b56-1b3722f53a55") + (at 75.345 20.895) + (descr "LED SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") + (tags "LED") + (property "Reference" "D7" + (at 0 -1.43 0) (layer "F.SilkS") - (uuid "9d568662-5bed-4c3b-be58-888cbf792bf1") + (uuid "f5fccca3-ae7c-442d-b409-11890c22d085") (effects (font (size 1 1) @@ -5983,10 +6215,10 @@ ) ) ) - (property "Value" "100mW Thick Film Resistors ±100ppm/℃ ±1% 487Ω 0603 Chip Resistor - Surface Mount ROHS" - (at 0 1.43 -90) + (property "Value" "" + (at 0 1.43 0) (layer "F.Fab") - (uuid "3d518ba9-d2d9-4f64-a0f1-883351e105fc") + (uuid "4e162c84-8888-4391-9870-38cf7e3b0943") (effects (font (size 1 1) @@ -5994,12 +6226,451 @@ ) ) ) - (property "Footprint" "lib:R0603" - (at 0 0 -90) + (property "Footprint" "" + (at 0 0 0) (unlocked yes) (layer "F.Fab") (hide yes) - (uuid "3d1e6d49-b703-44b8-870c-82120a80c390") + (uuid "07c0b500-d675-40db-bb88-d4360e3cd949") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "7aff21b1-a7bd-4270-a406-4be5cfe9aa99") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "8a6a2c05-e6a5-4d54-9156-582353c316a4") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (path "/3fc31534-b265-00a5-73dd-5740eb0ba200/3fc31534-b265-00a5-73dd-5740eb0ba200") + (attr smd) + (fp_line + (start -1.485 -0.735) + (end -1.485 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "d0f7f1e5-0ffb-4819-94bf-b1e60650d267") + ) + (fp_line + (start -1.485 0.735) + (end 0.8 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "2ae3b2b9-6491-4b36-8049-a4baf7996c83") + ) + (fp_line + (start 0.8 -0.735) + (end -1.485 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "e4c664c3-f9c3-4162-bf6a-374f9b945a55") + ) + (fp_line + (start -1.48 -0.73) + (end 1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "61a282e3-59e9-4494-8194-c7ee03bc6533") + ) + (fp_line + (start -1.48 0.73) + (end -1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "95db45dd-b1cf-424b-b6cd-ae90fbf29b90") + ) + (fp_line + (start 1.48 -0.73) + (end 1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "570f1fb1-8be0-4af8-aa5f-c2ce287ee55a") + ) + (fp_line + (start 1.48 0.73) + (end -1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "19d3eb6a-5445-4e19-92d4-44dece95f086") + ) + (fp_line + (start -0.8 -0.1) + (end -0.8 0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "d679e74a-fe1c-4f27-9ee4-851b9d8bf1ff") + ) + (fp_line + (start -0.8 0.4) + (end 0.8 0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "105aadc4-00c5-4969-8e66-952b57223c75") + ) + (fp_line + (start -0.5 -0.4) + (end -0.8 -0.1) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "3c067ef0-8904-48f7-9640-46025e5c36df") + ) + (fp_line + (start 0.8 -0.4) + (end -0.5 -0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "77b82f7d-2df4-480a-b2ef-5405f08fff22") + ) + (fp_line + (start 0.8 0.4) + (end 0.8 -0.4) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "4c546f9b-e802-4b8d-95aa-937f86ae7bd6") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "407a9006-c28f-4aaf-a0cd-4ef0bd7655af") + (effects + (font + (size 0.4 0.4) + (thickness 0.06) + ) + ) + ) + (pad "1" smd roundrect + (at -0.7875 0) + (size 0.875 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 90 "can_con_trx.led_tx.resistor-cathode") + (pintype "stereo") + (uuid "0c2df8fa-831b-43b7-abe0-1997611ed666") + ) + (pad "2" smd roundrect + (at 0.7875 0) + (size 0.875 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 27 "vcc") + (pintype "stereo") + (uuid "57e46a7f-9fd7-460e-921b-b33e3475674b") + ) + (model "${KIPRJMOD}/../../footprints/footprints.3dshapes/LED_0603_1608Metric.step" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "lib:R0603" + (layer "F.Cu") + (uuid "63ad9954-7648-4ee5-84dc-aef7af8d1fc3") + (at 163.60625 86.3425 -90) + (descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R7" + (at 0 -1.43 -90) + (layer "F.SilkS") + (uuid "9d568662-5bed-4c3b-be58-888cbf792bf1") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "100mW Thick Film Resistors ±100ppm/℃ ±1% 487Ω 0603 Chip Resistor - Surface Mount ROHS" + (at 0 1.43 -90) + (layer "F.Fab") + (uuid "3d518ba9-d2d9-4f64-a0f1-883351e105fc") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "lib:R0603" + (at 0 0 -90) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "3d1e6d49-b703-44b8-870c-82120a80c390") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 -90) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "3edcc9af-2f70-41aa-8568-5d981255e374") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "" + (at 0 0 -90) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "0d6f815a-b167-4c17-a28b-c29a0b86a8f9") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (path "/bce5372d-247b-d0c1-a42d-fc8827949706/bce5372d-247b-d0c1-a42d-fc8827949706") + (attr smd) + (fp_line + (start -0.237258 0.5225) + (end 0.237258 0.5225) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "34397049-56ee-4f20-84ea-9fa03e17d5dd") + ) + (fp_line + (start -0.237258 -0.5225) + (end 0.237258 -0.5225) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "6ffe84f6-87ee-48eb-994a-9834d7b549a9") + ) + (fp_line + (start -1.48 0.73) + (end -1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "7b3c0b71-66d6-4af9-89eb-7ddf850d776b") + ) + (fp_line + (start 1.48 0.73) + (end -1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "3ec8c089-3f53-4409-8af9-10a9e93c39cf") + ) + (fp_line + (start -1.48 -0.73) + (end 1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "64537833-9df9-41cf-954a-0b2d519aeb7d") + ) + (fp_line + (start 1.48 -0.73) + (end 1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "485c8064-111d-43b2-a593-cc2713f7f603") + ) + (fp_line + (start -0.8 0.4125) + (end -0.8 -0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "05d7048f-663f-4540-adf1-e952b6c94d36") + ) + (fp_line + (start 0.8 0.4125) + (end -0.8 0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "ec497554-94ab-4aba-8f77-e416167076cf") + ) + (fp_line + (start -0.8 -0.4125) + (end 0.8 -0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6d763796-fc84-44e9-8dfc-2643adbfd7c8") + ) + (fp_line + (start 0.8 -0.4125) + (end 0.8 0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "1cc6d07e-1a1e-4230-9678-1a841a00593a") + ) + (fp_text user "${REFERENCE}" + (at 0 0 -90) + (layer "F.Fab") + (uuid "882d6be6-d383-4ff2-a1e2-f3a85afe6f78") + (effects + (font + (size 0.4 0.4) + (thickness 0.06) + ) + ) + ) + (pad "1" smd roundrect + (at -0.825 0 270) + (size 0.8 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 8 "power_indicator_5v.resistor-cathode") + (pintype "stereo") + (uuid "3ee817bb-9837-4395-8d2f-9f9a3f2ba0bf") + ) + (pad "2" smd roundrect + (at 0.825 0 270) + (size 0.8 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 1 "gnd") + (pintype "stereo") + (uuid "6867db83-f5e9-4d73-9533-de3d3be7137f") + ) + (model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0603_1608Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "lib:R0603" + (layer "F.Cu") + (uuid "648ecce9-8d67-4842-9223-6982c82e404c") + (at 81.355 25.365) + (descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R20" + (at 0 -1.43 0) + (layer "F.SilkS") + (uuid "c2d8e7cf-4203-4356-a2c7-931bf6a722c1") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "100mW Thick Film Resistors 75V ±100ppm/℃ ±1% 330Ω 0603 Chip Resistor - Surface Mount ROHS" + (at 0 1.43 0) + (layer "F.Fab") + (uuid "61468974-735f-4169-b2e5-c8a1cb5c6e3c") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "92c63fc9-1813-4404-98f8-2e761c242c15") (effects (font (size 1.27 1.27) @@ -6008,11 +6679,10 @@ ) ) (property "Datasheet" "" - (at 0 0 -90) - (unlocked yes) + (at 0 0 0) (layer "F.Fab") (hide yes) - (uuid "3edcc9af-2f70-41aa-8568-5d981255e374") + (uuid "7b888cc9-37ef-4862-b3d1-ff421b3d230f") (effects (font (size 1.27 1.27) @@ -6021,11 +6691,10 @@ ) ) (property "Description" "" - (at 0 0 -90) - (unlocked yes) + (at 0 0 0) (layer "F.Fab") (hide yes) - (uuid "0d6f815a-b167-4c17-a28b-c29a0b86a8f9") + (uuid "f6e127d4-8a00-4313-9679-4ecdef1116ed") (effects (font (size 1.27 1.27) @@ -6033,112 +6702,112 @@ ) ) ) - (path "/bce5372d-247b-d0c1-a42d-fc8827949706/bce5372d-247b-d0c1-a42d-fc8827949706") + (path "/42b66751-6559-4269-8720-e280e0c916e7/42b66751-6559-4269-8720-e280e0c916e7") (attr smd) (fp_line - (start -0.237258 0.5225) - (end 0.237258 0.5225) + (start -0.237258 -0.5225) + (end 0.237258 -0.5225) (stroke (width 0.12) (type solid) ) (layer "F.SilkS") - (uuid "34397049-56ee-4f20-84ea-9fa03e17d5dd") + (uuid "d565ccb4-3bfa-43ca-89e8-4f9490e629e4") ) (fp_line - (start -0.237258 -0.5225) - (end 0.237258 -0.5225) + (start -0.237258 0.5225) + (end 0.237258 0.5225) (stroke (width 0.12) (type solid) ) (layer "F.SilkS") - (uuid "6ffe84f6-87ee-48eb-994a-9834d7b549a9") + (uuid "c39bae0c-10de-4450-97a6-9f2a8f7b7a6e") ) (fp_line - (start -1.48 0.73) - (end -1.48 -0.73) + (start -1.48 -0.73) + (end 1.48 -0.73) (stroke (width 0.05) (type solid) ) (layer "F.CrtYd") - (uuid "7b3c0b71-66d6-4af9-89eb-7ddf850d776b") + (uuid "20bed8eb-664b-40ec-beb3-4d72639abc51") ) (fp_line - (start 1.48 0.73) - (end -1.48 0.73) + (start -1.48 0.73) + (end -1.48 -0.73) (stroke (width 0.05) (type solid) ) (layer "F.CrtYd") - (uuid "3ec8c089-3f53-4409-8af9-10a9e93c39cf") + (uuid "af21c63c-fba8-4072-b790-bd460e0dbce5") ) (fp_line - (start -1.48 -0.73) - (end 1.48 -0.73) + (start 1.48 -0.73) + (end 1.48 0.73) (stroke (width 0.05) (type solid) ) (layer "F.CrtYd") - (uuid "64537833-9df9-41cf-954a-0b2d519aeb7d") + (uuid "8461d434-8dda-49c6-9e2c-34dd6613f5a3") ) (fp_line - (start 1.48 -0.73) - (end 1.48 0.73) + (start 1.48 0.73) + (end -1.48 0.73) (stroke (width 0.05) (type solid) ) (layer "F.CrtYd") - (uuid "485c8064-111d-43b2-a593-cc2713f7f603") + (uuid "4c46fbc1-9159-4ff2-a9f3-de495519e441") ) (fp_line - (start -0.8 0.4125) - (end -0.8 -0.4125) + (start -0.8 -0.4125) + (end 0.8 -0.4125) (stroke (width 0.1) (type solid) ) (layer "F.Fab") - (uuid "05d7048f-663f-4540-adf1-e952b6c94d36") + (uuid "b3c1c240-051f-4c7e-9069-c45203784486") ) (fp_line - (start 0.8 0.4125) - (end -0.8 0.4125) + (start -0.8 0.4125) + (end -0.8 -0.4125) (stroke (width 0.1) (type solid) ) (layer "F.Fab") - (uuid "ec497554-94ab-4aba-8f77-e416167076cf") + (uuid "11c0ee40-cca1-4ad3-8b1e-10fd0a3b607d") ) (fp_line - (start -0.8 -0.4125) - (end 0.8 -0.4125) + (start 0.8 -0.4125) + (end 0.8 0.4125) (stroke (width 0.1) (type solid) ) (layer "F.Fab") - (uuid "6d763796-fc84-44e9-8dfc-2643adbfd7c8") + (uuid "0dd45206-7aa0-43c8-bbf6-8e4e1c0e878e") ) (fp_line - (start 0.8 -0.4125) - (end 0.8 0.4125) + (start 0.8 0.4125) + (end -0.8 0.4125) (stroke (width 0.1) (type solid) ) (layer "F.Fab") - (uuid "1cc6d07e-1a1e-4230-9678-1a841a00593a") + (uuid "9215e231-d31d-444b-808c-5338481ed339") ) (fp_text user "${REFERENCE}" - (at 0 0 -90) + (at 0 0 0) (layer "F.Fab") - (uuid "882d6be6-d383-4ff2-a1e2-f3a85afe6f78") + (uuid "e119d24d-fc7c-4529-a202-5df2538287a8") (effects (font (size 0.4 0.4) @@ -6147,22 +6816,22 @@ ) ) (pad "1" smd roundrect - (at -0.825 0 270) + (at -0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) - (net 8 "power_indicator_5v.resistor-cathode") + (net 90 "can_con_trx.led_tx.resistor-cathode") (pintype "stereo") - (uuid "3ee817bb-9837-4395-8d2f-9f9a3f2ba0bf") + (uuid "b18e4c7d-349e-498f-b026-84c336b01273") ) (pad "2" smd roundrect - (at 0.825 0 270) + (at 0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) - (net 1 "gnd") + (net 3 "can_con_trx.controller-tx") (pintype "stereo") - (uuid "6867db83-f5e9-4d73-9533-de3d3be7137f") + (uuid "a395fde5-5fbb-4cff-9050-08d888001701") ) (model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0603_1608Metric.wrl" (offset @@ -9030,6 +9699,213 @@ ) ) ) + (footprint "lib:R0603" + (layer "F.Cu") + (uuid "93ec3458-ac4e-4666-96e7-7fe75842534e") + (at 81.355 20.855) + (descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R19" + (at 0 -1.43 0) + (layer "F.SilkS") + (uuid "12161e1c-89fd-485f-9f5e-81cbc8023d90") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "100mW Thick Film Resistors 75V ±100ppm/℃ ±1% 316Ω 0603 Chip Resistor - Surface Mount ROHS" + (at 0 1.43 0) + (layer "F.Fab") + (uuid "7ecb0739-3c7a-40f1-9ecc-71891e1b3b1b") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "27c1d050-5b51-49f7-b7e0-80b6b9dd9276") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "c4764af6-f603-484c-bbf5-eb429889f87b") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "82bed8e8-6725-4854-bcd1-b5756c076e80") + (effects + (font + (size 1.27 1.27) + (thickness 0.15) + ) + ) + ) + (path "/0f07a311-a96f-41a8-88cd-f6b1cf464886/0f07a311-a96f-41a8-88cd-f6b1cf464886") + (attr smd) + (fp_line + (start -0.237258 -0.5225) + (end 0.237258 -0.5225) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "532a663b-a50b-4545-9b59-02543960e1f6") + ) + (fp_line + (start -0.237258 0.5225) + (end 0.237258 0.5225) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "0db47cf7-7990-41d2-a761-a1707c9a44a8") + ) + (fp_line + (start -1.48 -0.73) + (end 1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "15ed7aa7-e6ca-472f-b2a6-c4550f77f51f") + ) + (fp_line + (start -1.48 0.73) + (end -1.48 -0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "3022226e-20e9-4f6d-b53d-d0e3868988da") + ) + (fp_line + (start 1.48 -0.73) + (end 1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "a3f0fada-9552-4be1-a452-dafe084858a9") + ) + (fp_line + (start 1.48 0.73) + (end -1.48 0.73) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "7387c7fb-28e2-4183-8baf-f4ecec56728a") + ) + (fp_line + (start -0.8 -0.4125) + (end 0.8 -0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "abdd4ac6-d5e0-439e-80d5-40a2e68c9c3e") + ) + (fp_line + (start -0.8 0.4125) + (end -0.8 -0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "ad4c8413-d9c3-4f1c-9e57-f9de1431bb7c") + ) + (fp_line + (start 0.8 -0.4125) + (end 0.8 0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6c71209b-fef2-4025-9a67-01157c80fbd2") + ) + (fp_line + (start 0.8 0.4125) + (end -0.8 0.4125) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "88e79fd3-d296-43d0-90f4-867d15d8ad32") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "6a7722e3-88e3-4245-addc-8d56f0760485") + (effects + (font + (size 0.4 0.4) + (thickness 0.06) + ) + ) + ) + (pad "1" smd roundrect + (at -0.825 0) + (size 0.8 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 91 "can_con_trx.led_rx.resistor-cathode") + (pintype "stereo") + (uuid "ceddd06d-8c8c-483a-af72-628d8042de7b") + ) + (pad "2" smd roundrect + (at 0.825 0) + (size 0.8 0.95) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 24 "can_con_trx.controller-rx") + (pintype "stereo") + (uuid "9666b780-aa68-4664-8274-29e5f0ae6364") + ) + (model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0603_1608Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) (footprint "lib:R0603" (layer "F.Cu") (uuid "980f2211-09e1-4275-a5bb-bb8eeeeae04e") @@ -14696,7 +15572,7 @@ (at 50.05 54.25) (descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") (tags "resistor") - (property "Reference" "R19" + (property "Reference" "R21" (at 0 -1.43 0) (layer "F.SilkS") (uuid "b8ffe24a-3761-4225-8bb2-39439f8dcff6") diff --git a/src/osr_elec/elec/src/lib/can-controller-trx.ato b/src/osr_elec/elec/src/lib/can-controller-trx.ato index 6b80919..6cf3b34 100644 --- a/src/osr_elec/elec/src/lib/can-controller-trx.ato +++ b/src/osr_elec/elec/src/lib/can-controller-trx.ato @@ -4,7 +4,7 @@ from "generics/interfaces.ato" import Power, SPI from "lib/capacitors.ato" import PowerDecouplingCap100nf from "lib/connectors.ato" import JstGhHorizontalCan -from "lib/leds.ato" import LEDIndicatorUser +from "lib/leds.ato" import LEDIndicatorRx, LEDIndicatorTx, LEDIndicatorUser from "lib/mechanical-switches.ato" import CkJs102011jcqn from "lib/microchip/MCP2517FDT.ato" import MCP2517FDT from "lib/microchip/MCP2562FD.ato" import MCP2562FD @@ -46,6 +46,17 @@ module CanControllerTrx: transceiver.power ~ power controller.can_ttl ~ transceiver.can_ttl + # indicator LEDs + led_rx = new LEDIndicatorRx + led_rx.v_in = 3.1V to 3.3V + led_rx.input ~ power.vcc + led_rx.gnd ~ controller.can_ttl.rx + + led_tx = new LEDIndicatorTx + led_tx.v_in = 3.1V to 3.3V + led_tx.input ~ power.vcc + led_tx.gnd ~ controller.can_ttl.tx + # transceiver power decoupling capacitor transceiver_power_cap = new PowerDecouplingCap100nf transceiver_power_cap.power ~ power diff --git a/src/osr_elec/elec/src/lib/leds.ato b/src/osr_elec/elec/src/lib/leds.ato index 3be2fe4..148f6b9 100644 --- a/src/osr_elec/elec/src/lib/leds.ato +++ b/src/osr_elec/elec/src/lib/leds.ato @@ -1,6 +1,6 @@ """LEDs.""" -from "generics/leds.ato" import LED, LEDIndicator, LEDIndicatorBlue, LEDIndicatorGreen +from "generics/leds.ato" import LED, LEDIndicator, LEDIndicatorBlue, LEDIndicatorGreen, LEDIndicatorRed component SML_D12D1WT86 from LED: @@ -44,3 +44,19 @@ module LEDIndicatorUser from LEDIndicatorBlue: led.designator_prefix = "D" led.footprint = "LED_0603_1608Metric" resistor.package = "0603" + + +module LEDIndicatorRx from LEDIndicatorGreen: + """Receive LED indicator.""" + current = 1mA to 4mA + led.designator_prefix = "D" + led.footprint = "LED_0603_1608Metric" + resistor.package = "0603" + + +module LEDIndicatorTx from LEDIndicatorRed: + """Transmit LED indicator.""" + current = 1mA to 4mA + led.designator_prefix = "D" + led.footprint = "LED_0603_1608Metric" + resistor.package = "0603"