Compare commits
294 Commits
0.7-final
...
3e31b4c041
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e31b4c041 | |||
| c6ef614221 | |||
| bfee21796a | |||
| 57a0971c4b | |||
| 556e64740a | |||
| 9d1a807805 | |||
| 680d1c3aaf | |||
| 060a1cc32d | |||
| 541f7e4471 | |||
| 7ea1486e2c | |||
| b933516062 | |||
| b533739aa4 | |||
| 12463c557b | |||
| 9473466feb | |||
| b5b5b25238 | |||
| b9ec3247af | |||
| a30dbe0759 | |||
| 5724088780 | |||
| 4c02b99ea7 | |||
| 1e40e2e3ba | |||
| fd823217aa | |||
| 2541c83ebe | |||
| 58801f870e | |||
| 066b3ec24f | |||
| 303bdd131f | |||
| 5d6871250e | |||
| e43538ec8a | |||
| fb0ad6b1dc | |||
| f0f0e9f27e | |||
| 4a8fffb3cc | |||
| dd949a1be1 | |||
| a9ab4ee99b | |||
| 8bfa27612d | |||
| 55369e46a8 | |||
| b2e5ccccee | |||
| 031e8de99f | |||
| d35b814047 | |||
| 0a0ac6babf | |||
| b268466b89 | |||
| 3c409ea339 | |||
| 825d389a8c | |||
| 17db1b8a45 | |||
| 2092354bc9 | |||
| ae8ff86c1a | |||
| ec67450a0a | |||
| f72135a2b3 | |||
| ba0fa2e732 | |||
| d3d6ad8ffb | |||
| ca74a716b7 | |||
| ba9fc2432b | |||
| fd08921bba | |||
| 33082b7481 | |||
| 8cc9b9d492 | |||
| 928dce949d | |||
| 5f20ec17d0 | |||
| bdd9a17757 | |||
|
|
fbbbc5f5aa | ||
|
|
5e16ca32e0 | ||
|
|
78193855a3 | ||
|
|
6d5f68fab5 | ||
|
|
9167da5a82 | ||
|
|
f65132652c | ||
|
|
703553beb4 | ||
|
|
2636e2defa | ||
|
|
c6ddfea44b | ||
|
|
85bcbd166c | ||
|
|
6cb446735d | ||
|
|
ab17709435 | ||
|
|
e55b4abd49 | ||
|
|
cf7ff9b0d1 | ||
|
|
1cc46a360b | ||
|
|
9235e8a272 | ||
|
|
2a2a36b267 | ||
|
|
9f2e21d94c | ||
|
|
a84344f978 | ||
|
|
5df69f20a8 | ||
|
|
704684d437 | ||
|
|
90f2d821a7 | ||
|
|
e8759435e7 | ||
|
|
bd2e4d3da0 | ||
|
|
9eb16637dc | ||
|
|
66f61a69db | ||
|
|
939a5fe21a | ||
|
|
3a2ddb92e3 | ||
|
|
1e79588e98 | ||
|
|
a0c657a418 | ||
|
|
ab480041b2 | ||
|
|
1fad63a84d | ||
|
|
712ef73a30 | ||
|
|
63ed9afabc | ||
|
|
3835bd96a1 | ||
|
|
42ce4cdda2 | ||
|
|
2b6d766492 | ||
|
|
68386ce02f | ||
|
|
17d16a6eef | ||
|
|
43e638a587 | ||
|
|
0d15479268 | ||
|
|
2914a0c7a1 | ||
| 37a08dede6 | |||
|
|
195d3d3c1b | ||
|
|
e820301490 | ||
|
|
29e3aa08cb | ||
|
|
791d6f04b0 | ||
|
|
79ffd8acff | ||
|
|
18b927bd59 | ||
|
|
c444117853 | ||
|
|
5d24a51bd9 | ||
|
|
71b9150279 | ||
|
|
7eda866a91 | ||
|
|
f18e4a7586 | ||
| 662d7bc853 | |||
| 5dedc76727 | |||
| 15e96a4990 | |||
| 0dd4553999 | |||
| 7a841d423b | |||
| 4a86d8c41c | |||
|
|
c43da98245 | ||
|
|
f38cb6b564 | ||
|
|
6c475a2ade | ||
|
|
9a172c269e | ||
|
|
868d3d912e | ||
|
|
defbcca8ae | ||
|
|
a9c4c32a22 | ||
|
|
1161c62a90 | ||
|
|
a0f8df7016 | ||
|
|
d0320beaa7 | ||
|
|
7a54065a5f | ||
|
|
27cd6af02d | ||
|
|
a745896643 | ||
|
|
80828eadd7 | ||
|
|
b9d8831dea | ||
|
|
d69feb4143 | ||
|
|
f131d9f39a | ||
|
|
d7b854da75 | ||
|
|
16a722816c | ||
|
|
9ff546b7b7 | ||
|
|
61fad8e14c | ||
|
|
af618e73f3 | ||
|
|
c5bce25afe | ||
|
|
a457db4447 | ||
|
|
66d69eab6b | ||
|
|
f727971138 | ||
|
|
d00517ec1e | ||
|
|
2ad351c41b | ||
|
|
7d80d444cf | ||
|
|
e70e467e9b | ||
|
|
6a97215a04 | ||
|
|
2c8645121e | ||
|
|
dba39869d1 | ||
|
|
9170a1fe05 | ||
|
|
49664ba6f7 | ||
|
|
0bcef25528 | ||
|
|
f30a0a0c78 | ||
|
|
d819f7df4e | ||
|
|
ecc03e9cb4 | ||
|
|
2cd0a0f48b | ||
|
|
b5569aa8ab | ||
|
|
244dfb9b27 | ||
|
|
f4e13454e3 | ||
|
|
1619b93fa1 | ||
|
|
58cb523e1b | ||
|
|
e913ff462e | ||
|
|
f13a25b34d | ||
|
|
88e4ceea8b | ||
|
|
f99f72b65a | ||
|
|
e927fc8c70 | ||
|
|
61098724b6 | ||
|
|
2e052710e2 | ||
|
|
d043d873cc | ||
|
|
2d167c7393 | ||
|
|
f6c51f6d05 | ||
|
|
02a882ebde | ||
|
|
697d470d29 | ||
|
|
c448960415 | ||
|
|
2d91f91290 | ||
|
|
df39c09c50 | ||
|
|
99703e5ad1 | ||
|
|
12d4c9950d | ||
|
|
456f78042c | ||
|
|
57d18af76d | ||
|
|
f1d55ed603 | ||
|
|
a1f2388c7f | ||
|
|
d2010ddebb | ||
|
|
7c9a0bf6f1 | ||
|
|
11d29939f6 | ||
|
|
c32fd350c1 | ||
|
|
a1de9ee2b9 | ||
|
|
5568000d62 | ||
|
|
191e05b941 | ||
|
|
c22c14a42b | ||
|
|
54398b7bd6 | ||
|
|
0eeeb6dc60 | ||
|
|
e483b63400 | ||
|
|
bc4d3ca271 | ||
|
|
d08132c420 | ||
|
|
295673b6cb | ||
|
|
c400200e23 | ||
|
|
b5031124f4 | ||
| 3391dfb2c9 | |||
|
|
a8403a7c98 | ||
|
|
5fcf72602d | ||
|
|
5980115298 | ||
| e78f49b9da | |||
| 84690562b2 | |||
| 7fcee1fb0d | |||
|
|
2f21bd133e | ||
|
|
bb0eefa8bd | ||
|
|
89b982e59f | ||
|
|
8cbd96adda | ||
|
|
ac8e2bc4d4 | ||
|
|
049246312e | ||
|
|
8c04bcbb7d | ||
|
|
dd58310fe9 | ||
|
|
ce1f75eae3 | ||
|
|
8e5a13d291 | ||
|
|
200ff30f62 | ||
|
|
f275becb98 | ||
|
|
2c5d61a124 | ||
|
|
057e2b37c3 | ||
|
|
3d45a3fca3 | ||
|
|
98799bd2d5 | ||
|
|
2c70ff1ed3 | ||
|
|
f0127921b1 | ||
|
|
cad836b070 | ||
|
|
72f8d36393 | ||
|
|
a90b59f69f | ||
|
|
50d07a3c02 | ||
|
|
92005c1c33 | ||
|
|
5db0e2c82f | ||
|
|
ad0ae88c3c | ||
|
|
c7d98ef108 | ||
|
|
3fffd41bcd | ||
|
|
9af5a13e12 | ||
|
|
758ae3ef57 | ||
|
|
04d7120adf | ||
|
|
129b2b1478 | ||
|
|
658bc7a389 | ||
|
|
0a1d755154 | ||
|
|
31229594fe | ||
|
|
b8b8cf84d5 | ||
|
|
902c863873 | ||
|
|
47aba5387b | ||
|
|
3932e82593 | ||
|
|
dc5dc27ba5 | ||
|
|
284fb4907d | ||
| 6da0e0268e | |||
| 4ef13cbe59 | |||
| 0784d2da44 | |||
|
|
38ffd64305 | ||
|
|
5e2ab1eedb | ||
|
|
cf905c9c03 | ||
|
|
9f96fa2c5b | ||
|
|
86b82d03b3 | ||
| 552c27632b | |||
| fcdcfe2720 | |||
| d5fbd38762 | |||
| f1f21027ed | |||
|
|
093b7c7fc3 | ||
|
|
55d66b763c | ||
|
|
5deea587a8 | ||
| 17b0bb435c | |||
| ae18a25c69 | |||
| 6843a58228 | |||
| 3e73e5e9b0 | |||
| 4836f4eb58 | |||
| 8412ee863d | |||
| 9d20474bdd | |||
| 20a61aa87a | |||
|
|
062638378f | ||
| afc244a3b2 | |||
| a6b1bb7a70 | |||
|
|
e006d719d7 | ||
|
|
7cad34627f | ||
|
|
938f253072 | ||
| 4cd9b35cd2 | |||
|
|
d3809c1db9 | ||
|
|
c3408a7a36 | ||
| 268fe0fdc0 | |||
|
|
6b64fa50a4 | ||
|
|
3a5405998c | ||
|
|
a1bae8180d | ||
|
|
11cde021a2 | ||
| 653d962cdf | |||
| d4ccab6ea5 | |||
|
|
4a00af5506 | ||
|
|
f4f7195e4f | ||
|
|
1060166d43 | ||
|
|
bb1e59c79d | ||
|
|
bd3c6ec4eb | ||
|
|
cf9e4a5f47 | ||
|
|
505a5e337a | ||
|
|
8b1367a20c | ||
|
|
1eba578f20 | ||
|
|
060fa80efd |
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1 +1,12 @@
|
||||
*.sch-bak
|
||||
PlantCtrlESP32-backups/
|
||||
board/production/PlantCtrlESP32_2023-11-08_00-45-35/PlantCtrlESP32.zip
|
||||
board/production/PlantCtrlESP32_2023-11-08_00-45-35/netlist.ipc
|
||||
.vscode
|
||||
.embuild/
|
||||
target
|
||||
Cargo.lock
|
||||
node_modules/
|
||||
rust/src/webserver/bundle.js
|
||||
rust/build/
|
||||
rust/image.bin
|
||||
|
||||
@@ -12,14 +12,15 @@ Open hardware design (powered by KiCAD).
|
||||
The complete PCB is stored in the ***board*** sub directory.
|
||||
|
||||
There the following components are connected:
|
||||
* ESP32 NodeMCU Module (the one of A-Z Delivery was used)
|
||||
* Lipo
|
||||
* ESP32 **16MB flash required**
|
||||
* Lipo monitoring (DS2438)
|
||||
* 7 moist sensors
|
||||
* 7 pump
|
||||
* DC-DC convert (generating voltage from Lipo for pumps)
|
||||
* DS18B20 temperature sensors
|
||||
* water tank ultrasonic sensor (via HC_SR04)
|
||||
* general purpose expansion pin
|
||||
* water level via laser distance sensor (VL53L0X)
|
||||
* DS2438 battery monitor
|
||||
* general purpose expansion pins
|
||||
|
||||
# Software
|
||||
The firmware for the controller is stored in ***esp32*** sub directory.
|
||||
|
||||
46
board/4435.kicad_mod
Normal file
46
board/4435.kicad_mod
Normal file
@@ -0,0 +1,46 @@
|
||||
(footprint "4435" (version 20221018) (generator pcbnew)
|
||||
(layer "F.Cu")
|
||||
(attr smd)
|
||||
(fp_text reference "REF**" (at -3.705 0 90) (layer "F.SilkS")
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
(tstamp 888d4749-ec8d-48e0-b622-265ef152540e)
|
||||
)
|
||||
(fp_text value "4435" (at 0 0) (layer "F.Fab")
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
(tstamp 92782e22-8381-4ed1-a11f-ef69c9601af0)
|
||||
)
|
||||
(fp_line (start -2.705 -1.9) (end 2.705 -1.9)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp 3128977c-e0a0-4ca7-8f5b-79eab6c86d44))
|
||||
(fp_line (start -2.705 1.1) (end -2.705 -1.9)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp b5339e6e-bef0-40f8-ac0d-5ffe68b262f3))
|
||||
(fp_line (start -1.905 1.9) (end -2.705 1.1)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp 267dcc87-49da-46db-86da-4ce81b7d2468))
|
||||
(fp_line (start 2.705 -1.9) (end 2.705 1.9)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp 14aaa409-1cdb-4bf6-a811-f0da4dffe73a))
|
||||
(fp_line (start 2.705 1.9) (end -1.905 1.9)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp 1789de97-d192-4375-b67e-3ad05848eee2))
|
||||
(fp_line (start -2.46 -4.85) (end 2.46 -4.85)
|
||||
(stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp f4d6fc79-0700-4ee7-b411-e8f033ff66d3))
|
||||
(fp_line (start -2.46 4.85) (end -2.46 -4.85)
|
||||
(stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 3cfe9046-c22e-44b7-8f86-5e90bf2c83b0))
|
||||
(fp_line (start 2.46 -4.85) (end 2.46 4.85)
|
||||
(stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 41eb9d06-d36a-4d1d-a098-b2c48b580c65))
|
||||
(fp_line (start 2.46 4.85) (end -2.46 4.85)
|
||||
(stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 05ce4f60-8c60-4fe2-86da-df65172ffb03))
|
||||
(pad "1" smd rect (at -1.905 -3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp 239f0d43-7a93-43bf-abef-be78a7aed604))
|
||||
(pad "1" smd rect (at -0.635 -3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp a9c370b9-178b-48cd-94a4-ca368fb8484d))
|
||||
(pad "1" smd rect (at 0.635 -3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp 8d506357-8b26-4d9b-b778-52fd40f96071))
|
||||
(pad "1" smd rect (at 1.905 -3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp 4f4e03c6-0964-4327-a6cb-2e71085bfef0))
|
||||
(pad "2" smd rect (at 1.905 3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp 3f6b4cbd-12fd-4380-92b9-d204178e6014))
|
||||
(pad "3" smd rect (at -1.905 3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp bb893791-93a0-4766-9b0e-f175da5df5f4))
|
||||
(pad "3" smd rect (at -0.635 3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp 8487832e-80f2-4019-9519-9da7cbe24a96))
|
||||
(pad "3" smd rect (at 0.635 3.5) (size 0.6 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
|
||||
(thermal_bridge_angle 45) (tstamp 4ecffbef-d0f1-4d07-af9a-0fb6030dccea))
|
||||
)
|
||||
82
board/CN3306.kicad_sym
Normal file
82
board/CN3306.kicad_sym
Normal file
@@ -0,0 +1,82 @@
|
||||
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
|
||||
(symbol "CN3306" (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at 5.08 -5.08 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)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "CN3306_1_1"
|
||||
(rectangle (start -2.54 7.62) (end 12.7 -16.51)
|
||||
(stroke (width 0) (type default))
|
||||
(fill (type background))
|
||||
)
|
||||
(pin input line (at 15.24 -8.89 180) (length 2.54)
|
||||
(name "FB" (effects (font (size 1.27 1.27))))
|
||||
(number "1" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 5.08 10.16 270) (length 2.54)
|
||||
(name "COME" (effects (font (size 1.27 1.27))))
|
||||
(number "10" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 15.24 -13.97 180) (length 2.54)
|
||||
(name "VCC" (effects (font (size 1.27 1.27))))
|
||||
(number "11" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 15.24 -11.43 180) (length 2.54)
|
||||
(name "VCC" (effects (font (size 1.27 1.27))))
|
||||
(number "12" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 15.24 5.08 180) (length 2.54)
|
||||
(name "DRV" (effects (font (size 1.27 1.27))))
|
||||
(number "13" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 3.81 -19.05 90) (length 2.54)
|
||||
(name "GND" (effects (font (size 1.27 1.27))))
|
||||
(number "14" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 6.35 -19.05 90) (length 2.54)
|
||||
(name "GND" (effects (font (size 1.27 1.27))))
|
||||
(number "15" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 15.24 2.54 180) (length 2.54)
|
||||
(name "ISW" (effects (font (size 1.27 1.27))))
|
||||
(number "16" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -5.08 -10.16 0) (length 2.54)
|
||||
(name "COMP" (effects (font (size 1.27 1.27))))
|
||||
(number "2" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -5.08 -1.27 0) (length 2.54)
|
||||
(name "MPPT" (effects (font (size 1.27 1.27))))
|
||||
(number "3" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -5.08 -7.62 0) (length 2.54)
|
||||
(name "SHDN" (effects (font (size 1.27 1.27))))
|
||||
(number "5" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -5.08 3.81 0) (length 2.54)
|
||||
(name "CHRG" (effects (font (size 1.27 1.27))))
|
||||
(number "6" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -5.08 1.27 0) (length 2.54)
|
||||
(name "DONE" (effects (font (size 1.27 1.27))))
|
||||
(number "7" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 15.24 -3.81 180) (length 2.54)
|
||||
(name "CSP" (effects (font (size 1.27 1.27))))
|
||||
(number "8" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at 15.24 -6.35 180) (length 2.54)
|
||||
(name "ONE" (effects (font (size 1.27 1.27))))
|
||||
(number "9" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
123
board/CN3795.kicad_sym
Normal file
123
board/CN3795.kicad_sym
Normal file
@@ -0,0 +1,123 @@
|
||||
|
||||
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
|
||||
(symbol "CN3795" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (id 0) (at 5.08 18.542 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom left))
|
||||
)
|
||||
(property "Value" "CN3795" (id 1) (at 5.08 -20.32 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom left))
|
||||
)
|
||||
(property "Footprint" "CN3795:SSOP10" (id 2) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "MF" "Consonance" (id 4) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Description" "\n4A, Multi-Chemistry Battery Charger\nWith Photovoltaic Cell MPPT Function\n" (id 5) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Package" "Package" (id 6) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Price" "None" (id 7) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "SnapEDA_Link" "https://www.snapeda.com/parts/CN3795/Consonance/view-part/?ref=snap" (id 8) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "MP" "CN3795" (id 9) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Availability" "Not in stock" (id 10) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Check_prices" "https://www.snapeda.com/parts/CN3795/Consonance/view-part/?ref=eda" (id 11) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(symbol "CN3795_0_0"
|
||||
(rectangle (start -12.7 -17.78) (end 12.7 17.78)
|
||||
(stroke (width 0.254)) (fill (type background))
|
||||
)
|
||||
(pin bidirectional line (at -15.24 7.62 0) (length 2.54)
|
||||
(name "VCC"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "9"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -15.24 -2.54 0) (length 2.54)
|
||||
(name "~{CHRG}"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "3"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -15.24 -7.62 0) (length 2.54)
|
||||
(name "MPPT"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "4"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -2.54 20.32 270.0) (length 2.54)
|
||||
(name "VG"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "1"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 2.54 20.32 270.0) (length 2.54)
|
||||
(name "DRV"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "10"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 15.24 7.62 180.0) (length 2.54)
|
||||
(name "CSP"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "8"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 15.24 2.54 180.0) (length 2.54)
|
||||
(name "BAT"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "7"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 15.24 -2.54 180.0) (length 2.54)
|
||||
(name "FB"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "6"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 15.24 -7.62 180.0) (length 2.54)
|
||||
(name "COM"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "5"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 0.0 -20.32 90.0) (length 2.54)
|
||||
(name "GND"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "2"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
3
board/PlantCtrlESP32-rescue.dcm
Normal file
3
board/PlantCtrlESP32-rescue.dcm
Normal file
@@ -0,0 +1,3 @@
|
||||
EESchema-DOCLIB Version 2.0
|
||||
#
|
||||
#End Doc Library
|
||||
11
board/PlantCtrlESP32.erc
Normal file
11
board/PlantCtrlESP32.erc
Normal file
@@ -0,0 +1,11 @@
|
||||
ERC report (Thu 10 Jun 2021 11:02:23 PM CEST, Encoding UTF8 )
|
||||
|
||||
***** Sheet /
|
||||
ErrType(3): Pin connected to other pins, but not driven by any pin
|
||||
@(476.25 mm, 236.22 mm): Pin 3 (Power input) of component U6 is not driven (Net 13).
|
||||
ErrType(3): Pin connected to other pins, but not driven by any pin
|
||||
@(71.12 mm, 154.94 mm): Pin 4 (Power input) of component U3 is not driven (Net 25).
|
||||
ErrType(3): Pin connected to other pins, but not driven by any pin
|
||||
@(558.80 mm, 274.32 mm): Pin 5 (Power input) of component U2 is not driven (Net 28).
|
||||
|
||||
** ERC messages: 3 Errors 0 Warnings 3
|
||||
File diff suppressed because it is too large
Load Diff
10900
board/PlantCtrlESP32.kicad_pcb.orig
Normal file
10900
board/PlantCtrlESP32.kicad_pcb.orig
Normal file
File diff suppressed because it is too large
Load Diff
81
board/PlantCtrlESP32.kicad_prl
Normal file
81
board/PlantCtrlESP32.kicad_prl
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 2,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": false,
|
||||
"hidden_netclasses": [],
|
||||
"hidden_nets": [],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
"opacity": {
|
||||
"images": 0.6,
|
||||
"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,
|
||||
6,
|
||||
7,
|
||||
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
|
||||
],
|
||||
"visible_layers": "fffffff_ffffffff",
|
||||
"zone_display_mode": 1
|
||||
},
|
||||
"meta": {
|
||||
"filename": "PlantCtrlESP32.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
1060
board/PlantCtrlESP32.kicad_pro
Normal file
1060
board/PlantCtrlESP32.kicad_pro
Normal file
File diff suppressed because it is too large
Load Diff
24810
board/PlantCtrlESP32.kicad_sch
Normal file
24810
board/PlantCtrlESP32.kicad_sch
Normal file
File diff suppressed because it is too large
Load Diff
24410
board/PlantCtrlESP32.kicad_sch-bak
Normal file
24410
board/PlantCtrlESP32.kicad_sch-bak
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,286 +0,0 @@
|
||||
update=Fri 27 Nov 2020 08:17:47 PM CET
|
||||
version=1
|
||||
last_client=kicad
|
||||
[general]
|
||||
version=1
|
||||
RootSch=
|
||||
BoardNm=
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
[eeschema/libraries]
|
||||
[schematic_editor]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
PlotDirectoryName=/tmp/
|
||||
SubpartIdSeparator=0
|
||||
SubpartFirstId=65
|
||||
NetFmtName=Pcbnew
|
||||
SpiceAjustPassiveValues=0
|
||||
LabSize=50
|
||||
ERC_TestSimilarLabels=1
|
||||
[pcbnew]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
LastNetListRead=PlantCtrlESP32.net
|
||||
CopperLayerCount=2
|
||||
BoardThickness=1.6
|
||||
AllowMicroVias=0
|
||||
AllowBlindVias=0
|
||||
RequireCourtyardDefinitions=0
|
||||
ProhibitOverlappingCourtyards=1
|
||||
MinTrackWidth=0.2
|
||||
MinViaDiameter=0.4
|
||||
MinViaDrill=0.3
|
||||
MinMicroViaDiameter=0.2
|
||||
MinMicroViaDrill=0.09999999999999999
|
||||
MinHoleToHole=0.25
|
||||
TrackWidth1=1.2
|
||||
TrackWidth2=0.2
|
||||
TrackWidth3=0.5
|
||||
TrackWidth4=1
|
||||
ViaDiameter1=0.8
|
||||
ViaDrill1=0.4
|
||||
ViaDiameter2=4
|
||||
ViaDrill2=3
|
||||
dPairWidth1=0.2
|
||||
dPairGap1=0.25
|
||||
dPairViaGap1=0.25
|
||||
SilkLineWidth=0.12
|
||||
SilkTextSizeV=1
|
||||
SilkTextSizeH=1
|
||||
SilkTextSizeThickness=0.15
|
||||
SilkTextItalic=0
|
||||
SilkTextUpright=1
|
||||
CopperLineWidth=0.2
|
||||
CopperTextSizeV=1.5
|
||||
CopperTextSizeH=1.5
|
||||
CopperTextThickness=0.3
|
||||
CopperTextItalic=0
|
||||
CopperTextUpright=1
|
||||
EdgeCutLineWidth=0.05
|
||||
CourtyardLineWidth=0.05
|
||||
OthersLineWidth=0.15
|
||||
OthersTextSizeV=1
|
||||
OthersTextSizeH=1
|
||||
OthersTextSizeThickness=0.15
|
||||
OthersTextItalic=0
|
||||
OthersTextUpright=1
|
||||
SolderMaskClearance=0.051
|
||||
SolderMaskMinWidth=0.25
|
||||
SolderPasteClearance=0
|
||||
SolderPasteRatio=-0
|
||||
[pcbnew/Layer.F.Cu]
|
||||
Name=F.Cu
|
||||
Type=0
|
||||
Enabled=1
|
||||
[pcbnew/Layer.In1.Cu]
|
||||
Name=In1.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In2.Cu]
|
||||
Name=In2.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In3.Cu]
|
||||
Name=In3.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In4.Cu]
|
||||
Name=In4.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In5.Cu]
|
||||
Name=In5.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In6.Cu]
|
||||
Name=In6.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In7.Cu]
|
||||
Name=In7.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In8.Cu]
|
||||
Name=In8.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In9.Cu]
|
||||
Name=In9.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In10.Cu]
|
||||
Name=In10.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In11.Cu]
|
||||
Name=In11.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In12.Cu]
|
||||
Name=In12.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In13.Cu]
|
||||
Name=In13.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In14.Cu]
|
||||
Name=In14.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In15.Cu]
|
||||
Name=In15.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In16.Cu]
|
||||
Name=In16.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In17.Cu]
|
||||
Name=In17.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In18.Cu]
|
||||
Name=In18.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In19.Cu]
|
||||
Name=In19.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In20.Cu]
|
||||
Name=In20.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In21.Cu]
|
||||
Name=In21.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In22.Cu]
|
||||
Name=In22.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In23.Cu]
|
||||
Name=In23.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In24.Cu]
|
||||
Name=In24.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In25.Cu]
|
||||
Name=In25.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In26.Cu]
|
||||
Name=In26.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In27.Cu]
|
||||
Name=In27.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In28.Cu]
|
||||
Name=In28.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In29.Cu]
|
||||
Name=In29.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.In30.Cu]
|
||||
Name=In30.Cu
|
||||
Type=0
|
||||
Enabled=0
|
||||
[pcbnew/Layer.B.Cu]
|
||||
Name=B.Cu
|
||||
Type=0
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Adhes]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Adhes]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Paste]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Paste]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.SilkS]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.SilkS]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Mask]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Mask]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Dwgs.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Cmts.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Eco1.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Eco2.User]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Edge.Cuts]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Margin]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.CrtYd]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.CrtYd]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.B.Fab]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.F.Fab]
|
||||
Enabled=1
|
||||
[pcbnew/Layer.Rescue]
|
||||
Enabled=0
|
||||
[pcbnew/Netclasses]
|
||||
[pcbnew/Netclasses/Default]
|
||||
Name=Default
|
||||
Clearance=0.2
|
||||
TrackWidth=1.2
|
||||
ViaDiameter=0.8
|
||||
ViaDrill=0.4
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
||||
[pcbnew/Netclasses/1]
|
||||
Name=5V
|
||||
Clearance=0.2
|
||||
TrackWidth=1.4
|
||||
ViaDiameter=0.8
|
||||
ViaDrill=0.4
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
||||
[pcbnew/Netclasses/2]
|
||||
Name=Mini
|
||||
Clearance=0.2
|
||||
TrackWidth=1
|
||||
ViaDiameter=0.8
|
||||
ViaDrill=0.4
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
||||
[pcbnew/Netclasses/3]
|
||||
Name=Power
|
||||
Clearance=0.2
|
||||
TrackWidth=1.7
|
||||
ViaDiameter=0.8
|
||||
ViaDrill=0.4
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
||||
7
board/PlantCtrlESP32.round-tracks-config
Normal file
7
board/PlantCtrlESP32.round-tracks-config
Normal file
@@ -0,0 +1,7 @@
|
||||
Default False 2.0 3
|
||||
12V True 2.0 3
|
||||
3V True 2.0 3
|
||||
BAT+ True 2.0 3
|
||||
BAT- True 2.0 3
|
||||
GND True 2.0 3
|
||||
False True False
|
||||
File diff suppressed because it is too large
Load Diff
BIN
board/PlantCtrlESP32_Board0_7.ods
Normal file
BIN
board/PlantCtrlESP32_Board0_7.ods
Normal file
Binary file not shown.
63
board/R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm.kicad_mod
Normal file
63
board/R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm.kicad_mod
Normal file
@@ -0,0 +1,63 @@
|
||||
(footprint "R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm" (version 20221018) (generator pcbnew)
|
||||
(layer "F.Cu")
|
||||
(descr "Shunt Resistor SMD 2512 (6332 Metric), 2.6mm thick, Vishay WKS2512, Terminal length (T) 1.19mm, 5 to 200 milli Ohm (http://http://www.vishay.com/docs/30108/wsk.pdf)")
|
||||
(tags "resistor shunt WSK2512")
|
||||
(attr smd)
|
||||
(fp_text reference "REF**" (at 0 -2.65) (layer "F.SilkS")
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
(tstamp e64357ee-67ea-437d-842c-edd4e9b0e817)
|
||||
)
|
||||
(fp_text value "R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm" (at 0 2.65) (layer "F.Fab")
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
(tstamp 6d43eee8-d677-4710-a5b6-ed0a393d7e86)
|
||||
)
|
||||
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab")
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
(tstamp 7af73258-6848-4c90-ada6-9916b21e0d54)
|
||||
)
|
||||
(fp_line (start -2.5 1.7) (end 1.67 1.7)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 686b0a9f-f303-4b9c-97bc-13b268071b2a))
|
||||
(fp_line (start -1.67 -1.7) (end 2.53 -1.7)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 8ff3cd0c-2e69-49a7-948e-62e2af1cdeaf))
|
||||
(fp_line (start -4.38 -1.9) (end 4.38 -1.9)
|
||||
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 97453d6f-90a6-4d0b-9533-4b9de0e70d67))
|
||||
(fp_line (start -4.38 1.9) (end -4.38 -1.9)
|
||||
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 8d751a64-d963-4d3e-b652-c6367d221a4c))
|
||||
(fp_line (start 4.38 -1.9) (end 4.38 1.9)
|
||||
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 5fc8cbbe-390d-45f2-b9e2-001b3b36ad53))
|
||||
(fp_line (start 4.38 1.9) (end -4.38 1.9)
|
||||
(stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 85ea9322-734e-4f57-b7f4-e08d8559c109))
|
||||
(fp_line (start -3.175 -1.59) (end 3.175 -1.59)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp a616017c-8c30-4c24-8988-6ebc65a5a14c))
|
||||
(fp_line (start -3.175 0.32) (end -3.175 -1.59)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 007035a4-df14-4627-b9dd-16c0816e9fc4))
|
||||
(fp_line (start -3.175 0.32) (end -2.795 0.32)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 7a92ebc4-86fb-494b-8925-1512bf4598dd))
|
||||
(fp_line (start -3.175 0.94) (end -3.175 1.59)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 8d1ed9db-8b9e-4c9a-b026-a147d8ba5a89))
|
||||
(fp_line (start -3.175 0.94) (end -2.795 0.94)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 3238b0a3-1bbc-4ecd-9eca-d39a4563f46a))
|
||||
(fp_line (start -2.795 0.94) (end -2.795 0.32)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 56e7214e-7e65-4896-9919-6dfa6ad242a1))
|
||||
(fp_line (start 2.79 -0.94) (end 3.17 -0.94)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp bf2fd8b5-dc07-4d36-93f4-c05d760e4ae8))
|
||||
(fp_line (start 2.79 -0.32) (end 2.79 -0.94)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2732ea3b-0a68-4014-9f1f-147b192cb827))
|
||||
(fp_line (start 2.79 -0.32) (end 3.17 -0.32)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 7597632e-0fab-4537-9ef5-3d955ee8fe04))
|
||||
(fp_line (start 3.175 -0.94) (end 3.175 -1.59)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp be78e59b-9296-4843-849b-9aeaddf3ec90))
|
||||
(fp_line (start 3.175 -0.32) (end 3.175 1.59)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp f0529fdf-6a96-4afa-ae66-3987676f8cc1))
|
||||
(fp_line (start 3.175 1.59) (end -3.175 1.59)
|
||||
(stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 5494f1f1-9934-4901-ae11-4f45356840a6))
|
||||
(pad "1" smd roundrect (at -2.985 0.635) (size 2.29 2.03) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.12) (tstamp 7d665233-6376-4fd3-9d23-184556b0630c))
|
||||
(pad "2" smd roundrect (at -3.43 -1.27) (size 1.4 0.76) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.12) (tstamp a060266a-0c38-4364-b2df-6f7cf4c69f0d))
|
||||
(pad "3" smd roundrect (at 3.43 -1.27) (size 1.4 0.76) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) (tstamp a1e31646-49e8-4836-bd67-1b6bed652414))
|
||||
(pad "4" smd roundrect (at 2.985 0.635) (size 2.29 2.03) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.12) (tstamp 3f532dd2-fd5a-4fe7-9636-aa84f769e3b2))
|
||||
(model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm.wrl"
|
||||
(offset (xyz 0 0 0))
|
||||
(scale (xyz 1 1 1))
|
||||
(rotate (xyz 0 0 0))
|
||||
)
|
||||
)
|
||||
4562
board/bom/ibom.html
Normal file
4562
board/bom/ibom.html
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,7 @@
|
||||
(fp_lib_table
|
||||
(lib (name misc_footprints)(type KiCad)(uri ${KIPRJMOD}/kicad-stuff/misc_footprints-master/misc_footprints.pretty)(options "")(descr ""))
|
||||
(lib (name ESP32)(type KiCad)(uri ${KIPRJMOD}/kicad-stuff/ESP32)(options "")(descr ""))
|
||||
)
|
||||
(fp_lib_table
|
||||
(version 7)
|
||||
(lib (name "misc_footprints")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/misc_footprints-master/misc_footprints.pretty")(options "")(descr ""))
|
||||
(lib (name "ESP32")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/ESP32")(options "")(descr ""))
|
||||
(lib (name "kicad-stuff")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff")(options "")(descr ""))
|
||||
(lib (name "board")(type "KiCad")(uri "${KIPRJMOD}/")(options "")(descr ""))
|
||||
)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:08+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Glue,Bot*
|
||||
G04 #@! TF.FilePolarity,Positive*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:08*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
@@ -1,23 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Other,User*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
%ADD10C,0.050000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X248020000Y-64572000D02*
|
||||
X239620000Y-64572000D01*
|
||||
X248020000Y-57822000D02*
|
||||
X248020000Y-64572000D01*
|
||||
X239620000Y-57822000D02*
|
||||
X248020000Y-57822000D01*
|
||||
X239620000Y-64572000D02*
|
||||
X239620000Y-57822000D01*
|
||||
M02*
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,155 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Other,Fab,Bot*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
%ADD10C,0.100000*%
|
||||
%ADD11C,0.150000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X242570000Y-63072000D02*
|
||||
X243195000Y-64072000D01*
|
||||
X241945000Y-64072000D02*
|
||||
X242570000Y-63072000D01*
|
||||
X247520000Y-64072000D02*
|
||||
X240120000Y-64072000D01*
|
||||
X247520000Y-58322000D02*
|
||||
X247520000Y-64072000D01*
|
||||
X240120000Y-58322000D02*
|
||||
X247520000Y-58322000D01*
|
||||
X240120000Y-64072000D02*
|
||||
X240120000Y-58322000D01*
|
||||
D11*
|
||||
X247558095Y-57479142D02*
|
||||
X247605714Y-57526761D01*
|
||||
X247748571Y-57574380D01*
|
||||
X247843809Y-57574380D01*
|
||||
X247986666Y-57526761D01*
|
||||
X248081904Y-57431523D01*
|
||||
X248129523Y-57336285D01*
|
||||
X248177142Y-57145809D01*
|
||||
X248177142Y-57002952D01*
|
||||
X248129523Y-56812476D01*
|
||||
X248081904Y-56717238D01*
|
||||
X247986666Y-56622000D01*
|
||||
X247843809Y-56574380D01*
|
||||
X247748571Y-56574380D01*
|
||||
X247605714Y-56622000D01*
|
||||
X247558095Y-56669619D01*
|
||||
X246986666Y-57574380D02*
|
||||
X247081904Y-57526761D01*
|
||||
X247129523Y-57479142D01*
|
||||
X247177142Y-57383904D01*
|
||||
X247177142Y-57098190D01*
|
||||
X247129523Y-57002952D01*
|
||||
X247081904Y-56955333D01*
|
||||
X246986666Y-56907714D01*
|
||||
X246843809Y-56907714D01*
|
||||
X246748571Y-56955333D01*
|
||||
X246700952Y-57002952D01*
|
||||
X246653333Y-57098190D01*
|
||||
X246653333Y-57383904D01*
|
||||
X246700952Y-57479142D01*
|
||||
X246748571Y-57526761D01*
|
||||
X246843809Y-57574380D01*
|
||||
X246986666Y-57574380D01*
|
||||
X246224761Y-56907714D02*
|
||||
X246224761Y-57574380D01*
|
||||
X246224761Y-57002952D02*
|
||||
X246177142Y-56955333D01*
|
||||
X246081904Y-56907714D01*
|
||||
X245939047Y-56907714D01*
|
||||
X245843809Y-56955333D01*
|
||||
X245796190Y-57050571D01*
|
||||
X245796190Y-57574380D01*
|
||||
X245320000Y-56907714D02*
|
||||
X245320000Y-57574380D01*
|
||||
X245320000Y-57002952D02*
|
||||
X245272380Y-56955333D01*
|
||||
X245177142Y-56907714D01*
|
||||
X245034285Y-56907714D01*
|
||||
X244939047Y-56955333D01*
|
||||
X244891428Y-57050571D01*
|
||||
X244891428Y-57574380D01*
|
||||
X244653333Y-57669619D02*
|
||||
X243891428Y-57669619D01*
|
||||
X243462857Y-56574380D02*
|
||||
X243367619Y-56574380D01*
|
||||
X243272380Y-56622000D01*
|
||||
X243224761Y-56669619D01*
|
||||
X243177142Y-56764857D01*
|
||||
X243129523Y-56955333D01*
|
||||
X243129523Y-57193428D01*
|
||||
X243177142Y-57383904D01*
|
||||
X243224761Y-57479142D01*
|
||||
X243272380Y-57526761D01*
|
||||
X243367619Y-57574380D01*
|
||||
X243462857Y-57574380D01*
|
||||
X243558095Y-57526761D01*
|
||||
X243605714Y-57479142D01*
|
||||
X243653333Y-57383904D01*
|
||||
X243700952Y-57193428D01*
|
||||
X243700952Y-56955333D01*
|
||||
X243653333Y-56764857D01*
|
||||
X243605714Y-56669619D01*
|
||||
X243558095Y-56622000D01*
|
||||
X243462857Y-56574380D01*
|
||||
X242177142Y-57574380D02*
|
||||
X242748571Y-57574380D01*
|
||||
X242462857Y-57574380D02*
|
||||
X242462857Y-56574380D01*
|
||||
X242558095Y-56717238D01*
|
||||
X242653333Y-56812476D01*
|
||||
X242748571Y-56860095D01*
|
||||
X241843809Y-57574380D02*
|
||||
X241320000Y-56907714D01*
|
||||
X241843809Y-56907714D02*
|
||||
X241320000Y-57574380D01*
|
||||
X240748571Y-56574380D02*
|
||||
X240653333Y-56574380D01*
|
||||
X240558095Y-56622000D01*
|
||||
X240510476Y-56669619D01*
|
||||
X240462857Y-56764857D01*
|
||||
X240415238Y-56955333D01*
|
||||
X240415238Y-57193428D01*
|
||||
X240462857Y-57383904D01*
|
||||
X240510476Y-57479142D01*
|
||||
X240558095Y-57526761D01*
|
||||
X240653333Y-57574380D01*
|
||||
X240748571Y-57574380D01*
|
||||
X240843809Y-57526761D01*
|
||||
X240891428Y-57479142D01*
|
||||
X240939047Y-57383904D01*
|
||||
X240986666Y-57193428D01*
|
||||
X240986666Y-56955333D01*
|
||||
X240939047Y-56764857D01*
|
||||
X240891428Y-56669619D01*
|
||||
X240843809Y-56622000D01*
|
||||
X240748571Y-56574380D01*
|
||||
X240034285Y-56669619D02*
|
||||
X239986666Y-56622000D01*
|
||||
X239891428Y-56574380D01*
|
||||
X239653333Y-56574380D01*
|
||||
X239558095Y-56622000D01*
|
||||
X239510476Y-56669619D01*
|
||||
X239462857Y-56764857D01*
|
||||
X239462857Y-56860095D01*
|
||||
X239510476Y-57002952D01*
|
||||
X240081904Y-57574380D01*
|
||||
X239462857Y-57574380D01*
|
||||
X244153333Y-58474380D02*
|
||||
X244153333Y-59188666D01*
|
||||
X244200952Y-59331523D01*
|
||||
X244296190Y-59426761D01*
|
||||
X244439047Y-59474380D01*
|
||||
X244534285Y-59474380D01*
|
||||
X243772380Y-58474380D02*
|
||||
X243105714Y-58474380D01*
|
||||
X243534285Y-59474380D01*
|
||||
M02*
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:08+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Paste,Bot*
|
||||
G04 #@! TF.FilePolarity,Positive*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:08*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
@@ -1,193 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:08+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Legend,Bot*
|
||||
G04 #@! TF.FilePolarity,Positive*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:08*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
%ADD10C,0.500000*%
|
||||
%ADD11C,0.120000*%
|
||||
%ADD12C,0.150000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X235779314Y-50323523D02*
|
||||
X235779314Y-46323523D01*
|
||||
X234255504Y-46323523D01*
|
||||
X233874552Y-46514000D01*
|
||||
X233684076Y-46704476D01*
|
||||
X233493600Y-47085428D01*
|
||||
X233493600Y-47656857D01*
|
||||
X233684076Y-48037809D01*
|
||||
X233874552Y-48228285D01*
|
||||
X234255504Y-48418761D01*
|
||||
X235779314Y-48418761D01*
|
||||
X231207885Y-50323523D02*
|
||||
X231588838Y-50133047D01*
|
||||
X231779314Y-49752095D01*
|
||||
X231779314Y-46323523D01*
|
||||
X227969790Y-50323523D02*
|
||||
X227969790Y-48228285D01*
|
||||
X228160266Y-47847333D01*
|
||||
X228541219Y-47656857D01*
|
||||
X229303123Y-47656857D01*
|
||||
X229684076Y-47847333D01*
|
||||
X227969790Y-50133047D02*
|
||||
X228350742Y-50323523D01*
|
||||
X229303123Y-50323523D01*
|
||||
X229684076Y-50133047D01*
|
||||
X229874552Y-49752095D01*
|
||||
X229874552Y-49371142D01*
|
||||
X229684076Y-48990190D01*
|
||||
X229303123Y-48799714D01*
|
||||
X228350742Y-48799714D01*
|
||||
X227969790Y-48609238D01*
|
||||
X226065028Y-47656857D02*
|
||||
X226065028Y-50323523D01*
|
||||
X226065028Y-48037809D02*
|
||||
X225874552Y-47847333D01*
|
||||
X225493600Y-47656857D01*
|
||||
X224922171Y-47656857D01*
|
||||
X224541219Y-47847333D01*
|
||||
X224350742Y-48228285D01*
|
||||
X224350742Y-50323523D01*
|
||||
X223017409Y-47656857D02*
|
||||
X221493600Y-47656857D01*
|
||||
X222445980Y-46323523D02*
|
||||
X222445980Y-49752095D01*
|
||||
X222255504Y-50133047D01*
|
||||
X221874552Y-50323523D01*
|
||||
X221493600Y-50323523D01*
|
||||
X217874552Y-49942571D02*
|
||||
X218065028Y-50133047D01*
|
||||
X218636457Y-50323523D01*
|
||||
X219017409Y-50323523D01*
|
||||
X219588838Y-50133047D01*
|
||||
X219969790Y-49752095D01*
|
||||
X220160266Y-49371142D01*
|
||||
X220350742Y-48609238D01*
|
||||
X220350742Y-48037809D01*
|
||||
X220160266Y-47275904D01*
|
||||
X219969790Y-46894952D01*
|
||||
X219588838Y-46514000D01*
|
||||
X219017409Y-46323523D01*
|
||||
X218636457Y-46323523D01*
|
||||
X218065028Y-46514000D01*
|
||||
X217874552Y-46704476D01*
|
||||
X216731695Y-47656857D02*
|
||||
X215207885Y-47656857D01*
|
||||
X216160266Y-46323523D02*
|
||||
X216160266Y-49752095D01*
|
||||
X215969790Y-50133047D01*
|
||||
X215588838Y-50323523D01*
|
||||
X215207885Y-50323523D01*
|
||||
X213874552Y-50323523D02*
|
||||
X213874552Y-47656857D01*
|
||||
X213874552Y-48418761D02*
|
||||
X213684076Y-48037809D01*
|
||||
X213493600Y-47847333D01*
|
||||
X213112647Y-47656857D01*
|
||||
X212731695Y-47656857D01*
|
||||
X210826933Y-50323523D02*
|
||||
X211207885Y-50133047D01*
|
||||
X211398361Y-49752095D01*
|
||||
X211398361Y-46323523D01*
|
||||
X206826933Y-46323523D02*
|
||||
X205493600Y-50323523D01*
|
||||
X204160266Y-46323523D01*
|
||||
X202065028Y-46323523D02*
|
||||
X201684076Y-46323523D01*
|
||||
X201303123Y-46514000D01*
|
||||
X201112647Y-46704476D01*
|
||||
X200922171Y-47085428D01*
|
||||
X200731695Y-47847333D01*
|
||||
X200731695Y-48799714D01*
|
||||
X200922171Y-49561619D01*
|
||||
X201112647Y-49942571D01*
|
||||
X201303123Y-50133047D01*
|
||||
X201684076Y-50323523D01*
|
||||
X202065028Y-50323523D01*
|
||||
X202445980Y-50133047D01*
|
||||
X202636457Y-49942571D01*
|
||||
X202826933Y-49561619D01*
|
||||
X203017409Y-48799714D01*
|
||||
X203017409Y-47847333D01*
|
||||
X202826933Y-47085428D01*
|
||||
X202636457Y-46704476D01*
|
||||
X202445980Y-46514000D01*
|
||||
X202065028Y-46323523D01*
|
||||
X199017409Y-49942571D02*
|
||||
X198826933Y-50133047D01*
|
||||
X199017409Y-50323523D01*
|
||||
X199207885Y-50133047D01*
|
||||
X199017409Y-49942571D01*
|
||||
X199017409Y-50323523D01*
|
||||
X195398361Y-47656857D02*
|
||||
X195398361Y-50323523D01*
|
||||
X196350742Y-46133047D02*
|
||||
X197303123Y-48990190D01*
|
||||
X194826933Y-48990190D01*
|
||||
D11*
|
||||
X239720000Y-64472000D02*
|
||||
X239720000Y-63222000D01*
|
||||
X240970000Y-64472000D02*
|
||||
X239720000Y-64472000D01*
|
||||
X246870000Y-58972000D02*
|
||||
X243820000Y-58972000D01*
|
||||
X246870000Y-61922000D02*
|
||||
X246870000Y-58972000D01*
|
||||
X247620000Y-61922000D02*
|
||||
X246870000Y-61922000D01*
|
||||
X240770000Y-58972000D02*
|
||||
X243820000Y-58972000D01*
|
||||
X240770000Y-61922000D02*
|
||||
X240770000Y-58972000D01*
|
||||
X240020000Y-61922000D02*
|
||||
X240770000Y-61922000D01*
|
||||
X247620000Y-64172000D02*
|
||||
X245820000Y-64172000D01*
|
||||
X247620000Y-63422000D02*
|
||||
X247620000Y-64172000D01*
|
||||
X245820000Y-63422000D02*
|
||||
X247620000Y-63422000D01*
|
||||
X245820000Y-64172000D02*
|
||||
X245820000Y-63422000D01*
|
||||
X241820000Y-64172000D02*
|
||||
X240020000Y-64172000D01*
|
||||
X241820000Y-63422000D02*
|
||||
X241820000Y-64172000D01*
|
||||
X240020000Y-63422000D02*
|
||||
X241820000Y-63422000D01*
|
||||
X240020000Y-64172000D02*
|
||||
X240020000Y-63422000D01*
|
||||
X244320000Y-64172000D02*
|
||||
X243320000Y-64172000D01*
|
||||
X244320000Y-63422000D02*
|
||||
X244320000Y-64172000D01*
|
||||
X243320000Y-63422000D02*
|
||||
X244320000Y-63422000D01*
|
||||
X243320000Y-64172000D02*
|
||||
X243320000Y-63422000D01*
|
||||
X247630000Y-64182000D02*
|
||||
X240010000Y-64182000D01*
|
||||
X247630000Y-58212000D02*
|
||||
X247630000Y-64182000D01*
|
||||
X240010000Y-58212000D02*
|
||||
X247630000Y-58212000D01*
|
||||
X240010000Y-64182000D02*
|
||||
X240010000Y-58212000D01*
|
||||
D12*
|
||||
X244153333Y-64724380D02*
|
||||
X244153333Y-65438666D01*
|
||||
X244200952Y-65581523D01*
|
||||
X244296190Y-65676761D01*
|
||||
X244439047Y-65724380D01*
|
||||
X244534285Y-65724380D01*
|
||||
X243772380Y-64724380D02*
|
||||
X243105714Y-64724380D01*
|
||||
X243534285Y-65724380D01*
|
||||
M02*
|
||||
@@ -1,372 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Other,Comment*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
%ADD10C,0.150000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X277589033Y-83880909D02*
|
||||
X277638018Y-83927121D01*
|
||||
X277688390Y-84020933D01*
|
||||
X277695322Y-84258927D01*
|
||||
X277650496Y-84355511D01*
|
||||
X277604283Y-84404496D01*
|
||||
X277510472Y-84454868D01*
|
||||
X277415274Y-84457641D01*
|
||||
X277271091Y-84414201D01*
|
||||
X276683268Y-83859651D01*
|
||||
X276701291Y-84478436D01*
|
||||
X277725822Y-85306102D02*
|
||||
X277720277Y-85115707D01*
|
||||
X277669905Y-85021895D01*
|
||||
X277620920Y-84975683D01*
|
||||
X277475350Y-84884644D01*
|
||||
X277283569Y-84842591D01*
|
||||
X276902778Y-84853682D01*
|
||||
X276808966Y-84904053D01*
|
||||
X276762754Y-84953039D01*
|
||||
X276717928Y-85049623D01*
|
||||
X276723473Y-85240018D01*
|
||||
X276773845Y-85333830D01*
|
||||
X276822830Y-85380042D01*
|
||||
X276919414Y-85424868D01*
|
||||
X277157408Y-85417936D01*
|
||||
X277251220Y-85367565D01*
|
||||
X277297432Y-85318579D01*
|
||||
X277342258Y-85221995D01*
|
||||
X277336713Y-85031600D01*
|
||||
X277286341Y-84937789D01*
|
||||
X277237356Y-84891576D01*
|
||||
X277140772Y-84846750D01*
|
||||
X276836694Y-85856031D02*
|
||||
X276790481Y-85905016D01*
|
||||
X276741496Y-85858803D01*
|
||||
X276787709Y-85809818D01*
|
||||
X276836694Y-85856031D01*
|
||||
X276741496Y-85858803D01*
|
||||
X276770610Y-86858380D02*
|
||||
X276753973Y-86287193D01*
|
||||
X276762292Y-86572786D02*
|
||||
X277761868Y-86543672D01*
|
||||
X277616298Y-86452634D01*
|
||||
X277518328Y-86360209D01*
|
||||
X277467956Y-86266398D01*
|
||||
X277779891Y-87162458D02*
|
||||
X277799300Y-87828842D01*
|
||||
X276787246Y-87429566D01*
|
||||
X277807618Y-88114435D02*
|
||||
X277825641Y-88733220D01*
|
||||
X277435146Y-88411119D01*
|
||||
X277439305Y-88553916D01*
|
||||
X277394479Y-88650500D01*
|
||||
X277348266Y-88699485D01*
|
||||
X277254455Y-88749857D01*
|
||||
X277016460Y-88756788D01*
|
||||
X276919876Y-88711962D01*
|
||||
X276870891Y-88665750D01*
|
||||
X276820519Y-88571939D01*
|
||||
X276812201Y-88286345D01*
|
||||
X276857027Y-88189761D01*
|
||||
X276903240Y-88140776D01*
|
||||
X276860724Y-89952306D02*
|
||||
X277527108Y-89932896D01*
|
||||
X277431911Y-89935669D02*
|
||||
X277480896Y-89981882D01*
|
||||
X277531267Y-90075693D01*
|
||||
X277535427Y-90218489D01*
|
||||
X277490600Y-90315074D01*
|
||||
X277396789Y-90365445D01*
|
||||
X276873202Y-90380695D01*
|
||||
X277396789Y-90365445D02*
|
||||
X277493373Y-90410271D01*
|
||||
X277543745Y-90504083D01*
|
||||
X277547904Y-90646879D01*
|
||||
X277503078Y-90743463D01*
|
||||
X277409267Y-90793835D01*
|
||||
X276885679Y-90809085D01*
|
||||
X276899543Y-91285074D02*
|
||||
X277565927Y-91265664D01*
|
||||
X277470729Y-91268437D02*
|
||||
X277519714Y-91314650D01*
|
||||
X277570086Y-91408461D01*
|
||||
X277574245Y-91551258D01*
|
||||
X277529419Y-91647842D01*
|
||||
X277435608Y-91698213D01*
|
||||
X276912020Y-91713463D01*
|
||||
X277435608Y-91698213D02*
|
||||
X277532192Y-91743039D01*
|
||||
X277582563Y-91836851D01*
|
||||
X277586722Y-91979647D01*
|
||||
X277541896Y-92076231D01*
|
||||
X277448085Y-92126603D01*
|
||||
X276924498Y-92141853D01*
|
||||
X276339010Y-101154029D02*
|
||||
X275577010Y-74992029D01*
|
||||
X269748000Y-101346000D02*
|
||||
X276925182Y-101136956D01*
|
||||
X268986000Y-75184000D02*
|
||||
X276163182Y-74974956D01*
|
||||
X275577010Y-74992029D02*
|
||||
X276195979Y-76100982D01*
|
||||
X275577010Y-74992029D02*
|
||||
X275023635Y-76135128D01*
|
||||
X276339010Y-101154029D02*
|
||||
X276892385Y-100010930D01*
|
||||
X276339010Y-101154029D02*
|
||||
X275720041Y-100045076D01*
|
||||
X283091941Y-71405219D02*
|
||||
X283084973Y-70929080D01*
|
||||
X282608137Y-70888434D01*
|
||||
X282656447Y-70935351D01*
|
||||
X282705455Y-71029882D01*
|
||||
X282708939Y-71267952D01*
|
||||
X282662719Y-71363876D01*
|
||||
X282615801Y-71412187D01*
|
||||
X282521270Y-71461195D01*
|
||||
X282283201Y-71464679D01*
|
||||
X282187276Y-71418458D01*
|
||||
X282138965Y-71371541D01*
|
||||
X282089958Y-71277010D01*
|
||||
X282086474Y-71038940D01*
|
||||
X282132694Y-70943016D01*
|
||||
X282179611Y-70894705D01*
|
||||
X283002984Y-71835138D02*
|
||||
X283051295Y-71882056D01*
|
||||
X283100302Y-71976587D01*
|
||||
X283103786Y-72214656D01*
|
||||
X283057566Y-72310581D01*
|
||||
X283010649Y-72358892D01*
|
||||
X282916118Y-72407899D01*
|
||||
X282820890Y-72409293D01*
|
||||
X282677351Y-72363769D01*
|
||||
X282097622Y-71800763D01*
|
||||
X282106681Y-72419745D01*
|
||||
X282208180Y-72846877D02*
|
||||
X282161262Y-72895187D01*
|
||||
X282112952Y-72848270D01*
|
||||
X282159869Y-72799960D01*
|
||||
X282208180Y-72846877D01*
|
||||
X282112952Y-72848270D01*
|
||||
X283122600Y-73500233D02*
|
||||
X283123993Y-73595461D01*
|
||||
X283077773Y-73691386D01*
|
||||
X283030856Y-73739696D01*
|
||||
X282936325Y-73788704D01*
|
||||
X282746566Y-73839105D01*
|
||||
X282508496Y-73842589D01*
|
||||
X282317343Y-73797762D01*
|
||||
X282221419Y-73751542D01*
|
||||
X282173108Y-73704625D01*
|
||||
X282124100Y-73610094D01*
|
||||
X282122707Y-73514866D01*
|
||||
X282168927Y-73418941D01*
|
||||
X282215844Y-73370630D01*
|
||||
X282310375Y-73321623D01*
|
||||
X282500134Y-73271222D01*
|
||||
X282738204Y-73267738D01*
|
||||
X282929357Y-73312564D01*
|
||||
X283025281Y-73358785D01*
|
||||
X283073592Y-73405702D01*
|
||||
X283122600Y-73500233D01*
|
||||
X283132355Y-74166828D02*
|
||||
X283142110Y-74833424D01*
|
||||
X282135946Y-74419531D01*
|
||||
X283153955Y-75642861D02*
|
||||
X283151168Y-75452405D01*
|
||||
X283102160Y-75357874D01*
|
||||
X283053850Y-75310957D01*
|
||||
X282909614Y-75217819D01*
|
||||
X282718462Y-75172992D01*
|
||||
X282337550Y-75178567D01*
|
||||
X282243019Y-75227574D01*
|
||||
X282196102Y-75275885D01*
|
||||
X282149882Y-75371810D01*
|
||||
X282152669Y-75562265D01*
|
||||
X282201676Y-75656797D01*
|
||||
X282249987Y-75703714D01*
|
||||
X282345912Y-75749934D01*
|
||||
X282583981Y-75746450D01*
|
||||
X282678512Y-75697443D01*
|
||||
X282725430Y-75649132D01*
|
||||
X282771650Y-75553207D01*
|
||||
X282768863Y-75362751D01*
|
||||
X282719855Y-75268220D01*
|
||||
X282671545Y-75221303D01*
|
||||
X282575620Y-75175083D01*
|
||||
X282172876Y-76943070D02*
|
||||
X282839471Y-76933315D01*
|
||||
X282744243Y-76934709D02*
|
||||
X282792554Y-76981626D01*
|
||||
X282841561Y-77076157D01*
|
||||
X282843652Y-77218999D01*
|
||||
X282797431Y-77314923D01*
|
||||
X282702900Y-77363931D01*
|
||||
X282179147Y-77371596D01*
|
||||
X282702900Y-77363931D02*
|
||||
X282798825Y-77410151D01*
|
||||
X282847832Y-77504682D01*
|
||||
X282849923Y-77647524D01*
|
||||
X282803702Y-77743449D01*
|
||||
X282709171Y-77792456D01*
|
||||
X282185418Y-77800121D01*
|
||||
X282192386Y-78276261D02*
|
||||
X282858981Y-78266506D01*
|
||||
X282763753Y-78267899D02*
|
||||
X282812064Y-78314816D01*
|
||||
X282861071Y-78409347D01*
|
||||
X282863162Y-78552189D01*
|
||||
X282816941Y-78648114D01*
|
||||
X282722410Y-78697121D01*
|
||||
X282198657Y-78704786D01*
|
||||
X282722410Y-78697121D02*
|
||||
X282818335Y-78743342D01*
|
||||
X282867342Y-78837873D01*
|
||||
X282869433Y-78980715D01*
|
||||
X282823212Y-79076639D01*
|
||||
X282728681Y-79125647D01*
|
||||
X282204928Y-79133312D01*
|
||||
X281678476Y-101085915D02*
|
||||
X280916476Y-49015915D01*
|
||||
X263906000Y-101346000D02*
|
||||
X282264834Y-101077334D01*
|
||||
X263144000Y-49276000D02*
|
||||
X281502834Y-49007334D01*
|
||||
X280916476Y-49015915D02*
|
||||
X281519318Y-50133717D01*
|
||||
X280916476Y-49015915D02*
|
||||
X280346602Y-50150879D01*
|
||||
X281678476Y-101085915D02*
|
||||
X282248350Y-99950951D01*
|
||||
X281678476Y-101085915D02*
|
||||
X281075634Y-99968113D01*
|
||||
X260308156Y-74045062D02*
|
||||
X259736906Y-74059343D01*
|
||||
X260022531Y-74052203D02*
|
||||
X259997539Y-73052515D01*
|
||||
X259905901Y-73197708D01*
|
||||
X259813073Y-73295296D01*
|
||||
X259719055Y-73345281D01*
|
||||
X260902019Y-73029903D02*
|
||||
X260997227Y-73027523D01*
|
||||
X261093625Y-73072747D01*
|
||||
X261142420Y-73119161D01*
|
||||
X261192404Y-73213179D01*
|
||||
X261244769Y-73402406D01*
|
||||
X261250719Y-73640426D01*
|
||||
X261207875Y-73832033D01*
|
||||
X261162651Y-73928432D01*
|
||||
X261116237Y-73977226D01*
|
||||
X261022219Y-74027210D01*
|
||||
X260927011Y-74029591D01*
|
||||
X260830612Y-73984367D01*
|
||||
X260781818Y-73937953D01*
|
||||
X260731834Y-73843934D01*
|
||||
X260679469Y-73654708D01*
|
||||
X260673519Y-73416687D01*
|
||||
X260716362Y-73225080D01*
|
||||
X260761586Y-73128682D01*
|
||||
X260808000Y-73079887D01*
|
||||
X260902019Y-73029903D01*
|
||||
X261686297Y-73915341D02*
|
||||
X261735092Y-73961755D01*
|
||||
X261688678Y-74010549D01*
|
||||
X261639883Y-73964135D01*
|
||||
X261686297Y-73915341D01*
|
||||
X261688678Y-74010549D01*
|
||||
X262688365Y-73985557D02*
|
||||
X262117115Y-73999838D01*
|
||||
X262402740Y-73992697D02*
|
||||
X262377748Y-72993010D01*
|
||||
X262286110Y-73138202D01*
|
||||
X262193282Y-73235791D01*
|
||||
X262099264Y-73285775D01*
|
||||
X263520248Y-72964447D02*
|
||||
X263329831Y-72969208D01*
|
||||
X263235813Y-73019192D01*
|
||||
X263189399Y-73067986D01*
|
||||
X263097761Y-73213179D01*
|
||||
X263054917Y-73404786D01*
|
||||
X263064438Y-73785619D01*
|
||||
X263114423Y-73879637D01*
|
||||
X263163217Y-73926052D01*
|
||||
X263259615Y-73971276D01*
|
||||
X263450032Y-73966515D01*
|
||||
X263544050Y-73916531D01*
|
||||
X263590464Y-73867736D01*
|
||||
X263635688Y-73771338D01*
|
||||
X263629738Y-73533317D01*
|
||||
X263579753Y-73439299D01*
|
||||
X263530959Y-73392885D01*
|
||||
X263434561Y-73347661D01*
|
||||
X263244144Y-73352421D01*
|
||||
X263150126Y-73402406D01*
|
||||
X263103712Y-73451200D01*
|
||||
X263058488Y-73547598D01*
|
||||
X263948686Y-72953736D02*
|
||||
X264567540Y-72938265D01*
|
||||
X264243832Y-73327429D01*
|
||||
X264386644Y-73323859D01*
|
||||
X264483042Y-73369083D01*
|
||||
X264531837Y-73415497D01*
|
||||
X264581821Y-73509515D01*
|
||||
X264587772Y-73747536D01*
|
||||
X264542548Y-73843934D01*
|
||||
X264496134Y-73892729D01*
|
||||
X264402115Y-73942713D01*
|
||||
X264116490Y-73949854D01*
|
||||
X264020092Y-73904630D01*
|
||||
X263971298Y-73858216D01*
|
||||
X265782636Y-73908200D02*
|
||||
X265765975Y-73241742D01*
|
||||
X265768355Y-73336950D02*
|
||||
X265814769Y-73288156D01*
|
||||
X265908787Y-73238171D01*
|
||||
X266051600Y-73234601D01*
|
||||
X266147998Y-73279825D01*
|
||||
X266197983Y-73373843D01*
|
||||
X266211074Y-73897489D01*
|
||||
X266197983Y-73373843D02*
|
||||
X266243207Y-73277445D01*
|
||||
X266337225Y-73227460D01*
|
||||
X266480038Y-73223890D01*
|
||||
X266576436Y-73269114D01*
|
||||
X266626420Y-73363132D01*
|
||||
X266639512Y-73886778D01*
|
||||
X267115553Y-73874877D02*
|
||||
X267098892Y-73208419D01*
|
||||
X267101272Y-73303627D02*
|
||||
X267147686Y-73254833D01*
|
||||
X267241704Y-73204848D01*
|
||||
X267384517Y-73201278D01*
|
||||
X267480915Y-73246502D01*
|
||||
X267530900Y-73340520D01*
|
||||
X267543991Y-73864166D01*
|
||||
X267530900Y-73340520D02*
|
||||
X267576124Y-73244122D01*
|
||||
X267670142Y-73194137D01*
|
||||
X267812954Y-73190567D01*
|
||||
X267909353Y-73235791D01*
|
||||
X267959337Y-73329809D01*
|
||||
X267972428Y-73853455D01*
|
||||
X268979654Y-74676159D02*
|
||||
X258819654Y-74930159D01*
|
||||
X269240000Y-85090000D02*
|
||||
X268964998Y-74089921D01*
|
||||
X259080000Y-85344000D02*
|
||||
X258804998Y-74343921D01*
|
||||
X258819654Y-74930159D02*
|
||||
X259931150Y-74315768D01*
|
||||
X258819654Y-74930159D02*
|
||||
X259960462Y-75488243D01*
|
||||
X268979654Y-74676159D02*
|
||||
X267838846Y-74118075D01*
|
||||
X268979654Y-74676159D02*
|
||||
X267868158Y-75290550D01*
|
||||
M02*
|
||||
@@ -1,13 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,OtherDrawing,Comment*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
@@ -1,13 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Other,ECO1*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
@@ -1,13 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Other,ECO2*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
@@ -1,25 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Profile,NP*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
%ADD10C,0.050000*%
|
||||
G04 APERTURE END LIST*
|
||||
D10*
|
||||
X170180000Y-40640000D02*
|
||||
X269240000Y-40640000D01*
|
||||
X170180000Y-43180000D02*
|
||||
X170180000Y-40640000D01*
|
||||
X170180000Y-139700000D02*
|
||||
X170180000Y-43180000D01*
|
||||
X269240000Y-139700000D02*
|
||||
X269240000Y-40640000D01*
|
||||
X170180000Y-139700000D02*
|
||||
X269240000Y-139700000D01*
|
||||
M02*
|
||||
@@ -1,14 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:08+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Glue,Top*
|
||||
G04 #@! TF.FilePolarity,Positive*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:08*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3*
|
||||
G04 #@! TF.CreationDate,2020-11-29T03:44:09+01:00*
|
||||
G04 #@! TF.ProjectId,PlantCtrlESP32,506c616e-7443-4747-926c-45535033322e,rev?*
|
||||
G04 #@! TF.SameCoordinates,Original*
|
||||
G04 #@! TF.FileFunction,Other,User*
|
||||
%FSLAX46Y46*%
|
||||
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
|
||||
G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-11-29 03:44:09*
|
||||
%MOMM*%
|
||||
%LPD*%
|
||||
G04 APERTURE LIST*
|
||||
G04 APERTURE END LIST*
|
||||
M02*
|
||||
@@ -1,20 +0,0 @@
|
||||
M48
|
||||
; DRILL file {KiCad (5.1.5)-3} date 11/29/20 03:44:10
|
||||
; FORMAT={-:-/ absolute / metric / decimal}
|
||||
; #@! TF.CreationDate,2020-11-29T03:44:10+01:00
|
||||
; #@! TF.GenerationSoftware,Kicad,Pcbnew,(5.1.5)-3
|
||||
; #@! TF.FileFunction,NonPlated,1,2,NPTH
|
||||
FMAT,2
|
||||
METRIC
|
||||
T1C2.390
|
||||
T2C3.450
|
||||
%
|
||||
G90
|
||||
G05
|
||||
T1
|
||||
X251.83Y-62.61
|
||||
T2
|
||||
X188.3Y-62.61
|
||||
X243.5Y-46.61
|
||||
T0
|
||||
M30
|
||||
@@ -1,200 +0,0 @@
|
||||
M48
|
||||
; DRILL file {KiCad (5.1.5)-3} date 11/29/20 03:44:10
|
||||
; FORMAT={-:-/ absolute / metric / decimal}
|
||||
; #@! TF.CreationDate,2020-11-29T03:44:10+01:00
|
||||
; #@! TF.GenerationSoftware,Kicad,Pcbnew,(5.1.5)-3
|
||||
; #@! TF.FileFunction,Plated,1,2,PTH
|
||||
FMAT,2
|
||||
METRIC
|
||||
T1C0.400
|
||||
T2C0.750
|
||||
T3C0.950
|
||||
T4C1.000
|
||||
T5C1.040
|
||||
T6C2.000
|
||||
T7C3.000
|
||||
%
|
||||
G90
|
||||
G05
|
||||
T1
|
||||
X171.45Y-77.724
|
||||
X175.26Y-76.454
|
||||
X176.276Y-66.548
|
||||
X176.784Y-59.944
|
||||
X184.404Y-99.568
|
||||
X185.42Y-122.428
|
||||
X187.706Y-122.428
|
||||
X188.976Y-95.504
|
||||
X188.976Y-98.552
|
||||
X189.794Y-80.208
|
||||
X189.992Y-122.428
|
||||
X191.008Y-54.61
|
||||
X191.262Y-66.548
|
||||
X192.024Y-99.822
|
||||
X192.278Y-88.9
|
||||
X192.278Y-122.428
|
||||
X194.564Y-122.428
|
||||
X195.834Y-77.47
|
||||
X196.85Y-122.428
|
||||
X196.88Y-78.77
|
||||
X197.612Y-135.636
|
||||
X199.136Y-122.428
|
||||
X200.214Y-128.016
|
||||
X200.914Y-129.286
|
||||
X201.93Y-127.0
|
||||
X202.438Y-98.044
|
||||
X208.28Y-65.024
|
||||
X210.12Y-102.616
|
||||
X210.82Y-104.14
|
||||
X211.455Y-59.817
|
||||
X212.32Y-85.598
|
||||
X212.344Y-87.122
|
||||
X213.106Y-92.202
|
||||
X214.122Y-54.356
|
||||
X216.916Y-98.044
|
||||
X220.284Y-92.268
|
||||
X221.234Y-54.61
|
||||
X224.282Y-98.044
|
||||
X226.822Y-85.09
|
||||
X227.396Y-92.268
|
||||
X227.584Y-87.376
|
||||
X231.902Y-98.044
|
||||
X235.016Y-92.268
|
||||
X235.204Y-87.63
|
||||
X236.474Y-80.01
|
||||
X237.38Y-76.344
|
||||
X239.776Y-98.044
|
||||
X241.3Y-87.122
|
||||
X242.25Y-92.268
|
||||
X242.316Y-83.058
|
||||
X247.396Y-98.044
|
||||
X250.886Y-92.268
|
||||
X255.27Y-98.044
|
||||
X257.744Y-92.268
|
||||
X262.636Y-98.044
|
||||
X263.398Y-59.436
|
||||
T2
|
||||
X215.138Y-41.783
|
||||
X216.408Y-41.783
|
||||
X217.678Y-41.783
|
||||
T3
|
||||
X237.49Y-124.54
|
||||
X237.49Y-127.04
|
||||
X237.49Y-129.54
|
||||
X214.63Y-124.54
|
||||
X214.63Y-127.04
|
||||
X214.63Y-129.54
|
||||
X252.73Y-124.54
|
||||
X252.73Y-127.04
|
||||
X252.73Y-129.54
|
||||
X173.99Y-101.6
|
||||
X173.99Y-104.1
|
||||
X173.99Y-106.6
|
||||
X245.11Y-124.54
|
||||
X245.11Y-127.04
|
||||
X245.11Y-129.54
|
||||
X173.99Y-86.36
|
||||
X173.99Y-88.86
|
||||
X173.99Y-91.36
|
||||
X173.99Y-93.86
|
||||
X173.736Y-113.792
|
||||
X173.736Y-116.292
|
||||
X173.736Y-118.792
|
||||
X229.87Y-124.54
|
||||
X229.87Y-127.04
|
||||
X229.87Y-129.54
|
||||
X260.35Y-124.54
|
||||
X260.35Y-127.04
|
||||
X260.35Y-129.54
|
||||
X222.25Y-124.54
|
||||
X222.25Y-127.04
|
||||
X222.25Y-129.54
|
||||
T4
|
||||
X214.63Y-110.53
|
||||
X214.63Y-113.03
|
||||
X229.87Y-110.53
|
||||
X229.87Y-113.03
|
||||
X259.842Y-71.374
|
||||
X259.842Y-73.914
|
||||
X259.842Y-76.454
|
||||
X259.842Y-78.994
|
||||
X237.49Y-110.53
|
||||
X237.49Y-113.03
|
||||
X238.76Y-67.564
|
||||
X241.3Y-67.564
|
||||
X243.84Y-67.564
|
||||
X246.38Y-67.564
|
||||
X186.055Y-133.985
|
||||
X188.595Y-133.985
|
||||
X191.135Y-133.985
|
||||
X193.675Y-133.985
|
||||
X222.25Y-110.53
|
||||
X222.25Y-113.03
|
||||
X252.73Y-110.53
|
||||
X252.73Y-113.03
|
||||
X242.57Y-61.722
|
||||
X245.07Y-61.722
|
||||
X245.11Y-110.53
|
||||
X245.11Y-113.03
|
||||
X260.35Y-110.53
|
||||
X260.35Y-113.03
|
||||
T5
|
||||
X179.705Y-74.855
|
||||
X179.705Y-77.395
|
||||
X179.705Y-79.935
|
||||
X179.705Y-82.475
|
||||
X179.705Y-85.015
|
||||
X179.705Y-87.555
|
||||
X179.705Y-90.095
|
||||
X179.705Y-92.635
|
||||
X179.705Y-95.175
|
||||
X179.705Y-97.715
|
||||
X179.705Y-100.255
|
||||
X179.705Y-102.795
|
||||
X179.705Y-105.335
|
||||
X179.705Y-107.875
|
||||
X179.705Y-110.415
|
||||
X179.705Y-112.955
|
||||
X179.705Y-115.495
|
||||
X179.705Y-118.035
|
||||
X179.705Y-120.575
|
||||
X205.105Y-74.855
|
||||
X205.105Y-77.395
|
||||
X205.105Y-79.935
|
||||
X205.105Y-82.475
|
||||
X205.105Y-85.015
|
||||
X205.105Y-87.555
|
||||
X205.105Y-90.095
|
||||
X205.105Y-92.635
|
||||
X205.105Y-95.175
|
||||
X205.105Y-97.715
|
||||
X205.105Y-100.255
|
||||
X205.105Y-102.795
|
||||
X205.105Y-105.335
|
||||
X205.105Y-107.875
|
||||
X205.105Y-110.415
|
||||
X205.105Y-112.955
|
||||
X205.105Y-115.495
|
||||
X205.105Y-118.035
|
||||
X205.105Y-120.575
|
||||
T6
|
||||
X176.57Y-54.61
|
||||
X255.23Y-54.61
|
||||
T7
|
||||
X173.99Y-44.45
|
||||
X173.99Y-135.636
|
||||
X265.43Y-44.45
|
||||
X265.43Y-135.636
|
||||
T6
|
||||
G00X252.73Y-74.234
|
||||
M15
|
||||
G01X252.73Y-70.234
|
||||
M16
|
||||
G05
|
||||
G00X252.73Y-83.534
|
||||
M15
|
||||
G01X252.73Y-79.534
|
||||
M16
|
||||
G05
|
||||
T0
|
||||
M30
|
||||
158
board/kicad-stuff/BQ34Z100PWR-G1.kicad_sym
Normal file
158
board/kicad-stuff/BQ34Z100PWR-G1.kicad_sym
Normal file
@@ -0,0 +1,158 @@
|
||||
|
||||
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
|
||||
(symbol "BQ34Z100PWR-G1" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (id 0) (at -12.7 26.4 0.0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom left))
|
||||
)
|
||||
(property "Value" "BQ34Z100PWR-G1" (id 1) (at -12.7 -29.4 0.0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom left))
|
||||
)
|
||||
(property "Footprint" "BQ34Z100PWR-G1:SOP65P640X120-14N" (id 2) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "MF" "Texas Instruments" (id 4) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Description" "\nMulti-chemistry Impedance Track™ standalone fuel gauge | battery gas gauge\n" (id 5) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Package" "TSSOP-14 Texas Instruments" (id 6) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Price" "None" (id 7) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "SnapEDA_Link" "https://www.snapeda.com/parts/BQ34Z100PWR-G1/Texas+Instruments/view-part/?ref=snap" (id 8) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "MP" "BQ34Z100PWR-G1" (id 9) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Purchase-URL" "https://www.snapeda.com/api/url_track_click_mouser/?unipart_id=327977&manufacturer=Texas Instruments&part_name=BQ34Z100PWR-G1&search_term=None" (id 10) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Availability" "In Stock" (id 11) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(property "Check_prices" "https://www.snapeda.com/parts/BQ34Z100PWR-G1/Texas+Instruments/view-part/?ref=eda" (id 12) (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify bottom) hide)
|
||||
)
|
||||
(symbol "BQ34Z100PWR-G1_0_0"
|
||||
(rectangle (start -12.7 -25.4) (end 12.7 25.4)
|
||||
(stroke (width 0.41)) (fill (type background))
|
||||
)
|
||||
(pin input line (at -17.78 22.86 0) (length 5.08)
|
||||
(name "REGIN"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "6"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 17.78 0) (length 5.08)
|
||||
(name "BAT"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "4"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 12.7 0) (length 5.08)
|
||||
(name "CE"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "5"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 7.62 0) (length 5.08)
|
||||
(name "P1"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "3"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 5.08 0) (length 5.08)
|
||||
(name "P2"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "1"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 2.54 0) (length 5.08)
|
||||
(name "P3/SDA"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "14"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 -2.54 0) (length 5.08)
|
||||
(name "REG25"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "7"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 -7.62 0) (length 5.08)
|
||||
(name "SRN"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "10"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 -12.7 0) (length 5.08)
|
||||
(name "SRP"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "9"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at -17.78 -17.78 0) (length 5.08)
|
||||
(name "VEN"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "2"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 17.78 5.08 180.0) (length 5.08)
|
||||
(name "P4/SCL"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "13"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 17.78 2.54 180.0) (length 5.08)
|
||||
(name "P5/HDQ"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "12"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin bidirectional line (at 17.78 1.77636e-15 180.0) (length 5.08)
|
||||
(name "P6/TS"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "11"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
(pin power_in line (at 17.78 -20.32 180.0) (length 5.08)
|
||||
(name "VSS"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
(number "8"
|
||||
(effects (font (size 1.016 1.016)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
7027
board/kicad-stuff/BQ34Z100PWR-G1.step
Normal file
7027
board/kicad-stuff/BQ34Z100PWR-G1.step
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,9 @@
|
||||
EESchema-DOCLIB Version 2.0
|
||||
#
|
||||
$CMP CN61CN33
|
||||
D Microprocessor Reset (active-low) Circuit, SOT-23
|
||||
K reset supervisor
|
||||
F http://www.ti.com/lit/ds/symlink/lm809.pdf
|
||||
$ENDCMP
|
||||
#
|
||||
#End Doc Library
|
||||
|
||||
186
board/kicad-stuff/DW01.kicad_sym
Normal file
186
board/kicad-stuff/DW01.kicad_sym
Normal file
@@ -0,0 +1,186 @@
|
||||
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
|
||||
(symbol "CN61CN33" (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at 2.54 12.7 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "CN61CN33" (at 5.08 10.16 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "Package_TO_SOT_SMD:SOT-23" (at 7.62 2.54 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "http://www.ti.com/lit/ds/symlink/lm809.pdf" (at 7.62 2.54 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "ki_keywords" "reset supervisor" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "ki_description" "Microprocessor Reset (active-low) Circuit, SOT-23" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "ki_fp_filters" "SOT?23*" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "CN61CN33_0_1"
|
||||
(rectangle (start 5.08 7.62) (end -5.08 -7.62)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type background))
|
||||
)
|
||||
)
|
||||
(symbol "CN61CN33_1_1"
|
||||
(pin output line (at 0 -10.16 90) (length 2.54)
|
||||
(name "RESET" (effects (font (size 1.27 1.27))))
|
||||
(number "1" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin power_in line (at 7.62 0 180) (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 0 10.16 270) (length 2.54)
|
||||
(name "VCC" (effects (font (size 1.27 1.27))))
|
||||
(number "3" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol "DS2438" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "DS2438" (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)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "DS2438_0_1"
|
||||
(rectangle (start -11.43 -2.54) (end 12.7 -30.48)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type background))
|
||||
)
|
||||
)
|
||||
(symbol "DS2438_1_1"
|
||||
(pin power_in line (at -13.97 -6.35 0) (length 2.54)
|
||||
(name "GND" (effects (font (size 1.27 1.27))))
|
||||
(number "1" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin unspecified line (at -13.97 -12.7 0) (length 2.54)
|
||||
(name "Vsens+" (effects (font (size 1.27 1.27))))
|
||||
(number "2" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin unspecified line (at -13.97 -19.05 0) (length 2.54)
|
||||
(name "Vsense-" (effects (font (size 1.27 1.27))))
|
||||
(number "3" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -13.97 -25.4 0) (length 2.54)
|
||||
(name "Vad" (effects (font (size 1.27 1.27))))
|
||||
(number "4" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin power_in line (at 15.24 -25.4 180) (length 2.54)
|
||||
(name "Vdd" (effects (font (size 1.27 1.27))))
|
||||
(number "5" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin unspecified line (at 15.24 -19.05 180) (length 2.54)
|
||||
(name "NC" (effects (font (size 1.27 1.27))))
|
||||
(number "6" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin unspecified line (at 15.24 -12.7 180) (length 2.54)
|
||||
(name "NC" (effects (font (size 1.27 1.27))))
|
||||
(number "7" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin bidirectional line (at 15.24 -6.35 180) (length 2.54)
|
||||
(name "DQ" (effects (font (size 1.27 1.27))))
|
||||
(number "8" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol "DW01" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "IC" (at 21.59 7.62 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Value" "DW01" (at 21.59 5.08 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Footprint" "SOT95P280X135-6N" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "HEIGHT" "1.35mm" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "DESCRIPTION" "ic" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "MANUFACTURER_PART_NUMBER" "DW01" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "MANUFACTURER_NAME" "Slkor" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "ki_locked" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(symbol "DW01_0_0"
|
||||
(polyline
|
||||
(pts
|
||||
(xy 5.08 2.54)
|
||||
(xy 5.08 -7.62)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 5.08 2.54)
|
||||
(xy 20.32 2.54)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 20.32 -7.62)
|
||||
(xy 5.08 -7.62)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 20.32 -7.62)
|
||||
(xy 20.32 2.54)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(pin bidirectional line (at 0 0 0) (length 5.08)
|
||||
(name "OD" (effects (font (size 1.016 1.016))))
|
||||
(number "1" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 0 -2.54 0) (length 5.08)
|
||||
(name "CSI" (effects (font (size 1.016 1.016))))
|
||||
(number "2" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 0 -5.08 0) (length 5.08)
|
||||
(name "OC" (effects (font (size 1.016 1.016))))
|
||||
(number "3" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 25.4 -5.08 180) (length 5.08)
|
||||
(name "TD" (effects (font (size 1.016 1.016))))
|
||||
(number "4" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 25.4 -2.54 180) (length 5.08)
|
||||
(name "VDD" (effects (font (size 1.016 1.016))))
|
||||
(number "5" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 25.4 0 180) (length 5.08)
|
||||
(name "VSS" (effects (font (size 1.016 1.016))))
|
||||
(number "6" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1,6 +1,24 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# CN61CN33
|
||||
#
|
||||
DEF CN61CN33 U 0 20 Y Y 1 F N
|
||||
F0 "U" 100 500 50 H V C CNN
|
||||
F1 "CN61CN33" 200 400 50 H V C CNN
|
||||
F2 "Package_TO_SOT_SMD:SOT-23" 300 100 50 H I C CNN
|
||||
F3 "" 300 100 50 H I C CNN
|
||||
$FPLIST
|
||||
SOT?23*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S 200 300 -200 -300 0 1 10 f
|
||||
X RESET 1 0 -400 100 U 50 50 1 1 O
|
||||
X GND 2 300 0 100 L 50 50 1 1 W
|
||||
X VCC 3 0 400 100 D 50 50 1 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# DS2438
|
||||
#
|
||||
DEF DS2438 U 0 40 Y Y 1 F N
|
||||
|
||||
454
board/kicad-stuff/ESP32/ESP32-DEVKITC-32D.kicad_sym
Normal file
454
board/kicad-stuff/ESP32/ESP32-DEVKITC-32D.kicad_sym
Normal file
@@ -0,0 +1,454 @@
|
||||
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
|
||||
(symbol "ESP32-DEVKITC-32D" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at -15.2654 26.0604 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Value" "ESP32-DEVKITC-32D" (at -15.2654 -27.9654 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Footprint" "MODULE_ESP32-DEVKITC-32D" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Datasheet" "4" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Field4" "Espressif Systems" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "ki_locked" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(symbol "ESP32-DEVKITC-32D_0_0"
|
||||
(polyline
|
||||
(pts
|
||||
(xy -15.24 -25.4)
|
||||
(xy -15.24 25.4)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -15.24 25.4)
|
||||
(xy 15.24 25.4)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 15.24 -25.4)
|
||||
(xy -15.24 -25.4)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 15.24 25.4)
|
||||
(xy 15.24 -25.4)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(pin power_in line (at -20.32 22.86 0) (length 5.08)
|
||||
(name "3V3" (effects (font (size 1.016 1.016))))
|
||||
(number "1" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 0 0) (length 5.08)
|
||||
(name "IO26" (effects (font (size 1.016 1.016))))
|
||||
(number "10" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -2.54 0) (length 5.08)
|
||||
(name "IO27" (effects (font (size 1.016 1.016))))
|
||||
(number "11" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -5.08 0) (length 5.08)
|
||||
(name "IO14" (effects (font (size 1.016 1.016))))
|
||||
(number "12" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -7.62 0) (length 5.08)
|
||||
(name "IO12" (effects (font (size 1.016 1.016))))
|
||||
(number "13" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin power_in line (at -20.32 -10.16 0) (length 5.08)
|
||||
(name "GND1" (effects (font (size 1.016 1.016))))
|
||||
(number "14" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -12.7 0) (length 5.08)
|
||||
(name "IO13" (effects (font (size 1.016 1.016))))
|
||||
(number "15" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -15.24 0) (length 5.08)
|
||||
(name "SD2" (effects (font (size 1.016 1.016))))
|
||||
(number "16" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -17.78 0) (length 5.08)
|
||||
(name "SD3" (effects (font (size 1.016 1.016))))
|
||||
(number "17" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 -20.32 0) (length 5.08)
|
||||
(name "CMD" (effects (font (size 1.016 1.016))))
|
||||
(number "18" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin power_in line (at -20.32 -22.86 0) (length 5.08)
|
||||
(name "EXT_5V" (effects (font (size 1.016 1.016))))
|
||||
(number "19" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin input line (at -20.32 20.32 0) (length 5.08)
|
||||
(name "EN" (effects (font (size 1.016 1.016))))
|
||||
(number "2" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin power_in line (at 20.32 22.86 180) (length 5.08)
|
||||
(name "GND3" (effects (font (size 1.016 1.016))))
|
||||
(number "20" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 20.32 180) (length 5.08)
|
||||
(name "IO23" (effects (font (size 1.016 1.016))))
|
||||
(number "21" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 17.78 180) (length 5.08)
|
||||
(name "IO22" (effects (font (size 1.016 1.016))))
|
||||
(number "22" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin output line (at 20.32 15.24 180) (length 5.08)
|
||||
(name "TXD0" (effects (font (size 1.016 1.016))))
|
||||
(number "23" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin input line (at 20.32 12.7 180) (length 5.08)
|
||||
(name "RXD0" (effects (font (size 1.016 1.016))))
|
||||
(number "24" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 10.16 180) (length 5.08)
|
||||
(name "IO21" (effects (font (size 1.016 1.016))))
|
||||
(number "25" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin power_in line (at 20.32 7.62 180) (length 5.08)
|
||||
(name "GND2" (effects (font (size 1.016 1.016))))
|
||||
(number "26" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 5.08 180) (length 5.08)
|
||||
(name "IO19" (effects (font (size 1.016 1.016))))
|
||||
(number "27" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 2.54 180) (length 5.08)
|
||||
(name "IO18" (effects (font (size 1.016 1.016))))
|
||||
(number "28" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 0 180) (length 5.08)
|
||||
(name "IO5" (effects (font (size 1.016 1.016))))
|
||||
(number "29" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin input line (at -20.32 17.78 0) (length 5.08)
|
||||
(name "SENSOR_VP" (effects (font (size 1.016 1.016))))
|
||||
(number "3" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -2.54 180) (length 5.08)
|
||||
(name "IO17" (effects (font (size 1.016 1.016))))
|
||||
(number "30" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -5.08 180) (length 5.08)
|
||||
(name "IO16" (effects (font (size 1.016 1.016))))
|
||||
(number "31" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -7.62 180) (length 5.08)
|
||||
(name "IO4" (effects (font (size 1.016 1.016))))
|
||||
(number "32" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -10.16 180) (length 5.08)
|
||||
(name "IO0" (effects (font (size 1.016 1.016))))
|
||||
(number "33" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -12.7 180) (length 5.08)
|
||||
(name "IO2" (effects (font (size 1.016 1.016))))
|
||||
(number "34" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -15.24 180) (length 5.08)
|
||||
(name "IO15" (effects (font (size 1.016 1.016))))
|
||||
(number "35" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -17.78 180) (length 5.08)
|
||||
(name "SD1" (effects (font (size 1.016 1.016))))
|
||||
(number "36" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 20.32 -20.32 180) (length 5.08)
|
||||
(name "SD0" (effects (font (size 1.016 1.016))))
|
||||
(number "37" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin input clock (at 20.32 -22.86 180) (length 5.08)
|
||||
(name "CLK" (effects (font (size 1.016 1.016))))
|
||||
(number "38" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin input line (at -20.32 15.24 0) (length 5.08)
|
||||
(name "SENSOR_VN" (effects (font (size 1.016 1.016))))
|
||||
(number "4" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 12.7 0) (length 5.08)
|
||||
(name "IO34" (effects (font (size 1.016 1.016))))
|
||||
(number "5" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 10.16 0) (length 5.08)
|
||||
(name "IO35" (effects (font (size 1.016 1.016))))
|
||||
(number "6" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 7.62 0) (length 5.08)
|
||||
(name "IO32" (effects (font (size 1.016 1.016))))
|
||||
(number "7" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 5.08 0) (length 5.08)
|
||||
(name "IO33" (effects (font (size 1.016 1.016))))
|
||||
(number "8" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -20.32 2.54 0) (length 5.08)
|
||||
(name "IO25" (effects (font (size 1.016 1.016))))
|
||||
(number "9" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol "SL2300" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "Q" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "SL2300" (at 7.62 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "SL2300_1_1"
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.016 0)
|
||||
(xy -3.81 0)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.016 1.905)
|
||||
(xy -1.016 -1.905)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -0.508 -1.27)
|
||||
(xy -0.508 -2.286)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -0.508 0.508)
|
||||
(xy -0.508 -0.508)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -0.508 2.286)
|
||||
(xy -0.508 1.27)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 1.27 2.54)
|
||||
(xy 1.27 1.778)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 1.27 -2.54)
|
||||
(xy 1.27 0)
|
||||
(xy -0.508 0)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -0.508 -1.778)
|
||||
(xy 2.032 -1.778)
|
||||
(xy 2.032 1.778)
|
||||
(xy -0.508 1.778)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -0.254 0)
|
||||
(xy 0.762 0.381)
|
||||
(xy 0.762 -0.381)
|
||||
(xy -0.254 0)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type outline))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 1.524 0.508)
|
||||
(xy 1.651 0.381)
|
||||
(xy 2.413 0.381)
|
||||
(xy 2.54 0.254)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 2.032 0.381)
|
||||
(xy 1.651 -0.254)
|
||||
(xy 2.413 -0.254)
|
||||
(xy 2.032 0.381)
|
||||
)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(circle (center 0.381 0) (radius 2.794)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(circle (center 1.27 -1.778) (radius 0.254)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type outline))
|
||||
)
|
||||
(circle (center 1.27 1.778) (radius 0.254)
|
||||
(stroke (width 0) (type solid))
|
||||
(fill (type outline))
|
||||
)
|
||||
(pin input line (at -6.35 0 0) (length 2.54)
|
||||
(name "G" (effects (font (size 1.27 1.27))))
|
||||
(number "1" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin passive line (at 1.27 -5.08 90) (length 2.54)
|
||||
(name "S" (effects (font (size 1.27 1.27))))
|
||||
(number "2" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin passive line (at 1.27 5.08 270) (length 2.54)
|
||||
(name "D" (effects (font (size 1.27 1.27))))
|
||||
(number "3" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol "SR04M-2" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "H" (at 6.35 27.94 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "SR04M-2" (at 7.62 -21.59 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "SR04M-2_0_1"
|
||||
(rectangle (start -22.86 26.67) (end 41.91 -20.32)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol "SR04M-2-HeaderConn_01x04_Female" (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "J" (at 0 5.08 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "SR04M-2-HeaderConn_01x04_Female" (at 0 -7.62 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "ESP32:SR04M-2PinHeader_1x04_P2.54mm_Vertical" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "ki_keywords" "connector" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "ki_description" "Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "ki_fp_filters" "Connector*:*_1x??_*" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "SR04M-2-HeaderConn_01x04_Female_1_1"
|
||||
(arc (start 0 -4.572) (mid -0.5058 -5.08) (end 0 -5.588)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(arc (start 0 -2.032) (mid -0.5058 -2.54) (end 0 -3.048)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.27 -5.08)
|
||||
(xy -0.508 -5.08)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.27 -2.54)
|
||||
(xy -0.508 -2.54)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.27 0)
|
||||
(xy -0.508 0)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -1.27 2.54)
|
||||
(xy -0.508 2.54)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(arc (start 0 0.508) (mid -0.5058 0) (end 0 -0.508)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(arc (start 0 3.048) (mid -0.5058 2.54) (end 0 2.032)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(pin power_in line (at -5.08 2.54 0) (length 3.81)
|
||||
(name "VCC" (effects (font (size 1.27 1.27))))
|
||||
(number "1" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin input line (at -5.08 0 0) (length 3.81)
|
||||
(name "RX" (effects (font (size 1.27 1.27))))
|
||||
(number "2" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin output line (at -5.08 -2.54 0) (length 3.81)
|
||||
(name "TX" (effects (font (size 1.27 1.27))))
|
||||
(number "3" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
(pin power_in line (at -5.08 -5.08 0) (length 3.81)
|
||||
(name "GND" (effects (font (size 1.27 1.27))))
|
||||
(number "4" (effects (font (size 1.27 1.27))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
74
board/kicad-stuff/LP38690DT-3.3.kicad_sym
Normal file
74
board/kicad-stuff/LP38690DT-3.3.kicad_sym
Normal file
@@ -0,0 +1,74 @@
|
||||
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
|
||||
(symbol "LP38690DT-3.3" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at -10.16 5.08 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Value" "LP38690DT-3.3" (at -10.16 -7.62 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Footprint" "DPAK457P991X255-3N" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Datasheet" "IPC-7351B" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Field4" "Texas Instruments" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Field5" "M" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Field6" "2.55mm" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "ki_locked" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(symbol "LP38690DT-3.3_0_0"
|
||||
(polyline
|
||||
(pts
|
||||
(xy -10.16 -5.08)
|
||||
(xy 10.16 -5.08)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -10.16 5.08)
|
||||
(xy -10.16 -5.08)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 10.16 -5.08)
|
||||
(xy 10.16 5.08)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 10.16 5.08)
|
||||
(xy -10.16 5.08)
|
||||
)
|
||||
(stroke (width 0.1524) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(pin output line (at 15.24 2.54 180) (length 5.08)
|
||||
(name "OUT" (effects (font (size 1.016 1.016))))
|
||||
(number "1" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin input line (at -15.24 2.54 0) (length 5.08)
|
||||
(name "IN" (effects (font (size 1.016 1.016))))
|
||||
(number "3" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin power_in line (at 15.24 -2.54 180) (length 5.08)
|
||||
(name "GND" (effects (font (size 1.016 1.016))))
|
||||
(number "4" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
37
board/kicad-stuff/SOP65P640X120-14N.kicad_mod
Normal file
37
board/kicad-stuff/SOP65P640X120-14N.kicad_mod
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
(footprint SOP65P640X120-14N (layer F.Cu) (tedit 65346025)
|
||||
(descr "")
|
||||
(attr smd)
|
||||
(fp_text reference REF** (at -0.595 -3.435 0) (layer F.SilkS)
|
||||
(effects (font (size 1.0 1.0) (thickness 0.15)))
|
||||
)
|
||||
(fp_text value SOP65P640X120-14N (at 7.025 3.435 0) (layer F.Fab)
|
||||
(effects (font (size 1.0 1.0) (thickness 0.15)))
|
||||
)
|
||||
(pad 1 smd roundrect (roundrect_rratio 0.05) (at -2.87 -1.95) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 2 smd roundrect (roundrect_rratio 0.05) (at -2.87 -1.3) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 3 smd roundrect (roundrect_rratio 0.05) (at -2.87 -0.65) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 4 smd roundrect (roundrect_rratio 0.05) (at -2.87 0.0) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 5 smd roundrect (roundrect_rratio 0.05) (at -2.87 0.65) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 6 smd roundrect (roundrect_rratio 0.05) (at -2.87 1.3) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 7 smd roundrect (roundrect_rratio 0.05) (at -2.87 1.95) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 8 smd roundrect (roundrect_rratio 0.05) (at 2.87 1.95) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 9 smd roundrect (roundrect_rratio 0.05) (at 2.87 1.3) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 10 smd roundrect (roundrect_rratio 0.05) (at 2.87 0.65) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 11 smd roundrect (roundrect_rratio 0.05) (at 2.87 0.0) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 12 smd roundrect (roundrect_rratio 0.05) (at 2.87 -0.65) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 13 smd roundrect (roundrect_rratio 0.05) (at 2.87 -1.3) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 14 smd roundrect (roundrect_rratio 0.05) (at 2.87 -1.95) (size 1.57 0.41) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(fp_circle (center -4.24 -2.26) (end -4.14 -2.26) (layer F.SilkS) (width 0.2))
|
||||
(fp_circle (center -4.24 -2.26) (end -4.14 -2.26) (layer F.Fab) (width 0.2))
|
||||
(fp_line (start -2.2 -2.5) (end 2.2 -2.5) (layer F.Fab) (width 0.127))
|
||||
(fp_line (start -2.2 2.5) (end 2.2 2.5) (layer F.Fab) (width 0.127))
|
||||
(fp_line (start -2.2 -2.5) (end 2.2 -2.5) (layer F.SilkS) (width 0.127))
|
||||
(fp_line (start -2.2 2.5) (end 2.2 2.5) (layer F.SilkS) (width 0.127))
|
||||
(fp_line (start -2.2 -2.5) (end -2.2 2.5) (layer F.Fab) (width 0.127))
|
||||
(fp_line (start 2.2 -2.5) (end 2.2 2.5) (layer F.Fab) (width 0.127))
|
||||
(fp_line (start -3.905 -2.75) (end 3.905 -2.75) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start -3.905 2.75) (end 3.905 2.75) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start -3.905 -2.75) (end -3.905 2.75) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start 3.905 -2.75) (end 3.905 2.75) (layer F.CrtYd) (width 0.05))
|
||||
)
|
||||
29
board/kicad-stuff/SSOP10.kicad_mod
Normal file
29
board/kicad-stuff/SSOP10.kicad_mod
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
(footprint SSOP10 (layer F.Cu) (tedit 652971AF)
|
||||
(descr "")
|
||||
(attr smd)
|
||||
(fp_text reference REF** (at -3.2004 0.0 900) (layer F.SilkS)
|
||||
(effects (font (size 0.64 0.64) (thickness 0.15)))
|
||||
)
|
||||
(fp_text value SSOP10 (at 3.1496 -0.4064 900) (layer F.Fab)
|
||||
(effects (font (size 0.64 0.64) (thickness 0.15)))
|
||||
)
|
||||
(pad 2 smd rect (at -1.0 2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 9 smd rect (at -1.0 -2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 1 smd rect (at -2.0 2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 3 smd rect (at 0.0 2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 4 smd rect (at 1.0 2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 10 smd rect (at -2.0 -2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 8 smd rect (at 0.0 -2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 7 smd rect (at 1.0 -2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 5 smd rect (at 2.0 2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(pad 6 smd rect (at 2.0 -2.8) (size 0.6 1.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
|
||||
(fp_line (start 2.527 -1.9) (end 2.527 1.4) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start 2.527 1.4) (end 2.527 1.9) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start 2.527 1.9) (end -2.527 1.9) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start -2.527 1.9) (end -2.527 1.4) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start -2.527 1.4) (end -2.527 -1.9) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start -2.527 -1.9) (end 2.527 -1.9) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start 2.527 1.4) (end -2.527 1.4) (layer F.Fab) (width 0.2032))
|
||||
(fp_line (start -1.905 1.016) (end -1.905 -1.016) (layer F.SilkS) (width 0.3048))
|
||||
)
|
||||
104
board/kicad-stuff/SX1308.kicad_sym
Normal file
104
board/kicad-stuff/SX1308.kicad_sym
Normal file
@@ -0,0 +1,104 @@
|
||||
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
|
||||
(symbol "SX1308" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at -17.78 20.32 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Value" "SX1308" (at -17.8054 17.8054 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom))
|
||||
)
|
||||
(property "Footprint" "SOT-23-6" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left bottom) hide)
|
||||
)
|
||||
(property "ki_locked" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(symbol "SX1308_0_0"
|
||||
(polyline
|
||||
(pts
|
||||
(xy -17.78 -7.62)
|
||||
(xy -17.78 15.24)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -17.78 15.24)
|
||||
(xy 0 15.24)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -13.7922 0.1778)
|
||||
(xy -11.2522 0.1778)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -11.303 1.6764)
|
||||
(xy -8.763 1.6764)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy -11.2522 0.1778)
|
||||
(xy -11.303 1.6764)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 0 -7.62)
|
||||
(xy -17.78 -7.62)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 0 15.24)
|
||||
(xy 0 -7.62)
|
||||
)
|
||||
(stroke (width 0.254) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(text "ON/OFF" (at -10.8712 -0.0508 0)
|
||||
(effects (font (size 0.8128 0.8128)) (justify left bottom))
|
||||
)
|
||||
(pin bidirectional line (at 5.08 12.7 180) (length 5.08)
|
||||
(name "SW" (effects (font (size 1.016 1.016))))
|
||||
(number "1" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -22.86 -5.08 0) (length 5.08)
|
||||
(name "GND" (effects (font (size 1.016 1.016))))
|
||||
(number "2" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 5.08 -2.54 180) (length 5.08)
|
||||
(name "FB" (effects (font (size 1.016 1.016))))
|
||||
(number "3" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -22.86 2.54 0) (length 5.08)
|
||||
(name "EN" (effects (font (size 1.016 1.016))))
|
||||
(number "4" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at -22.86 12.7 0) (length 5.08)
|
||||
(name "IN" (effects (font (size 1.016 1.016))))
|
||||
(number "5" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
(pin bidirectional line (at 5.08 5.08 180) (length 5.08)
|
||||
(name "N/C" (effects (font (size 1.016 1.016))))
|
||||
(number "6" (effects (font (size 1.016 1.016))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
168
board/kicad-stuff/ds2438.kicad_sym
Normal file
168
board/kicad-stuff/ds2438.kicad_sym
Normal file
@@ -0,0 +1,168 @@
|
||||
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
|
||||
(symbol "ds2438az+" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at 30.48 10.16 0)
|
||||
(effects (font (size 1.524 1.524)))
|
||||
)
|
||||
(property "Value" "ds2438az+" (at 30.48 7.62 0)
|
||||
(effects (font (size 1.524 1.524)))
|
||||
)
|
||||
(property "Footprint" "21-0041B_8_MXM" (at 30.48 6.096 0)
|
||||
(effects (font (size 1.524 1.524)) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at 0 0 0)
|
||||
(effects (font (size 1.524 1.524)))
|
||||
)
|
||||
(property "ki_locked" "" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "ki_fp_filters" "21-0041B_8_MXM 21-0041B_8_MXM-M 21-0041B_8_MXM-L" (at 0 0 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(symbol "ds2438az+_1_1"
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.112 -7.62)
|
||||
(xy 6.0452 -8.128)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.112 -7.62)
|
||||
(xy 6.0452 -7.112)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.112 -5.08)
|
||||
(xy 6.0452 -5.588)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.112 -5.08)
|
||||
(xy 6.0452 -4.572)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.112 -2.54)
|
||||
(xy 6.0452 -3.048)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.112 -2.54)
|
||||
(xy 6.0452 -2.032)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.62 -12.7)
|
||||
(xy 53.34 -12.7)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 7.62 5.08)
|
||||
(xy 7.62 -12.7)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 53.34 -12.7)
|
||||
(xy 53.34 5.08)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 53.34 5.08)
|
||||
(xy 7.62 5.08)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 53.848 0)
|
||||
(xy 54.9148 -0.508)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 53.848 0)
|
||||
(xy 54.9148 0.508)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 55.4228 -0.508)
|
||||
(xy 56.4642 0)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(polyline
|
||||
(pts
|
||||
(xy 55.4228 0.508)
|
||||
(xy 56.4642 0)
|
||||
)
|
||||
(stroke (width 0.127) (type solid))
|
||||
(fill (type none))
|
||||
)
|
||||
(pin power_in line (at 0 0 0) (length 7.62)
|
||||
(name "GND" (effects (font (size 1.4986 1.4986))))
|
||||
(number "1" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin input line (at 0 -2.54 0) (length 7.62)
|
||||
(name "VSENS+" (effects (font (size 1.4986 1.4986))))
|
||||
(number "2" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin input line (at 0 -5.08 0) (length 7.62)
|
||||
(name "VSENS-" (effects (font (size 1.4986 1.4986))))
|
||||
(number "3" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin input line (at 0 -7.62 0) (length 7.62)
|
||||
(name "VAD" (effects (font (size 1.4986 1.4986))))
|
||||
(number "4" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin power_in line (at 60.96 -7.62 180) (length 7.62)
|
||||
(name "VDD" (effects (font (size 1.4986 1.4986))))
|
||||
(number "5" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin no_connect line (at 60.96 -5.08 180) (length 7.62)
|
||||
(name "NC" (effects (font (size 1.4986 1.4986))))
|
||||
(number "6" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin no_connect line (at 60.96 -2.54 180) (length 7.62)
|
||||
(name "NC" (effects (font (size 1.4986 1.4986))))
|
||||
(number "7" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
(pin bidirectional line (at 60.96 0 180) (length 7.62)
|
||||
(name "DQ" (effects (font (size 1.4986 1.4986))))
|
||||
(number "8" (effects (font (size 1.4986 1.4986))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Binary file not shown.
1704
board/production/PlantCtrlESP32_2023-10-26_23-11-30/netlist.ipc
Normal file
1704
board/production/PlantCtrlESP32_2023-10-26_23-11-30/netlist.ipc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,11 @@
|
||||
(sym_lib_table
|
||||
(lib (name LP38690DT-3.3)(type Legacy)(uri ${KIPRJMOD}/kicad-stuff/LP38690DT-3.3.lib)(options "")(descr ""))
|
||||
(lib (name ESP32-DEVKITC-32D)(type Legacy)(uri ${KIPRJMOD}/kicad-stuff/ESP32/ESP32-DEVKITC-32D.lib)(options "")(descr ""))
|
||||
(lib (name DW01)(type Legacy)(uri ${KIPRJMOD}/kicad-stuff/DW01.lib)(options "")(descr ""))
|
||||
(lib (name SX1308)(type Legacy)(uri ${KIPRJMOD}/kicad-stuff/SX1308.lib)(options "")(descr ""))
|
||||
(lib (name ds2438)(type Legacy)(uri ${KIPRJMOD}/kicad-stuff/ds2438.lib)(options "")(descr ""))
|
||||
)
|
||||
(sym_lib_table
|
||||
(version 7)
|
||||
(lib (name "LP38690DT-3.3")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/LP38690DT-3.3.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "ESP32-DEVKITC-32D")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/ESP32/ESP32-DEVKITC-32D.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "DW01")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/DW01.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "SX1308")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/SX1308.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "ds2438")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/ds2438.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "CN3306")(type "KiCad")(uri "${KIPRJMOD}/CN3306.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "CN3795")(type "KiCad")(uri "${KIPRJMOD}/CN3795.kicad_sym")(options "")(descr ""))
|
||||
(lib (name "BQ34Z100PWR-G1")(type "KiCad")(uri "${KIPRJMOD}/kicad-stuff/BQ34Z100PWR-G1.kicad_sym")(options "")(descr ""))
|
||||
)
|
||||
|
||||
1
esp32/.gitignore
vendored
1
esp32/.gitignore
vendored
@@ -7,3 +7,4 @@
|
||||
doc/
|
||||
custom_platformio.ini
|
||||
cppcheck-build-dir
|
||||
host/settings.json
|
||||
|
||||
10
esp32/.vscode/extensions.json
vendored
Normal file
10
esp32/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
3
esp32/CMakeLists.txt
Normal file
3
esp32/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(esp32)
|
||||
@@ -6,16 +6,26 @@
|
||||
],
|
||||
"settings": {
|
||||
"files.associations": {
|
||||
"functional": "cpp",
|
||||
"*.tcc": "cpp",
|
||||
"map": "cpp",
|
||||
"*.cps": "javascript",
|
||||
"bitset": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"functional": "cpp",
|
||||
"string": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"cmath": "cpp"
|
||||
"cmath": "cpp",
|
||||
"iterator": "cpp",
|
||||
"array": "cpp",
|
||||
"tuple": "cpp",
|
||||
"utility": "cpp",
|
||||
"fstream": "cpp",
|
||||
"ostream": "cpp",
|
||||
"sstream": "cpp"
|
||||
"system_error": "cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
# PlantControl
|
||||
## Hardware
|
||||
|
||||
Uses ESP32MiniKit
|
||||
Main processor
|
||||
* ESP32 with 16MB Flash
|
||||
|
||||
One-Wire
|
||||
* Temperatur Sensor (DS18B20)
|
||||
* Lipo-Monitoring (DS2438)
|
||||
|
||||
Lipo Protection
|
||||
* Open drain 3.3V detector (CN61CN33 @ jlcpcb parts)
|
||||
|
||||
|
||||
|
||||
### Used Pins:
|
||||
* See '''include/ControllerConfiguration.h'''
|
||||
@@ -16,9 +26,9 @@ Uses ESP32MiniKit
|
||||
* 7 Pumps
|
||||
* Sensors
|
||||
* Solar powered (voltage)
|
||||
* Lipo-Powered (voltage)
|
||||
* Lipo-Powered (DS2438 for monitoring)
|
||||
* Temperature
|
||||
* Distance sensor [JSN-SR04T-2.0] (for waterlevel)
|
||||
* Laser distance sensor [VL53L0X]
|
||||
* Custom GPIO
|
||||
|
||||
## Documentation of Power-Modes
|
||||
@@ -42,35 +52,18 @@ DS18B20 one wire temp sensor
|
||||
## Empires Wunschliste
|
||||
* Pflanze
|
||||
* Pumpe
|
||||
* Zeitspann (wann laufen darf)
|
||||
* Helligkeitstrigger (Um den Morgen zum pumpen zu erkennen)
|
||||
* Maximal Dauer zum Pumpen (als Zeit oder Milliliter)
|
||||
* Zeitspanne zwischen zwei Pumpvorgängen
|
||||
* [x] Zeitspann (wann laufen darf)
|
||||
* [x] Helligkeitstrigger (Um den Morgen zum pumpen zu erkennen)
|
||||
* [-] Maximal Dauer zum Pumpen (als Zeit oder Milliliter)
|
||||
* [x] Zeitspanne zwischen zwei Pumpvorgängen
|
||||
* Moister sensor
|
||||
* Oberen
|
||||
* Unteren Wert
|
||||
* [x] Schwellwert für Pumpe
|
||||
* Tank
|
||||
* Füllstand Anzeige (in Liter)
|
||||
* Minimum Wasserstand (in cm damit Pumpen nicht leer laufen; enspricht 0 nutzbaren Liter)
|
||||
* Trigger-Erinnerungen um Wasser nachzufüllen
|
||||
* Maximaler Wasserstand des Tanks (in cm & Liter)
|
||||
* System
|
||||
* Tiefentladungsschutz vom LIPO (fest im Controller die Spannung festlegen)
|
||||
* 3.5V unterschritten, dann nur noch Deepsleep
|
||||
* MQTT Topic, wenn Spannung unterschritten wurde
|
||||
* Lipo innerhalb 24h nicht geladen -> MQTT Topic
|
||||
* Deep-Sleep
|
||||
* Mode1:
|
||||
* Nur Sensor werte einsameln
|
||||
* Wird verlassen bei Aktionen
|
||||
* Pumpe schalten
|
||||
* MQTT Nachrichten
|
||||
* nach x Minuten nur in Mode1
|
||||
* Mode2:
|
||||
* WLAN aktivieren und Werte über MQTT raus hauen
|
||||
* aktuelle Werte raushauen
|
||||
* MQTT lesen
|
||||
* Mode3:
|
||||
* Deepsleep verboten (MQTT topic, retained)
|
||||
* alle Pumpen & Sensoren deaktiviert
|
||||
* [x] Maximaler Wasserstand des Tanks (in cm & Liter)
|
||||
|
||||
## Masterplan 2.0
|
||||
* Partitionslayout
|
||||
|
||||
|
||||
|
||||
@@ -5,13 +5,12 @@ framework = arduino
|
||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||
board_build.partitions = defaultWithSmallerSpiffs.csv
|
||||
|
||||
extra_configs = custom_platformio.ini
|
||||
|
||||
; the latest development brankitchen-lightch (convention V3.0.x)
|
||||
lib_deps = ArduinoJson@6.16.1
|
||||
https://github.com/homieiot/homie-esp8266.git#v3.0
|
||||
OneWire
|
||||
DallasTemperature
|
||||
pololu/VL53L0X
|
||||
https://github.com/homieiot/homie-esp8266.git#develop
|
||||
|
||||
; add additional parameter, like the upload port
|
||||
upload_port=/dev/ttyUSB1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
nvs, data, nvs, 0x9000, 0x5000,
|
||||
otadata, data, ota, 0xe000, 0x2000,
|
||||
app0, app, ota_0, 0x10000, 0x150000,
|
||||
app1, app, ota_1, 0x160000,0x150000,
|
||||
spiffs, data, spiffs, 0x300000,0x17000,
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
nvs, data, nvs, 0x9000, 0x4000
|
||||
otadata, data, ota, 0xD000, 0x2000
|
||||
phy_init, data, phy, 0xF000, 0x1000
|
||||
ota_0, app, ota_0, 0x10000, 0x1E0000
|
||||
ota_1, app, ota_1, 0x1F0000, 0x1E0000
|
||||
spiffs, data, spiffs, 0x3D0000, 0x30000
|
||||
|
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"name": "PlantControl",
|
||||
"device_id": "PlantCtrl1",
|
||||
"device_stats_interval": 60,
|
||||
"wifi": {
|
||||
"ssid": "SSID",
|
||||
"bssid" : "BSSID",
|
||||
"password": "mysecretPassword",
|
||||
"channel": 1
|
||||
},
|
||||
"mqtt": {
|
||||
"host": "[0-255].[0-255].[0-255].[0-255]",
|
||||
"port": 1883,
|
||||
"base_topic": "mqtt/topic/",
|
||||
"auth": false
|
||||
},
|
||||
"ota": {
|
||||
"enabled": true
|
||||
},
|
||||
"settings": {
|
||||
"deepsleep" : 60000,
|
||||
"nightsleep" : 60000,
|
||||
"pumpdeepsleep": 1000,
|
||||
"watermaxlevel": 50,
|
||||
"watermin" : 5,
|
||||
"plants" : 3,
|
||||
"moist0" : 2000,
|
||||
"moist1" : 2000,
|
||||
"moist2" : 2000,
|
||||
"moist3" : 2000,
|
||||
"moist4" : 2000,
|
||||
"moist5" : 2000,
|
||||
"moist6" : 2000,
|
||||
"plant0MaxPumpTime": 1000,
|
||||
"plant1MaxPumpTime": 1000,
|
||||
"plant2MaxPumpTime": 1000,
|
||||
"plant3MaxPumpTime": 1000,
|
||||
"plant4MaxPumpTime": 1000,
|
||||
"plant5MaxPumpTime": 1000,
|
||||
"plant6MaxPumpTime": 1000,
|
||||
"plant0MinPumpIdle": 10000,
|
||||
"plant1MinPumpIdle": 10000,
|
||||
"plant2MinPumpIdle": 10000,
|
||||
"plant3MinPumpIdle": 10000,
|
||||
"plant4MinPumpIdle": 10000,
|
||||
"plant5MinPumpIdle": 10000,
|
||||
"plant6MinPumpIdle": 10000
|
||||
}
|
||||
}
|
||||
49
esp32/host/settings.json.example
Normal file
49
esp32/host/settings.json.example
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"settings": {
|
||||
"sleep":600,
|
||||
"nightsleep": 1200,
|
||||
"pumpsleep": 5,
|
||||
"tankmax": 1000,
|
||||
"tankmin": 100,
|
||||
"tankwarn": 200,
|
||||
"tankVolume": 100,
|
||||
"lipoDSAddr": "abcdefghijklmnop",
|
||||
"tankDSAddr": "abcdefghijklmnop",
|
||||
"ntpServer":"pool.ntp.org",
|
||||
"dry0":50,
|
||||
"hourstart0":6,
|
||||
"hourend0":20,
|
||||
"lowLight0": false,
|
||||
"delay0": 30,
|
||||
"dry1":-1,
|
||||
"hourstart1":6,
|
||||
"hourend1":20,
|
||||
"lowLight1": false,
|
||||
"delay1": 30,
|
||||
"dry2":-1,
|
||||
"hourstart2":6,
|
||||
"hourend2":20,
|
||||
"lowLight2": false,
|
||||
"delay2": 30,
|
||||
"dry3":-1,
|
||||
"hourstart3":6,
|
||||
"hourend3":20,
|
||||
"lowLight3": false,
|
||||
"delay3": 30,
|
||||
"dry4":-1,
|
||||
"hourstart4":6,
|
||||
"hourend4":20,
|
||||
"lowLight4": false,
|
||||
"delay4": 30,
|
||||
"dry5":-1,
|
||||
"hourstart5":6,
|
||||
"hourend5":20,
|
||||
"lowLight5": false,
|
||||
"delay5": 30,
|
||||
"dry6":-1,
|
||||
"hourstart6":6,
|
||||
"hourend6":20,
|
||||
"lowLight6": false,
|
||||
"delay6": 30
|
||||
}
|
||||
}
|
||||
41
esp32/host/upload-settings.sh
Executable file
41
esp32/host/upload-settings.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!//bin/bash
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "Homie prefex and device index must be specified:"
|
||||
echo "$0 <mqtt host> <prefix> <device index>"
|
||||
echo "e.g."
|
||||
echo "$0 192.168.0.2 test/ MyDeviceId"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mqttHost=$1
|
||||
mqttPrefix=$2
|
||||
homieId=$3
|
||||
|
||||
maxSteps=6
|
||||
|
||||
settingsFile=settings.json
|
||||
if [ ! -f $settingsFile ]; then
|
||||
echo "$settingsFile missing"
|
||||
echo "check $settingsFile.example"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "1" -r
|
||||
echo "(1 / $maxSteps) Waiting ..."
|
||||
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
||||
set -e
|
||||
echo "(2 / $maxSteps) Waiting 30 seconds ..."
|
||||
sleep 30
|
||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/\$implementation/config/set" -f $settingsFile
|
||||
echo "(3 / $maxSteps) Waiting for reboot ..."
|
||||
sleep 1
|
||||
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
||||
echo "(4 / $maxSteps) Alive"
|
||||
sleep 20
|
||||
echo "(5 / $maxSteps) Create Backup ..."
|
||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/config/backup/set" -m "true" -r
|
||||
sleep 5
|
||||
echo "(6 / $maxSteps) Shutdown ..."
|
||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "0" -r
|
||||
exit 0
|
||||
@@ -21,7 +21,8 @@ fi
|
||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "1" -r
|
||||
echo "Waiting ..."
|
||||
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
||||
python ota_updater.py -l $mqttHost -t "$mqttPrefix" -i "$homieId" $firmwareFile
|
||||
set -e
|
||||
python3 ota_updater.py -l $mqttHost -t "$mqttPrefix" -i "$homieId" $firmwareFile
|
||||
|
||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "0" -r
|
||||
exit 0
|
||||
|
||||
@@ -43,67 +43,94 @@
|
||||
*/
|
||||
#ifndef CONTROLLER_CONFIG_H
|
||||
#define CONTROLLER_CONFIG_H
|
||||
/** \addtogroup GPIO Settings
|
||||
* @{
|
||||
*/
|
||||
#define SENSOR_PLANT0 GPIO_NUM_32 /**< GPIO 32 (ADC1) */
|
||||
#define SENSOR_PLANT1 GPIO_NUM_33 /**< GPIO 33 (ADC1) */
|
||||
#define SENSOR_PLANT2 GPIO_NUM_25 /**< GPIO 25 (ADC2) */
|
||||
#define SENSOR_PLANT3 GPIO_NUM_26 /**< GPIO 26 (ADC2) */
|
||||
#define SENSOR_PLANT4 GPIO_NUM_27 /**< GPIO 27 (ADC2) */
|
||||
#define SENSOR_PLANT5 GPIO_NUM_39 /**< SENSOR_VIN */
|
||||
#define SENSOR_PLANT6 GPIO_NUM_36 /**< SENSOR_VP */
|
||||
|
||||
#define OUTPUT_PUMP0 GPIO_NUM_15 /**< GPIO 15 */
|
||||
#define OUTPUT_PUMP1 GPIO_NUM_5 /**< GPIO 5 */
|
||||
#define OUTPUT_PUMP2 GPIO_NUM_18 /**< GPIO 18 */
|
||||
#define OUTPUT_PUMP3 GPIO_NUM_19 /**< GPIO 19 */
|
||||
#define OUTPUT_PUMP4 GPIO_NUM_21 /**< GPIO 21 */
|
||||
#define OUTPUT_PUMP5 GPIO_NUM_22 /**< GPIO 22 */
|
||||
#define OUTPUT_PUMP6 GPIO_NUM_23 /**< GPIO 23 */
|
||||
|
||||
#define OUTPUT_ENABLE_SENSOR GPIO_NUM_14 /**< GPIO 14 - Enable Sensors */
|
||||
#define OUTPUT_ENABLE_PUMP GPIO_NUM_13 /**< GPIO 13 - Enable Pumps */
|
||||
|
||||
#define SENSOR_ONEWIRE GPIO_NUM_4 /**< GPIO 12 - Temperatur sensor, Battery and other cool onewire stuff */
|
||||
#define SENSOR_TANK_SDA GPIO_NUM_17 /**< GPIO 17 - water sensor SDA */
|
||||
#define SENSOR_TANK_SCL GPIO_NUM_16 /**< GPIO 16 - water sensor SCL */
|
||||
#define BUTTON GPIO_NUM_0 /**< GPIO 0 - Fix button of NodeMCU */
|
||||
|
||||
#define CUSTOM1_PIN1 GPIO_NUM_34 /** direct gpio */
|
||||
#define CUSTOM1_PIN3 GPIO_NUM_35 /** direct gpio */
|
||||
#define CUSTOM1_PIN5 GPIO_NUM_2 /** mosfet controlled */
|
||||
#define CUSTOM1_PIN7 GPIO_NUM_12 /** mosfet controlled */
|
||||
|
||||
/* @} */
|
||||
|
||||
/** \addtogroup Configuration
|
||||
* @{
|
||||
*/
|
||||
#define FIRMWARE_VERSION "1.0.10"
|
||||
|
||||
#define ADC_TO_VOLT(adc) ((adc) * 3.3 ) / 4095)
|
||||
#define ADC_TO_VOLT_WITH_MULTI(adc, multi) (((adc)*3.3 * (multi)) / 4095)
|
||||
#define MOIST_SENSOR_MAX_ADC (85 * 4095 / 100)
|
||||
#define MOIST_SENSOR_MIN_ADC (25 * 4095 / 100)
|
||||
#ifdef FLOWMETER_PIN
|
||||
#define FLOWMETER_PULSES_PER_ML 2.2
|
||||
#define FIRMWARE_FEATURE1 "Flow"
|
||||
#else
|
||||
#define FIRMWARE_FEATURE1 ""
|
||||
#endif
|
||||
|
||||
#define SOLAR_VOLT(adc) ADC_TO_VOLT_WITH_MULTI(adc, 4.0306) /**< 100k and 33k voltage dividor */
|
||||
#define ADC_5V_TO_3V3(adc) ADC_TO_VOLT_WITH_MULTI(adc, 1.69) /**< 33k and 47k8 voltage dividor */
|
||||
#define MS_TO_S 1000
|
||||
#ifdef TIMED_LIGHT_PIN
|
||||
#define FIRMWARE_FEATURE2 "Light"
|
||||
#else
|
||||
#define FIRMWARE_FEATURE2 ""
|
||||
#endif
|
||||
|
||||
#define SENSOR_LIPO 34 /**< GPIO 34 (ADC1) */
|
||||
#define SENSOR_SOLAR 35 /**< GPIO 35 (ADC1) */
|
||||
#define SENSOR_PLANT0 12 /**< GPIO 32 (ADC1) */
|
||||
#define SENSOR_PLANT1 14/**< GPIO 33 (ADC1) */
|
||||
#define SENSOR_PLANT2 27 /**< GPIO 25 (ADC2) */
|
||||
#define SENSOR_PLANT3 26 /**< GPIO 26 (ADC2) */
|
||||
#define SENSOR_PLANT4 25 /**< GPIO 27 (ADC2) */
|
||||
#define SENSOR_PLANT5 14 /**< GPIO 14 (ADC2) */
|
||||
#define SENSOR_PLANT6 12 /**< GPIO 12 (ADC2) */
|
||||
#define FIRMWARE_BASENAME "PlantControl"
|
||||
#define FIRMWARE_NAME FIRMWARE_BASENAME FIRMWARE_FEATURE1 FIRMWARE_FEATURE2
|
||||
#define FIRMWARE_VERSION "3.01 HW0.10b"
|
||||
|
||||
#define OUTPUT_PUMP0 15 /**< GPIO 23 */
|
||||
#define OUTPUT_PUMP1 5 /**< GPIO 22 */
|
||||
#define OUTPUT_PUMP2 18 /**< GPIO 21 */
|
||||
#define OUTPUT_PUMP3 19 /**< GPIO 19 */
|
||||
#define OUTPUT_PUMP4 21 /**< GPIO 18 */
|
||||
#define OUTPUT_PUMP5 22 /**< GPIO 5 */
|
||||
#define OUTPUT_PUMP6 23 /**< GPIO 15 */
|
||||
#define MOIST_SENSOR_MAX_FRQ 5200 // 60kHz (500Hz margin)
|
||||
#define MOIST_SENSOR_MIN_FRQ 500 // 0.5kHz (500Hz margin)
|
||||
|
||||
#define OUTPUT_SENSOR 16 /**< GPIO 16 - Enable Sensors */
|
||||
#define OUTPUT_PUMP 13 /**< GPIO 13 - Enable Pumps */
|
||||
#define ANALOG_SENSOR_MAX_MV 1300 //successive approximation of good range
|
||||
#define ANALOG_SENSOR_MIN_MV 100 //successive approximation of good range
|
||||
|
||||
#define SENSOR_DS18B20 2 /**< GPIO 2 - Temperatur sensor */
|
||||
#define BUTTON 0 /**< GPIO 0 - Fix button of NodeMCU */
|
||||
#define SOLAR_VOLT_FACTOR 11
|
||||
#define BATTSENSOR_INDEX_SOLAR 0
|
||||
#define BATTSENSOR_INDEX_BATTERY 1
|
||||
|
||||
#define MQTT_TIMEOUT (1000 * 60) /**< After 10 seconds, MQTT is expected to be connected */
|
||||
#define ESP_STALE_TIMEOUT (MQTT_TIMEOUT+(700*1000))
|
||||
|
||||
#define MIN_TIME_RUNNING 5UL /**< Amount of seconds the controller must stay awoken */
|
||||
#define MAX_PLANTS 7
|
||||
#define MINIMUM_LIPO_VOLT 3.6f /**< Minimum voltage of the Lipo, that must be present */
|
||||
#define NO_LIPO_VOLT 2.0f /**< No Lipo connected */
|
||||
#define MINIMUM_SOLAR_VOLT 4.0f /**< Minimum voltage of the sun, to detect daylight */
|
||||
#define SOLAR_CHARGE_MIN_VOLTAGE 7 /**< Sun is rising (morning detected) */
|
||||
#define SOLAR_CHARGE_MAX_VOLTAGE 9 /**< Sun is shining (noon) */
|
||||
#define SOLAR_CHARGE_MIN_VOLTAGE 7 /**< Sun is rising (morning detected) */
|
||||
#define SOLAR_CHARGE_MAX_VOLTAGE 9 /**< Sun is shining (noon) */
|
||||
#define SOLAR_MAX_VOLTAGE_POSSIBLE 100 /**< higher values are treated as not connected sensor */
|
||||
#define VOLT_MAX_BATT 4.2f
|
||||
#define VOLT_MIN_BATT 3.0f /**< Minimum battery voltage for normal operation */
|
||||
#define LOWVOLT_SLEEP_FACTOR 3 /**< Factor for nightsleep delay, if the battery drops below minimum (@see VOLT_MIN_BATT) */
|
||||
#define LOWVOLT_SLEEP_MINIMUM 1800 /**< At low voltage sleep at least for 30 minutes */
|
||||
|
||||
#define MAX_CONFIG_SETTING_ITEMS 50 /**< Parameter, that can be configured in Homie */
|
||||
#define MAX_CONFIG_SETTING_ITEMS 100 /**< Parameter, that can be configured in Homie */
|
||||
#define MAX_JSON_CONFIG_FILE_SIZE_CUSTOM 2500
|
||||
|
||||
#define PANIK_MODE_DEEPSLEEP (60 * 60 * 5U) /**< 5 hours in usecond */
|
||||
#define PANIK_MODE_DEEPSLEEP_US (PANIK_MODE_DEEPSLEEP * 1000 * 1000)
|
||||
#define LIPO_MAX_TEMPERATUR 85
|
||||
#define LIPO_MAX_TEMPERATUR_DIFF 10
|
||||
#define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatures sensors */
|
||||
#define WATERSENSOR_TIMEOUT 3000 /**< 3 Seconds timeout for the water distance sensor */
|
||||
#define WATERSENSOR_CYCLE 10 /**< 5 sensor measurement are performed */
|
||||
#define DS18B20_RESOLUTION 9 /**< 9bit temperature resolution -> 0.5°C steps */
|
||||
|
||||
#define TEMPERATURE_DELTA_TRIGGER_IN_C 1.0f
|
||||
#define MOIST_DELTA_TRIGGER_ADC 10
|
||||
#define SOLAR_DELTA_VOLT_ADC 3
|
||||
#define LIPO_DELTA_VOLT_ADC 0.2 /**< trigger for lipo voltage */
|
||||
|
||||
#define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatur sensors */
|
||||
#define TEMP_SENSOR_MEASURE_SERIES 5
|
||||
#define VOLT_SENSOR_MEASURE_SERIES 5
|
||||
#define UTC_OFFSET_DE 3600 /* UTC offset in seconds for Germany */
|
||||
#define UTF_OFFSET_DE_DST 3600 /* offset in seconds if daylight saving time is active */
|
||||
|
||||
/* @} */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
111
esp32/include/DS2438.h
Normal file
111
esp32/include/DS2438.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* @file DS2438.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DS2438_h
|
||||
#define DS2438_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <OneWire.h>
|
||||
#include "RunningMedian.h"
|
||||
|
||||
#define DS2438_TEMPERATURE_CONVERSION_COMMAND 0x44
|
||||
#define DS2438_VOLTAGE_CONVERSION_COMMAND 0xb4
|
||||
#define DS2438_WRITE_SCRATCHPAD_COMMAND 0x4e
|
||||
#define DS2438_COPY_SCRATCHPAD_COMMAND 0x48
|
||||
#define DS2438_READ_SCRATCHPAD_COMMAND 0xbe
|
||||
#define DS2438_RECALL_MEMORY_COMMAND 0xb8
|
||||
|
||||
#define PAGE_MIN 0
|
||||
#define PAGE_MAX 7
|
||||
|
||||
#define DS2438_CHA 0
|
||||
#define DS2438_CHB 1
|
||||
|
||||
#define DS2438_MODE_CHA 0x01
|
||||
#define DS2438_MODE_CHB 0x02
|
||||
#define DS2438_MODE_TEMPERATURE 0x04
|
||||
|
||||
#define DS2438_TEMPERATURE_DELAY 10
|
||||
#define DS2438_VOLTAGE_CONVERSION_DELAY 8
|
||||
|
||||
#define DS2438_MEDIAN_COUNT 5
|
||||
#define DS2438_MEDIAN_DELAY 50
|
||||
|
||||
#define DEFAULT_PAGE0(var) uint8_t var[8] { \
|
||||
0b00001011 /* X, ADB=0, NVB=0, TB=0, AD=1, EE=0, CA=1, IAD=1 */, \
|
||||
0, /* Temperatur */ \
|
||||
0, /* Temperatur */ \
|
||||
0, /* Voltage */ \
|
||||
0, /* Voltage */ \
|
||||
0, /* Current */ \
|
||||
0, /* Current */ \
|
||||
0b10000000 /* Threshold to 4LSB */ \
|
||||
}
|
||||
|
||||
typedef struct PageOne {
|
||||
uint8_t eleapsedTimerByte0; /**< LSB of timestamp */
|
||||
uint8_t eleapsedTimerByte1;
|
||||
uint8_t eleapsedTimerByte2;
|
||||
uint8_t eleapsedTimerByte3; /**< MSB of timestamp */
|
||||
uint8_t ICA; /**< Integrated Current Accumulator (current flowing into and out of the battery) */
|
||||
uint8_t offsetRegisterByte0; /**< Offset for ADC calibdation */
|
||||
uint8_t offsetRegisterByte1; /**< Offset for ADC calibdation */
|
||||
uint8_t reserved;
|
||||
} PageOne_t;
|
||||
|
||||
typedef struct PageSeven {
|
||||
uint8_t userByte0;
|
||||
uint8_t userByte1;
|
||||
uint8_t userByte2;
|
||||
uint8_t userByte3;
|
||||
uint8_t CCA0; /**< Charging Current Accumulator (CCA) */
|
||||
uint8_t CCA1; /**< Charging Current Accumulator (CCA) */
|
||||
uint8_t DCA0; /**< Discharge Current Accumulator (DCA) */
|
||||
uint8_t DCA1; /**< Discharge Current Accumulator (DCA) */
|
||||
} PageSeven_t;
|
||||
|
||||
typedef uint8_t DeviceAddress[8];
|
||||
|
||||
class DS2438 {
|
||||
public:
|
||||
DS2438(OneWire *ow, float currentShunt, int retryOnCRCError);
|
||||
|
||||
void begin();
|
||||
void updateMultiple();
|
||||
double getTemperature();
|
||||
float getVoltage(int channel=DS2438_CHA);
|
||||
float getCurrent();
|
||||
long getICA();
|
||||
long getCCA();
|
||||
long getDCA();
|
||||
float getAh();
|
||||
boolean isError();
|
||||
boolean isFound();
|
||||
private:
|
||||
bool validAddress(const uint8_t*);
|
||||
bool validFamily(const uint8_t* deviceAddress);
|
||||
void update(bool firstIteration);
|
||||
bool deviceFound = false;
|
||||
OneWire *_ow;
|
||||
DeviceAddress _address;
|
||||
uint8_t _mode;
|
||||
RunningMedian _temperature = RunningMedian(DS2438_MEDIAN_COUNT*2);
|
||||
RunningMedian _voltageA = RunningMedian(DS2438_MEDIAN_COUNT);
|
||||
RunningMedian _voltageB = RunningMedian(DS2438_MEDIAN_COUNT);
|
||||
RunningMedian _current = RunningMedian(DS2438_MEDIAN_COUNT);
|
||||
float _currentShunt;
|
||||
int _retryOnCRCError;
|
||||
long _CCA;
|
||||
long _DCA;
|
||||
long _ICA;
|
||||
boolean _error;
|
||||
boolean startConversion(int channel, boolean doTemperature);
|
||||
boolean selectChannel(int channel);
|
||||
void writePage(int page, uint8_t *data);
|
||||
boolean readPage(int page, uint8_t *data);
|
||||
};
|
||||
|
||||
#endif
|
||||
9
esp32/include/FileUtils.h
Normal file
9
esp32/include/FileUtils.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef FILEUTILS_H
|
||||
#define FILEUTILS_H
|
||||
|
||||
bool doesFileExist(const char *source);
|
||||
bool copyFile(const char *source, const char *target);
|
||||
bool deleteFile(const char *source);
|
||||
void printFile(const char *source);
|
||||
|
||||
#endif
|
||||
@@ -19,55 +19,81 @@
|
||||
#define MAX_PLANTS 7
|
||||
|
||||
/**
|
||||
* @name Attributes
|
||||
* @name Homie Attributes
|
||||
* generated Information
|
||||
* @{
|
||||
**/
|
||||
|
||||
#define NUMBER_TYPE "number"
|
||||
#define TEMPERATUR_SENSOR_LIPO "lipo"
|
||||
#define TEMPERATUR_SENSOR_WATER "water"
|
||||
#define TEMPERATUR_SENSOR_OUTSIDE "temp"
|
||||
#define NUMBER_TYPE "Float" /**< numberic information, published or read in Homie */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
* @name Temperatur Node
|
||||
* @{
|
||||
**/
|
||||
|
||||
#define TEMPERATURE_NAME "Temperature"
|
||||
#define TEMPERATURE_UNIT "°C"
|
||||
#define TEMPERATUR_SENSOR_LIPO "lipo" /**< Homie node: temperatur, setting: lipo temperatur (or close to it) */
|
||||
#define TEMPERATUR_SENSOR_CHIP "chip" /**< Homie node: temperatur, setting: battery chip */
|
||||
#define TEMPERATUR_SENSOR_WATER "water" /**< Homie node: temperatur, setting: water temperatur */
|
||||
/** @}
|
||||
*
|
||||
* @name Plant Nodes
|
||||
* @{
|
||||
*/
|
||||
|
||||
HomieNode plant0("plant0", "Plant 0", "Plant"); /**< dynamic Homie information for first plant */
|
||||
HomieNode plant1("plant1", "Plant 1", "Plant"); /**< dynamic Homie information for second plant */
|
||||
HomieNode plant2("plant2", "Plant 2", "Plant"); /**< dynamic Homie information for first plant */
|
||||
HomieNode plant3("plant3", "Plant 3", "Plant"); /**< dynamic Homie information for first plant */
|
||||
HomieNode plant4("plant4", "Plant 4", "Plant"); /**< dynamic Homie information for first plant */
|
||||
HomieNode plant5("plant5", "Plant 5", "Plant"); /**< dynamic Homie information for first plant */
|
||||
HomieNode plant6("plant6", "Plant 6", "Plant"); /**< dynamic Homie information for first plant */
|
||||
HomieNode plant2("plant2", "Plant 2", "Plant"); /**< dynamic Homie information for third plant */
|
||||
HomieNode plant3("plant3", "Plant 3", "Plant"); /**< dynamic Homie information for fourth plant */
|
||||
HomieNode plant4("plant4", "Plant 4", "Plant"); /**< dynamic Homie information for fivth plant */
|
||||
HomieNode plant5("plant5", "Plant 5", "Plant"); /**< dynamic Homie information for sixth plant */
|
||||
HomieNode plant6("plant6", "Plant 6", "Plant"); /**< dynamic Homie information for seventh plant */
|
||||
|
||||
#if defined(TIMED_LIGHT_PIN)
|
||||
HomieNode timedLightNode("timedLight", "TimedLight", "Status");
|
||||
#endif // TIMED_LIGHT_PIN
|
||||
|
||||
|
||||
HomieNode sensorLipo("lipo", "Battery Status", "Lipo");
|
||||
HomieNode sensorSolar("solar", "Solar Status", "Solarpanel");
|
||||
HomieNode sensorWater("water", "WaterSensor", "Water");
|
||||
HomieNode sensorTemp("temperature", "Temperature", "temperature");
|
||||
HomieNode startupReason("startupReason", "startupReason", "startupReason");
|
||||
HomieNode stayAlive("stay", "alive", "alive"); /**< Necessary for Mqtt Active Command */
|
||||
|
||||
/* @} */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name Settings
|
||||
* General settings for the controller
|
||||
* @{
|
||||
*/
|
||||
HomieSetting<long> maxTimeBetweenMQTTUpdates("mqttSleep", "time in seconds to start into mode2");
|
||||
HomieSetting<long> deepSleepTime("deepsleep", "time in seconds to sleep (0 deactivats it)");
|
||||
HomieSetting<long> deepSleepTime("sleep", "time in seconds to sleep");
|
||||
HomieSetting<long> deepSleepNightTime("nightsleep", "time in seconds to sleep (0 uses same setting: deepsleep at night, too)");
|
||||
HomieSetting<long> wateringDeepSleep("pumpdeepsleep", "time seconds to sleep, while a pump is running");
|
||||
|
||||
HomieSetting<long> waterLevelMax("watermaxlevel", "distance (mm) at maximum water level");
|
||||
HomieSetting<long> waterLevelMin("waterminlevel", "distance (mm) at minimum water level (pumps still covered)");
|
||||
HomieSetting<long> waterLevelWarn("waterlevelwarn", "warn (mm) if below this water level %");
|
||||
HomieSetting<long> waterLevelVol("waterVolume", "(ml) between minimum and maximum");
|
||||
HomieSetting<long> lipoSensorIndex("lipoTempIndex", "index onwire bus for lipo temperature sensor");
|
||||
HomieSetting<long> waterSensorIndex("waterTempIndex", "index onwire bus for water temperature sensor");
|
||||
HomieSetting<long> pumpIneffectiveWarning("pumpConsecutiveWarn", "if the pump was triggered this amount directly after each cooldown, without resolving dryness, warn");
|
||||
HomieSetting<long> waterLevelMax("tankmax", "distance (mm) at maximum water level");
|
||||
HomieSetting<long> waterLevelMin("tankmin", "distance (mm) at minimum water level (pumps still covered)");
|
||||
HomieSetting<long> waterLevelWarn("tankwarn", "warn (mm) if below this water level %");
|
||||
HomieSetting<long> waterLevelVol("tankVolume", "(ml) between minimum and maximum");
|
||||
HomieSetting<const char *> lipoSensorAddr("lipoDSAddr", "1wire address for lipo temperature sensor");
|
||||
HomieSetting<const char *> waterSensorAddr("tankDSAddr", "1wire address for water temperature sensor");
|
||||
HomieSetting<const char *> ntpServer("ntpServer", "NTP server (pool.ntp.org as default)");
|
||||
|
||||
#if defined(TIMED_LIGHT_PIN)
|
||||
HomieSetting<double> timedLightVoltageCutoff("LightVoltageCutoff", "voltage at wich to disable light");
|
||||
HomieSetting<long> timedLightStart("LightStart", "hour to start light");
|
||||
HomieSetting<long> timedLightEnd("LightEnd", "hour to end light");
|
||||
HomieSetting<bool> timedLightOnlyWhenDark("LightOnlyDark", "only enable light, if solar is low");
|
||||
HomieSetting<long> timedLightPowerLevel("LightPowerLevel", "0-255 power level");
|
||||
#endif // TIMED_LIGHT_PIN
|
||||
|
||||
|
||||
/**
|
||||
*@}
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -77,12 +103,15 @@ HomieSetting<const char *> ntpServer("ntpServer", "NTP server (pool.ntp.org as d
|
||||
**/
|
||||
|
||||
#define GENERATE_PLANT(plant, strplant) \
|
||||
HomieSetting<long> mSensorDry##plant = HomieSetting<long>("moistdry" strplant, "Plant " strplant "- Moist sensor dry threshold"); \
|
||||
HomieSetting<long> mPumpAllowedHourRangeStart##plant = HomieSetting<long>("rangehourstart" strplant, "Plant" strplant " - Range pump allowed hour start (0-23)"); \
|
||||
HomieSetting<long> mPumpAllowedHourRangeEnd##plant = HomieSetting<long>("rangehourend" strplant, "Plant" strplant " - Range pump allowed hour end (0-23)"); \
|
||||
HomieSetting<bool> mPumpOnlyWhenLowLight##plant = HomieSetting<bool>("onlyWhenLowLightZ" strplant, "Plant" strplant " - Enable the Pump only, when there is light but not enought to charge battery"); \
|
||||
HomieSetting<long> mPumpCooldownInHours##plant = HomieSetting<long>("cooldownpump" strplant, "Plant" strplant " - How long to wait until the pump is activated again (minutes)"); \
|
||||
PlantSettings_t mSetting##plant = {&mSensorDry##plant, &mPumpAllowedHourRangeStart##plant, &mPumpAllowedHourRangeEnd##plant, &mPumpOnlyWhenLowLight##plant, &mPumpCooldownInHours##plant}; \
|
||||
HomieSetting<double> mSensorDry##plant = HomieSetting<double>("dry" strplant, "Plant" strplant " - Moist sensor dry %"); \
|
||||
HomieSetting<long> mPumpAllowedHourRangeStart##plant = HomieSetting<long>("hourstart" strplant, "Plant" strplant " - Range pump allowed hour start (0-23)"); \
|
||||
HomieSetting<long> mPumpAllowedHourRangeEnd##plant = HomieSetting<long>("hourend" strplant, "Plant" strplant " - Range pump allowed hour end (0-23)"); \
|
||||
HomieSetting<bool> mPumpOnlyWhenLowLight##plant = HomieSetting<bool>("lowLight" strplant, "Plant" strplant " - Enable the Pump only, when there is no sunlight"); \
|
||||
HomieSetting<long> mPumpCooldownInSeconds##plant = HomieSetting<long>("delay" strplant, "Plant" strplant " - How long to wait until the pump is activated again (sec)"); \
|
||||
HomieSetting<long> pPumpDuration##plant = HomieSetting<long>("pumpDuration" strplant, "Plant" strplant " - time seconds to water when pump is active"); \
|
||||
HomieSetting<long> pPumpMl##plant = HomieSetting<long>("pumpAmount" strplant, "Plant" strplant " - ml (if using flowmeter) to water when pump is active"); \
|
||||
HomieSetting<long> pPowerLevel##plant = HomieSetting<long>("powerLevel" strplant, "Plant" strplant " - pwm duty cycle in percent"); \
|
||||
PlantSettings_t mSetting##plant = {&mSensorDry##plant, &mPumpAllowedHourRangeStart##plant, &mPumpAllowedHourRangeEnd##plant, &mPumpOnlyWhenLowLight##plant, &mPumpCooldownInSeconds##plant, &pPumpDuration##plant, &pPowerLevel##plant, &pPumpMl##plant}; \
|
||||
/**< Generate all settings for one plant \
|
||||
* \
|
||||
* Feature to start pumping only at morning: @link{SOLAR_CHARGE_MIN_VOLTAGE} and @link{SOLAR_CHARGE_MAX_VOLTAGE} \
|
||||
@@ -100,4 +129,7 @@ GENERATE_PLANT(4, "4"); /**< Homie settings for fifth plant */
|
||||
GENERATE_PLANT(5, "5"); /**< Homie settings for sixth plant */
|
||||
GENERATE_PLANT(6, "6"); /**< Homie settings for seventh plant */
|
||||
|
||||
#endif /* HOMIE_PLANT_CONFIG_H @} */
|
||||
|
||||
|
||||
#endif /* HOMIE_PLANT_CONFIG_H @} */
|
||||
|
||||
|
||||
@@ -13,16 +13,83 @@
|
||||
|
||||
#include <Homie.h>
|
||||
|
||||
#define DEACTIVATED_PLANT 5000
|
||||
#define MISSING_SENSOR 5001
|
||||
/**
|
||||
* @name Sensor types
|
||||
* possible sensors:
|
||||
* @{
|
||||
**/
|
||||
|
||||
#define FOREACH_SENSOR(SENSOR) \
|
||||
SENSOR(NONE) \
|
||||
SENSOR(FREQUENCY_MOD_RESISTANCE_PROBE) \
|
||||
SENSOR(ANALOG_RESISTANCE_PROBE)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#define GENERATE_ENUM(ENUM) ENUM,
|
||||
#define GENERATE_STRING(STRING) #STRING,
|
||||
|
||||
enum SENSOR_MODE {
|
||||
FOREACH_SENSOR(GENERATE_ENUM)
|
||||
};
|
||||
|
||||
static const char *SENSOR_STRING[] = {
|
||||
FOREACH_SENSOR(GENERATE_STRING)
|
||||
};
|
||||
|
||||
//plant pump is deactivated, but sensor values are still recorded and published
|
||||
#define DEACTIVATED_PLANT -1
|
||||
//special value to indicate a missing sensor when the plant is not deactivated but no valid sensor value was read
|
||||
#define MISSING_SENSOR -2
|
||||
//plant uses only cooldown and duration, moisture is measured but ignored, allowedHours is ignored (eg. make a 30min on 30min off cycle)
|
||||
#define HYDROPONIC_MODE -3
|
||||
//plant uses cooldown and duration and workhours, moisture is measured but ignored
|
||||
#define TIMER_ONLY -4
|
||||
//special value to indicate a shorted sensor when the plant is not deactivated but the sensor reads short circuit value
|
||||
#define SHORT_CIRCUIT_MODE -5
|
||||
|
||||
/**
|
||||
* @brief State of plants
|
||||
*
|
||||
*/
|
||||
#define PLANTSTATE_NUM_DEACTIVATED -1
|
||||
#define PLANTSTATE_NUM_NO_SENSOR -2
|
||||
#define PLANTSTATE_NUM_WET 0x00
|
||||
#define PLANTSTATE_NUM_SUNNY_ALARM 0x11
|
||||
#define PLANTSTATE_NUM_ACTIVE_ALARM 0x41
|
||||
#define PLANTSTATE_NUM_ACTIVE_SUPESSED -3
|
||||
#define PLANTSTATE_NUM_ACTIVE 0x40
|
||||
#define PLANTSTATE_NUM_SUNNY 0x10
|
||||
#define PLANTSTATE_NUM_COOLDOWN_ALARM 0x21
|
||||
#define PLANTSTATE_NUM_COOLDOWN 0x20
|
||||
#define PLANTSTATE_NUM_AFTERWORK_ALARM 0x31
|
||||
#define PLANTSTATE_NUM_AFTERWORK 0x30
|
||||
|
||||
#define PLANTSTATE_STR_DEACTIVATED "deactivated"
|
||||
#define PLANTSTATE_STR_NO_SENSOR "nosensor"
|
||||
#define PLANTSTATE_STR_WET "wet"
|
||||
#define PLANTSTATE_STR_SUNNY_ALARM "sunny+alarm"
|
||||
#define PLANTSTATE_STR_ACTIVE_ALARM "active+alarm"
|
||||
#define PLANTSTATE_STR_ACTIVE_SUPESSED "active+supressed"
|
||||
#define PLANTSTATE_STR_ACTIVE "active"
|
||||
#define PLANTSTATE_STR_SUNNY "sunny"
|
||||
#define PLANTSTATE_STR_COOLDOWN_ALARM "cooldown+alarm"
|
||||
#define PLANTSTATE_STR_COOLDOWN "cooldown"
|
||||
#define PLANTSTATE_STR_AFTERWORK_ALARM "after-work+alarm"
|
||||
#define PLANTSTATE_STR_AFTERWORK "after-work"
|
||||
|
||||
typedef struct PlantSettings_t
|
||||
{
|
||||
HomieSetting<long> *pSensorDry;
|
||||
HomieSetting<double> *pSensorDry;
|
||||
HomieSetting<long> *pPumpAllowedHourRangeStart;
|
||||
HomieSetting<long> *pPumpAllowedHourRangeEnd;
|
||||
HomieSetting<bool> *pPumpOnlyWhenLowLight;
|
||||
HomieSetting<long> *pPumpCooldownInHours;
|
||||
HomieSetting<long> *pPumpCooldownInSeconds;
|
||||
HomieSetting<long> *pPumpDuration;
|
||||
HomieSetting<long> *pPumpPowerLevel;
|
||||
HomieSetting<long> *pPumpMl;
|
||||
} PlantSettings_t;
|
||||
|
||||
#endif
|
||||
50
esp32/include/LogDefines.h
Normal file
50
esp32/include/LogDefines.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef LOG_DEFINES_H
|
||||
#define LOG_DEFINES_H
|
||||
|
||||
#define LOG_LEVEL_ERROR 0
|
||||
#define LOG_LEVEL_WARN 1
|
||||
#define LOG_LEVEL_INFO 2
|
||||
#define LOG_LEVEL_DEBUG 3
|
||||
|
||||
|
||||
#define LOG_TANKSENSOR_FAIL_DETECT "Failed to detect and initialize distance sensor!"
|
||||
#define LOG_TANKSENSOR_FAIL_DETECT_CODE -1
|
||||
|
||||
#define LOG_BACKUP_SUCCESSFUL "Backup sucessful"
|
||||
#define LOG_BACKUP_SUCCESSFUL_CODE 1
|
||||
|
||||
#define LOG_BACKUP_FAILED "Backup error"
|
||||
#define LOG_BACKUP_FAILED_CODE -2
|
||||
|
||||
#define LOG_PUMP_BUTNOTANK_MESSAGE "Want to pump but no water"
|
||||
#define LOG_PUMP_BUTNOTANK_CODE -3
|
||||
|
||||
#define LOG_HARDWARECOUNTER_ERROR_MESSAGE "PCNR returned error"
|
||||
#define LOG_HARDWARECOUNTER_ERROR_CODE -4
|
||||
|
||||
#define LOG_SENSORMODE_UNKNOWN "Unknown sensor mode requested"
|
||||
#define LOG_SENSORMODE_UNKNOWN_CODE -5
|
||||
|
||||
#define LOG_SENSOR_MISSING -6
|
||||
|
||||
#define LOG_PUMP_AND_DOWNLOADMODE "Download mode, ignoring pump request"
|
||||
#define LOG_PUMP_AND_DOWNLOADMODE_CODE 2
|
||||
|
||||
#define LOG_VERY_COLD_WATER "Water potentially frozen, ignoring pump request"
|
||||
#define LOG_VERY_COLD_WATER_CODE -7
|
||||
|
||||
#define LOG_PUMP_FULLTANK_MESSAGE "Water Sensor distance unrealistic"
|
||||
#define LOG_PUMP_FULLTANK_CODE 3
|
||||
|
||||
//msg is dynamic defined
|
||||
#define LOG_PUMP_INEFFECTIVE -4
|
||||
#define LOG_PUMP_STARTED_CODE 10
|
||||
#define LOG_DEBUG_CODE 1001
|
||||
#define LOG_SLEEP_NIGHT 100
|
||||
#define LOG_SLEEP_DAY 101
|
||||
#define LOG_SLEEP_LOWVOLTAGE 502
|
||||
#define LOG_SLEEP_CYCLE 102
|
||||
#define LOG_MISSING_PUMP -4
|
||||
#define LOG_BOOT_ERROR_DETECTION 10000
|
||||
#define LOG_SOLAR_CHARGER_MISSING 300
|
||||
#endif
|
||||
28
esp32/include/MQTTUtils.h
Normal file
28
esp32/include/MQTTUtils.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef MQTTUtils_h
|
||||
#define MQTTUtils_h
|
||||
|
||||
#include <Homie.h>
|
||||
|
||||
#define LOG_TOPIC "log\0"
|
||||
#define TEST_TOPIC "roundtrip\0"
|
||||
#define BACKUP_TOPIC "$implementation/config/backup/set\0"
|
||||
|
||||
#define CONFIG_FILE "/homie/config.json"
|
||||
#define CONFIG_FILE_BACKUP "/homie/config.json.bak"
|
||||
|
||||
#define getTopic(test, topic) \
|
||||
char *topic = new char[strlen(Homie.getConfiguration().mqtt.baseTopic) + strlen(Homie.getConfiguration().deviceId) + 1 + strlen(test) + 1]; \
|
||||
strcpy(topic, Homie.getConfiguration().mqtt.baseTopic); \
|
||||
strcat(topic, Homie.getConfiguration().deviceId); \
|
||||
strcat(topic, "/"); \
|
||||
strcat(topic, test);
|
||||
|
||||
bool aliveWasRead();
|
||||
bool mqttReady();
|
||||
void startMQTTRoundtripTest();
|
||||
|
||||
void log(int level, String message, int code);
|
||||
void mqttWrite(HomieNode* target,const char* key, String value);
|
||||
void mqttWrite(HomieNode* target,String key, String value);
|
||||
|
||||
#endif
|
||||
8
esp32/include/MathUtils.h
Normal file
8
esp32/include/MathUtils.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef MATHUTILS_H
|
||||
#define MATHUTILS_H
|
||||
|
||||
|
||||
bool equalish(double x, double y);
|
||||
double mapf(double x, double in_min, double in_max, double out_min, double out_max);
|
||||
|
||||
#endif
|
||||
@@ -4,83 +4,119 @@
|
||||
* @brief Abstraction to handle the Sensors
|
||||
* @version 0.1
|
||||
* @date 2020-05-27
|
||||
*
|
||||
*
|
||||
* @copyright Copyright (c) 2020
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PLANT_CTRL_H
|
||||
#define PLANT_CTRL_H
|
||||
|
||||
#include "HomieTypes.h"
|
||||
#include <HomieNode.hpp>
|
||||
#include "ControllerConfiguration.h"
|
||||
#include "RunningMedian.h"
|
||||
#include "MathUtils.h"
|
||||
#include "MQTTUtils.h"
|
||||
#include "LogDefines.h"
|
||||
|
||||
#define ANALOG_REREADS 5
|
||||
#define MOISTURE_MEASUREMENT_DURATION 400 /** ms */
|
||||
#define PWM_FREQ 50000
|
||||
#define PWM_BITS 8
|
||||
|
||||
class Plant
|
||||
{
|
||||
|
||||
private:
|
||||
RunningMedian moistureRaw = RunningMedian(5);
|
||||
HomieNode *mPlant = NULL;
|
||||
HomieInternals::PropertyInterface mPump;
|
||||
RunningMedian mMoisture_raw = RunningMedian(ANALOG_REREADS);
|
||||
RunningMedian mTemperature_degree = RunningMedian(ANALOG_REREADS);
|
||||
int mPinSensor = 0; /**< Pin of the moist sensor */
|
||||
int mPinPump = 0; /**< Pin of the pump */
|
||||
bool mConnected = false;
|
||||
int mPlantId = -1;
|
||||
SENSOR_MODE mSensorMode;
|
||||
|
||||
|
||||
public:
|
||||
PlantSettings_t *mSetting;
|
||||
/**
|
||||
* @brief Construct a new Plant object
|
||||
*
|
||||
*
|
||||
* @param pinSensor Pin of the Sensor to use to measure moist
|
||||
* @param pinPump Pin of the Pump to use
|
||||
*/
|
||||
Plant(int pinSensor, int pinPump,
|
||||
int plantId,
|
||||
HomieNode *plant,
|
||||
PlantSettings_t *setting);
|
||||
PlantSettings_t *setting, SENSOR_MODE mode);
|
||||
|
||||
void postMQTTconnection(void);
|
||||
|
||||
void advertise(void);
|
||||
|
||||
/**
|
||||
* @brief Measure a new analog moister value
|
||||
*
|
||||
*/
|
||||
void addSenseValue(void);
|
||||
// for sensor that might take any time
|
||||
void blockingMoistureMeasurement(void);
|
||||
// for sensor that need a start and a end in defined timing
|
||||
void startMoistureMeasurement(void);
|
||||
void stopMoistureMeasurement(void);
|
||||
|
||||
void deactivatePump(void);
|
||||
|
||||
void activatePump(void);
|
||||
|
||||
String getSensorModeString()
|
||||
{
|
||||
SENSOR_MODE mode = getSensorMode();
|
||||
return SENSOR_STRING[mode];
|
||||
}
|
||||
|
||||
bool isTimerOnly()
|
||||
{
|
||||
long current = this->mSetting->pSensorDry->get();
|
||||
return equalish(current, TIMER_ONLY);
|
||||
}
|
||||
|
||||
bool isHydroponic()
|
||||
{
|
||||
long current = this->mSetting->pSensorDry->get();
|
||||
return equalish(current, HYDROPONIC_MODE);
|
||||
}
|
||||
|
||||
SENSOR_MODE getSensorMode()
|
||||
{
|
||||
return mSensorMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if a plant is too dry and needs some water.
|
||||
*
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool isPumpRequired()
|
||||
{
|
||||
bool isDry = getCurrentMoisture() > getSettingsMoisture();
|
||||
if (isHydroponic() || isTimerOnly())
|
||||
{
|
||||
// hydroponic only uses timer based controll
|
||||
return true;
|
||||
}
|
||||
bool isDry = getCurrentMoisturePCT() < getTargetMoisturePCT();
|
||||
bool isActive = isPumpTriggerActive();
|
||||
return isDry && isActive;
|
||||
}
|
||||
|
||||
bool isPumpTriggerActive()
|
||||
{
|
||||
return this->mSetting->pSensorDry->get() != DEACTIVATED_PLANT;
|
||||
long current = this->mSetting->pSensorDry->get();
|
||||
return !equalish(current, DEACTIVATED_PLANT);
|
||||
}
|
||||
|
||||
float getCurrentMoisture()
|
||||
{
|
||||
if(moistureRaw.getCount()==0){
|
||||
return MISSING_SENSOR;
|
||||
}
|
||||
return this->moistureRaw.getMedian();
|
||||
}
|
||||
long getSettingsMoisture()
|
||||
float getTargetMoisturePCT()
|
||||
{
|
||||
if (this->mSetting->pSensorDry != NULL)
|
||||
if (isPumpTriggerActive())
|
||||
{
|
||||
return this->mSetting->pSensorDry->get();
|
||||
}
|
||||
@@ -90,37 +126,95 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
float getCurrentMoisturePCT()
|
||||
{
|
||||
switch (getSensorMode())
|
||||
{
|
||||
case NONE:
|
||||
return DEACTIVATED_PLANT;
|
||||
case FREQUENCY_MOD_RESISTANCE_PROBE:
|
||||
return mapf(mMoisture_raw.getMedian(), MOIST_SENSOR_MIN_FRQ, MOIST_SENSOR_MAX_FRQ, 0, 100);
|
||||
case ANALOG_RESISTANCE_PROBE:
|
||||
return mapf(mMoisture_raw.getMedian(), ANALOG_SENSOR_MAX_MV, ANALOG_SENSOR_MIN_MV, 0, 100);
|
||||
}
|
||||
return MISSING_SENSOR;
|
||||
}
|
||||
|
||||
float getCurrentMoistureRaw()
|
||||
{
|
||||
if (getSensorMode() == FREQUENCY_MOD_RESISTANCE_PROBE)
|
||||
{
|
||||
if (mMoisture_raw.getMedian() < MOIST_SENSOR_MIN_FRQ)
|
||||
{
|
||||
return MISSING_SENSOR;
|
||||
}
|
||||
else if (mMoisture_raw.getMedian() > MOIST_SENSOR_MAX_FRQ)
|
||||
{
|
||||
return SHORT_CIRCUIT_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
return mMoisture_raw.getMedian();
|
||||
}
|
||||
|
||||
HomieInternals::SendingPromise &setProperty(const String &property) const
|
||||
{
|
||||
return mPlant->setProperty(property);
|
||||
}
|
||||
bool switchHandler(const HomieRange &range, const String &value);
|
||||
|
||||
void init(void);
|
||||
void initSensors(void);
|
||||
|
||||
/** @fn bool isInCooldown(long sinceLastActivation)
|
||||
* @brief determine, if the plant was recently casted
|
||||
* @param sinceLastActivation timestamp of last time
|
||||
*/
|
||||
bool isInCooldown(long sinceLastActivation)
|
||||
long getCooldownInSeconds()
|
||||
{
|
||||
/* if the time difference is greater than one month, we know these are initial values */
|
||||
if (sinceLastActivation > (60 * 60 * 24 * 30))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (getCooldownInSeconds() > sinceLastActivation);
|
||||
return this->mSetting->pPumpCooldownInSeconds->get();
|
||||
}
|
||||
|
||||
long getCooldownInSeconds(){
|
||||
return this->mSetting->pPumpCooldownInHours->get()*60*60;
|
||||
/**
|
||||
* @brief Get the Hours when pumping should start
|
||||
*
|
||||
* @return hour
|
||||
*/
|
||||
int getHoursStart()
|
||||
{
|
||||
return this->mSetting->pPumpAllowedHourRangeStart->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the Hours when pumping should end
|
||||
*
|
||||
* @return hour
|
||||
*/
|
||||
int getHoursEnd()
|
||||
{
|
||||
return this->mSetting->pPumpAllowedHourRangeEnd->get();
|
||||
}
|
||||
|
||||
bool isAllowedOnlyAtLowLight(void)
|
||||
{
|
||||
if (this->isHydroponic())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return this->mSetting->pPumpOnlyWhenLowLight->get();
|
||||
}
|
||||
|
||||
void publishState(int stateNumber, String stateString);
|
||||
|
||||
bool switchHandler(const HomieRange &range, const String &value);
|
||||
|
||||
void setSwitchHandler(HomieInternals::PropertyInputHandler f);
|
||||
|
||||
long getPumpDuration()
|
||||
{
|
||||
return this->mSetting->pPumpDuration->get();
|
||||
}
|
||||
long getPumpMl()
|
||||
{
|
||||
return this->mSetting->pPumpMl->get();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
4
esp32/include/TimeUtils.h
Normal file
4
esp32/include/TimeUtils.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
long getCurrentTime(void);
|
||||
int getCurrentHour(void);
|
||||
177
esp32/include/ulp-pwm.h
Normal file
177
esp32/include/ulp-pwm.h
Normal file
@@ -0,0 +1,177 @@
|
||||
#ifndef ULP_PWM_h
|
||||
#define ILP_PWM_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "driver/rtc_io.h"
|
||||
#include "soc/rtc_cntl_reg.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "esp32/ulp.h"
|
||||
#include "ControllerConfiguration.h"
|
||||
|
||||
#define LBL_START 1
|
||||
#define LBL_DELAY_ON 2
|
||||
#define LBL_DELAY_OFF 3
|
||||
#define LBL_SKIP_ON 4
|
||||
#define LBL_SKIP_OFF 5
|
||||
#define REGISTER_DELAY_LOOP_COUNTER R0
|
||||
#define REGISTER_TICKS_ON R1
|
||||
#define REGISTER_TICKS_OFF R2
|
||||
#define TOTAL_TICKS_DELAY 255
|
||||
#define PIN TIMED_LIGHT_PIN
|
||||
|
||||
//support 20 vars
|
||||
const size_t ulp_var_offset = CONFIG_ULP_COPROC_RESERVE_MEM - 20;
|
||||
//use the first for dimming
|
||||
const size_t ulp_dimm_offset = ulp_var_offset + 1;
|
||||
const size_t ulp_alive_offset = ulp_var_offset + 2;
|
||||
|
||||
//see https://github.com/perseus086/ESP32-notes
|
||||
const uint32_t rtc_bit[40] = {
|
||||
25, //gpio0
|
||||
0, //gpio1
|
||||
26, //gpio2
|
||||
0, //gpio3
|
||||
24, //gpio4
|
||||
0, //gpio5
|
||||
0, //gpio6
|
||||
0, //gpio7
|
||||
0, //gpio8
|
||||
0, //gpio9
|
||||
0, //gpio10
|
||||
0, //gpio11
|
||||
29, //gpio12
|
||||
28, //gpio13
|
||||
30, //gpio14
|
||||
27, //gpio15
|
||||
0, //gpio16
|
||||
31, //gpio17
|
||||
0, //gpio18
|
||||
0, //gpio19
|
||||
0, //gpio20
|
||||
0, //gpio21
|
||||
0, //gpio22
|
||||
0, //gpio23
|
||||
0, //gpio24
|
||||
20, //gpio25
|
||||
21, //gpio26
|
||||
0, //gpio27
|
||||
0, //gpio28
|
||||
0, //gpio29
|
||||
0, //gpio30
|
||||
0, //gpio31
|
||||
23, //gpio32
|
||||
22, //gpio33
|
||||
18, //gpio34
|
||||
19, //gpio35
|
||||
14, //gpio36
|
||||
15, //gpio37
|
||||
16, //gpio38
|
||||
17 //gpio39
|
||||
};
|
||||
|
||||
static inline void ulp_internal_data_write(size_t offset, uint16_t value)
|
||||
{
|
||||
if (offset >= CONFIG_ULP_COPROC_RESERVE_MEM || offset <= ulp_var_offset)
|
||||
{
|
||||
Serial.print("Invalid ULP offset detected, refusing write!");
|
||||
Serial.print(offset);
|
||||
Serial.print("-");
|
||||
Serial.print(ulp_var_offset);
|
||||
Serial.print("-");
|
||||
Serial.println(CONFIG_ULP_COPROC_RESERVE_MEM);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
RTC_SLOW_MEM[offset] = value;
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint16_t ulp_internal_data_read(size_t offset)
|
||||
{
|
||||
if (offset >= CONFIG_ULP_COPROC_RESERVE_MEM || offset <= ulp_var_offset)
|
||||
{
|
||||
Serial.print("Invalid ULP offset detected");
|
||||
Serial.print(offset);
|
||||
Serial.print("-");
|
||||
Serial.print(ulp_var_offset);
|
||||
Serial.print("-");
|
||||
Serial.println(CONFIG_ULP_COPROC_RESERVE_MEM);
|
||||
}
|
||||
return RTC_SLOW_MEM[offset] & 0xffff;
|
||||
}
|
||||
|
||||
void ulp_internal_start(void)
|
||||
{
|
||||
rtc_gpio_init(PIN);
|
||||
rtc_gpio_set_direction(PIN, RTC_GPIO_MODE_OUTPUT_ONLY);
|
||||
rtc_gpio_set_level(PIN, 0);
|
||||
const uint32_t rtc_gpio = rtc_io_number_get(PIN);
|
||||
|
||||
// Define ULP program
|
||||
const ulp_insn_t ulp_prog[] = {
|
||||
M_LABEL(LBL_START),
|
||||
|
||||
I_MOVI(REGISTER_DELAY_LOOP_COUNTER, 1),
|
||||
I_MOVI(REGISTER_TICKS_ON, 0),
|
||||
I_ST(REGISTER_DELAY_LOOP_COUNTER, REGISTER_TICKS_ON, ulp_alive_offset), //store 1 with 0 offset into alive
|
||||
|
||||
I_LD(REGISTER_TICKS_ON, REGISTER_TICKS_ON, ulp_dimm_offset), //REGISTER_TICKS_ON = RTC_DATA[0+ulp_dimm_offset]
|
||||
//in total there is always 255 delay loop iterations, but in different duty cycle
|
||||
I_MOVI(REGISTER_TICKS_OFF, TOTAL_TICKS_DELAY),
|
||||
I_SUBR(REGISTER_TICKS_OFF, REGISTER_TICKS_OFF, REGISTER_TICKS_ON),
|
||||
|
||||
//on phase
|
||||
I_MOVR(REGISTER_DELAY_LOOP_COUNTER, REGISTER_TICKS_ON),
|
||||
M_BL(LBL_SKIP_ON, 1), //if never on, skip on phase
|
||||
I_WR_REG(RTC_GPIO_OUT_REG, rtc_gpio, rtc_gpio, HIGH), // on
|
||||
M_LABEL(LBL_DELAY_ON),
|
||||
I_DELAY(1), //wait 1 clock
|
||||
I_SUBI(REGISTER_DELAY_LOOP_COUNTER, REGISTER_DELAY_LOOP_COUNTER, 1), // REGISTER_DELAY_LOOP_COUNTER--
|
||||
M_BGE(LBL_DELAY_ON, 1), //if time left, goto start of on loop
|
||||
M_LABEL(LBL_SKIP_ON),
|
||||
|
||||
//off phase
|
||||
I_MOVR(REGISTER_DELAY_LOOP_COUNTER, REGISTER_TICKS_OFF),
|
||||
|
||||
M_BL(LBL_SKIP_OFF, 1), //if never off, skip on phase
|
||||
I_WR_REG(RTC_GPIO_OUT_REG, rtc_gpio, rtc_gpio, LOW), // on
|
||||
M_LABEL(3),
|
||||
I_DELAY(1), //wait 1 clock
|
||||
I_SUBI(REGISTER_DELAY_LOOP_COUNTER, REGISTER_DELAY_LOOP_COUNTER, 1), // REGISTER_DELAY_LOOP_COUNTER--
|
||||
M_BGE(3, 1), //if time left, goto start of on loop
|
||||
M_LABEL(LBL_SKIP_OFF),
|
||||
|
||||
M_BX(LBL_START),
|
||||
};
|
||||
// Run ULP program
|
||||
size_t size = sizeof(ulp_prog) / sizeof(ulp_insn_t);
|
||||
assert(size < ulp_var_offset && "ULP_DATA_OFFSET needs to be greater or equal to the program size");
|
||||
esp_err_t error = ulp_process_macros_and_load(0, ulp_prog, &size);
|
||||
Serial.print("ULP bootstrap status ");
|
||||
Serial.println(error);
|
||||
|
||||
//allow glitchless start
|
||||
ulp_internal_data_write(ulp_alive_offset, 0);
|
||||
|
||||
error = ulp_run(0);
|
||||
Serial.print("ULP start status ");
|
||||
Serial.println(error);
|
||||
}
|
||||
|
||||
static inline void ulp_pwm_set_level(uint8_t level)
|
||||
{
|
||||
ulp_internal_data_write(ulp_dimm_offset, level);
|
||||
}
|
||||
|
||||
static inline void ulp_pwm_init()
|
||||
{
|
||||
ulp_internal_data_write(ulp_alive_offset, 0);
|
||||
delay(10);
|
||||
if (ulp_internal_data_read(ulp_alive_offset) == 0)
|
||||
{
|
||||
ulp_internal_start();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -9,18 +9,32 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:esp32doit-devkit-v1]
|
||||
platform = espressif32
|
||||
platform = espressif32@6.3.2
|
||||
board = esp32doit-devkit-v1
|
||||
framework = arduino
|
||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||
-DPLANT0_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DPLANT1_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DPLANT2_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DPLANT3_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DPLANT4_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DPLANT5_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DPLANT6_SENSORTYPE=FREQUENCY_MOD_RESISTANCE_PROBE
|
||||
-DTIMED_LIGHT_PIN=CUSTOM1_PIN5
|
||||
-DFLOWMETER_PIN=CUSTOM1_PIN1
|
||||
|
||||
board_build.partitions = defaultWithSmallerSpiffs.csv
|
||||
|
||||
;#https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html
|
||||
|
||||
|
||||
; the latest development brankitchen-lightch (convention V3.0.x)
|
||||
lib_deps = ArduinoJson@6.16.1
|
||||
https://github.com/homieiot/homie-esp8266.git#v3.0
|
||||
OneWire
|
||||
DallasTemperature
|
||||
lib_deps = bblanchon/ArduinoJson@^6.20.1
|
||||
paulstoffregen/OneWire@^2.3.6
|
||||
milesburton/DallasTemperature@^3.11.0
|
||||
pololu/VL53L0X@^1.3.1
|
||||
https://github.com/homieiot/homie-esp8266.git#develop
|
||||
|
||||
[platformio]
|
||||
|
||||
extra_configs = custom_platformio.ini
|
||||
extra_configs = custom_platformio.ini
|
||||
|
||||
1638
esp32/sdkconfig.esp32doit-devkit-v1
Normal file
1638
esp32/sdkconfig.esp32doit-devkit-v1
Normal file
File diff suppressed because it is too large
Load Diff
6
esp32/src/CMakeLists.txt
Normal file
6
esp32/src/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file was automatically generated for projects
|
||||
# without default 'CMakeLists.txt' file.
|
||||
|
||||
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
||||
|
||||
idf_component_register(SRCS ${app_sources})
|
||||
272
esp32/src/DS2438.cpp
Normal file
272
esp32/src/DS2438.cpp
Normal file
@@ -0,0 +1,272 @@
|
||||
/*
|
||||
* DS2438.cpp
|
||||
*
|
||||
* by Joe Bechter
|
||||
*
|
||||
* (C) 2012, bechter.com
|
||||
*
|
||||
* All files, software, schematics and designs are provided as-is with no warranty.
|
||||
* All files, software, schematics and designs are for experimental/hobby use.
|
||||
* Under no circumstances should any part be used for critical systems where safety,
|
||||
* life or property depends upon it. You are responsible for all use.
|
||||
* You are free to use, modify, derive or otherwise extend for your own non-commercial purposes provided
|
||||
* 1. No part of this software or design may be used to cause injury or death to humans or animals.
|
||||
* 2. Use is non-commercial.
|
||||
* 3. Credit is given to the author (i.e. portions © bechter.com), and provide a link to the original source.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "DS2438.h"
|
||||
|
||||
// DSROM FIELDS
|
||||
#define DSROM_FAMILY 0
|
||||
#define DSROM_CRC 7
|
||||
|
||||
#define DS2438MODEL 0x26
|
||||
|
||||
DS2438::DS2438(OneWire *ow, float currentShunt, int retryOnCRCError) {
|
||||
_ow = ow;
|
||||
_currentShunt = currentShunt;
|
||||
_retryOnCRCError = retryOnCRCError;
|
||||
};
|
||||
|
||||
void DS2438::begin(){
|
||||
DeviceAddress searchDeviceAddress;
|
||||
|
||||
_ow->reset_search();
|
||||
memset(searchDeviceAddress,0, 8);
|
||||
_temperature.clear();
|
||||
_voltageA.clear();
|
||||
_voltageB.clear();
|
||||
_error = true;
|
||||
_mode = (DS2438_MODE_CHA | DS2438_MODE_CHB | DS2438_MODE_TEMPERATURE);
|
||||
|
||||
deviceFound = false; // Reset the number of devices when we enumerate wire devices
|
||||
|
||||
while (_ow->search(searchDeviceAddress)) {
|
||||
if (validAddress(searchDeviceAddress)) {
|
||||
if (validFamily(searchDeviceAddress)) {
|
||||
memcpy(_address,searchDeviceAddress,8);
|
||||
DEFAULT_PAGE0(defaultConfig);
|
||||
writePage(0, defaultConfig);
|
||||
deviceFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool DS2438::isFound(){
|
||||
return deviceFound;
|
||||
}
|
||||
|
||||
bool DS2438::validAddress(const uint8_t* deviceAddress) {
|
||||
return (_ow->crc8(deviceAddress, 7) == deviceAddress[DSROM_CRC]);
|
||||
}
|
||||
|
||||
bool DS2438::validFamily(const uint8_t* deviceAddress) {
|
||||
switch (deviceAddress[DSROM_FAMILY]) {
|
||||
case DS2438MODEL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void DS2438::updateMultiple(){
|
||||
for(int i = 0;i< DS2438_MEDIAN_COUNT; i++){
|
||||
update(i==0);
|
||||
if(_error){
|
||||
return;
|
||||
}
|
||||
delay(DS2438_MEDIAN_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
void DS2438::update(bool firstIteration) {
|
||||
uint8_t data[9];
|
||||
_error = true;
|
||||
|
||||
if(!isFound()){
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mode & DS2438_MODE_CHA || _mode == DS2438_MODE_TEMPERATURE) {
|
||||
boolean doTemperature = _mode & DS2438_MODE_TEMPERATURE;
|
||||
if (!startConversion(DS2438_CHA, doTemperature)) {
|
||||
Serial.println("Error starting temp conversion ds2438 channel a");
|
||||
return;
|
||||
}
|
||||
if (!readPage(0, data)){
|
||||
|
||||
Serial.println("Error reading zero page ds2438 channel a");
|
||||
return;
|
||||
}
|
||||
|
||||
if (doTemperature) {
|
||||
_temperature.add((double)(((((int16_t)data[2]) << 8) | (data[1] & 0x0ff)) >> 3) * 0.03125);
|
||||
}
|
||||
if (_mode & DS2438_MODE_CHA) {
|
||||
_voltageA.add((((data[4] << 8) & 0x00300) | (data[3] & 0x0ff)) / 100.0);
|
||||
}
|
||||
}
|
||||
if (_mode & DS2438_MODE_CHB) {
|
||||
boolean doTemperature = _mode & DS2438_MODE_TEMPERATURE && !(_mode & DS2438_MODE_CHA);
|
||||
if (!startConversion(DS2438_CHB, doTemperature)) {
|
||||
Serial.println("Error starting temp conversion channel b ds2438");
|
||||
return;
|
||||
}
|
||||
if (!readPage(0, data)){
|
||||
Serial.println("Error reading zero page ds2438 channel b");
|
||||
return;
|
||||
}
|
||||
if (doTemperature) {
|
||||
int16_t upperByte = ((int16_t)data[2]) << 8;
|
||||
int16_t lowerByte = data[1] >> 3;
|
||||
int16_t fullByte = (upperByte | lowerByte);
|
||||
_temperature.add(((double)fullByte) * 0.03125);
|
||||
}
|
||||
_voltageB.add((((data[4] << 8) & 0x00300) | (data[3] & 0x0ff)) / 100.0);
|
||||
}
|
||||
|
||||
int16_t upperByte = ((int16_t)data[6]) << 8;
|
||||
int16_t lowerByte = data[5];
|
||||
int16_t fullByte = (int16_t)(upperByte | lowerByte);
|
||||
float fullByteb = fullByte;
|
||||
_current.add((fullByteb) / ((4096.0f * _currentShunt)));
|
||||
|
||||
|
||||
if(firstIteration){
|
||||
if (readPage(1, data)){
|
||||
PageOne_t *pOne = (PageOne_t *) data;
|
||||
_ICA = pOne->ICA;
|
||||
}
|
||||
|
||||
if (readPage(7, data)){
|
||||
PageSeven_t *pSeven = (PageSeven_t *) data;
|
||||
_CCA = pSeven->CCA0 | ((int16_t) pSeven->CCA1) << 8;
|
||||
_DCA = pSeven->DCA0 | ((int16_t) pSeven->DCA1) << 8;
|
||||
}
|
||||
}
|
||||
_error = false;
|
||||
}
|
||||
|
||||
double DS2438::getTemperature() {
|
||||
return _temperature.getMedian();
|
||||
}
|
||||
|
||||
float DS2438::getAh(){
|
||||
return _ICA / (2048.0f * _currentShunt);
|
||||
}
|
||||
|
||||
long DS2438::getICA(){
|
||||
return _ICA;
|
||||
}
|
||||
|
||||
long DS2438::getDCA(){
|
||||
return _DCA;
|
||||
}
|
||||
|
||||
long DS2438::getCCA(){
|
||||
return _CCA;
|
||||
}
|
||||
|
||||
|
||||
float DS2438::getVoltage(int channel) {
|
||||
if (channel == DS2438_CHA) {
|
||||
return _voltageA.getMedian();
|
||||
} else if (channel == DS2438_CHB) {
|
||||
return _voltageB.getMedian();
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
float DS2438::getCurrent() {
|
||||
return _current.getMedian();
|
||||
}
|
||||
|
||||
boolean DS2438::isError() {
|
||||
return _error;
|
||||
}
|
||||
|
||||
boolean DS2438::startConversion(int channel, boolean doTemperature) {
|
||||
if(!isFound()){
|
||||
return false;
|
||||
}
|
||||
if (!selectChannel(channel)){
|
||||
return false;
|
||||
}
|
||||
_ow->reset();
|
||||
_ow->select(_address);
|
||||
if (doTemperature) {
|
||||
_ow->write(DS2438_TEMPERATURE_CONVERSION_COMMAND, 0);
|
||||
delay(DS2438_TEMPERATURE_DELAY);
|
||||
_ow->reset();
|
||||
_ow->select(_address);
|
||||
}
|
||||
_ow->write(DS2438_VOLTAGE_CONVERSION_COMMAND, 0);
|
||||
delay(DS2438_VOLTAGE_CONVERSION_DELAY);
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean DS2438::selectChannel(int channel) {
|
||||
if(!isFound()){
|
||||
return false;
|
||||
}
|
||||
uint8_t data[9];
|
||||
if (readPage(0, data)) {
|
||||
if (channel == DS2438_CHB){
|
||||
data[0] = data[0] | 0x08;
|
||||
}
|
||||
else {
|
||||
data[0] = data[0] & 0xf7;
|
||||
}
|
||||
writePage(0, data);
|
||||
return true;
|
||||
}
|
||||
Serial.println("Could not read page zero data");
|
||||
return false;
|
||||
}
|
||||
|
||||
void DS2438::writePage(int page, uint8_t *data) {
|
||||
_ow->reset();
|
||||
_ow->select(_address);
|
||||
_ow->write(DS2438_WRITE_SCRATCHPAD_COMMAND, 0);
|
||||
if ((page >= PAGE_MIN) && (page <= PAGE_MAX)) {
|
||||
_ow->write(page, 0);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < 8; i++){
|
||||
_ow->write(data[i], 0);
|
||||
}
|
||||
_ow->reset();
|
||||
_ow->select(_address);
|
||||
_ow->write(DS2438_COPY_SCRATCHPAD_COMMAND, 0);
|
||||
_ow->write(page, 0);
|
||||
}
|
||||
|
||||
boolean DS2438::readPage(int page, uint8_t *data) {
|
||||
bool valid = false;
|
||||
for(int retry = 0;retry < this->_retryOnCRCError && !valid; retry ++){
|
||||
//TODO if all data is 0 0 is a valid crc, but most likly not as intended
|
||||
_ow->reset();
|
||||
_ow->select(_address);
|
||||
_ow->write(DS2438_RECALL_MEMORY_COMMAND, 0);
|
||||
if ((page >= PAGE_MIN) && (page <= PAGE_MAX)) {
|
||||
_ow->write(page, 0);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
_ow->reset();
|
||||
_ow->select(_address);
|
||||
_ow->write(DS2438_READ_SCRATCHPAD_COMMAND, 0);
|
||||
_ow->write(page, 0);
|
||||
for (int i = 0; i < 9; i++){
|
||||
data[i] = _ow->read();
|
||||
}
|
||||
valid = _ow->crc8(data, 8) == data[8];
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
||||
81
esp32/src/FileUtils.cpp
Normal file
81
esp32/src/FileUtils.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
#include <Homie.h>
|
||||
#include "FileUtils.h"
|
||||
|
||||
bool deleteFile(const char *source)
|
||||
{
|
||||
Serial << "deleting file " << source << endl;
|
||||
if (!SPIFFS.begin())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool deleted = SPIFFS.remove(source);
|
||||
if (deleted)
|
||||
{
|
||||
Serial << "Deleted " << source << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial << "Could not delete " << source << endl;
|
||||
}
|
||||
return deleted;
|
||||
}
|
||||
|
||||
void printFile(const char *source)
|
||||
{
|
||||
Serial << "printing file " << source << endl;
|
||||
if (!SPIFFS.begin())
|
||||
{
|
||||
Serial << "could not start spiffs " << source << endl;
|
||||
return;
|
||||
}
|
||||
File file = SPIFFS.open(source, FILE_READ);
|
||||
if (!file)
|
||||
{
|
||||
Serial << "could not start open " << source << endl;
|
||||
return;
|
||||
}
|
||||
Serial << file.readString() << endl;
|
||||
Serial << "Finished printing file " << source << endl;
|
||||
file.close();
|
||||
}
|
||||
|
||||
bool doesFileExist(const char *source)
|
||||
{
|
||||
Serial << "checking if file exist " << source << endl;
|
||||
if (!SPIFFS.begin())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool exists = SPIFFS.exists(source);
|
||||
Serial << "File " << source << (exists ? "" : " not") << " found " << endl;
|
||||
return exists;
|
||||
}
|
||||
|
||||
bool copyFile(const char *source, const char *target)
|
||||
{
|
||||
Serial << "copy started " << source << " -> " << target << endl;
|
||||
if (!SPIFFS.begin())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
File file = SPIFFS.open(source, FILE_READ);
|
||||
File file2 = SPIFFS.open(target, FILE_WRITE);
|
||||
Serial.flush();
|
||||
if (!file)
|
||||
{
|
||||
Serial << "There was an error opening " << source << " for reading" << endl;
|
||||
return false;
|
||||
}
|
||||
if (!file2)
|
||||
{
|
||||
Serial << "There was an error opening " << target << " for reading" << endl;
|
||||
file.close();
|
||||
return false;
|
||||
}
|
||||
file2.println(file.readString());
|
||||
Serial << "copy finished " << source << " -> " << target << endl;
|
||||
file.close();
|
||||
file2.close();
|
||||
return true;
|
||||
}
|
||||
98
esp32/src/MQTTUtils.cpp
Normal file
98
esp32/src/MQTTUtils.cpp
Normal file
@@ -0,0 +1,98 @@
|
||||
#include "MQTTUtils.h"
|
||||
#include "FileUtils.h"
|
||||
#include "LogDefines.h"
|
||||
|
||||
|
||||
bool volatile mAliveWasRead = false;
|
||||
|
||||
void log(int level, String message, int statusCode)
|
||||
{
|
||||
String buffer;
|
||||
StaticJsonDocument<200> doc;
|
||||
// Read the current time
|
||||
time_t now; // this is the epoch
|
||||
tm tm; // the structure tm holds time information in a more convient way
|
||||
doc["level"] = level;
|
||||
doc["message"] = message;
|
||||
doc["statusCode"] = statusCode;
|
||||
time(&now);
|
||||
localtime_r(&now, &tm);
|
||||
if (tm.tm_year > (2021 - 1970)) { /* Only add the time, if we have at least 2021 */
|
||||
doc["time"] = String(String(1900 + tm.tm_year) + "-" + String(tm.tm_mon + 1) + "-" + String(tm.tm_mday) +
|
||||
" " + String(tm.tm_hour) + ":" + String(tm.tm_min) + ":" + String(tm.tm_sec));
|
||||
}
|
||||
|
||||
serializeJson(doc, buffer);
|
||||
if (mAliveWasRead)
|
||||
{
|
||||
getTopic(LOG_TOPIC, logTopic)
|
||||
Homie.getMqttClient()
|
||||
.subscribe(logTopic, 2);
|
||||
|
||||
Homie.getMqttClient().publish(logTopic, 2, false, buffer.c_str());
|
||||
delete logTopic;
|
||||
}
|
||||
Serial << statusCode << "@" << level << " : " << message << endl;
|
||||
Serial.flush();
|
||||
}
|
||||
|
||||
|
||||
void mqttWrite(HomieNode* target,String key, String value){
|
||||
if(mAliveWasRead){
|
||||
target->setProperty(key).send(value);
|
||||
}
|
||||
}
|
||||
|
||||
void mqttWrite(HomieNode* target,const char* key, String value){
|
||||
if(aliveWasRead()){
|
||||
target->setProperty(key).send(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void onMQTTMessage(char *incoming, char *payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total)
|
||||
{
|
||||
getTopic(TEST_TOPIC, testTopic);
|
||||
if (strcmp(incoming, testTopic) == 0)
|
||||
{
|
||||
mAliveWasRead = true;
|
||||
}
|
||||
delete testTopic;
|
||||
getTopic(BACKUP_TOPIC, backupTopic);
|
||||
if (strcmp(incoming, backupTopic) == 0)
|
||||
{
|
||||
if (strcmp(payload, "true") == 0)
|
||||
{
|
||||
bool backupSucessful = copyFile(CONFIG_FILE, CONFIG_FILE_BACKUP);
|
||||
printFile(CONFIG_FILE_BACKUP);
|
||||
if (backupSucessful)
|
||||
{
|
||||
log(LOG_LEVEL_INFO, LOG_BACKUP_SUCCESSFUL, LOG_BACKUP_SUCCESSFUL_CODE);
|
||||
}
|
||||
else
|
||||
{
|
||||
log(LOG_LEVEL_INFO, LOG_BACKUP_FAILED, LOG_BACKUP_FAILED_CODE);
|
||||
}
|
||||
Homie.getMqttClient().publish(backupTopic, 2, true, "false");
|
||||
}
|
||||
}
|
||||
delete backupTopic;
|
||||
}
|
||||
|
||||
bool aliveWasRead(){
|
||||
return mAliveWasRead;
|
||||
}
|
||||
|
||||
void startMQTTRoundtripTest(){
|
||||
{
|
||||
getTopic(TEST_TOPIC, testopic)
|
||||
Homie.getMqttClient()
|
||||
.subscribe(testopic, 2);
|
||||
Homie.getMqttClient().publish(testopic, 2, false, "ping");
|
||||
Homie.getMqttClient().onMessage(onMQTTMessage);
|
||||
|
||||
getTopic(BACKUP_TOPIC, backupTopic)
|
||||
Homie.getMqttClient()
|
||||
.subscribe(backupTopic, 2);
|
||||
}
|
||||
}
|
||||
12
esp32/src/MathUtil.cpp
Normal file
12
esp32/src/MathUtil.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#include "MathUtils.h"
|
||||
#include <Arduino.h>
|
||||
bool equalish(double x, double y)
|
||||
{
|
||||
return (abs(x - y) < 0.5);
|
||||
}
|
||||
|
||||
double mapf(double x, double in_min, double in_max, double out_min, double out_max)
|
||||
{
|
||||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
||||
}
|
||||
@@ -1,62 +1,171 @@
|
||||
/**
|
||||
* @file PlantCtrl.cpp
|
||||
* @author your name (you@domain.com)
|
||||
* @brief
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2020-05-27
|
||||
*
|
||||
*
|
||||
* @copyright Copyright (c) 2020
|
||||
*
|
||||
*
|
||||
|
||||
*/
|
||||
|
||||
#include "PlantCtrl.h"
|
||||
#include "ControllerConfiguration.h"
|
||||
#include "TimeUtils.h"
|
||||
#include "driver/pcnt.h"
|
||||
#include "MQTTUtils.h"
|
||||
|
||||
Plant::Plant(int pinSensor, int pinPump, int plantId, HomieNode *plant, PlantSettings_t *setting)
|
||||
Plant::Plant(int pinSensor, int pinPump, int plantId, HomieNode *plant, PlantSettings_t *setting, SENSOR_MODE mode)
|
||||
{
|
||||
this->mPinSensor = pinSensor;
|
||||
this->mPinPump = pinPump;
|
||||
this->mPlant = plant;
|
||||
this->mSetting = setting;
|
||||
this->mPlantId = plantId;
|
||||
this->mSensorMode = mode;
|
||||
}
|
||||
|
||||
void Plant::init(void)
|
||||
{
|
||||
/* Initialize Home Settings validator */
|
||||
this->mSetting->pSensorDry->setDefaultValue(DEACTIVATED_PLANT);
|
||||
this->mSetting->pSensorDry->setValidator([](long candidate) {
|
||||
return (((candidate >= 0) && (candidate <= 4095)) || candidate == DEACTIVATED_PLANT);
|
||||
});
|
||||
this->mSetting->pPumpAllowedHourRangeStart->setDefaultValue(8); // start at 8:00
|
||||
this->mSetting->pPumpAllowedHourRangeStart->setValidator([](long candidate) {
|
||||
return ((candidate >= 0) && (candidate <= 23));
|
||||
});
|
||||
this->mSetting->pPumpAllowedHourRangeEnd->setDefaultValue(20); // stop pumps at 20:00
|
||||
this->mSetting->pPumpAllowedHourRangeEnd->setValidator([](long candidate) {
|
||||
return ((candidate >= 0) && (candidate <= 23));
|
||||
});
|
||||
this->mSetting->pPumpOnlyWhenLowLight->setDefaultValue(true);
|
||||
this->mSetting->pPumpCooldownInHours->setDefaultValue(20); // minutes
|
||||
this->mSetting->pPumpCooldownInHours->setValidator([](long candidate) {
|
||||
return ((candidate >= 0) && (candidate <= 1024));
|
||||
});
|
||||
this->mSetting->pSensorDry->setValidator([](long candidate)
|
||||
{ return (((candidate >= 0.0) && (candidate <= 100.0)) || equalish(candidate, DEACTIVATED_PLANT) || equalish(candidate, HYDROPONIC_MODE) || equalish(candidate, TIMER_ONLY)); });
|
||||
|
||||
this->mSetting->pPumpAllowedHourRangeStart->setDefaultValue(5); // start at 5:00 UTC or 7:00 ECST
|
||||
this->mSetting->pPumpAllowedHourRangeStart->setValidator([](long candidate)
|
||||
{ return ((candidate >= 0) && (candidate <= 23)); });
|
||||
this->mSetting->pPumpAllowedHourRangeEnd->setDefaultValue(18); // stop pumps at 18 UTC or 20:00 ECST
|
||||
this->mSetting->pPumpAllowedHourRangeEnd->setValidator([](long candidate)
|
||||
{ return ((candidate >= 0) && (candidate <= 23)); });
|
||||
this->mSetting->pPumpOnlyWhenLowLight->setDefaultValue(false);
|
||||
this->mSetting->pPumpCooldownInSeconds->setDefaultValue(60 * 60); // 1 hour
|
||||
this->mSetting->pPumpCooldownInSeconds->setValidator([](long candidate)
|
||||
{ return (candidate >= 0); });
|
||||
|
||||
this->mSetting->pPumpDuration->setDefaultValue(30);
|
||||
this->mSetting->pPumpDuration->setValidator([](long candidate)
|
||||
{ return ((candidate >= 0) && (candidate <= 1000)); });
|
||||
this->mSetting->pPumpMl->setDefaultValue(1000);
|
||||
this->mSetting->pPumpMl->setValidator([](long candidate)
|
||||
{ return ((candidate >= 0) && (candidate <= 5000)); });
|
||||
this->mSetting->pPumpPowerLevel->setDefaultValue(100);
|
||||
this->mSetting->pPumpPowerLevel->setValidator([](long candidate)
|
||||
{ return ((candidate >= 0) && (candidate <= 100)); });
|
||||
|
||||
/* Initialize Hardware */
|
||||
pinMode(this->mPinPump, OUTPUT);
|
||||
pinMode(this->mPinSensor, ANALOG);
|
||||
digitalWrite(this->mPinPump, LOW);
|
||||
ledcSetup(this->mPlantId, PWM_FREQ, PWM_BITS);
|
||||
ledcAttachPin(mPinPump, this->mPlantId);
|
||||
ledcWrite(this->mPlantId, 0);
|
||||
pinMode(this->mPinSensor, INPUT);
|
||||
}
|
||||
|
||||
void Plant::addSenseValue(void)
|
||||
{
|
||||
int raw = analogRead(this->mPinSensor);
|
||||
if(raw < MOIST_SENSOR_MAX_ADC && raw > MOIST_SENSOR_MIN_ADC){
|
||||
this->moistureRaw.add(raw);
|
||||
} else {
|
||||
int plantId = this->mPlantId;
|
||||
Serial << "ignoring sensor " << plantId << " value due to being strange " << raw << endl;
|
||||
void Plant::initSensors(void)
|
||||
{
|
||||
switch (getSensorMode())
|
||||
{
|
||||
case FREQUENCY_MOD_RESISTANCE_PROBE:
|
||||
{
|
||||
|
||||
pcnt_unit_t unit = (pcnt_unit_t)(PCNT_UNIT_0 + this->mPlantId);
|
||||
pcnt_config_t pcnt_config = {}; // Instancia PCNT config
|
||||
|
||||
pcnt_config.pulse_gpio_num = this->mPinSensor; // Configura GPIO para entrada dos pulsos
|
||||
pcnt_config.ctrl_gpio_num = PCNT_PIN_NOT_USED; // Configura GPIO para controle da contagem
|
||||
pcnt_config.unit = unit; // Unidade de contagem PCNT - 0
|
||||
pcnt_config.channel = PCNT_CHANNEL_0; // Canal de contagem PCNT - 0
|
||||
pcnt_config.counter_h_lim = INT16_MAX; // Limite maximo de contagem - 20000
|
||||
pcnt_config.pos_mode = PCNT_COUNT_INC; // Incrementa contagem na subida do pulso
|
||||
pcnt_config.neg_mode = PCNT_COUNT_DIS; // Incrementa contagem na descida do pulso
|
||||
pcnt_config.lctrl_mode = PCNT_MODE_KEEP; // PCNT - modo lctrl desabilitado
|
||||
pcnt_config.hctrl_mode = PCNT_MODE_KEEP; // PCNT - modo hctrl - se HIGH conta incrementando
|
||||
pcnt_unit_config(&pcnt_config); // Configura o contador PCNT
|
||||
|
||||
pcnt_counter_pause(unit); // Pausa o contador PCNT
|
||||
pcnt_counter_clear(unit); // Zera o contador PCNT
|
||||
break;
|
||||
}
|
||||
case ANALOG_RESISTANCE_PROBE:
|
||||
{
|
||||
adcAttachPin(this->mPinSensor);
|
||||
break;
|
||||
}
|
||||
case NONE:
|
||||
{
|
||||
// do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Plant::blockingMoistureMeasurement(void)
|
||||
{
|
||||
switch (getSensorMode())
|
||||
{
|
||||
case ANALOG_RESISTANCE_PROBE:
|
||||
{
|
||||
for (int i = 0; i < ANALOG_REREADS; i++)
|
||||
{
|
||||
this->mMoisture_raw.add(analogReadMilliVolts(this->mPinSensor));
|
||||
delay(5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FREQUENCY_MOD_RESISTANCE_PROBE:
|
||||
case NONE:
|
||||
{
|
||||
// nothing to do here
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Plant::startMoistureMeasurement(void)
|
||||
{
|
||||
switch (getSensorMode())
|
||||
{
|
||||
case FREQUENCY_MOD_RESISTANCE_PROBE:
|
||||
{
|
||||
pcnt_unit_t unit = (pcnt_unit_t)(PCNT_UNIT_0 + this->mPlantId);
|
||||
pcnt_counter_resume(unit);
|
||||
break;
|
||||
}
|
||||
case ANALOG_RESISTANCE_PROBE:
|
||||
case NONE:
|
||||
{
|
||||
// do nothing here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Plant::stopMoistureMeasurement(void)
|
||||
{
|
||||
switch (getSensorMode())
|
||||
{
|
||||
case FREQUENCY_MOD_RESISTANCE_PROBE:
|
||||
{
|
||||
int16_t pulses;
|
||||
pcnt_unit_t unit = (pcnt_unit_t)(PCNT_UNIT_0 + this->mPlantId);
|
||||
pcnt_counter_pause(unit);
|
||||
esp_err_t result = pcnt_get_counter_value(unit, &pulses);
|
||||
pcnt_counter_clear(unit);
|
||||
if (result != ESP_OK)
|
||||
{
|
||||
log(LOG_LEVEL_ERROR, LOG_HARDWARECOUNTER_ERROR_MESSAGE, LOG_HARDWARECOUNTER_ERROR_CODE);
|
||||
this->mMoisture_raw.clear();
|
||||
this->mMoisture_raw.add(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->mMoisture_raw.add(pulses * (1000 / MOISTURE_MEASUREMENT_DURATION));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ANALOG_RESISTANCE_PROBE:
|
||||
case NONE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,11 +174,33 @@ void Plant::postMQTTconnection(void)
|
||||
const String OFF = String("OFF");
|
||||
this->mConnected = true;
|
||||
this->mPlant->setProperty("switch").send(OFF);
|
||||
|
||||
float pct = getCurrentMoisturePCT();
|
||||
float raw = getCurrentMoistureRaw();
|
||||
if (equalish(raw, MISSING_SENSOR))
|
||||
{
|
||||
pct = 0;
|
||||
}
|
||||
if (pct < 0)
|
||||
{
|
||||
pct = 0;
|
||||
}
|
||||
if (pct > 100)
|
||||
{
|
||||
pct = 100;
|
||||
}
|
||||
|
||||
this->mPlant->setProperty("moist").send(String(pct));
|
||||
this->mPlant->setProperty("sensormode").send(getSensorModeString());
|
||||
this->mPlant->setProperty("moistraw").send(String(raw));
|
||||
this->mPlant->setProperty("moisttrigger").send(String(getTargetMoisturePCT()));
|
||||
}
|
||||
|
||||
void Plant::deactivatePump(void)
|
||||
{
|
||||
digitalWrite(this->mPinPump, LOW);
|
||||
int plantId = this->mPlantId;
|
||||
Serial << "deactivating pump " << plantId << endl;
|
||||
ledcWrite(this->mPlantId, 0);
|
||||
if (this->mConnected)
|
||||
{
|
||||
const String OFF = String("OFF");
|
||||
@@ -77,39 +208,69 @@ void Plant::deactivatePump(void)
|
||||
}
|
||||
}
|
||||
|
||||
void Plant::activatePump(void)
|
||||
void Plant::publishState(int stateNumber, String stateString)
|
||||
{
|
||||
digitalWrite(this->mPinPump, HIGH);
|
||||
String buffer;
|
||||
StaticJsonDocument<200> doc;
|
||||
if (this->mConnected)
|
||||
{
|
||||
const String OFF = String("ON");
|
||||
this->mPlant->setProperty("switch").send(OFF);
|
||||
doc["number"] = stateNumber;
|
||||
doc["message"] = stateString;
|
||||
serializeJson(doc, buffer);
|
||||
this->mPlant->setProperty("state").send(buffer.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void Plant::activatePump(void)
|
||||
{
|
||||
int plantId = this->mPlantId;
|
||||
|
||||
Serial << "activating pump " << plantId << endl;
|
||||
long desiredPowerLevelPercent = this->mSetting->pPumpPowerLevel->get();
|
||||
ledcWrite(this->mPlantId, desiredPowerLevelPercent * PWM_BITS);
|
||||
if (this->mConnected)
|
||||
{
|
||||
const String ON = String("ON");
|
||||
this->mPlant->setProperty("switch").send(ON);
|
||||
this->mPlant->setProperty("lastPump").send(String(getCurrentTime()));
|
||||
}
|
||||
}
|
||||
|
||||
bool Plant::switchHandler(const HomieRange &range, const String &value)
|
||||
{
|
||||
if (range.isRange)
|
||||
{
|
||||
return false; // only one switch is present
|
||||
}
|
||||
|
||||
if ((value.equals("ON")) || (value.equals("On")) || (value.equals("on")) || (value.equals("true")))
|
||||
{
|
||||
this->activatePump();
|
||||
return true;
|
||||
}
|
||||
else if ((value.equals("OFF")) || (value.equals("Off")) || (value.equals("off")) || (value.equals("false")))
|
||||
{
|
||||
this->deactivatePump();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void Plant::setSwitchHandler(HomieInternals::PropertyInputHandler f)
|
||||
{
|
||||
this->mPump.settable(f);
|
||||
}
|
||||
|
||||
void Plant::advertise(void)
|
||||
{
|
||||
// Advertise topics
|
||||
this->mPlant->advertise("switch").setName("Pump 1").setDatatype("boolean");
|
||||
//FIXME add .settable(this->switchHandler)
|
||||
this->mPlant->advertise("moist").setName("Percent").setDatatype("number").setUnit("%");
|
||||
this->mPlant->advertise("moistraw").setName("adc").setDatatype("number").setUnit("3.3/4096V");
|
||||
mPump = this->mPlant->advertise("switch").setName("Pump").setDatatype("Boolean");
|
||||
this->mPlant->advertise("lastPump").setName("lastPump").setDatatype("Integer").setUnit("unixtime").setRetained(true);
|
||||
this->mPlant->advertise("moist").setName("Percent").setDatatype("Float").setUnit("%").setRetained(true);
|
||||
this->mPlant->advertise("moistraw").setName("frequency").setDatatype("Float").setUnit("hz").setRetained(true);
|
||||
this->mPlant->advertise("state").setName("state").setDatatype("String").setRetained(true);
|
||||
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
bool Plant::switchHandler(const HomieRange& range, const String& value) {
|
||||
if (range.isRange) return false; // only one switch is present
|
||||
|
||||
|
||||
if ((value.equals("ON")) || (value.equals("On")) || (value.equals("on")) || (value.equals("true"))) {
|
||||
this->activatePump();
|
||||
return true;
|
||||
} else if ((value.equals("OFF")) || (value.equals("Off")) || (value.equals("off")) || (value.equals("false")) ) {
|
||||
this->deactivatePump();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
18
esp32/src/TimeUtils.cpp
Normal file
18
esp32/src/TimeUtils.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "TimeUtils.h"
|
||||
#include <Homie.h>
|
||||
|
||||
long getCurrentTime()
|
||||
{
|
||||
struct timeval tv_now;
|
||||
gettimeofday(&tv_now, NULL);
|
||||
return tv_now.tv_sec;
|
||||
}
|
||||
|
||||
int getCurrentHour()
|
||||
{
|
||||
struct tm info;
|
||||
time_t now;
|
||||
time(&now);
|
||||
localtime_r(&now, &info);
|
||||
return info.tm_hour;
|
||||
}
|
||||
1718
esp32/src/main.cpp
1718
esp32/src/main.cpp
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,10 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
]
|
||||
}
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
|
||||
28
esp32test/Esp32DeepSleepTest/PlantControlTest.code-workspace
Normal file
28
esp32test/Esp32DeepSleepTest/PlantControlTest.code-workspace
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"files.associations": {
|
||||
"*.tcc": "cpp",
|
||||
"bitset": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"functional": "cpp",
|
||||
"string": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"cmath": "cpp",
|
||||
"array": "cpp",
|
||||
"deque": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"vector": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"regex": "cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* @file DS18B20.h
|
||||
* @author your name (you@domain.com)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2020-06-09
|
||||
*
|
||||
* @copyright Copyright (c) 2020
|
||||
* Based on the LUA code from the ESP8266
|
||||
* --------------------------------------------------------------------------------
|
||||
* -- DS18B20 one wire module for NODEMCU
|
||||
* -- NODEMCU TEAM
|
||||
* -- LICENCE: http://opensource.org/licenses/MIT
|
||||
* -- Vowstar <vowstar@nodemcu.com>
|
||||
* -- 2015/02/14 sza2 <sza2trash@gmail.com> Fix for negative values
|
||||
* --------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef DS18B20_H
|
||||
#define DS18B20_H
|
||||
|
||||
#include <OneWire.h>
|
||||
|
||||
class Ds18B20 {
|
||||
private:
|
||||
OneWire* mDs;
|
||||
int foundDevices;
|
||||
public:
|
||||
Ds18B20(int pin) {
|
||||
this->mDs = new OneWire(pin);
|
||||
}
|
||||
|
||||
~Ds18B20() {
|
||||
delete this->mDs;
|
||||
}
|
||||
/**
|
||||
* @brief read amount sensots
|
||||
* check for available of DS18B20 sensors
|
||||
* @return amount of sensors
|
||||
*/
|
||||
int readDevices(void);
|
||||
|
||||
/**
|
||||
* @brief Read all temperatures in celsius
|
||||
*
|
||||
* @param pTemperatures array of float valuies
|
||||
* @param maxTemperatures size of the given array
|
||||
* @return int amount of read temperature values
|
||||
*/
|
||||
int readAllTemperatures(float* pTemperatures, int maxTemperatures);
|
||||
};
|
||||
#endif
|
||||
187
esp32test/Esp32DeepSleepTest/include/ulp-pwm.h
Normal file
187
esp32test/Esp32DeepSleepTest/include/ulp-pwm.h
Normal file
@@ -0,0 +1,187 @@
|
||||
#ifndef ULP_PWM_h
|
||||
#define ILP_PWM_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "driver/rtc_io.h"
|
||||
#include "soc/rtc_cntl_reg.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "esp32/ulp.h"
|
||||
|
||||
#define LBL_START 1
|
||||
#define LBL_DELAY_ON 2
|
||||
#define LBL_DELAY_OFF 3
|
||||
#define LBL_SKIP_ON 4
|
||||
#define LBL_SKIP_OFF 5
|
||||
#define REGISTER_DELAY_LOOP_COUNTER R0
|
||||
#define REGISTER_TICKS_ON R1
|
||||
#define REGISTER_TICKS_OFF R2
|
||||
#define TOTAL_TICKS_DELAY 255
|
||||
#define PIN GPIO_NUM_12
|
||||
|
||||
//support 20 vars
|
||||
const size_t ulp_var_offset = CONFIG_ULP_COPROC_RESERVE_MEM - 20;
|
||||
//use the first for dimming
|
||||
const size_t ulp_dimm_offset = ulp_var_offset + 1;
|
||||
const size_t ulp_alive_offset = ulp_var_offset + 2;
|
||||
|
||||
//see https://github.com/perseus086/ESP32-notes
|
||||
const uint32_t rtc_bit[40] = {
|
||||
25, //gpio0
|
||||
0, //gpio1
|
||||
26, //gpio2
|
||||
0, //gpio3
|
||||
24, //gpio4
|
||||
0, //gpio5
|
||||
0, //gpio6
|
||||
0, //gpio7
|
||||
0, //gpio8
|
||||
0, //gpio9
|
||||
0, //gpio10
|
||||
0, //gpio11
|
||||
29, //gpio12
|
||||
28, //gpio13
|
||||
30, //gpio14
|
||||
27, //gpio15
|
||||
0, //gpio16
|
||||
31, //gpio17
|
||||
0, //gpio18
|
||||
0, //gpio19
|
||||
0, //gpio20
|
||||
0, //gpio21
|
||||
0, //gpio22
|
||||
0, //gpio23
|
||||
0, //gpio24
|
||||
20, //gpio25
|
||||
21, //gpio26
|
||||
0, //gpio27
|
||||
0, //gpio28
|
||||
0, //gpio29
|
||||
0, //gpio30
|
||||
0, //gpio31
|
||||
23, //gpio32
|
||||
22, //gpio33
|
||||
18, //gpio34
|
||||
19, //gpio35
|
||||
14, //gpio36
|
||||
15, //gpio37
|
||||
16, //gpio38
|
||||
17 //gpio39
|
||||
};
|
||||
|
||||
static inline void ulp_data_write(size_t offset, uint16_t value)
|
||||
{
|
||||
if (offset >= CONFIG_ULP_COPROC_RESERVE_MEM || offset <= ulp_var_offset)
|
||||
{
|
||||
Serial.print("Invalid ULP offset detected, refusing write!");
|
||||
Serial.print(offset);
|
||||
Serial.print("-");
|
||||
Serial.print(ulp_var_offset);
|
||||
Serial.print("-");
|
||||
Serial.println(CONFIG_ULP_COPROC_RESERVE_MEM);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
RTC_SLOW_MEM[offset] = value;
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint16_t ulp_data_read(size_t offset)
|
||||
{
|
||||
if (offset >= CONFIG_ULP_COPROC_RESERVE_MEM || offset <= ulp_var_offset)
|
||||
{
|
||||
Serial.print("Invalid ULP offset detected");
|
||||
Serial.print(offset);
|
||||
Serial.print("-");
|
||||
Serial.print(ulp_var_offset);
|
||||
Serial.print("-");
|
||||
Serial.println(CONFIG_ULP_COPROC_RESERVE_MEM);
|
||||
}
|
||||
return RTC_SLOW_MEM[offset] & 0xffff;
|
||||
}
|
||||
|
||||
static inline uint32_t rtc_io_number_get(gpio_num_t gpio_num)
|
||||
{
|
||||
assert(rtc_gpio_is_valid_gpio(gpio_num) && "Invalid GPIO for RTC");
|
||||
uint32_t bit = rtc_bit[gpio_num];
|
||||
Serial.print("Resolved GPIO ");
|
||||
Serial.print(gpio_num);
|
||||
Serial.print(" to rtc bit ");
|
||||
Serial.println(bit);
|
||||
return bit;
|
||||
}
|
||||
|
||||
void ulp_pwm_start(void)
|
||||
{
|
||||
rtc_gpio_init(PIN);
|
||||
rtc_gpio_set_direction(PIN, RTC_GPIO_MODE_OUTPUT_ONLY);
|
||||
rtc_gpio_set_level(PIN, 0);
|
||||
const uint32_t rtc_gpio = rtc_io_number_get(PIN);
|
||||
|
||||
// Define ULP program
|
||||
const ulp_insn_t ulp_prog[] = {
|
||||
M_LABEL(LBL_START),
|
||||
|
||||
I_MOVI(REGISTER_DELAY_LOOP_COUNTER, 1),
|
||||
I_MOVI(REGISTER_TICKS_ON, 0),
|
||||
I_ST(REGISTER_DELAY_LOOP_COUNTER, REGISTER_TICKS_ON, ulp_alive_offset), //store 1 with 0 offset into alive
|
||||
|
||||
I_LD(REGISTER_TICKS_ON, REGISTER_TICKS_ON, ulp_dimm_offset), //REGISTER_TICKS_ON = RTC_DATA[0+ulp_dimm_offset]
|
||||
//in total there is always 255 delay loop iterations, but in different duty cycle
|
||||
I_MOVI(REGISTER_TICKS_OFF, TOTAL_TICKS_DELAY),
|
||||
I_SUBR(REGISTER_TICKS_OFF, REGISTER_TICKS_OFF, REGISTER_TICKS_ON),
|
||||
|
||||
//on phase
|
||||
I_MOVR(REGISTER_DELAY_LOOP_COUNTER, REGISTER_TICKS_ON),
|
||||
M_BL(LBL_SKIP_ON, 1), //if never on, skip on phase
|
||||
I_WR_REG(RTC_GPIO_OUT_REG, rtc_gpio, rtc_gpio, HIGH), // on
|
||||
M_LABEL(LBL_DELAY_ON),
|
||||
I_DELAY(1), //wait 1 clock
|
||||
I_SUBI(REGISTER_DELAY_LOOP_COUNTER, REGISTER_DELAY_LOOP_COUNTER, 1), // REGISTER_DELAY_LOOP_COUNTER--
|
||||
M_BGE(LBL_DELAY_ON, 1), //if time left, goto start of on loop
|
||||
M_LABEL(LBL_SKIP_ON),
|
||||
|
||||
//off phase
|
||||
I_MOVR(REGISTER_DELAY_LOOP_COUNTER, REGISTER_TICKS_OFF),
|
||||
|
||||
M_BL(LBL_SKIP_OFF, 1), //if never off, skip on phase
|
||||
I_WR_REG(RTC_GPIO_OUT_REG, rtc_gpio, rtc_gpio, LOW), // on
|
||||
M_LABEL(3),
|
||||
I_DELAY(1), //wait 1 clock
|
||||
I_SUBI(REGISTER_DELAY_LOOP_COUNTER, REGISTER_DELAY_LOOP_COUNTER, 1), // REGISTER_DELAY_LOOP_COUNTER--
|
||||
M_BGE(3, 1), //if time left, goto start of on loop
|
||||
M_LABEL(LBL_SKIP_OFF),
|
||||
|
||||
M_BX(LBL_START),
|
||||
};
|
||||
// Run ULP program
|
||||
size_t size = sizeof(ulp_prog) / sizeof(ulp_insn_t);
|
||||
assert(size < ulp_var_offset && "ULP_DATA_OFFSET needs to be greater or equal to the program size");
|
||||
esp_err_t error = ulp_process_macros_and_load(0, ulp_prog, &size);
|
||||
Serial.print("ULP bootstrap status ");
|
||||
Serial.println(error);
|
||||
|
||||
//allow glitchless start
|
||||
ulp_data_write(ulp_alive_offset, 0);
|
||||
|
||||
error = ulp_run(0);
|
||||
Serial.print("ULP start status ");
|
||||
Serial.println(error);
|
||||
}
|
||||
|
||||
static inline void ulp_pwm_set_level(uint8_t level)
|
||||
{
|
||||
ulp_data_write(ulp_dimm_offset, level);
|
||||
}
|
||||
|
||||
static inline void ulp_pwm_init()
|
||||
{
|
||||
ulp_data_write(ulp_alive_offset, 0);
|
||||
delay(10);
|
||||
if (ulp_data_read(ulp_alive_offset) == 0)
|
||||
{
|
||||
ulp_pwm_start();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -12,5 +12,5 @@
|
||||
platform = espressif32
|
||||
board = esp32doit-devkit-v1
|
||||
framework = arduino
|
||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||
lib_deps = OneWire
|
||||
lib_deps = pololu/VL53L0X@^1.3.1
|
||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -DBOOTLOADER_LOG_LEVEL_VERBOSE -DLOG_DEFAULT_LEVEL_VERBOSE -DCORE_DEBUG_LEVEL=5
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/**
|
||||
* @file DS18B20.cpp
|
||||
* @author your name (you@domain.com)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2020-06-09
|
||||
*
|
||||
* @copyright Copyright (c) 2020
|
||||
*
|
||||
*/
|
||||
|
||||
#include "DS18B20.h"
|
||||
|
||||
#define STARTCONV 0x44
|
||||
#define READSCRATCH 0xBE // Read EEPROM
|
||||
#define TEMP_LSB 0
|
||||
#define TEMP_MSB 1
|
||||
#define SCRATCHPADSIZE 9
|
||||
#define OFFSET_CRC8 8 /**< 9th byte has the CRC of the complete data */
|
||||
|
||||
//Printf debugging
|
||||
//#define DS_DEBUG
|
||||
|
||||
int Ds18B20::readDevices() {
|
||||
byte addr[8];
|
||||
|
||||
int amount = -1;
|
||||
while (this->mDs->search(addr)) {
|
||||
amount++;
|
||||
}
|
||||
this->mDs->reset_search();
|
||||
return amount;
|
||||
}
|
||||
|
||||
int Ds18B20::readAllTemperatures(float* pTemperatures, int maxTemperatures) {
|
||||
byte addr[8];
|
||||
uint8_t scratchPad[SCRATCHPADSIZE];
|
||||
int currentTemp = 0;
|
||||
|
||||
while (this->mDs->search(addr)) {
|
||||
#ifdef DS_DEBUG
|
||||
Serial.print(" ROM =");
|
||||
for (i = 0; i < 8; i++) {
|
||||
Serial.write(' ');
|
||||
Serial.print(addr[i], HEX);
|
||||
}
|
||||
#endif
|
||||
this->mDs->reset();
|
||||
this->mDs->select(addr);
|
||||
this->mDs->write(STARTCONV);
|
||||
this->mDs->reset();
|
||||
this->mDs->select(addr);
|
||||
this->mDs->write(READSCRATCH);
|
||||
|
||||
// Read all registers in a simple loop
|
||||
// byte 0: temperature LSB
|
||||
// byte 1: temperature MSB
|
||||
// byte 2: high alarm temp
|
||||
// byte 3: low alarm temp
|
||||
// byte 4: DS18S20: store for crc
|
||||
// DS18B20 & DS1822: configuration register
|
||||
// byte 5: internal use & crc
|
||||
// byte 6: DS18S20: COUNT_REMAIN
|
||||
// DS18B20 & DS1822: store for crc
|
||||
// byte 7: DS18S20: COUNT_PER_C
|
||||
// DS18B20 & DS1822: store for crc
|
||||
// byte 8: SCRATCHPAD_CRC
|
||||
#ifdef DS_DEBUG
|
||||
Serial.write("\r\nDATA:");
|
||||
for (uint8_t i = 0; i < 9; i++) {
|
||||
Serial.print(scratchPad[i], HEX);
|
||||
}
|
||||
#else
|
||||
delay(50);
|
||||
#endif
|
||||
for (uint8_t i = 0; i < 9; i++) {
|
||||
scratchPad[i] = this->mDs->read();
|
||||
}
|
||||
uint8_t crc8 = this->mDs->crc8(scratchPad, 8);
|
||||
|
||||
/* Only work an valid data */
|
||||
if (crc8 == scratchPad[OFFSET_CRC8]) {
|
||||
int16_t fpTemperature = (((int16_t) scratchPad[TEMP_MSB]) << 11)
|
||||
| (((int16_t) scratchPad[TEMP_LSB]) << 3);
|
||||
float celsius = (float) fpTemperature * 0.0078125;
|
||||
#ifdef DS_DEBUG
|
||||
Serial.printf("\r\nTemp%d %f °C (Raw: %d, %x =? %x)\r\n", (currentTemp+1), celsius, fpTemperature, crc8, scratchPad[8]);
|
||||
#endif
|
||||
/* check, if the buffer as some space for our data */
|
||||
if (currentTemp < maxTemperatures) {
|
||||
pTemperatures[currentTemp] = celsius;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
currentTemp++;
|
||||
}
|
||||
this->mDs->reset();
|
||||
#ifdef DS_DEBUG
|
||||
Serial.println(" No more addresses.");
|
||||
Serial.println();
|
||||
#endif
|
||||
|
||||
return currentTemp;
|
||||
}
|
||||
@@ -1,174 +1,83 @@
|
||||
#include <Arduino.h>
|
||||
#include "esp_sleep.h"
|
||||
#include <DS18B20.h>
|
||||
#include "driver/pcnt.h"
|
||||
#include <VL53L0X.h>
|
||||
|
||||
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
|
||||
#define TIME_TO_SLEEP 5 /* Time ESP32 will go to sleep (in seconds) */
|
||||
|
||||
#define SENSOR_LIPO 34 /**< GPIO 34 (ADC1) */
|
||||
#define SENSOR_SOLAR 35 /**< GPIO 35 (ADC1) */
|
||||
|
||||
#define SENSOR_DS18B20 2 /**< GPIO 2 */
|
||||
#define SENSOR_TANK_SDA GPIO_NUM_16 /**< GPIO 16 - echo feedback of water sensor */
|
||||
#define SENSOR_TANK_SCL GPIO_NUM_17 /**< GPIO 17 - trigger for water sensor */
|
||||
|
||||
|
||||
#define OUTPUT_PUMP0 23 /**< GPIO 23 */
|
||||
#define OUTPUT_PUMP1 22 /**< GPIO 22 */
|
||||
#define OUTPUT_PUMP2 21 /**< GPIO 21 */
|
||||
#define OUTPUT_PUMP3 19 /**< GPIO 19 */
|
||||
#define OUTPUT_PUMP4 18 /**< GPIO 18 */
|
||||
#define OUTPUT_PUMP5 5 /**< GPIO 5 */
|
||||
#define OUTPUT_PUMP6 15 /**< GPIO 15 */
|
||||
#define OUTPUT_SENSOR 14
|
||||
#define SENSOR_PLANT 17
|
||||
|
||||
#define OUTPUT_SENSOR 16 /**< GPIO 16 - Enable Sensors */
|
||||
#define OUTPUT_PUMP 13 /**< GPIO 13 - Enable Pumps */
|
||||
VL53L0X tankSensor;
|
||||
bool distanceReady = false;
|
||||
|
||||
#define SENSOR_PLANT0 32 /**< GPIO 32 (ADC1) */
|
||||
|
||||
|
||||
#define ADC_TO_VOLT(adc) ((adc) * 3.3 ) / 4095)
|
||||
#define ADC_TO_VOLT_WITH_MULTI(adc, multi) (((adc) * 3.3 * (multi)) / 4095)
|
||||
|
||||
|
||||
#define SOLAR_VOLT(adc) ADC_TO_VOLT_WITH_MULTI(adc, 4.0306) /**< 100k and 33k voltage dividor */
|
||||
#define ADC_5V_TO_3V3(adc) ADC_TO_VOLT_WITH_MULTI(adc, 1.7) /**< 33k and 47k8 voltage dividor */
|
||||
|
||||
RTC_DATA_ATTR int bootCount = 0;
|
||||
RTC_DATA_ATTR int pumpActive = 0;
|
||||
int secondBootCount = 0;
|
||||
|
||||
Ds18B20 ds(SENSOR_DS18B20);
|
||||
|
||||
void print_wakeup_reason(){
|
||||
esp_sleep_wakeup_cause_t wakeup_reason;
|
||||
|
||||
wakeup_reason = esp_sleep_get_wakeup_cause();
|
||||
|
||||
switch(wakeup_reason){
|
||||
case ESP_SLEEP_WAKEUP_EXT0 : Serial.println("Wakeup caused by external signal using RTC_IO"); break;
|
||||
case ESP_SLEEP_WAKEUP_EXT1 : Serial.println("Wakeup caused by external signal using RTC_CNTL"); break;
|
||||
case ESP_SLEEP_WAKEUP_TIMER : Serial.println("Wakeup caused by timer"); break;
|
||||
case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println("Wakeup caused by touchpad"); break;
|
||||
case ESP_SLEEP_WAKEUP_ULP : Serial.println("Wakeup caused by ULP program"); break;
|
||||
default : Serial.printf("Wakeup was not caused by deep sleep: %d\n",wakeup_reason); break;
|
||||
}
|
||||
}
|
||||
|
||||
void setAll2Off() {
|
||||
digitalWrite(OUTPUT_PUMP0, LOW);
|
||||
digitalWrite(OUTPUT_PUMP1, LOW);
|
||||
digitalWrite(OUTPUT_PUMP2, LOW);
|
||||
digitalWrite(OUTPUT_PUMP3, LOW);
|
||||
digitalWrite(OUTPUT_PUMP4, LOW);
|
||||
digitalWrite(OUTPUT_PUMP5, LOW);
|
||||
digitalWrite(OUTPUT_PUMP6, LOW);
|
||||
digitalWrite(OUTPUT_SENSOR, LOW);
|
||||
digitalWrite(OUTPUT_PUMP, LOW);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
|
||||
pinMode(OUTPUT_PUMP0, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP1, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP2, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP3, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP4, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP5, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP6, OUTPUT);
|
||||
pinMode(OUTPUT_SENSOR, OUTPUT);
|
||||
pinMode(OUTPUT_PUMP, OUTPUT);
|
||||
|
||||
pinMode(SENSOR_LIPO, ANALOG);
|
||||
pinMode(SENSOR_SOLAR, ANALOG);
|
||||
pinMode(SENSOR_PLANT0, ANALOG);
|
||||
|
||||
setAll2Off();
|
||||
|
||||
Serial.begin(115200);
|
||||
|
||||
//Increment boot number and print it every reboot
|
||||
++bootCount;
|
||||
++secondBootCount;
|
||||
Serial.println("Boot number: " + String(bootCount) + " " + String(secondBootCount));
|
||||
|
||||
//Print the wakeup reason for ESP32
|
||||
print_wakeup_reason();
|
||||
|
||||
/*
|
||||
First we configure the wake up source
|
||||
We set our ESP32 to wake up every 5 seconds
|
||||
*/
|
||||
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
|
||||
Serial.println("Setup ESP32 to sleep for every " + String(TIME_TO_SLEEP) +
|
||||
" Seconds");
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON);
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL,ESP_PD_OPTION_ON);
|
||||
|
||||
|
||||
|
||||
pinMode(GPIO_NUM_32, ANALOG);
|
||||
digitalWrite(GPIO_NUM_32, HIGH);
|
||||
pinMode(GPIO_NUM_33, INPUT_PULLUP);
|
||||
digitalWrite(GPIO_NUM_33, HIGH);
|
||||
pinMode(GPIO_NUM_25, INPUT_PULLUP);
|
||||
digitalWrite(GPIO_NUM_25, HIGH);
|
||||
pinMode(GPIO_NUM_26, INPUT_PULLUP);
|
||||
pinMode(GPIO_NUM_27, INPUT_PULLUP);
|
||||
pinMode(GPIO_NUM_14, INPUT_PULLUP);
|
||||
pinMode(GPIO_NUM_12, INPUT_PULLUP);
|
||||
|
||||
|
||||
/* Sensor activieren */
|
||||
digitalWrite(OUTPUT_SENSOR, HIGH);
|
||||
|
||||
/* activate power pump and pump 0 */
|
||||
digitalWrite(OUTPUT_PUMP, HIGH);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void loop() {
|
||||
double value = analogRead(SENSOR_LIPO);
|
||||
|
||||
Serial.println(value);
|
||||
|
||||
float temp[2] = {0, 0};
|
||||
float* pFloat = temp;
|
||||
|
||||
Serial.print("DS18B20 sensors: ");
|
||||
Serial.println(ds.readDevices());
|
||||
delay(200);
|
||||
if (ds.readAllTemperatures(pFloat, 2) > 0) {
|
||||
Serial.println(temp[0]);
|
||||
Serial.println(temp[1]);
|
||||
void initializeTanksensor() {
|
||||
Wire.begin(SENSOR_TANK_SDA, SENSOR_TANK_SCL, 100000UL /* 100kHz */);
|
||||
tankSensor.setBus(&Wire);
|
||||
delay(100);
|
||||
tankSensor.setTimeout(500);
|
||||
long start = millis();
|
||||
while (start + 500 > millis())
|
||||
{
|
||||
if (tankSensor.init())
|
||||
{
|
||||
distanceReady = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
delay(20);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double volt = ADC_5V_TO_3V3(value);
|
||||
Serial.print("Lipo: ");
|
||||
Serial.println(volt);
|
||||
|
||||
pumpActive = (pumpActive + 1) % 2;
|
||||
if (pumpActive) {
|
||||
digitalWrite(OUTPUT_PUMP0, HIGH);
|
||||
if ((distanceReady) && (!tankSensor.timeoutOccurred()))
|
||||
{
|
||||
Serial.println("Sensor init done");
|
||||
tankSensor.setSignalRateLimit(0.1);
|
||||
// increase laser pulse periods (defaults are 14 and 10 PCLKs)
|
||||
tankSensor.setVcselPulsePeriod(VL53L0X::VcselPeriodPreRange, 18);
|
||||
tankSensor.setVcselPulsePeriod(VL53L0X::VcselPeriodFinalRange, 14);
|
||||
tankSensor.setMeasurementTimingBudget(200000);
|
||||
tankSensor.startContinuous();
|
||||
} else {
|
||||
digitalWrite(OUTPUT_PUMP0, LOW);
|
||||
Serial.println("Sensor init failed");
|
||||
}
|
||||
}
|
||||
|
||||
double solarVal = analogRead(SENSOR_SOLAR);
|
||||
|
||||
Serial.println(solarVal);
|
||||
|
||||
double solarVolt = SOLAR_VOLT(solarVal);
|
||||
Serial.print("Solar: ");
|
||||
Serial.println(solarVolt);
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
pinMode(OUTPUT_SENSOR, OUTPUT);
|
||||
|
||||
Serial.print("Moist0: ");
|
||||
Serial.println(analogRead(SENSOR_PLANT0));
|
||||
digitalWrite(OUTPUT_SENSOR, HIGH);
|
||||
Serial.println("Nodemcu ESP32 Start done");
|
||||
|
||||
delay(1000);
|
||||
gpio_deep_sleep_hold_en();
|
||||
gpio_hold_en(GPIO_NUM_13);
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
initializeTanksensor();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
delay(500);
|
||||
|
||||
|
||||
if ((distanceReady) && (!tankSensor.timeoutOccurred()))
|
||||
{
|
||||
uint16_t distance = tankSensor.readRangeSingleMillimeters();
|
||||
if (distance > 8000) {
|
||||
Serial.println("Reset due invalid distance: 8 meter");
|
||||
Wire.end();
|
||||
delay(1000);
|
||||
initializeTanksensor();
|
||||
} else {
|
||||
Serial.print("Distance");
|
||||
Serial.println(distance);
|
||||
}
|
||||
} else {
|
||||
Serial.println("Timeout");
|
||||
tankSensor.stopContinuous();
|
||||
Wire.end();
|
||||
delay(100);
|
||||
initializeTanksensor();
|
||||
}
|
||||
}
|
||||
|
||||
BIN
hardware/sensor_mod.png
Normal file
BIN
hardware/sensor_mod.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 279 KiB |
BIN
hardware/verguss form sensor v1.stl
Normal file
BIN
hardware/verguss form sensor v1.stl
Normal file
Binary file not shown.
Binary file not shown.
6224
plantctrl-extension/plantctrl-extension.kicad_pcb
Normal file
6224
plantctrl-extension/plantctrl-extension.kicad_pcb
Normal file
File diff suppressed because it is too large
Load Diff
78
plantctrl-extension/plantctrl-extension.kicad_prl
Normal file
78
plantctrl-extension/plantctrl-extension.kicad_prl
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"board": {
|
||||
"active_layer": 31,
|
||||
"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,
|
||||
"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,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
39,
|
||||
40
|
||||
],
|
||||
"visible_layers": "fffffff_ffffffff",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"meta": {
|
||||
"filename": "plantctrl-extension.kicad_prl",
|
||||
"version": 3
|
||||
},
|
||||
"project": {
|
||||
"files": []
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user