Compare commits

..

14 Commits

59 changed files with 2132667 additions and 182086 deletions

View File

@ -0,0 +1,208 @@
(footprint "LightPower"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(property "Reference" "REF**"
(at 0 -0.5 0)
(unlocked yes)
(layer "F.SilkS")
(uuid "0d42c5f3-a9e7-44fb-91f8-62bbb8e8e7fb")
(effects
(font
(size 1 1)
(thickness 0.1)
)
)
)
(property "Value" "LightPower"
(at 0 1 0)
(unlocked yes)
(layer "F.Fab")
(uuid "56f97324-dbe4-43ff-a10c-cfc7875dabba")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(unlocked yes)
(layer "F.Fab")
(hide yes)
(uuid "fffbc31d-2d05-4fe7-9786-5bc8d82bb48a")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(unlocked yes)
(layer "F.Fab")
(hide yes)
(uuid "7f894ad2-db32-4bd1-a0a8-dcb308562141")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(attr smd)
(fp_line
(start -19.1 -5.9)
(end 18.9 -5.9)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "61ffbe7b-a4bf-4909-81b7-0e19518f145c")
)
(fp_line
(start -19.1 6.1)
(end -19.1 -5.9)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "54f550a1-e6e1-4119-a49f-a9aebb4befbf")
)
(fp_line
(start 18.9 -5.9)
(end 18.9 -0.5)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "d602ffa7-a7ff-4636-898f-1490ff61a015")
)
(fp_line
(start 18.9 -0.5)
(end 19.15 0.5)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "92638711-2cf6-4115-80fb-f2f2d995f431")
)
(fp_line
(start 19.15 0.5)
(end 19.5 1.3)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "72346884-b0d9-43b0-9826-8a279b34f109")
)
(fp_line
(start 19.5 1.3)
(end 19.9 2)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "237fb7f5-440e-49c0-9e5f-57e450425975")
)
(fp_line
(start 19.9 2)
(end 21.1 2)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "29de2776-0155-4990-9886-eaa6133e1e35")
)
(fp_line
(start 21.1 6.1)
(end -19.1 6.1)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "86fbd866-c598-42d9-83d2-9f60637cd889")
)
(fp_line
(start 21.1 6.1)
(end 21.1 2)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "e1bdee8f-0a26-4703-9a9a-41e4fae709ec")
)
(fp_text user "${REFERENCE}"
(at 0 2.5 0)
(unlocked yes)
(layer "F.Fab")
(uuid "10d8d783-d5cb-4308-95f2-9c79a6f90db2")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(pad "1" thru_hole circle
(at 13.52 4.3 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "ef891d05-9b9f-48c3-bef3-9b4b56cb685e")
)
(pad "2" thru_hole circle
(at 16.06 4.3 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "124c24ec-7b0e-4868-9700-bc4e7c567885")
)
(pad "3" thru_hole rect
(at 18.6 4.3 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "92852bed-9f18-4995-a2a5-d26facacadd0")
)
(pad "4" thru_hole rect
(at 17.8 -4.8)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "142a18f8-cfac-497e-bb90-f927dc045155")
)
(pad "5" thru_hole rect
(at -18 -4.8)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "398d0534-3ff9-4028-9a52-9a410332884e")
)
(pad "6" thru_hole rect
(at -18 5)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "d7c32d07-2326-4bc1-8bda-aceb817d7a40")
)
(embedded_fonts no)
)

View File

@ -0,0 +1,174 @@
(footprint "PumpModule"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(property "Reference" "U1"
(at -0.1 -0.5 0)
(unlocked yes)
(layer "F.SilkS")
(uuid "0fac3daa-410a-424b-8b62-3653e0e39256")
(effects
(font
(size 1 1)
(thickness 0.1)
)
)
)
(property "Value" "~"
(at -0.1 1 0)
(unlocked yes)
(layer "F.Fab")
(uuid "490e1af0-9912-46a9-8419-a3c2a915a249")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at -13.3 -7.35 0)
(unlocked yes)
(layer "F.Fab")
(hide yes)
(uuid "46dc35be-63c1-46ff-8f93-dceb8fd53dc3")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Description" ""
(at -13.3 -7.35 0)
(unlocked yes)
(layer "F.Fab")
(hide yes)
(uuid "d96cf3f1-cf49-4af2-b935-e7df8b23c266")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(attr smd)
(fp_line
(start -40 4.9)
(end -40 28.4)
(stroke
(width 0.1)
(type default)
)
(layer "F.SilkS")
(uuid "5b0120eb-981a-40db-ad22-ef6fe81cbdcc")
)
(fp_line
(start -40 4.9)
(end 49.8 4.9)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "c832bc6f-3a4d-41f7-ba87-e9cac399b8d7")
)
(fp_line
(start -40 28.4)
(end 49.8 28.4)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "aea04064-7e14-41c3-adac-23e5ce64e65e")
)
(fp_line
(start 49.8 4.9)
(end 49.8 28.4)
(stroke
(width 0.05)
(type solid)
)
(layer "F.SilkS")
(uuid "7a9fdc40-f4c7-45e7-8b57-e7b2d37884c0")
)
(fp_text user "${REFERENCE}"
(at -0.1 2.5 0)
(unlocked yes)
(layer "F.Fab")
(uuid "8231e46b-5bec-4822-8561-bdd1fa9da1da")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(pad "1" thru_hole rect
(at 48 6.7 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "95e5f681-61e1-4c06-8ff4-85f4013efdea")
)
(pad "2" thru_hole rect
(at 30 27)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "c521b1c9-f760-4dc6-879c-b94140d5624e")
)
(pad "3" thru_hole rect
(at -30 27)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "038ad619-2e4e-4056-a099-69de8ddd0df8")
)
(pad "4" thru_hole rect
(at -38.5 6.25)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "bb96f5cb-d9fa-4cd9-ac26-451919aa9518")
)
(pad "5" thru_hole oval
(at 45.46 6.7 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "def315f4-56be-4088-b826-eb2c89dfa8df")
)
(pad "6" thru_hole oval
(at 42.92 6.7 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "8fd26b79-013e-4286-8f18-adc764d1e894")
)
(pad "7" thru_hole oval
(at 40.38 6.7 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "58e24d78-f1d3-45df-867a-691db92a3ca2")
)
(pad "8" thru_hole oval
(at 37.84 6.7 270)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "7f75adc2-03d6-4d95-9e8a-b91e3d90198e")
)
(embedded_fonts no)
)

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"board": {
"active_layer": 31,
"active_layer_preset": "",
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
@ -10,6 +10,7 @@
"opacity": {
"images": 0.4399999976158142,
"pads": 1.0,
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
@ -29,6 +30,55 @@
"zones": true
},
"visible_items": [
"vias",
"footprint_text",
"footprint_anchors",
"ratsnest",
"grid",
"footprints_front",
"footprints_back",
"footprint_values",
"footprint_references",
"tracks",
"drc_errors",
"drawing_sheet",
"bitmaps",
"pads",
"zones",
"drc_warnings",
"locked_item_shadows",
"conflict_shadows",
"shapes"
],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff",
"zone_display_mode": 1
},
"git": {
"repo_password": "",
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "PlantCtrlESP32.kicad_prl",
"version": 5
},
"net_inspector_panel": {
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
@ -40,48 +90,49 @@
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
32,
33,
34,
35,
36,
39,
40
11
],
"visible_layers": "ffcffff_ffffffff",
"zone_display_mode": 1
},
"git": {
"repo_password": "",
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "PlantCtrlESP32.kicad_prl",
"version": 3
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
"filter_by_netclass": true,
"filter_text": "",
"group_by_constraint": false,
"group_by_netclass": false,
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": 0
},
"open_jobsets": [],
"project": {
"files": []
},
"schematic": {
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
}
}
}

View File

@ -59,8 +59,10 @@
}
],
"drc_exclusions": [
"footprint_symbol_mismatch|177050000|59025000|a624af3d-bffa-4ff7-9554-e16d3c677f69|00000000-0000-0000-0000-000000000000",
"footprint_symbol_mismatch|237580000|53970000|c9d8d35b-26b7-4992-9d25-be9130d57b1a|00000000-0000-0000-0000-000000000000"
[
"footprint_symbol_mismatch|177050000|59025000|a624af3d-bffa-4ff7-9554-e16d3c677f69|00000000-0000-0000-0000-000000000000",
""
]
],
"meta": {
"filename": "board_design_settings.json",
@ -73,16 +75,19 @@
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_near_hole": "error",
"hole_to_hole": "error",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
@ -93,9 +98,11 @@
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
@ -107,10 +114,13 @@
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
@ -125,6 +135,7 @@
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.025,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
@ -142,10 +153,11 @@
},
"teardrop_options": [
{
"td_onpadsmd": true,
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onviapad": true
"td_onvia": true
}
],
"teardrop_parameters": [
@ -241,6 +253,7 @@
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
@ -435,10 +448,15 @@
"duplicate_sheet_names": "error",
"endpoint_off_grid": "ignore",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
@ -451,9 +469,14 @@
"pin_not_driven": "error",
"pin_to_pin": "error",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
@ -465,7 +488,7 @@
},
"meta": {
"filename": "PlantCtrlESP32.kicad_pro",
"version": 1
"version": 3
},
"net_settings": {
"classes": [
@ -480,6 +503,7 @@
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 1.2,
"via_diameter": 0.8,
@ -497,6 +521,7 @@
"microvia_drill": 0.1,
"name": "12V",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 0,
"schematic_color": "rgb(255, 4, 6)",
"track_width": 1.0,
"via_diameter": 0.8,
@ -514,6 +539,7 @@
"microvia_drill": 0.1,
"name": "3V",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 1,
"schematic_color": "rgb(255, 153, 0)",
"track_width": 0.2,
"via_diameter": 0.8,
@ -531,6 +557,7 @@
"microvia_drill": 0.1,
"name": "BAT+",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2,
"schematic_color": "rgb(81, 255, 3)",
"track_width": 1.2,
"via_diameter": 0.8,
@ -548,6 +575,7 @@
"microvia_drill": 0.1,
"name": "BAT-",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 3,
"schematic_color": "rgb(130, 130, 130)",
"track_width": 1.2,
"via_diameter": 0.8,
@ -565,6 +593,7 @@
"microvia_drill": 0.1,
"name": "GND",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 4,
"schematic_color": "rgb(0, 0, 0)",
"track_width": 0.5,
"via_diameter": 0.8,
@ -573,13 +602,10 @@
}
],
"meta": {
"version": 3
"version": 4
},
"net_colors": null,
"netclass_assignments": {
"Net-(battery1-Pin_1)": "BAT-",
"VBAT": "BAT+"
},
"netclass_assignments": null,
"netclass_patterns": [
{
"netclass": "3V",
@ -1229,6 +1255,7 @@
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": false,
"name": "",
"sort_asc": true,
"sort_field": "LCSC_PART_NUMBER"
@ -1272,6 +1299,7 @@
},
"page_layout_descr_file": "",
"plot_directory": "/tmp/",
"space_save_all_events": true,
"spice_adjust_passive_values": false,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",

File diff suppressed because it is too large Load Diff

1438595
board/PlantCtrlESP32_v3_3.step Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6,4 +6,8 @@
(lib (name "board")(type "KiCad")(uri "${KIPRJMOD}/")(options "")(descr ""))
(lib (name "esp32c6")(type "KiCad")(uri "${KIPRJMOD}/esp32c6")(options "")(descr ""))
(lib (name "easyeda2kicad")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/easyeda2kicad.pretty")(options "")(descr ""))
(lib (name "MPPT")(type "KiCad")(uri "${KIPRJMOD}/modules/MPPT/MPPT.pretty")(options "")(descr ""))
(lib (name "PumpOut")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/Modules.pretty")(options "")(descr ""))
(lib (name "Modules")(type "KiCad")(uri "${KIPRJMOD}/Modules.pretty")(options "")(descr ""))
(lib (name "Sensor")(type "KiCad")(uri "${KIPRJMOD}/modules/Sensors/Sensors/Sensor.pretty")(options "")(descr ""))
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
"vias",
"footprint_text",
"footprint_anchors",
"ratsnest",
"grid",
"footprints_front",
"footprints_back",
"footprint_values",
"footprint_references",
"tracks",
"drc_errors",
"drawing_sheet",
"bitmaps",
"pads",
"zones",
"drc_warnings",
"locked_item_shadows",
"conflict_shadows",
"shapes"
],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff",
"zone_display_mode": 0
},
"git": {
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "3v3.kicad_prl",
"version": 5
},
"net_inspector_panel": {
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
"filter_by_netclass": true,
"filter_text": "",
"group_by_constraint": false,
"group_by_netclass": false,
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": 0
},
"open_jobsets": [],
"project": {
"files": []
},
"schematic": {
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
}
}
}

