Compare commits

...

4 Commits

13 changed files with 4384 additions and 504 deletions

24
.gitignore vendored
View File

@ -4,12 +4,15 @@
*.so
*.swp
export
img
tmp
# Nix
.direnv
.pre-commit-config.yaml
result
*.img*
*.qcow2
# Python
/*.py[cod]
@ -23,11 +26,32 @@ result
/flow_backup.json
# Mkdocs
dist
docs/_*
site
# macOS
.DS_Store
# KiCad
*.000
*.bak
*.bck
*.kicad_pcb-bak
*.kicad_sch-bak
*-backups
*.kicad_prl
*.sch-bak
*~
_autosave-*
*.tmp
*-save.pro
*-save.kicad_pcb
fp-info-cache*
*.net
*.dsn
*.ses
# Misc
template
TODOS.md

View File

@ -1,5 +1,5 @@
{
description = "FabNet IoT Platform";
description = "Smart Energy Monitor";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -91,11 +91,11 @@
};
deploy.nodes.gateway = {
hostname = "fabnet";
hostname = "sem";
fastConnection = true;
profiles = {
system = {
sshUser = "fabnet";
sshUser = "sem";
path =
deploy-rs.lib.aarch64-linux.activate.nixos
self.nixosConfigurations.gateway;

View File

View File

@ -1,2 +0,0 @@
(kicad_pcb (version 20211014) (generator pcbnew)
)

View File

@ -1,75 +0,0 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "All Layers",
"auto_track_width": true,
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"pads": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
},
"ratsnest_display_mode": 0,
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": true,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
0,
1,
2,
3,
4,
5,
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
],
"visible_layers": "fffffff_ffffffff",
"zone_display_mode": 0
},
"meta": {
"filename": "fc-iot.kicad_prl",
"version": 3
},
"project": {
"files": []
}
}

View File

@ -1,61 +0,0 @@
{
"board": {
"design_settings": {
"defaults": {
"board_outline_line_width": 0.1,
"copper_line_width": 0.2,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"other_line_width": 0.15,
"silk_line_width": 0.15,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15
},
"diff_pair_dimensions": [],
"drc_exclusions": [],
"rules": {
"min_copper_edge_clearance": 0.0,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0
},
"track_widths": [],
"via_dimensions": []
}
},
"boards": [],
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "kicad.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"nets": [],
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4
}
],
"meta": {
"version": 0
}
},
"pcbnew": {
"page_layout_descr_file": ""
},
"sheets": [],
"text_variables": {}
}

View File

@ -1,360 +0,0 @@
(kicad_sch (version 20211123) (generator eeschema)
(uuid 2c751d87-7884-4fe1-9ec1-5647188465bc)
(paper "A4")
(lib_symbols
(symbol "Jumper:Jumper_3_Bridged12" (pin_names (offset 0) hide) (in_bom yes) (on_board yes)
(property "Reference" "JP" (id 0) (at -2.54 -2.54 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "Jumper_3_Bridged12" (id 1) (at 0 2.794 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "Jumper SPDT" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Jumper, 3-pole, pins 1+2 closed/bridged" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "Jumper* TestPoint*3Pads* TestPoint*Bridge*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "Jumper_3_Bridged12_0_0"
(circle (center -3.302 0) (radius 0.508)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(circle (center 0 0) (radius 0.508)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(circle (center 3.302 0) (radius 0.508)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "Jumper_3_Bridged12_0_1"
(arc (start -0.254 0.508) (mid -1.651 0.9912) (end -3.048 0.508)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 -1.27)
(xy 0 -0.508)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "Jumper_3_Bridged12_1_1"
(pin passive line (at -6.35 0 0) (length 2.54)
(name "A" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 0 -3.81 90) (length 2.54)
(name "C" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin passive line (at 6.35 0 180) (length 2.54)
(name "B" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "MCU_Module:WeMos_D1_mini" (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at 3.81 19.05 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "WeMos_D1_mini" (id 1) (at 1.27 -19.05 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "Module:WEMOS_D1_mini_light" (id 2) (at 0 -29.21 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://wiki.wemos.cc/products:d1:d1_mini#documentation" (id 3) (at -46.99 -29.21 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "ESP8266 WiFi microcontroller ESP8266EX" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "32-bit microcontroller module with WiFi" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "WEMOS*D1*mini*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "WeMos_D1_mini_1_1"
(rectangle (start -7.62 17.78) (end 7.62 -17.78)
(stroke (width 0.254) (type default) (color 0 0 0 0))
(fill (type background))
)
(pin input line (at -10.16 10.16 0) (length 2.54)
(name "~{RST}" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 -20.32 90) (length 2.54)
(name "GND" (effects (font (size 1.27 1.27))))
(number "10" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 0 180) (length 2.54)
(name "D4" (effects (font (size 1.27 1.27))))
(number "11" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 2.54 180) (length 2.54)
(name "D3" (effects (font (size 1.27 1.27))))
(number "12" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 5.08 180) (length 2.54)
(name "SDA/D2" (effects (font (size 1.27 1.27))))
(number "13" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 7.62 180) (length 2.54)
(name "SCL/D1" (effects (font (size 1.27 1.27))))
(number "14" (effects (font (size 1.27 1.27))))
)
(pin input line (at -10.16 2.54 0) (length 2.54)
(name "RX" (effects (font (size 1.27 1.27))))
(number "15" (effects (font (size 1.27 1.27))))
)
(pin output line (at -10.16 0 0) (length 2.54)
(name "TX" (effects (font (size 1.27 1.27))))
(number "16" (effects (font (size 1.27 1.27))))
)
(pin input line (at 10.16 12.7 180) (length 2.54)
(name "A0" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 10.16 180) (length 2.54)
(name "D0" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 -2.54 180) (length 2.54)
(name "SCK/D5" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 -5.08 180) (length 2.54)
(name "MISO/D6" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 -7.62 180) (length 2.54)
(name "MOSI/D7" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin bidirectional line (at 10.16 -10.16 180) (length 2.54)
(name "CS/D8" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin power_out line (at 2.54 20.32 270) (length 2.54)
(name "3V3" (effects (font (size 1.27 1.27))))
(number "8" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at -2.54 20.32 270) (length 2.54)
(name "5V" (effects (font (size 1.27 1.27))))
(number "9" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:+3.3V" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (id 0) (at 0 -3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3.3V" (id 1) (at 0 3.556 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"+3.3V\"" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "+3.3V_0_1"
(polyline
(pts
(xy -0.762 1.27)
(xy 0 2.54)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 0)
(xy 0 2.54)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 0 2.54)
(xy 0.762 1.27)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "+3.3V_1_1"
(pin power_in line (at 0 0 90) (length 0) hide
(name "+3.3V" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (id 0) (at 0 -6.35 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 0 -3.81 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"GND\" , ground" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "GND_0_1"
(polyline
(pts
(xy 0 0)
(xy 0 -1.27)
(xy 1.27 -1.27)
(xy 0 -2.54)
(xy -1.27 -1.27)
(xy 0 -1.27)
)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
)
(symbol "GND_1_1"
(pin power_in line (at 0 0 270) (length 0) hide
(name "GND" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
)
(symbol (lib_id "power:GND") (at 130.81 90.17 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 1354a86a-be8d-4826-a9ba-68fa928f18f3)
(property "Reference" "#PWR?" (id 0) (at 130.81 96.52 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "GND" (id 1) (at 130.81 95.25 0))
(property "Footprint" "" (id 2) (at 130.81 90.17 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 130.81 90.17 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 5d236a43-1d39-464f-9bb9-0f7c760e3cda))
)
(symbol (lib_id "MCU_Module:WeMos_D1_mini") (at 81.28 71.12 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 46e1a100-2ef4-4e91-a12c-807fd987de29)
(property "Reference" "U?" (id 0) (at 83.2994 91.44 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "WeMos_D1_mini" (id 1) (at 83.2994 93.98 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "Module:WEMOS_D1_mini_light" (id 2) (at 81.28 100.33 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://wiki.wemos.cc/products:d1:d1_mini#documentation" (id 3) (at 34.29 100.33 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid e751624d-1018-4a76-9725-ed78d6061622))
(pin "10" (uuid 38a421ca-62d7-444b-b195-6a0cf8e84bea))
(pin "11" (uuid a9ce474f-e39d-4f66-990e-90fa1cabb37a))
(pin "12" (uuid c5008612-56c6-4af5-92c8-3ec06ab23e7d))
(pin "13" (uuid acb65805-b6d6-47cc-93c8-a4fdc6b18cd6))
(pin "14" (uuid 1fbfd5e7-9457-4695-8272-17bf767bc8ce))
(pin "15" (uuid 41b64a92-f0c6-4936-b531-b2e1f288ae0a))
(pin "16" (uuid f2932599-a3b1-4e01-be1d-e18b4ffeddc7))
(pin "2" (uuid 4f60a284-00fd-4f11-8e1b-60ff65236e95))
(pin "3" (uuid f9959900-0fcc-4b90-b68d-c126aae09341))
(pin "4" (uuid a9d739e7-e587-418e-a38d-9639415779b0))
(pin "5" (uuid bbf7d8f7-80ae-434c-a428-4a394db7f36a))
(pin "6" (uuid 5a3a8b74-d471-47da-89ab-19343cf080fc))
(pin "7" (uuid 88cd9c27-6f32-459d-838f-42a494446d9c))
(pin "8" (uuid 0f6195e3-47d6-4067-8f01-4fa8f237d783))
(pin "9" (uuid 9cb0dd25-4070-4ce0-976b-0fd9f75e67ff))
)
(symbol (lib_id "Jumper:Jumper_3_Bridged12") (at 173.99 86.36 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 93e9d1c2-a9c6-4f2a-ba94-b2d2cb6b76ca)
(property "Reference" "JP?" (id 0) (at 173.99 80.01 0))
(property "Value" "Jumper_3_Bridged12" (id 1) (at 173.99 82.55 0))
(property "Footprint" "" (id 2) (at 173.99 86.36 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 173.99 86.36 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 692d460d-911a-492a-b8c2-3bc1d508cc9f))
(pin "2" (uuid 62994400-585b-43d1-b492-113431ea14e9))
(pin "3" (uuid 50bc9f5d-f5ef-4320-aef6-a24715f97ebe))
)
(symbol (lib_id "power:+3.3V") (at 124.46 60.96 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid f6dc4d9f-6397-4d9e-b529-4d1d97f1b5e7)
(property "Reference" "#PWR?" (id 0) (at 124.46 64.77 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3.3V" (id 1) (at 124.46 55.88 0))
(property "Footprint" "" (id 2) (at 124.46 60.96 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (id 3) (at 124.46 60.96 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 4f0183e7-c1b6-42df-bd82-5b1f145ec6b6))
)
(sheet_instances
(path "/" (page "1"))
)
(symbol_instances
(path "/1354a86a-be8d-4826-a9ba-68fa928f18f3"
(reference "#PWR?") (unit 1) (value "GND") (footprint "")
)
(path "/f6dc4d9f-6397-4d9e-b529-4d1d97f1b5e7"
(reference "#PWR?") (unit 1) (value "+3.3V") (footprint "")
)
(path "/93e9d1c2-a9c6-4f2a-ba94-b2d2cb6b76ca"
(reference "JP?") (unit 1) (value "Jumper_3_Bridged12") (footprint "")
)
(path "/46e1a100-2ef4-4e91-a12c-807fd987de29"
(reference "U?") (unit 1) (value "WeMos_D1_mini") (footprint "Module:WEMOS_D1_mini_light")
)
)
)

View File

@ -0,0 +1,80 @@
(kicad_pcb (version 20221018) (generator pcbnew)
(general
(thickness 1.6)
)
(paper "A4")
(layers
(0 "F.Cu" signal)
(31 "B.Cu" signal)
(32 "B.Adhes" user "B.Adhesive")
(33 "F.Adhes" user "F.Adhesive")
(34 "B.Paste" user)
(35 "F.Paste" user)
(36 "B.SilkS" user "B.Silkscreen")
(37 "F.SilkS" user "F.Silkscreen")
(38 "B.Mask" user)
(39 "F.Mask" user)
(40 "Dwgs.User" user "User.Drawings")
(41 "Cmts.User" user "User.Comments")
(42 "Eco1.User" user "User.Eco1")
(43 "Eco2.User" user "User.Eco2")
(44 "Edge.Cuts" user)
(45 "Margin" user)
(46 "B.CrtYd" user "B.Courtyard")
(47 "F.CrtYd" user "F.Courtyard")
(48 "B.Fab" user)
(49 "F.Fab" user)
(50 "User.1" user)
(51 "User.2" user)
(52 "User.3" user)
(53 "User.4" user)
(54 "User.5" user)
(55 "User.6" user)
(56 "User.7" user)
(57 "User.8" user)
(58 "User.9" user)
)
(setup
(pad_to_mask_clearance 0)
(pcbplotparams
(layerselection 0x00010fc_ffffffff)
(plot_on_all_layers_selection 0x0000000_00000000)
(disableapertmacros false)
(usegerberextensions false)
(usegerberattributes true)
(usegerberadvancedattributes true)
(creategerberjobfile true)
(dashed_line_dash_ratio 12.000000)
(dashed_line_gap_ratio 3.000000)
(svgprecision 4)
(plotframeref false)
(viasonmask false)
(mode 1)
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15.000000)
(dxfpolygonmode true)
(dxfimperialunits true)
(dxfusepcbnewfont true)
(psnegative false)
(psa4output false)
(plotreference true)
(plotvalue true)
(plotinvisibletext false)
(sketchpadsonfab false)
(subtractmaskfromsilk false)
(outputformat 1)
(mirror false)
(drillshape 1)
(scaleselection 1)
(outputdirectory "")
)
)
(net 0 "")
)

View File

@ -0,0 +1,483 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"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.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"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.15,
"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.762,
"height": 1.524,
"width": 1.524
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [],
"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",
"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_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_near_hole": "error",
"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",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "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_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"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.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.09999999999999999,
"min_via_diameter": 0.5,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onroundshapesonly": false,
"td_ontrackend": false,
"td_onviapad": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [],
"via_dimensions": [],
"zones_allow_external_fillets": false
},
"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",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "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": "error",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "ignore",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "Din-Rail-Energy-Meter.kicad_pro",
"version": 1
},
"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)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6
}
],
"meta": {
"version": 3
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 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": [
{
"name": "Untitled Field",
"url": false,
"visible": false
}
],
"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,
"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": "",
"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_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"a83500ad-471e-4639-9589-a537dc752fa7",
""
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{self, ...}: system:
with self.pkgs.${system};
mkShell {
name = "FabNet";
name = "Smart Energy Monitor";
nativeBuildInputs =
[
# Development

View File

@ -20,7 +20,7 @@
];
system.stateVersion = lib.mkForce "23.05";
networking.hostName = "fabnet";
networking.hostName = "sem";
networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName);
networking.firewall.allowedTCPPorts = lib.mkDefault [
1880 # Node-Red
@ -38,7 +38,26 @@
services.node-red.enable = lib.mkDefault true;
services.influxdb2.enable = lib.mkDefault true;
services.prometheus.enable = lib.mkDefault true;
services.octoprint.enable = lib.mkDefault true;
services.octoprint.plugins = plugins:
with plugins; [
themeify
stlviewer
];
services.octoprint.extraConfig = lib.mkDefault {
appearance.name = "FabNet";
api.enabled = true;
slicing.enabled = true;
serial = {
port = "/dev/ttyACM0";
autoconnect = true;
};
webcam = {
stream = "http://<stream host>:<stream port>/?action=stream";
ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg";
};
};
services.grafana.enable = lib.mkDefault true;
services.grafana.settings.server.http_port = 7878;

View File

@ -5,7 +5,7 @@
...
}: {
networking.firewall.enable = lib.mkForce true;
networking.wireless.enable = lib.mkDefault true;
# networking.wireless.enable = lib.mkDefault true;
networking.networkmanager.enable = lib.mkDefault true;
services.avahi.enable = lib.mkDefault true;