lightpower module

This commit is contained in:
Empire 2025-04-26 00:12:39 +02:00
parent 3572b15564
commit aec083bcef
20 changed files with 135629 additions and 12050 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)
)

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"board": {
"active_layer": 25,
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],

File diff suppressed because it is too large Load Diff

View File

@ -9,4 +9,5 @@
(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

@ -1,8 +1,8 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "",
"auto_track_width": true,
"active_layer": 5,
"active_layer_preset": "All Layers",
"auto_track_width": false,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 0,
@ -62,9 +62,42 @@
"version": 5
},
"net_inspector_panel": {
"col_hidden": [],
"col_order": [],
"col_widths": [],
"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,
@ -75,7 +108,7 @@
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": -1
"sorting_column": 0
},
"open_jobsets": [],
"project": {

View File

@ -2,12 +2,231 @@
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {},
"diff_pair_dimensions": [],
"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": [],
"rules": {},
"track_widths": [],
"via_dimensions": []
"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": "",
@ -288,7 +507,7 @@
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "",
"step": "LightOut.step",
"svg": "",
"vrml": ""
},
@ -317,6 +536,30 @@
"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",
@ -324,10 +567,22 @@
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"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,
@ -346,24 +601,12 @@
"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",
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},

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 ""))
)

View File

@ -2,6 +2,176 @@
(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)

View File

@ -2,4 +2,5 @@
(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 ""))
)

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 ""))
)

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

@ -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

@ -308,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 {