View File

@ -0,0 +1,635 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.8,
"height": 1.27,
"width": 2.54
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.005,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
0.5,
1.0,
1.5,
2.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "3v3.kicad_pro",
"version": 3
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2,
"via_diameter": 0.6,
"via_drill": 0.3,
"wire_width": 6
}
],
"meta": {
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "3v3.step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": true,
"label": "Exclude from BOM",
"name": "${EXCLUDE_FROM_BOM}",
"show": true
},
{
"group_by": true,
"label": "Exclude from Board",
"name": "${EXCLUDE_FROM_BOARD}",
"show": true
},
{
"group_by": true,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": true,
"name": "Default Editing",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"5d71a9a3-d83a-4a01-809f-1cb0d3006b10",
"Root"
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

34730
board/modules/3v3/3v3.step Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
{
"board": {
"active_layer": 5,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
"vias",
"footprint_text",
"footprint_anchors",
"ratsnest",
"grid",
"footprints_front",
"footprints_back",
"footprint_values",
"footprint_references",
"tracks",
"drc_errors",
"drawing_sheet",
"bitmaps",
"pads",
"zones",
"drc_warnings",
"locked_item_shadows",
"conflict_shadows",
"shapes"
],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff",
"zone_display_mode": 0
},
"git": {
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "LightOut.kicad_prl",
"version": 5
},
"net_inspector_panel": {
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
"filter_by_netclass": true,
"filter_text": "",
"group_by_constraint": false,
"group_by_netclass": false,
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": 0
},
"open_jobsets": [],
"project": {
"files": []
},
"schematic": {
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
}
}
}

View File

@ -0,0 +1,660 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 1.0,
"height": 1.7,
"width": 1.7
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
0.1,
0.5,
1.0,
1.5,
2.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "LightOut.kicad_pro",
"version": 3
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2,
"via_diameter": 0.6,
"via_drill": 0.3,
"wire_width": 6
}
],
"meta": {
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "LightOut.step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": true,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
},
{
"group_by": false,
"label": "Description",
"name": "Description",
"show": false
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": false,
"label": "#",
"name": "${ITEM_NUMBER}",
"show": false
},
{
"group_by": false,
"label": "LCSC",
"name": "LCSC",
"show": false
},
{
"group_by": false,
"label": "LCSC_PART_NUMBER",
"name": "LCSC_PART_NUMBER",
"show": false
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": true,
"label": "Exclude from BOM",
"name": "${EXCLUDE_FROM_BOM}",
"show": true
},
{
"group_by": true,
"label": "Exclude from Board",
"name": "${EXCLUDE_FROM_BOARD}",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": true,
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"2a8304c5-3c9a-4ae8-a3b2-19491060e8fb",
"Root"
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
(fp_lib_table
(version 7)
(lib (name "Modules")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/Modules.pretty")(options "")(descr ""))
)

View File

@ -0,0 +1,4 @@
(sym_lib_table
(version 7)
(lib (name "Modules")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/modules/Modules.kicad_sym")(options "")(descr ""))
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
"vias",
"footprint_text",
"footprint_anchors",
"ratsnest",
"grid",
"footprints_front",
"footprints_back",
"footprint_values",
"footprint_references",
"tracks",
"drc_errors",
"drawing_sheet",
"bitmaps",
"pads",
"zones",
"drc_warnings",
"locked_item_shadows",
"conflict_shadows",
"shapes"
],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff",
"zone_display_mode": 1
},
"git": {
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "MPPT.kicad_prl",
"version": 5
},
"net_inspector_panel": {
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
"filter_by_netclass": true,
"filter_text": "",
"group_by_constraint": false,
"group_by_netclass": false,
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": 0
},
"open_jobsets": [],
"project": {
"files": []
},
"schematic": {
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
}
}
}

View File

@ -0,0 +1,658 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.8,
"height": 1.27,
"width": 2.54
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [
[
"silk_over_copper|115549999|32059610|4d3349dc-5b52-43de-8407-342b46c9ab03|00000000-0000-0000-0000-000000000000",
""
],
[
"starved_thermal|84500000|37000000|1c111c53-aa66-4ea7-a1fd-488f9eb7dc56|8d490f05-82aa-4679-a53e-ec4019506065|F.Cu",
""
]
],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
0.1,
0.5,
1.0,
1.5,
2.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [
[
"pin_to_pin|2222500|1549400|e3b55a99-d520-4e90-8de0-46127973153b|9077e07b-1f30-4868-845d-93f2d4a2c725|/7218b645-aff7-4fb9-9c17-5858b920ef23|/7218b645-aff7-4fb9-9c17-5858b920ef23|/7218b645-aff7-4fb9-9c17-5858b920ef23",
""
],
[
"pin_to_pin|2222500|1549400|e3b55a99-d520-4e90-8de0-46127973153b|c174cc28-f539-4d5e-b27b-cf983a713ffb|/7218b645-aff7-4fb9-9c17-5858b920ef23|/7218b645-aff7-4fb9-9c17-5858b920ef23|/7218b645-aff7-4fb9-9c17-5858b920ef23",
""
],
[
"power_pin_not_driven|3162300|1003300|fefaa914-52bb-4f31-b127-8901fa81a93d|00000000-0000-0000-0000-000000000000|/7218b645-aff7-4fb9-9c17-5858b920ef23|/7218b645-aff7-4fb9-9c17-5858b920ef23|",
""
]
],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "MPPT.kicad_pro",
"version": 3
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2,
"via_diameter": 0.6,
"via_drill": 0.3,
"wire_width": 6
}
],
"meta": {
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "MPPT.step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": true,
"label": "Exclude from BOM",
"name": "${EXCLUDE_FROM_BOM}",
"show": true
},
{
"group_by": true,
"label": "Exclude from Board",
"name": "${EXCLUDE_FROM_BOARD}",
"show": true
},
{
"group_by": true,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": true,
"name": "Default Editing",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"7218b645-aff7-4fb9-9c17-5858b920ef23",
"Root"
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,265 @@
(kicad_symbol_lib
(version 20241209)
(generator "kicad_symbol_editor")
(generator_version "9.0")
(symbol "MPPT"
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(property "Reference" "U"
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Datasheet" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Description" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(symbol "MPPT_1_1"
(rectangle
(start -10.16 -1.27)
(end 8.89 -22.86)
(stroke
(width 0)
(type solid)
)
(fill
(type background)
)
)
(pin input line
(at -12.7 -6.35 0)
(length 2.54)
(name "SDA"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "6"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 -8.89 0)
(length 2.54)
(name "SCL"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line
(at -7.62 -25.4 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "8"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line
(at -5.08 -25.4 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "9"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line
(at -2.54 -25.4 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "10"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line
(at 0 -25.4 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "11"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line
(at 11.43 -3.81 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "7"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line
(at 11.43 -6.35 180)
(length 2.54)
(name "VBAT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 11.43 -11.43 180)
(length 2.54)
(name "IsDay"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 11.43 -13.97 180)
(length 2.54)
(name "Charge"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 11.43 -20.32 180)
(length 2.54)
(name "3V3"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "4"
(effects
(font
(size 1.27 1.27)
)
)
)
)
)
(embedded_fonts no)
)
)

File diff suppressed because it is too large Load Diff

42635
board/modules/MPPT/MPPT.step Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
(fp_lib_table
(version 7)
(lib (name "esp32c6")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/esp32c6")(options "")(descr ""))
(lib (name "board")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board")(options "")(descr ""))
(lib (name "MPPT")(type "KiCad")(uri "${KIPRJMOD}/MPPT.pretty")(options "")(descr ""))
(lib (name "kicad-stuff")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/kicad-stuff")(options "")(descr ""))
)

View File

@ -0,0 +1,6 @@
(sym_lib_table
(version 7)
(lib (name "CN3795")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/CN3795.kicad_sym")(options "")(descr ""))
(lib (name "MPPT")(type "KiCad")(uri "${KIPRJMOD}/MPPT.kicad_sym")(options "")(descr ""))
(lib (name "ESP32-DEVKITC-32D")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/kicad-stuff/ESP32/ESP32-DEVKITC-32D.kicad_sym")(options "")(descr ""))
)

View File

@ -0,0 +1,641 @@
(kicad_symbol_lib
(version 20241209)
(generator "kicad_symbol_editor")
(generator_version "9.0")
(symbol "LightPowerSupply"
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(property "Reference" "U"
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Datasheet" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Description" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(symbol "LightPowerSupply_1_1"
(rectangle
(start -6.35 -1.27)
(end 6.35 -19.05)
(stroke
(width 0)
(type solid)
)
(fill
(type background)
)
)
(pin input line
(at -8.89 -2.54 0)
(length 2.54)
(name "LED_ENABLE"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at -8.89 -5.08 0)
(length 2.54)
(name "VBAT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -8.89 -7.62 0)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -8.89 -10.16 0)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "4"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -8.89 -12.7 0)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -8.89 -15.24 0)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "6"
(effects
(font
(size 1.27 1.27)
)
)
)
)
)
(embedded_fonts no)
)
(symbol "Pump_Output"
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(property "Reference" "U"
(at -6.35 15.24 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Datasheet" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Description" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(symbol "Pump_Output_1_1"
(rectangle
(start -12.7 12.7)
(end 10.16 -15.24)
(stroke
(width 0)
(type solid)
)
(fill
(type background)
)
)
(pin bidirectional line
(at -15.24 1.27 0)
(length 2.54)
(name "SCL"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin bidirectional line
(at -15.24 -1.27 0)
(length 2.54)
(name "SDA"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "6"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at -3.81 15.24 270)
(length 2.54)
(name "3V3"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "7"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at -1.27 15.24 270)
(length 2.54)
(name "VCC"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "8"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at -1.27 -17.78 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 1.27 -17.78 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 3.81 -17.78 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 6.35 -17.78 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "4"
(effects
(font
(size 1.27 1.27)
)
)
)
)
)
(embedded_fonts no)
)
(symbol "Sensor"
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(property "Reference" "U"
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Datasheet" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Description" ""
(at 0 0 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(symbol "Sensor_1_1"
(rectangle
(start -5.08 -1.27)
(end 5.08 -29.21)
(stroke
(width 0)
(type solid)
)
(fill
(type background)
)
)
(pin power_in line
(at 7.62 -2.54 180)
(length 2.54)
(name "3V3"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin no_connect line
(at 7.62 -5.08 180)
(length 2.54)
(name "VBAT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 7.62 -7.62 180)
(length 2.54)
(name "SDA"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 7.62 -10.16 180)
(length 2.54)
(name "SCL"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "4"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -12.7 180)
(length 2.54)
(name "Signal"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -15.24 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "6"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -17.78 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "7"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -20.32 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "8"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -22.86 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "9"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -25.4 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "10"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at 7.62 -27.94 180)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "11"
(effects
(font
(size 1.27 1.27)
)
)
)
)
)
(embedded_fonts no)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
"vias",
"footprint_text",
"footprint_anchors",
"ratsnest",
"grid",
"footprints_front",
"footprints_back",
"footprint_values",
"footprint_references",
"tracks",
"drc_errors",
"drawing_sheet",
"bitmaps",
"pads",
"zones",
"drc_warnings",
"locked_item_shadows",
"conflict_shadows",
"shapes"
],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff",
"zone_display_mode": 1
},
"git": {
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "PumpOutput.kicad_prl",
"version": 5
},
"net_inspector_panel": {
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
"filter_by_netclass": true,
"filter_text": "",
"group_by_constraint": false,
"group_by_netclass": false,
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": 0
},
"open_jobsets": [],
"project": {
"files": []
},
"schematic": {
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
}
}
}

View File

@ -0,0 +1,688 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.8,
"height": 1.27,
"width": 2.54
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [
[
"footprint_type_mismatch|145100000|72500000|5ecd01c7-e707-43f2-ada2-bb695111d219|00000000-0000-0000-0000-000000000000",
""
],
[
"silk_over_copper|177059610|78100001|e5735006-b5a9-492a-868f-a91cc93975c2|00000000-0000-0000-0000-000000000000",
""
]
],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "warning",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "warning",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.005,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
0.1,
0.3,
0.5,
1.0,
1.5,
2.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [
[
"power_pin_not_driven|1130300|660400|e4ea27f9-c0eb-4f42-a53b-0c7fd9aa9f2d|00000000-0000-0000-0000-000000000000|/fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1|/fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1|",
""
],
[
"power_pin_not_driven|1384300|812800|1d894c27-ab0a-479f-ab88-cf53e2baa7e4|00000000-0000-0000-0000-000000000000|/fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1|/fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1|",
""
],
[
"power_pin_not_driven|1943100|812800|e0cac361-8a98-43b1-965d-36aa882fb85b|00000000-0000-0000-0000-000000000000|/fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1|/fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1|",
""
]
],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "PumpOutput.kicad_pro",
"version": 3
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.1,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2,
"via_diameter": 0.6,
"via_drill": 0.3,
"wire_width": 6
}
],
"meta": {
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": [
{
"netclass": "Default",
"pattern": "VCC"
}
]
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "PumpOutput.step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": true,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
},
{
"group_by": false,
"label": "Description",
"name": "Description",
"show": false
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": false,
"label": "#",
"name": "${ITEM_NUMBER}",
"show": false
},
{
"group_by": false,
"label": "LCSC_PART_NUMBER",
"name": "LCSC_PART_NUMBER",
"show": true
},
{
"group_by": false,
"label": "Sim.Pins",
"name": "Sim.Pins",
"show": false
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": true,
"label": "Exclude from BOM",
"name": "${EXCLUDE_FROM_BOM}",
"show": true
},
{
"group_by": true,
"label": "Exclude from Board",
"name": "${EXCLUDE_FROM_BOARD}",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": true,
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"fa7c93d2-7670-4cd5-85ee-82ddfb7f2ba1",
"Root"
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
{"EXTRA_LAYERS": "", "ALL_ACTIVE_LAYERS": false, "EXTEND_EDGE_CUT": false, "ALTERNATIVE_EDGE_CUT": false, "AUTO TRANSLATE": true, "AUTO FILL": true, "EXCLUDE DNP": false}

View File

@ -0,0 +1,6 @@
(fp_lib_table
(version 7)
(lib (name "Modules")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/Modules.pretty")(options "")(descr ""))
(lib (name "board")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board")(options "")(descr ""))
(lib (name "Library")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/modules/LightOut/Library.pretty")(options "")(descr ""))
)

View File

@ -0,0 +1,244 @@
P CODE 00
P UNITS CUST 0
P arrayDim N
317GND VIA MD0118PA00X+039921Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+073071Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+075512Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+070000Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+061339Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+048346Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+057008Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+065669Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+052677Y-034803X0236Y0000R000S3
317GND VIA MD0118PA00X+044173Y-034803X0236Y0000R000S3
3175K_VBAT VIA MD0118PA00X+061122Y-032776X0236Y0000R000S3
3175K_VBAT VIA MD0118PA00X+065650Y-032874X0236Y0000R000S3
3175K_VBAT VIA MD0118PA00X+069726Y-033248X0236Y0000R000S3
317T-(P_FAULT1-K) VIA MD0118PA00X+062894Y-033563X0236Y0000R000S3
317T-(P_FAULT1-K) VIA MD0118PA00X+067283Y-033583X0236Y0000R000S3
317T-(P_FAULT1-K) VIA MD0118PA00X+071535Y-033622X0236Y0000R000S3
317T-(P_FAULT1-A) VIA MD0118PA00X+075577Y-032918X0236Y0000R000S3
317T-(P_FAULT1-A) VIA MD0118PA00X+041890Y-032480X0236Y0000R000S3
317T-(P_FAULT2-A) VIA MD0118PA00X+075263Y-032896X0236Y0000R000S3
317T-(P_FAULT2-A) VIA MD0118PA00X+046102Y-032948X0236Y0000R000S3
317T-(P_FAULT3-A) VIA MD0118PA00X+050236Y-032908X0236Y0000R000S3
317T-(P_FAULT3-A) VIA MD0118PA00X+075019Y-032697X0236Y0000R000S3
317T-(P_FAULT4-A) VIA MD0118PA00X+054646Y-032908X0236Y0000R000S3
317T-(P_FAULT4-A) VIA MD0118PA00X+074802Y-032468X0236Y0000R000S3
317T-(P_FAULT5-A) VIA MD0118PA00X+074539Y-032643X0236Y0000R000S3
317T-(P_FAULT5-A) VIA MD0118PA00X+059055Y-032908X0236Y0000R000S3
317T-(P_FAULT6-A) VIA MD0118PA00X+063268Y-032908X0236Y0000R000S3
317T-(P_FAULT6-A) VIA MD0118PA00X+074279Y-032819X0236Y0000R000S3
317T-(P_FAULT7-A) VIA MD0118PA00X+067598Y-032948X0236Y0000R000S3
317T-(P_FAULT7-A) VIA MD0118PA00X+074006Y-032977X0236Y0000R000S3
317T-(P_FAULT8-A) VIA MD0118PA00X+073740Y-034055X0236Y0000R000S3
317T-(P_FAULT8-A) VIA MD0118PA00X+071969Y-033268X0236Y0000R000S3
317PUMP1 VIA MD0118PA00X+041811Y-037638X0236Y0000R000S3
317PUMP1 VIA MD0118PA00X+073465Y-038898X0236Y0000R000S3
317PUMP3 VIA MD0118PA00X+073937Y-038583X0236Y0000R000S3
317PUMP3 VIA MD0118PA00X+050354Y-037638X0236Y0000R000S3
317PUMP4 VIA MD0118PA00X+074173Y-038819X0236Y0000R000S3
317PUMP4 VIA MD0118PA00X+054646Y-037638X0236Y0000R000S3
317PUMP5 VIA MD0118PA00X+074528Y-038661X0236Y0000R000S3
317PUMP5 VIA MD0118PA00X+058976Y-037658X0236Y0000R000S3
317PUMP6 VIA MD0118PA00X+074764Y-038386X0236Y0000R000S3
317PUMP6 VIA MD0118PA00X+063484Y-037598X0236Y0000R000S3
317PUMP7 VIA MD0118PA00X+067638Y-037598X0236Y0000R000S3
317PUMP7 VIA MD0118PA00X+075001Y-038179X0236Y0000R000S3
317PUMP8 VIA MD0118PA00X+075276Y-037953X0236Y0000R000S3
317PUMP8 VIA MD0118PA00X+071969Y-037953X0236Y0000R000S3
317PUMP2 VIA MD0118PA00X+046102Y-037598X0236Y0000R000S3
317PUMP2 VIA MD0118PA00X+073740Y-038307X0236Y0000R000S3
3173_3V VIA MD0118PA00X+072726Y-032903X0236Y0000R000S3
3173_3V VIA MD0118PA00X+067992Y-032953X0236Y0000R000S3
317SDA VIA MD0118PA00X+069685Y-034173X0236Y0000R000S3
317SDA VIA MD0118PA00X+072933Y-034173X0236Y0000R000S3
317SCL VIA MD0118PA00X+068363Y-034012X0236Y0000R000S3
317SCL VIA MD0118PA00X+073228Y-033957X0236Y0000R000S3
327PUMP3 R16 -1 A01X+050315Y-036073X0315Y0374R270S2
327NET-(Q3-G) R16 -2 A01X+050315Y-035423X0315Y0374R270S2
327NET-(Q3-G) Q3 -1 A01X+049621Y-035984X0354Y0315R180S2
327GND Q3 -2 A01X+049621Y-035236X0354Y0315R180S2
327-(PUMP3-PIN_1) Q3 -3 A01X+048834Y-035610X0354Y0315R180S2
327NET-(Q5-G) Q5 -1 A01X+058297Y-035984X0354Y0315R180S2
327GND Q5 -2 A01X+058297Y-035236X0354Y0315R180S2
327-(PUMP5-PIN_1) Q5 -3 A01X+057510Y-035610X0354Y0315R180S2
327NET-(Q1-G) Q1 -1 A01X+041132Y-035984X0354Y0315R180S2
327GND Q1 -2 A01X+041132Y-035236X0354Y0315R180S2
327-(PUMP1-PIN_1) Q1 -3 A01X+040344Y-035610X0354Y0315R180S2
317-(PUMP8-PIN_1) PUMP8 -1 D0394PA00X+069503Y-037362X0669Y0787R000S0
317VCC PUMP8 -2 D0394PA00X+070487Y-037362X0669Y0787R000S0
317-(PUMP7-PIN_1) PUMP7 -1 D0394PA00X+065172Y-037382X0669Y0787R000S0
317VCC PUMP7 -2 D0394PA00X+066156Y-037382X0669Y0787R000S0
327NET-(Q6-G) Q6 -1 A01X+062613Y-035984X0354Y0315R180S2
327GND Q6 -2 A01X+062613Y-035236X0354Y0315R180S2
327-(PUMP6-PIN_1) Q6 -3 A01X+061826Y-035610X0354Y0315R180S2
327PUMP8 R19 -1 A01X+071969Y-036033X0315Y0374R270S2
327NET-(Q8-G) R19 -2 A01X+071969Y-035384X0315Y0374R270S2
327NET-(Q5-G) R10 -1 A01X+058041Y-033898X0315Y0374R180S2
327GND R10 -2 A01X+057392Y-033898X0315Y0374R180S2
327T-(P_FAULT1-K) P_FAUL-1 A01X+058504Y-033164X0384Y0551R270S2
327T-(P_FAULT5-A) P_FAUL-2 A01X+058504Y-032426X0384Y0551R270S2
327NET-(Q6-G) R11 -1 A01X+062333Y-033898X0315Y0374R180S2
327GND R11 -2 A01X+061683Y-033898X0315Y0374R180S2
327-(PUMP6-PIN_1) PUMP_D-1 A01X+061811Y-033164X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+061811Y-032426X0384Y0551R270S2
327PUMP6 R21 -1 A01X+063484Y-037234X0315Y0374R270S2
327NET-(Q6-G) R21 -2 A01X+063484Y-036585X0315Y0374R270S2
327-(PUMP2-PIN_1) PUMP_D-1 A01X+044660Y-033204X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+044660Y-032466X0384Y0551R270S2
327PUMP1 R14 -1 A01X+041890Y-036073X0315Y0374R270S2
327NET-(Q1-G) R14 -2 A01X+041890Y-035423X0315Y0374R270S2
327NET-(Q2-G) R7 -1 A01X+045167Y-033898X0315Y0374R180S2
327GND R7 -2 A01X+044518Y-033898X0315Y0374R180S2
327T-(P_FAULT1-K) P_FAUL-1 A01X+054173Y-033164X0384Y0551R270S2
327T-(P_FAULT4-A) P_FAUL-2 A01X+054173Y-032426X0384Y0551R270S2
327NET-(Q7-G) R12 -1 A01X+066663Y-033937X0315Y0374R180S2
327GND R12 -2 A01X+066014Y-033937X0315Y0374R180S2
327NET-(Q4-G) Q4 -1 A01X+053967Y-035984X0354Y0315R180S2
327GND Q4 -2 A01X+053967Y-035236X0354Y0315R180S2
327-(PUMP4-PIN_1) Q4 -3 A01X+053179Y-035610X0354Y0315R180S2
327-(PUMP5-PIN_1) PUMP_D-1 A01X+057520Y-033164X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+057520Y-032426X0384Y0551R270S2
327GND C3 -1 A01X+067913Y-034099X0423Y0374R270S2
3273_3V C3 -2 A01X+067913Y-033420X0423Y0374R270S2
327NET-(U2-IN+) U2 -1 A01X+069380Y-033159X0522Y0197R090S2
327NET-(U2-IN-) U2 -2 A01X+069124Y-033159X0522Y0197R090S2
327GND U2 -3 A01X+068868Y-033159X0522Y0197R090S2
3273_3V U2 -4 A01X+068612Y-033159X0522Y0197R090S2
327SCL U2 -5 A01X+068612Y-034055X0522Y0197R090S2
327SDA U2 -6 A01X+068868Y-034055X0522Y0197R090S2
327GND U2 -7 A01X+069124Y-034055X0522Y0197R090S2
327SDA U2 -8 A01X+069380Y-034055X0522Y0197R090S2
327-(PUMP8-PIN_1) PUMP_D-1 A01X+070472Y-033204X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+070472Y-032466X0384Y0551R270S2
327-(PUMP1-PIN_1) PUMP_D-1 A01X+040463Y-033204X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+040463Y-032466X0384Y0551R270S2
317GND U1 -1 D0394PA00X+076024Y-031181X0669Y0669R090S0
317GND U1 -2 D0394PA00X+076181Y-039173X0669Y0669R000S0
317GND U1 -3 D0394PA00X+037933Y-039173X0669Y0669R000S0
317GND U1 -4 D0394PA00X+037933Y-031004X0669Y0669R000S0
317SCL U1 -5 D0394PA00X+075024Y-031181X0669Y0669R090S0
317SDA U1 -6 D0394PA00X+074024Y-031181X0669Y0669R090S0
3173_3V U1 -7 D0394PA00X+073024Y-031181X0669Y0669R090S0
317VBAT U1 -8 D0394PA00X+072024Y-031181X0669Y0669R090S0
3273-~{INT}-PAD1) U3 -1 A01X+072726Y-036260X0689Y0177R270S2
327GND U3 -2 A01X+072982Y-036260X0689Y0177R270S2
327GND U3 -3 A01X+073238Y-036260X0689Y0177R270S2
327PUMP1 U3 -4 A01X+073494Y-036260X0689Y0177R270S2
327PUMP2 U3 -5 A01X+073750Y-036260X0689Y0177R270S2
327PUMP3 U3 -6 A01X+074006Y-036260X0689Y0177R270S2
327PUMP4 U3 -7 A01X+074262Y-036260X0689Y0177R270S2
327PUMP5 U3 -8 A01X+074518Y-036260X0689Y0177R270S2
327PUMP6 U3 -9 A01X+074774Y-036260X0689Y0177R270S2
327PUMP7 U3 -10 A01X+075030Y-036260X0689Y0177R270S2
327PUMP8 U3 -11 A01X+075285Y-036260X0689Y0177R270S2
327GND U3 -12 A01X+075541Y-036260X0689Y0177R270S2
327T-(P_FAULT1-A) U3 -13 A01X+075541Y-033425X0689Y0177R270S2
327T-(P_FAULT2-A) U3 -14 A01X+075285Y-033425X0689Y0177R270S2
327T-(P_FAULT3-A) U3 -15 A01X+075030Y-033425X0689Y0177R270S2
327T-(P_FAULT4-A) U3 -16 A01X+074774Y-033425X0689Y0177R270S2
327T-(P_FAULT5-A) U3 -17 A01X+074518Y-033425X0689Y0177R270S2
327T-(P_FAULT6-A) U3 -18 A01X+074262Y-033425X0689Y0177R270S2
327T-(P_FAULT7-A) U3 -19 A01X+074006Y-033425X0689Y0177R270S2
327T-(P_FAULT8-A) U3 -20 A01X+073750Y-033425X0689Y0177R270S2
327GND U3 -21 A01X+073494Y-033425X0689Y0177R270S2
327SCL U3 -22 A01X+073238Y-033425X0689Y0177R270S2
327SDA U3 -23 A01X+072982Y-033425X0689Y0177R270S2
3273_3V U3 -24 A01X+072726Y-033425X0689Y0177R270S2
327VBAT R1 -1 A01X+070073Y-031148X0902Y0799R180S2
327NET-(R1-PAD2) R1 -2 A01X+070248Y-031898X0551Y0299R180S2
327NET-(R1-PAD3) R1 -3 A01X+067547Y-031898X0551Y0299R180S2
327VCC R1 -4 A01X+067722Y-031148X0902Y0799R180S2
317-(PUMP5-PIN_1) PUMP5 -1 D0394PA00X+056526Y-037382X0669Y0787R000S0
317VCC PUMP5 -2 D0394PA00X+057510Y-037382X0669Y0787R000S0
327-(PUMP3-PIN_1) PUMP_D-1 A01X+048819Y-033164X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+048819Y-032426X0384Y0551R270S2
327PUMP7 R20 -1 A01X+067638Y-037175X0315Y0374R270S2
327NET-(Q7-G) R20 -2 A01X+067638Y-036526X0315Y0374R270S2
327T-(P_FAULT1-K) P_FAUL-1 A01X+067141Y-033204X0384Y0551R270S2
327T-(P_FAULT7-A) P_FAUL-2 A01X+067141Y-032466X0384Y0551R270S2
317-(PUMP6-PIN_1) PUMP6 -1 D0394PA00X+060842Y-037382X0669Y0787R000S0
317VCC PUMP6 -2 D0394PA00X+061826Y-037382X0669Y0787R000S0
327VCC C2 -1 A01X+055709Y-033858X0463Y0571R000S2
327GND C2 -2 A01X+056526Y-033858X0463Y0571R000S2
327NET-(R1-PAD2) R3 -1 A01X+069783Y-032480X0315Y0374R180S2
327NET-(U2-IN+) R3 -2 A01X+069134Y-032480X0315Y0374R180S2
327NET-(U2-IN-) R2 -1 A01X+068533Y-032480X0315Y0374R180S2
327NET-(R1-PAD3) R2 -2 A01X+067884Y-032480X0315Y0374R180S2
327-(PUMP7-PIN_1) PUMP_D-1 A01X+066156Y-033204X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+066156Y-032466X0384Y0551R270S2
327NET-(Q2-G) Q2 -1 A01X+045354Y-036024X0354Y0315R180S2
327GND Q2 -2 A01X+045354Y-035276X0354Y0315R180S2
327-(PUMP2-PIN_1) Q2 -3 A01X+044567Y-035650X0354Y0315R180S2
327T-(P_FAULT1-K) P_FAUL-1 A01X+045645Y-033204X0384Y0551R270S2
327T-(P_FAULT2-A) P_FAUL-2 A01X+045645Y-032466X0384Y0551R270S2
327GND D3 -1 A01X+047062Y-035236X0581Y0236R000S2
327VCC D3 -2 A01X+047062Y-035984X0581Y0236R000S2
327-(PUMP3-PIN_1) D3 -3 A01X+047800Y-035610X0581Y0236R000S2
327GND D6 -1 A01X+060054Y-035217X0581Y0236R000S2
327VCC D6 -2 A01X+060054Y-035965X0581Y0236R000S2
327-(PUMP6-PIN_1) D6 -3 A01X+060792Y-035591X0581Y0236R000S2
327T-(P_FAULT1-K) P_FAUL-1 A01X+049764Y-033164X0384Y0551R270S2
327T-(P_FAULT3-A) P_FAUL-2 A01X+049764Y-032426X0384Y0551R270S2
327T-(P_FAULT1-K) P_FAUL-1 A01X+062795Y-033164X0384Y0551R270S2
327T-(P_FAULT6-A) P_FAUL-2 A01X+062795Y-032426X0384Y0551R270S2
317-(PUMP3-PIN_1) PUMP3 -1 D0394PA00X+047849Y-037382X0669Y0787R000S0
317VCC PUMP3 -2 D0394PA00X+048834Y-037382X0669Y0787R000S0
327GND C1 -1 A01X+072200Y-032382X0423Y0374R000S2
3273_3V C1 -2 A01X+072879Y-032382X0423Y0374R000S2
327NET-(Q8-G) R13 -1 A01X+070994Y-033937X0315Y0374R180S2
327GND R13 -2 A01X+070344Y-033937X0315Y0374R180S2
327GND D2 -1 A01X+042913Y-035256X0581Y0236R000S2
327VCC D2 -2 A01X+042913Y-036004X0581Y0236R000S2
327-(PUMP2-PIN_1) D2 -3 A01X+043652Y-035630X0581Y0236R000S2
327VCC R5 -1 A01X+038189Y-033120X0315Y0374R270S2
3275K_VBAT R5 -2 A01X+038189Y-032470X0315Y0374R270S2
327GND D5 -1 A01X+055738Y-035236X0581Y0236R000S2
327VCC D5 -2 A01X+055738Y-035984X0581Y0236R000S2
327-(PUMP5-PIN_1) D5 -3 A01X+056476Y-035610X0581Y0236R000S2
327PUMP4 R17 -1 A01X+054646Y-036073X0315Y0374R270S2
327NET-(Q4-G) R17 -2 A01X+054646Y-035423X0315Y0374R270S2
317-(PUMP2-PIN_1) PUMP2 -1 D0394PA00X+043676Y-037382X0669Y0787R000S0
317VCC PUMP2 -2 D0394PA00X+044660Y-037382X0669Y0787R000S0
327T-(P_FAULT1-K) P_FAUL-1 A01X+041447Y-033204X0384Y0551R270S2
327T-(P_FAULT1-A) P_FAUL-2 A01X+041447Y-032466X0384Y0551R270S2
327PUMP5 R18 -1 A01X+058976Y-036073X0315Y0374R270S2
327NET-(Q5-G) R18 -2 A01X+058976Y-035423X0315Y0374R270S2
327GND D1 -1 A01X+038691Y-035256X0581Y0236R000S2
327VCC D1 -2 A01X+038691Y-036004X0581Y0236R000S2
327-(PUMP1-PIN_1) D1 -3 A01X+039429Y-035630X0581Y0236R000S2
327-(PUMP4-PIN_1) PUMP_D-1 A01X+053189Y-033164X0384Y0551R270S2
3275K_VBAT PUMP_D-2 A01X+053189Y-032426X0384Y0551R270S2
327NET-(Q8-G) Q8 -1 A01X+071275Y-035965X0354Y0315R180S2
327GND Q8 -2 A01X+071275Y-035217X0354Y0315R180S2
327-(PUMP8-PIN_1) Q8 -3 A01X+070487Y-035591X0354Y0315R180S2
327GND D4 -1 A01X+051407Y-035236X0581Y0236R000S2
327VCC D4 -2 A01X+051407Y-035984X0581Y0236R000S2
327-(PUMP4-PIN_1) D4 -3 A01X+052146Y-035610X0581Y0236R000S2
317-(PUMP1-PIN_1) PUMP1 -1 D0394PA00X+039478Y-037402X0669Y0787R000S0
317VCC PUMP1 -2 D0394PA00X+040463Y-037402X0669Y0787R000S0
327T-(P_FAULT1-K) P_FAUL-1 A01X+071417Y-033204X0384Y0551R270S2
327T-(P_FAULT8-A) P_FAUL-2 A01X+071417Y-032466X0384Y0551R270S2
327GND R4 -1 A01X+042884Y-032677X0315Y0374R180S2
327T-(P_FAULT1-K) R4 -2 A01X+042234Y-032677X0315Y0374R180S2
327PUMP2 R15 -1 A01X+046063Y-036112X0315Y0374R270S2
327NET-(Q2-G) R15 -2 A01X+046063Y-035463X0315Y0374R270S2
317-(PUMP4-PIN_1) PUMP4 -1 D0394PA00X+052195Y-037382X0669Y0787R000S0
317VCC PUMP4 -2 D0394PA00X+053179Y-037382X0669Y0787R000S0
327NET-(Q3-G) R8 -1 A01X+049350Y-033858X0315Y0374R180S2
327GND R8 -2 A01X+048701Y-033858X0315Y0374R180S2
327NET-(Q1-G) R6 -1 A01X+040955Y-033858X0315Y0374R180S2
327GND R6 -2 A01X+040305Y-033858X0315Y0374R180S2
327NET-(Q7-G) Q7 -1 A01X+066944Y-035984X0354Y0315R180S2
327GND Q7 -2 A01X+066944Y-035236X0354Y0315R180S2
327-(PUMP7-PIN_1) Q7 -3 A01X+066156Y-035610X0354Y0315R180S2
327GND D7 -1 A01X+064385Y-035236X0581Y0236R000S2
327VCC D7 -2 A01X+064385Y-035984X0581Y0236R000S2
327-(PUMP7-PIN_1) D7 -3 A01X+065123Y-035610X0581Y0236R000S2
327GND D8 -1 A01X+068716Y-035236X0581Y0236R000S2
327VCC D8 -2 A01X+068716Y-035984X0581Y0236R000S2
327-(PUMP8-PIN_1) D8 -3 A01X+069454Y-035610X0581Y0236R000S2
327NET-(Q4-G) R9 -1 A01X+053711Y-033898X0315Y0374R180S2
327GND R9 -2 A01X+053061Y-033898X0315Y0374R180S2
999

View File

@ -0,0 +1,5 @@
(sym_lib_table
(version 7)
(lib (name "Modules")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/modules/Modules.kicad_sym")(options "")(descr ""))
(lib (name "ESP32-C6-WROOM-1-N8")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/esp32c6/ESP32-C6-WROOM-1-N8.kicad_sym")(options "")(descr ""))
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,136 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
"pads": 1.0,
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
"vias",
"footprint_text",
"footprint_anchors",
"ratsnest",
"grid",
"footprints_front",
"footprints_back",
"footprint_values",
"footprint_references",
"tracks",
"drc_errors",
"drawing_sheet",
"bitmaps",
"pads",
"zones",
"drc_warnings",
"locked_item_shadows",
"conflict_shadows",
"shapes"
],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff",
"zone_display_mode": 1
},
"git": {
"repo_type": "",
"repo_username": "",
"ssh_key": ""
},
"meta": {
"filename": "Sensors.kicad_prl",
"version": 5
},
"net_inspector_panel": {
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
"filter_by_netclass": true,
"filter_text": "",
"group_by_constraint": false,
"group_by_netclass": false,
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": 0
},
"open_jobsets": [],
"project": {
"files": []
},
"schematic": {
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
}
}
}

View File

@ -0,0 +1,687 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.8,
"height": 1.27,
"width": 2.54
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [
[
"silk_over_copper|98836040|49235000|02eec4a9-10aa-4ffd-acfb-ce06a25de154|00000000-0000-0000-0000-000000000000",
""
],
[
"silk_over_copper|98836040|49235000|1e5edd9f-7842-4f7f-b4f4-7be08845a9d9|00000000-0000-0000-0000-000000000000",
""
],
[
"silk_over_copper|98836040|49235000|a2ae2bdf-d2ce-446d-9eca-7a31fd18eea4|00000000-0000-0000-0000-000000000000",
""
]
],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "ignore",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "warning",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.15,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.15,
"min_track_width": 0.0,
"min_via_annular_width": 0.05,
"min_via_diameter": 0.25,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
0.1,
0.2,
0.5
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
},
{
"diameter": 0.25,
"drill": 0.15
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "Sensors.kicad_pro",
"version": 3
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.15,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2,
"via_diameter": 0.6,
"via_drill": 0.3,
"wire_width": 6
}
],
"meta": {
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "Sensors.step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": true,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
},
{
"group_by": false,
"label": "Description",
"name": "Description",
"show": false
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": false,
"label": "#",
"name": "${ITEM_NUMBER}",
"show": false
},
{
"group_by": false,
"label": "LCSC_PART_NUMBER",
"name": "LCSC_PART_NUMBER",
"show": false
},
{
"group_by": false,
"label": "Sim.Device",
"name": "Sim.Device",
"show": false
},
{
"group_by": false,
"label": "Sim.Pins",
"name": "Sim.Pins",
"show": false
},
{
"group_by": false,
"label": "Sim.Type",
"name": "Sim.Type",
"show": false
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": true,
"label": "Exclude from BOM",
"name": "${EXCLUDE_FROM_BOM}",
"show": true
},
{
"group_by": true,
"label": "Exclude from Board",
"name": "${EXCLUDE_FROM_BOARD}",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": true,
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"46346c04-8bed-48b4-837b-9342dd403232",
"Root"
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
(fp_lib_table
(version 7)
(lib (name "kicad-stuff")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/kicad-stuff")(options "")(descr ""))
(lib (name "Sensor")(type "KiCad")(uri "${KIPRJMOD}/Sensor.pretty")(options "")(descr ""))
)

View File

@ -0,0 +1,4 @@
(sym_lib_table
(version 7)
(lib (name "Modules")(type "KiCad")(uri "/home/empire/workspace/PlantCtrl/board/modules/Modules.kicad_sym")(options "")(descr ""))
)

View File

@ -10,4 +10,6 @@
(lib (name "BQ34Z100PWR-G1")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/BQ34Z100PWR-G1.kicad_sym")(options "")(descr ""))
(lib (name "ESP32-C6-WROOM-1-N8")(type "KiCad")(uri "${KIPRJMOD}/esp32c6/ESP32-C6-WROOM-1-N8.kicad_sym")(options "")(descr ""))
(lib (name "easyeda2kicad")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/easyeda2kicad.kicad_sym")(options "")(descr ""))
(lib (name "Modules")(type "KiCad")(uri "${KIPRJMOD}/modules/Modules.kicad_sym")(options "")(descr ""))
(lib (name "MPPT")(type "KiCad")(uri "${KIPRJMOD}/modules/MPPT/MPPT.kicad_sym")(options "")(descr ""))
)

1
rust/.idea/vcs.xml generated
View File

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$/../website/themes/blowfish" vcs="Git" />
</component>
</project>

View File

@ -63,21 +63,17 @@ one-wire-bus = "0.1.1"
ds323x = "0.6.0"
#pure code dependencies
log = { version = "0.4", default-features = false }
once_cell = "1.19.0"
anyhow = { version = "1.0.75", features = ["std", "backtrace"] }
average = { version = "0.14.1" , features = ["std"] }
bit_field = "0.10.2"
strum = { version = "0.27.0", features = ["derive"] }
measurements = "0.11.0"
schemars = "0.8.16"
#json
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"
#timezone
chrono = { version = "0.4.23", default-features = false , features = ["iana-time-zone" , "alloc", "serde"] }
chrono = { version = "0.4.23", default-features = false , features = ["iana-time-zone" , "alloc"] }
chrono-tz = {version="0.8.0", default-features = false , features = [ "filter-by-regex" ]}
eeprom24x = "0.7.2"
url = "2.5.3"

View File

@ -3,39 +3,39 @@ use std::process::Command;
use vergen::EmitBuilder;
fn main() {
println!("cargo:rerun-if-changed=./src/src_webpack");
Command::new("rm")
.arg("./src/webserver/bundle.js")
.output()
.unwrap();
match Command::new("cmd").spawn() {
Ok(_) => {
println!("Assuming build on windows");
let output = Command::new("cmd")
.arg("/K")
.arg("npx")
.arg("webpack")
.current_dir("./src_webpack")
.output()
.unwrap();
println!("status: {}", output.status);
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
assert!(output.status.success());
}
Err(_) => {
println!("Assuming build on linux");
let output = Command::new("npx")
.arg("webpack")
.current_dir("./src_webpack")
.output()
.unwrap();
println!("status: {}", output.status);
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
assert!(output.status.success());
}
Command::new("rm")
.arg("./src/webserver/bundle.js")
.output()
.unwrap();
match Command::new("cmd").spawn() {
Ok(_) => {
println!("Assuming build on windows");
let output = Command::new("cmd")
.arg("/K")
.arg("npx")
.arg("webpack")
.current_dir("./src_webpack")
.output()
.unwrap();
println!("status: {}", output.status);
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
assert!(output.status.success());
}
Err(_) => {
println!("Assuming build on linux");
let output = Command::new("npx")
.arg("webpack")
.current_dir("./src_webpack")
.output()
.unwrap();
println!("status: {}", output.status);
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
assert!(output.status.success());
}
}
embuild::espidf::sysenv::output();
let _ = EmitBuilder::builder().all_git().all_build().emit();

View File

@ -1,8 +1,8 @@
use std::str::FromStr;
use chrono_tz::{Europe::Berlin, Tz};
use serde::{Deserialize, Serialize};
use crate::plant_state::PlantWateringMode;
use crate::PLANT_COUNT;
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
@ -13,6 +13,7 @@ pub struct NetworkConfig {
pub password: Option<heapless::String<64>>,
pub mqtt_url: Option<heapless::String<128>>,
pub base_topic: Option<heapless::String<64>>,
pub timezone: heapless::String<64>,
}
impl Default for NetworkConfig {
fn default() -> Self {
@ -22,6 +23,7 @@ impl Default for NetworkConfig {
password: None,
mqtt_url: None,
base_topic: None,
timezone: heapless::String::from_str("Europe/Berlin").unwrap(),
}
}
}
@ -84,28 +86,34 @@ pub struct PlantControllerConfig {
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(default)]
pub struct PlantConfig {
pub mode: PlantWateringMode,
pub target_moisture: f32,
pub mode: Mode,
pub target_moisture: u8,
pub pump_time_s: u16,
pub pump_cooldown_min: u16,
pub pump_hour_start: u8,
pub pump_hour_end: u8,
pub sensor_a: bool,
pub sensor_b: bool,
pub max_consecutive_pump_count: u8,
}
impl Default for PlantConfig {
fn default() -> Self {
Self {
mode: PlantWateringMode::OFF,
target_moisture: 40.,
mode: Mode::OFF,
target_moisture: 40,
pump_time_s: 30,
pump_cooldown_min: 60,
pump_hour_start: 9,
pump_hour_end: 20,
sensor_a: true,
sensor_b: false,
max_consecutive_pump_count: 10,
}
}
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum Mode {
OFF,
TargetMoisture,
TimerOnly,
TimerAndDeadzone,
}

View File

@ -4,9 +4,10 @@ use std::{
};
use anyhow::{bail, Result};
use chrono::{DateTime, Datelike, Timelike};
use chrono::{DateTime, Datelike, TimeDelta, Timelike, Utc};
use chrono_tz::{Europe::Berlin, Tz};
use config::Mode;
use esp_idf_hal::delay::Delay;
use esp_idf_sys::{
esp_ota_get_app_partition_count, esp_ota_get_running_partition, esp_ota_get_state_partition,
@ -25,14 +26,18 @@ use crate::{config::PlantControllerConfig, webserver::webserver::httpd};
mod config;
mod log;
pub mod plant_hal;
mod plant_state;
mod tank;
pub mod util;
use plant_state::PlantState;
use tank::*;
const TIME_ZONE: Tz = Berlin;
const MOIST_SENSOR_MAX_FREQUENCY: u32 = 6500; // 60kHz (500Hz margin)
const MOIST_SENSOR_MIN_FREQUENCY: u32 = 150; // this is really really dry, think like cactus levels
const FROM: (f32, f32) = (
MOIST_SENSOR_MIN_FREQUENCY as f32,
MOIST_SENSOR_MAX_FREQUENCY as f32,
);
const TO: (f32, f32) = (0_f32, 100_f32);
pub static BOARD_ACCESS: Lazy<Mutex<PlantCtrlBoard>> = Lazy::new(|| PlantHal::create().unwrap());
pub static STAY_ALIVE: Lazy<AtomicBool> = Lazy::new(|| AtomicBool::new(false));
@ -73,6 +78,46 @@ struct LightState {
is_day: bool,
}
#[derive(Debug, PartialEq, Default)]
/// State of a single plant to be tracked
///
/// TODO can some state be replaced with functions
/// TODO unify with PlantStateMQTT
struct PlantState {
/// state of humidity sensor on bank a
a: Option<u8>,
/// raw measured frequency value for sensor on bank a in hertz
a_raw: Option<u32>,
/// state of humidity sensor on bank b
b: Option<u8>,
/// raw measured frequency value for sensor on bank b in hertz
b_raw: Option<u32>,
/// how often has the logic determined that plant should have been irrigated but wasn't
consecutive_pump_count: u32,
/// plant needs to be watered
do_water: bool,
/// is plant considerd to be dry according to settings
dry: bool,
/// is pump currently running
active: bool,
/// TODO: convert this to an Option<PumpErorr> enum for every case that can happen
pump_error: bool,
/// if pump count has increased higher than configured limit
not_effective: bool,
/// plant irrigation cooldown is active
cooldown: bool,
/// we want to irrigate but tank is empty
no_water: bool,
///TODO: combine with field a using Result
sensor_error_a: Option<SensorError>,
///TODO: combine with field b using Result
sensor_error_b: Option<SensorError>,
/// pump should not be watered at this time of day
out_of_work_hour: bool,
/// next time when pump should activate
next_pump: Option<DateTime<Tz>>,
}
#[derive(Serialize, Deserialize, Debug, PartialEq)]
/// humidity sensor error
enum SensorError {
@ -81,6 +126,24 @@ enum SensorError {
OpenCircuit { hz: f32, min: f32 },
}
#[derive(Serialize)]
struct PlantStateMQTT<'a> {
a: &'a str,
a_raw: &'a str,
b: &'a str,
b_raw: &'a str,
mode: &'a str,
consecutive_pump_count: u32,
dry: bool,
active: bool,
pump_error: bool,
not_effective: bool,
cooldown: bool,
out_of_work_hour: bool,
last_pump: &'a str,
next_pump: &'a str,
}
fn safe_main() -> anyhow::Result<()> {
// It is necessary to call this function once. Otherwise some patches to the runtime
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
@ -280,11 +343,14 @@ fn safe_main() -> anyhow::Result<()> {
}
}
let timezone_time = cur.with_timezone(&TIME_ZONE);
let time_zone_string: String = config.network.timezone.to_string();
let time_zone = time_zone_string.parse::<Tz>().unwrap_or(Tz::UTC);
let timezone_time = cur.with_timezone(&time_zone);
println!(
"Running logic at utc {} and {} {}",
cur,
TIME_ZONE.name(),
time_zone.name(),
timezone_time
);
@ -406,70 +472,61 @@ fn safe_main() -> anyhow::Result<()> {
}
};
let plantstate: [PlantState; PLANT_COUNT] =
core::array::from_fn(|i| PlantState::read_hardware_state(i, &mut board, &config.plants[i]));
for (plant_id, (plant_state, plant_conf)) in plantstate.iter().zip(&config.plants).enumerate() {
match serde_json::to_string(&plant_state.to_mqtt_info(plant_conf, &timezone_time)) {
Ok(state) => {
let plant_topic = format!("/plant{}", plant_id + 1);
let _ = board.mqtt_publish(&config, &plant_topic, state.as_bytes());
//reduce speed as else messages will be dropped
Delay::new_default().delay_ms(200);
}
Err(err) => {
println!("Error publishing plant state {}", err);
}
};
}
let mut plantstate: [PlantState; PLANT_COUNT] = core::array::from_fn(|_| PlantState {
..Default::default()
});
determine_plant_state(
&mut plantstate,
timezone_time,
&tank_state,
&config,
&mut board,
);
let pump_required = plantstate
.iter()
.zip(&config.plants)
.any(|(it, conf)| it.needs_to_be_watered(&conf, &timezone_time))
&& !water_frozen;
let pump_required = plantstate.iter().any(|it| it.do_water) && !water_frozen;
if pump_required {
log(log::LogMessage::EnableMain, dry_run as u32, 0, "", "");
if !dry_run {
board.any_pump(true)?; // what does this do? Does it need to be reset?
board.any_pump(true)?;
}
for (plant_id, (state, plant_config)) in plantstate.iter().zip(&config.plants).enumerate() {
if state.needs_to_be_watered(&plant_config, &timezone_time) {
let pump_count = board.consecutive_pump_count(plant_id) + 1;
board.store_consecutive_pump_count(plant_id, pump_count);
//TODO(judge) where to put this?
//if state.consecutive_pump_count > plant_config.max_consecutive_pump_count as u32 {
// log(
// log::LogMessage::ConsecutivePumpCountLimit,
// state.consecutive_pump_count as u32,
// plant_config.max_consecutive_pump_count as u32,
// &plant.to_string(),
// "",
// );
// state.not_effective = true;
// board.fault(plant, true);
//}
for plant in 0..PLANT_COUNT {
let state = &mut plantstate[plant];
if state.do_water {
let plant_config = &config.plants[plant];
state.consecutive_pump_count = board.consecutive_pump_count(plant) + 1;
board.store_consecutive_pump_count(plant, state.consecutive_pump_count);
if state.consecutive_pump_count > plant_config.max_consecutive_pump_count as u32 {
log(
log::LogMessage::ConsecutivePumpCountLimit,
state.consecutive_pump_count as u32,
plant_config.max_consecutive_pump_count as u32,
&plant.to_string(),
"",
);
state.not_effective = true;
board.fault(plant, true);
}
log(
log::LogMessage::PumpPlant,
(plant_id + 1) as u32,
(plant + 1) as u32,
plant_config.pump_time_s as u32,
&dry_run.to_string(),
"",
);
board.store_last_pump_time(plant_id, cur);
board.last_pump_time(plant_id);
//state.active = true;
board.store_last_pump_time(plant, cur);
board.last_pump_time(plant);
state.active = true;
if !dry_run {
board.pump(plant_id, true)?;
Delay::new_default().delay_ms(1000 * plant_config.pump_time_s as u32);
board.pump(plant_id, false)?;
board.pump(plant, true)?;
for _ in 0..plant_config.pump_time_s {
Delay::new_default().delay_ms(1000);
}
board.pump(plant, false)?;
}
} else if !state.pump_in_timeout(&plant_config, &timezone_time) {
// plant does not need to be watered and is not in timeout
// -> reset consecutive pump count
board.store_consecutive_pump_count(plant_id, 0);
}
}
}
update_plant_state(&mut plantstate, &mut board, &config, &timezone_time.timezone());
let is_day = board.is_day();
let state_of_charge = board.state_charge_percent().unwrap_or(0);
@ -577,8 +634,284 @@ fn publish_battery_state(
};
}
fn determine_state_target_moisture_for_plant(
board: &mut std::sync::MutexGuard<'_, PlantCtrlBoard<'_>>,
plant: usize,
state: &mut PlantState,
config: &PlantControllerConfig,
tank_state: &TankState,
cur: DateTime<Tz>,
) {
let plant_config = &config.plants[plant];
if plant_config.mode == Mode::OFF {
return;
}
match board.measure_moisture_hz(plant, plant_hal::Sensor::A) {
Ok(a) => {
state.a_raw = Some(a);
let mapped = map_range_moisture(a as f32);
match mapped {
Ok(result) => state.a = Some(result),
Err(err) => {
state.sensor_error_a = Some(err);
}
}
}
Err(_) => {
state.sensor_error_a = Some(SensorError::Unknown);
}
}
if plant_config.sensor_b {
match board.measure_moisture_hz(plant, plant_hal::Sensor::B) {
Ok(b) => {
state.b_raw = Some(b);
let mapped = map_range_moisture(b as f32);
match mapped {
Ok(result) => state.b = Some(result),
Err(err) => {
state.sensor_error_b = Some(err);
}
}
}
Err(_) => {
state.sensor_error_b = Some(SensorError::Unknown);
}
}
}
//FIXME how to average analyze whatever?
let a_low = state.a.is_some() && state.a.unwrap() < plant_config.target_moisture;
let b_low = state.b.is_some() && state.b.unwrap() < plant_config.target_moisture;
if a_low || b_low {
state.dry = true;
match tank_state.enough_water(&config.tank) {
Err(_tank_err) => {
if !config.tank.tank_allow_pumping_if_sensor_error {
state.no_water = true;
}
}
// when no tank error, if plant should be watered depends on if enough water is in tank
// no_water behaves inversly to enough_water
Ok(enough_water) => state.no_water = !enough_water,
}
}
let duration = TimeDelta::try_minutes(plant_config.pump_cooldown_min as i64).unwrap();
let last_pump = board.last_pump_time(plant);
match last_pump {
Some(last_pump) => {
let next_pump = last_pump + duration;
if next_pump > cur {
let local_time = next_pump.with_timezone(&cur.timezone());
state.next_pump = Some(local_time);
state.cooldown = true;
}
}
None => {
println!(
"Could not restore last pump for plant {}, restoring",
plant + 1
);
board.store_last_pump_time(plant, DateTime::from_timestamp_millis(0).unwrap());
state.pump_error = true;
}
}
if !in_time_range(
&cur,
plant_config.pump_hour_start,
plant_config.pump_hour_end,
) {
state.out_of_work_hour = true;
}
if state.dry && !state.no_water && !state.cooldown && !state.out_of_work_hour {
state.do_water = true;
}
}
fn determine_state_timer_only_for_plant(
board: &mut std::sync::MutexGuard<'_, PlantCtrlBoard<'_>>,
plant: usize,
state: &mut PlantState,
config: &PlantControllerConfig,
tank_state: &TankState,
cur: DateTime<Tz>,
) {
let plant_config = &config.plants[plant];
let duration = TimeDelta::try_minutes(plant_config.pump_cooldown_min as i64).unwrap();
let last_pump = board.last_pump_time(plant);
match last_pump {
Some(last_pump) => {
let next_pump = last_pump + duration;
if next_pump > cur {
let europe_time = next_pump.with_timezone(&cur.timezone());
state.next_pump = Some(europe_time);
state.cooldown = true;
} else {
match tank_state.enough_water(&config.tank) {
Err(_tank_err) => {
if !config.tank.tank_allow_pumping_if_sensor_error {
state.do_water = true;
}
}
Ok(enough_water) => {
state.no_water = !enough_water;
}
}
}
}
None => {
println!(
"Could not restore last pump for plant {}, restoring",
plant + 1
);
board.store_last_pump_time(plant, DateTime::from_timestamp_millis(0).unwrap());
state.pump_error = true;
}
}
}
fn determine_state_timer_and_deadzone_for_plant(
board: &mut std::sync::MutexGuard<'_, PlantCtrlBoard<'_>>,
plant: usize,
state: &mut PlantState,
config: &PlantControllerConfig,
tank_state: &TankState,
cur: DateTime<Tz>,
) {
let plant_config = &config.plants[plant];
let duration = TimeDelta::try_minutes(plant_config.pump_cooldown_min as i64).unwrap();
let last_pump = board.last_pump_time(plant);
match last_pump {
Some(last_pump) => {
let next_pump = last_pump + duration;
if next_pump > cur {
let europe_time = next_pump.with_timezone(&cur.timezone());
state.next_pump = Some(europe_time);
state.cooldown = true;
}
if !in_time_range(
&cur,
plant_config.pump_hour_start,
plant_config.pump_hour_end,
) {
state.out_of_work_hour = true;
}
if !state.cooldown && !state.out_of_work_hour {
match tank_state.enough_water(&config.tank) {
Err(_tank_err) => {
if !config.tank.tank_allow_pumping_if_sensor_error {
state.do_water = true;
}
}
Ok(enough_water) => {
state.no_water = !enough_water;
}
}
}
}
None => {
println!(
"Could not restore last pump for plant {}, restoring",
plant + 1
);
board.store_last_pump_time(plant, DateTime::from_timestamp_millis(0).unwrap());
state.pump_error = true;
}
}
}
fn determine_plant_state(
plantstate: &mut [PlantState; PLANT_COUNT],
cur: DateTime<Tz>,
tank_state: &TankState,
config: &PlantControllerConfig,
board: &mut std::sync::MutexGuard<'_, PlantCtrlBoard<'_>>,
) {
for plant in 0..PLANT_COUNT {
let state = &mut plantstate[plant];
let plant_config = &config.plants[plant];
match plant_config.mode {
config::Mode::OFF => {}
config::Mode::TargetMoisture => {
determine_state_target_moisture_for_plant(
board, plant, state, config, tank_state, cur,
);
}
config::Mode::TimerOnly => {
determine_state_timer_only_for_plant(board, plant, state, config, tank_state, cur);
}
config::Mode::TimerAndDeadzone => {
determine_state_timer_and_deadzone_for_plant(
board, plant, state, config, tank_state, cur,
);
}
}
if state.sensor_error_a.is_some() || state.sensor_error_b.is_some() {
board.fault(plant, true);
}
if !state.dry {
state.consecutive_pump_count = 0;
board.store_consecutive_pump_count(plant, 0);
}
println!("Plant {} state is {:?}", plant, state);
}
}
fn update_plant_state(
plantstate: &mut [PlantState; PLANT_COUNT],
board: &mut std::sync::MutexGuard<'_, PlantCtrlBoard<'_>>,
config: &PlantControllerConfig,
timezone: &Tz
) {
for plant in 0..PLANT_COUNT {
let state = &plantstate[plant];
let plant_config = &config.plants[plant];
let mode = format!("{:?}", plant_config.mode);
let plant_dto = PlantStateMQTT {
a: &sensor_to_string(
&state.a,
&state.sensor_error_a,
plant_config.mode != Mode::OFF,
),
a_raw: &state.a_raw.unwrap_or(0).to_string(),
b: &sensor_to_string(&state.b, &state.sensor_error_b, plant_config.sensor_b),
b_raw: &state.b_raw.unwrap_or(0).to_string(),
active: state.active,
mode: &mode,
last_pump: &time_to_string_utc(board.last_pump_time(plant), timezone),
next_pump: &time_to_string(state.next_pump, timezone),
consecutive_pump_count: state.consecutive_pump_count,
cooldown: state.cooldown,
dry: state.dry,
not_effective: state.not_effective,
out_of_work_hour: state.out_of_work_hour,
pump_error: state.pump_error,
};
match serde_json::to_string(&plant_dto) {
Ok(state) => {
let plant_topic = format!("/plant{}", plant + 1);
let _ = board.mqtt_publish(&config, &plant_topic, state.as_bytes());
//reduce speed as else messages will be dropped
Delay::new_default().delay_ms(200);
}
Err(err) => {
println!("Error publishing lightstate {}", err);
}
};
}
}
fn wait_infinity(wait_type: WaitType, reboot_now: Arc<AtomicBool>) -> ! {
let delay = wait_type.blink_pattern();
let mut led_count = 8;
let mut pattern_step = 0;
let mut led_count = 8;
loop {
@ -589,18 +922,41 @@ fn wait_infinity(wait_type: WaitType, reboot_now: Arc<AtomicBool>) -> ! {
};
unsafe {
BOARD_ACCESS.lock().unwrap().update_charge_indicator();
//do not trigger watchdog
for i in 0..8 {
BOARD_ACCESS.lock().unwrap().fault(i, i < led_count);
match wait_type {
WaitType::MissingConfig => {
// Keep existing behavior: circular filling pattern
led_count %= 8;
led_count += 1;
for i in 0..8 {
BOARD_ACCESS.lock().unwrap().fault(i, i < led_count);
}
}
WaitType::ConfigButton => {
// Alternating pattern: 1010 1010 -> 0101 0101
pattern_step = (pattern_step + 1) % 2;
for i in 0..8 {
BOARD_ACCESS.lock().unwrap().fault(i, (i + pattern_step) % 2 == 0);
}
}
WaitType::MqttConfig => {
// Moving dot pattern
pattern_step = (pattern_step + 1) % 8;
for i in 0..8 {
BOARD_ACCESS.lock().unwrap().fault(i, i == pattern_step);
}
}
}
BOARD_ACCESS.lock().unwrap().general_fault(true);
vTaskDelay(delay);
BOARD_ACCESS.lock().unwrap().general_fault(false);
//TODO move locking outside of loop and drop afterwards
// Clear all LEDs
for i in 0..8 {
BOARD_ACCESS.lock().unwrap().fault(i, false);
}
vTaskDelay(delay);
if wait_type == WaitType::MqttConfig {
if !STAY_ALIVE.load(std::sync::atomic::Ordering::Relaxed) {
reboot_now.store(true, std::sync::atomic::Ordering::Relaxed);
@ -615,6 +971,7 @@ fn wait_infinity(wait_type: WaitType, reboot_now: Arc<AtomicBool>) -> ! {
}
}
fn main() {
let result = safe_main();
match result {
@ -634,6 +991,40 @@ fn main() {
}
}
fn time_to_string_utc(value_option: Option<DateTime<Utc>>, timezone: &Tz) -> String {
let converted = value_option.and_then(|utc| Some(utc.with_timezone(timezone)));
return time_to_string(converted, timezone);
}
fn time_to_string(value_option: Option<DateTime<Tz>>, timezone: &Tz) -> String {
match value_option {
Some(value) => {
let europe_time = value.with_timezone(timezone);
if europe_time.year() > 2023 {
return europe_time.to_rfc3339();
} else {
//initial value of 0 in rtc memory
return "N/A".to_owned();
}
}
None => return "N/A".to_owned(),
};
}
fn sensor_to_string(value: &Option<u8>, error: &Option<SensorError>, enabled: bool) -> String {
if enabled {
match error {
Some(error) => return format!("{:?}", error),
None => match value {
Some(v) => return v.to_string(),
None => return "Error".to_owned(),
},
}
} else {
return "disabled".to_owned();
};
}
fn to_string<T: Display>(value: Result<T>) -> String {
return match value {
Ok(v) => v.to_string(),
@ -643,7 +1034,19 @@ fn to_string<T: Display>(value: Result<T>) -> String {
};
}
pub fn in_time_range(cur: &DateTime<Tz>, start: u8, end: u8) -> bool {
fn map_range_moisture(s: f32) -> Result<u8, SensorError> {
if s < FROM.0 {
return Err(SensorError::OpenCircuit { hz: s, min: FROM.0 });
}
if s > FROM.1 {
return Err(SensorError::ShortCircuit { hz: s, max: FROM.1 });
}
let tmp = TO.0 + (s - FROM.0) * (TO.1 - TO.0) / (FROM.1 - FROM.0);
return Ok(tmp as u8);
}
fn in_time_range(cur: &DateTime<Tz>, start: u8, end: u8) -> bool {
let curhour = cur.hour() as u8;
//eg 10-14
if start < end {

View File

@ -603,7 +603,7 @@ impl PlantCtrlBoard<'_> {
self.time()
}
pub fn measure_moisture_hz(&mut self, plant: usize, sensor: Sensor) -> Result<f32> {
pub fn measure_moisture_hz(&mut self, plant: usize, sensor: Sensor) -> Result<u32> {
let sensor_channel = match sensor {
Sensor::A => match plant {
0 => SENSOR_A_1,
@ -629,7 +629,7 @@ impl PlantCtrlBoard<'_> {
},
};
let mut results = [0_f32; REPEAT_MOIST_MEASURE];
let mut results = [0_u32; REPEAT_MOIST_MEASURE];
for repeat in 0..REPEAT_MOIST_MEASURE {
self.signal_counter.counter_pause()?;
self.signal_counter.counter_clear()?;
@ -644,7 +644,7 @@ impl PlantCtrlBoard<'_> {
.unwrap();
let delay = Delay::new_default();
let measurement = 100; // TODO what is this scaling factor? what is its purpose?
let measurement = 100;
let factor = 1000 as f32 / measurement as f32;
//give some time to stabilize
@ -658,7 +658,7 @@ impl PlantCtrlBoard<'_> {
.unwrap();
delay.delay_ms(10);
let unscaled = self.signal_counter.get_counter_value()? as i32;
let hz = unscaled as f32 * factor;
let hz = (unscaled as f32 * factor) as u32;
log(
LogMessage::RawMeasure,
unscaled as u32,
@ -668,7 +668,7 @@ impl PlantCtrlBoard<'_> {
);
results[repeat] = hz;
}
results.sort_by(|a, b| a.partial_cmp(b).unwrap()); // floats don't seem to implement total_ord
results.sort();
let mid = results.len() / 2;

View File

@ -1,296 +0,0 @@
use chrono::{DateTime, TimeDelta, Utc};
use chrono_tz::Tz;
use serde::{Deserialize, Serialize};
use crate::{
config::{self, PlantConfig},
in_time_range, plant_hal,
};
const MOIST_SENSOR_MAX_FREQUENCY: f32 = 5500.; // 60kHz (500Hz margin)
const MOIST_SENSOR_MIN_FREQUENCY: f32 = 150.; // this is really really dry, think like cactus levels
#[derive(Debug, PartialEq, Serialize)]
pub enum MoistureSensorError {
ShortCircuit { hz: f32, max: f32 },
OpenLoop { hz: f32, min: f32 },
BoardError(String),
}
#[derive(Debug, PartialEq, Serialize)]
pub enum MoistureSensorState {
Disabled,
MoistureValue { raw_hz: f32, moisture_percent: f32 },
SensorError(MoistureSensorError),
}
impl MoistureSensorState {
pub fn is_err(&self) -> Option<&MoistureSensorError> {
match self {
MoistureSensorState::SensorError(moisture_sensor_error) => Some(moisture_sensor_error),
_ => None,
}
}
pub fn moisture_percent(&self) -> Option<f32> {
if let MoistureSensorState::MoistureValue {
raw_hz: _,
moisture_percent,
} = self
{
Some(*moisture_percent)
} else {
None
}
}
}
impl MoistureSensorState {}
#[derive(Debug, PartialEq, Serialize)]
pub enum PumpError {
PumpNotWorking {
failed_attempts: usize,
max_allowed_failures: usize,
},
}
#[derive(Debug, Serialize)]
pub struct PumpState {
consecutive_pump_count: u32,
previous_pump: Option<DateTime<Utc>>,
}
impl PumpState {
fn is_err(&self, plant_config: &PlantConfig) -> Option<PumpError> {
if self.consecutive_pump_count > plant_config.max_consecutive_pump_count as u32 {
Some(PumpError::PumpNotWorking {
failed_attempts: self.consecutive_pump_count as usize,
max_allowed_failures: plant_config.max_consecutive_pump_count as usize,
})
} else {
None
}
}
}
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
pub enum PlantWateringMode {
OFF,
TargetMoisture,
TimerOnly,
}
pub struct PlantState {
pub sensor_a: MoistureSensorState,
pub sensor_b: MoistureSensorState,
pub pump: PumpState,
}
fn map_range_moisture(s: f32) -> Result<f32, MoistureSensorError> {
if s < MOIST_SENSOR_MIN_FREQUENCY {
return Err(MoistureSensorError::OpenLoop {
hz: s,
min: MOIST_SENSOR_MIN_FREQUENCY,
});
}
if s > MOIST_SENSOR_MAX_FREQUENCY {
return Err(MoistureSensorError::ShortCircuit {
hz: s,
max: MOIST_SENSOR_MAX_FREQUENCY,
});
}
let moisture_percent = (s - MOIST_SENSOR_MIN_FREQUENCY) * 100.0
/ (MOIST_SENSOR_MAX_FREQUENCY - MOIST_SENSOR_MIN_FREQUENCY);
return Ok(moisture_percent);
}
impl PlantState {
pub fn read_hardware_state(
plant_id: usize,
board: &mut plant_hal::PlantCtrlBoard,
config: &config::PlantConfig,
) -> Self {
let sensor_a = if config.sensor_a {
match board.measure_moisture_hz(plant_id, plant_hal::Sensor::A) {
Ok(raw) => match map_range_moisture(raw) {
Ok(moisture_percent) => MoistureSensorState::MoistureValue {
raw_hz: raw,
moisture_percent,
},
Err(err) => MoistureSensorState::SensorError(err),
},
Err(err) => MoistureSensorState::SensorError(MoistureSensorError::BoardError(
err.to_string(),
)),
}
} else {
MoistureSensorState::Disabled
};
let sensor_b = if config.sensor_b {
match board.measure_moisture_hz(plant_id, plant_hal::Sensor::B) {
Ok(raw) => match map_range_moisture(raw) {
Ok(moisture_percent) => MoistureSensorState::MoistureValue {
raw_hz: raw,
moisture_percent,
},
Err(err) => MoistureSensorState::SensorError(err),
},
Err(err) => MoistureSensorState::SensorError(MoistureSensorError::BoardError(
err.to_string(),
)),
}
} else {
MoistureSensorState::Disabled
};
let previous_pump = board.last_pump_time(plant_id);
let consecutive_pump_count = board.consecutive_pump_count(plant_id);
let state = Self {
sensor_a,
sensor_b,
pump: PumpState {
consecutive_pump_count,
previous_pump,
},
};
if state.is_err() {
board.fault(plant_id, true);
}
state
}
pub fn pump_in_timeout(&self, plant_conf: &PlantConfig, current_time: &DateTime<Tz>) -> bool {
if matches!(plant_conf.mode, PlantWateringMode::OFF) {
return false;
}
self.pump.previous_pump.is_some_and(|last_pump| {
last_pump
.checked_add_signed(TimeDelta::minutes(plant_conf.pump_cooldown_min.into()))
.is_some_and(|earliest_next_allowed_pump| {
earliest_next_allowed_pump > *current_time
})
})
}
pub fn is_err(&self) -> bool {
self.sensor_a.is_err().is_some() || self.sensor_b.is_err().is_some()
}
pub fn plant_moisture(
&self,
) -> (
Option<f32>,
(Option<&MoistureSensorError>, Option<&MoistureSensorError>),
) {
match (
self.sensor_a.moisture_percent(),
self.sensor_b.moisture_percent(),
) {
(Some(moisture_a), Some(moisture_b)) => {
(Some((moisture_a + moisture_b) / 2.), (None, None))
}
(Some(moisture_percent), _) => (Some(moisture_percent), (None, self.sensor_b.is_err())),
(_, Some(moisture_percent)) => (Some(moisture_percent), (self.sensor_a.is_err(), None)),
_ => (None, (self.sensor_a.is_err(), self.sensor_b.is_err())),
}
}
pub fn needs_to_be_watered(
&self,
plant_conf: &PlantConfig,
current_time: &DateTime<Tz>,
) -> bool {
match plant_conf.mode {
PlantWateringMode::OFF => false,
PlantWateringMode::TargetMoisture => {
let (moisture_percent, _) = self.plant_moisture();
if let Some(moisture_percent) = moisture_percent {
if self.pump_in_timeout(plant_conf, current_time) {
false
} else {
if moisture_percent < plant_conf.target_moisture {
true
} else {
false
}
}
} else {
// in case no moisture can be determined do not water plant
return false;
}
}
PlantWateringMode::TimerOnly => {
if self.pump_in_timeout(plant_conf, current_time) {
false
} else {
true
}
}
}
}
pub fn to_mqtt_info(&self, plant_conf: &PlantConfig, current_time: &DateTime<Tz>) -> PlantInfo {
PlantInfo {
sensor_a: &self.sensor_a,
sensor_b: &self.sensor_b,
mode: plant_conf.mode,
do_water: self.needs_to_be_watered(plant_conf, current_time),
dry: if let Some(moisture_percent) = self.plant_moisture().0 {
moisture_percent < plant_conf.target_moisture
} else {
false
},
cooldown: self.pump_in_timeout(plant_conf, current_time),
out_of_work_hour: in_time_range(
current_time,
plant_conf.pump_hour_start,
plant_conf.pump_hour_end,
),
consecutive_pump_count: self.pump.consecutive_pump_count,
pump_error: self.pump.is_err(plant_conf),
last_pump: self
.pump
.previous_pump
.map(|t| t.with_timezone(&current_time.timezone())),
next_pump: if matches!(
plant_conf.mode,
PlantWateringMode::TimerOnly | PlantWateringMode::TargetMoisture
) {
self.pump.previous_pump.and_then(|last_pump| {
last_pump
.checked_add_signed(TimeDelta::minutes(plant_conf.pump_cooldown_min.into()))
.map(|t| t.with_timezone(&current_time.timezone()))
})
} else {
None
},
}
}
}
#[derive(Debug, PartialEq, Serialize)]
/// State of a single plant to be tracked
pub struct PlantInfo<'a> {
/// state of humidity sensor on bank a
sensor_a: &'a MoistureSensorState,
/// state of humidity sensor on bank b
sensor_b: &'a MoistureSensorState,
/// configured plant watering mode
mode: PlantWateringMode,
/// plant needs to be watered
do_water: bool,
/// is plant considerd to be dry according to settings
dry: bool,
/// plant irrigation cooldown is active
cooldown: bool,
/// plant should not be watered at this time of day TODO: does this really belong here? Isn't this a global setting?
out_of_work_hour: bool,
/// how often has the pump been watered without reaching target moisture
consecutive_pump_count: u32,
pump_error: Option<PumpError>,
/// last time when pump was active
last_pump: Option<DateTime<Tz>>,
/// next time when pump should activate
next_pump: Option<DateTime<Tz>>,
}

View File

@ -80,7 +80,7 @@ impl TankState {
}
pub fn is_enabled(&self) -> bool {
matches!(self, TankState::TankSensorDisabled)
! matches!(self, TankState::TankSensorDisabled)
}
pub fn warn_level(&self, config: &TankConfig) -> Result<bool, TankError> {

View File

@ -1,9 +0,0 @@
pub trait LimitPrecision {
fn to_precision(self, presision: i32) -> Self;
}
impl LimitPrecision for f32 {
fn to_precision(self, precision: i32) -> Self {
(self * (10_f32).powi(precision)).round() / (10_f32).powi(precision)
}
}

View File

@ -1,8 +1,8 @@
//offer ota and config mode
use crate::{
determine_tank_state, get_version, log::LogMessage, plant_hal::PLANT_COUNT,
plant_state::PlantState, util::LimitPrecision, BOARD_ACCESS,
determine_tank_state, get_version, log::LogMessage, map_range_moisture, plant_hal::PLANT_COUNT,
BOARD_ACCESS,
};
use anyhow::bail;
use chrono::DateTime;
@ -35,8 +35,8 @@ struct LoadData<'a> {
#[derive(Serialize, Debug)]
struct Moistures {
moisture_a: Vec<Option<f32>>,
moisture_b: Vec<Option<f32>>,
moisture_a: Vec<u8>,
moisture_b: Vec<u8>,
}
#[derive(Deserialize, Debug)]
@ -81,21 +81,33 @@ fn get_live_moisture(
_request: &mut Request<&mut EspHttpConnection>,
) -> Result<Option<std::string::String>, anyhow::Error> {
let mut board = BOARD_ACCESS.lock().unwrap();
let config = board.get_config().unwrap();
let plant_state = Vec::from_iter(
(0..PLANT_COUNT).map(|i| PlantState::read_hardware_state(i, &mut board, &config.plants[i])),
);
let a = Vec::from_iter(
plant_state
.iter()
.map(|s| s.sensor_a.moisture_percent().map(|f| f.to_precision(2))),
);
let b = Vec::from_iter(
plant_state
.iter()
.map(|s| s.sensor_b.moisture_percent().map(|f| f.to_precision(2))),
);
let mut a: Vec<u8> = Vec::new();
let mut b: Vec<u8> = Vec::new();
for plant in 0..8 {
let a_hz = board.measure_moisture_hz(plant, crate::plant_hal::Sensor::A)?;
let b_hz = board.measure_moisture_hz(plant, crate::plant_hal::Sensor::B)?;
let a_pct = map_range_moisture(a_hz as f32);
match a_pct {
Ok(result) => {
a.push(result);
}
Err(_) => {
a.push(200);
}
}
let b_pct = map_range_moisture(b_hz as f32);
match b_pct {
Ok(result) => {
b.push(result);
}
Err(_) => {
b.push(200);
}
}
}
let data = Moistures {
moisture_a: a,
@ -296,6 +308,8 @@ fn ota(
let read = request.read(&mut buffer)?;
total_read += read;
let to_write = &buffer[0..read];
//delay for watchdog and wifi stuff
Delay::new_default().delay_ms(1);
let iter = (total_read / 1024) % 8;
if iter != lastiter {