mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-17 00:52:12 +00:00
Merge branch 'master' into new-parser
This commit is contained in:
commit
0e75732022
34
hardware/wemos_mbus_shield/README.md
Normal file
34
hardware/wemos_mbus_shield/README.md
Normal file
@ -0,0 +1,34 @@
|
||||
## Wemos shield
|
||||
|
||||
Fits D1 mini and S2 mini.
|
||||
|
||||
<img src="img1.jpg"/>
|
||||
<img src="img2.jpg"/>
|
||||
|
||||
**WARNING** Not properly tested
|
||||
|
||||
**Resistors**
|
||||
- R1: 470 (for U1)
|
||||
- R2: 220 (for U1)
|
||||
- R3: 82k (for U1)
|
||||
- R4: 220 (for U1)
|
||||
- R5: 100k (for U1)
|
||||
- R6: 10k (for AP button)
|
||||
- R7: 4.7k (for DS18B20)
|
||||
- R8-R10: 1k (for RGB LED)
|
||||
|
||||
**Capacitors**
|
||||
- C1: 100n (for U1)
|
||||
- C2: 1u (for U1)
|
||||
- C3: 100n (for U1)
|
||||
|
||||
**Other components**
|
||||
- U1: TSS521 or TSS721
|
||||
- U2: DS18B20 (Digital temperature sensor)
|
||||
- D1: RGB LED
|
||||
- J1: RJ45
|
||||
- SW1: AP button (to D3 GPIO0)
|
||||
|
||||
**Jumper**
|
||||
- JP1 & JP4: Jump these to receive power (5V) via RJ45 on pin 7 (GND) and 8 (+5)
|
||||
- JP2 & JP3: Jump these to attach DS18B20 sensors via RJ45 on pin 4 (Data) and pin 5 (GND)
|
||||
BIN
hardware/wemos_mbus_shield/img1.jpg
Normal file
BIN
hardware/wemos_mbus_shield/img1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 237 KiB |
BIN
hardware/wemos_mbus_shield/img2.jpg
Normal file
BIN
hardware/wemos_mbus_shield/img2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 296 KiB |
3
hardware/wemos_mbus_shield/kicad/.gitignore
vendored
Normal file
3
hardware/wemos_mbus_shield/kicad/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
gerber
|
||||
rescue-backup
|
||||
*-bak
|
||||
326
hardware/wemos_mbus_shield/kicad/d1_mini_shield-cache.lib
Normal file
326
hardware/wemos_mbus_shield/kicad/d1_mini_shield-cache.lib
Normal file
@ -0,0 +1,326 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# Connector_RJ45
|
||||
#
|
||||
DEF Connector_RJ45 J 0 40 Y Y 1 F N
|
||||
F0 "J" -200 550 50 H V R CNN
|
||||
F1 "Connector_RJ45" 100 550 50 H V L CNN
|
||||
F2 "" 0 25 50 V I C CNN
|
||||
F3 "" 0 25 50 V I C CNN
|
||||
ALIAS RJ31 RJ32 RJ33 RJ34 RJ35 RJ41 RJ45 RJ49 RJ61
|
||||
$FPLIST
|
||||
8P8C*
|
||||
RJ31*
|
||||
RJ32*
|
||||
RJ33*
|
||||
RJ34*
|
||||
RJ35*
|
||||
RJ41*
|
||||
RJ45*
|
||||
RJ49*
|
||||
RJ61*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S 300 500 -300 -400 0 1 10 f
|
||||
P 2 0 1 0 -200 175 -250 175 N
|
||||
P 2 0 1 0 -200 225 -250 225 N
|
||||
P 3 0 1 0 -250 -125 -200 -125 -200 -125 N
|
||||
P 3 0 1 0 -250 -75 -200 -75 -200 -75 N
|
||||
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
|
||||
P 3 0 1 0 -250 25 -200 25 -200 25 N
|
||||
P 3 0 1 0 -250 75 -200 75 -200 75 N
|
||||
P 3 0 1 0 -200 125 -250 125 -250 125 N
|
||||
P 14 0 1 0 -250 -175 -250 275 150 275 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -175 -250 -175 -250 -175 N
|
||||
X ~ 1 400 -300 100 L 50 50 1 1 P
|
||||
X ~ 2 400 -200 100 L 50 50 1 1 P
|
||||
X ~ 3 400 -100 100 L 50 50 1 1 P
|
||||
X ~ 4 400 0 100 L 50 50 1 1 P
|
||||
X ~ 5 400 100 100 L 50 50 1 1 P
|
||||
X ~ 6 400 200 100 L 50 50 1 1 P
|
||||
X ~ 7 400 300 100 L 50 50 1 1 P
|
||||
X ~ 8 400 400 100 L 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_C
|
||||
#
|
||||
DEF Device_C C 0 10 N Y 1 F N
|
||||
F0 "C" 25 100 50 H V L CNN
|
||||
F1 "Device_C" 25 -100 50 H V L CNN
|
||||
F2 "" 38 -150 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
C_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 2 0 1 20 -80 -30 80 -30 N
|
||||
P 2 0 1 20 -80 30 80 30 N
|
||||
X ~ 1 0 150 110 D 50 50 1 1 P
|
||||
X ~ 2 0 -150 110 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_Jumper
|
||||
#
|
||||
DEF Device_Jumper JP 0 30 Y N 1 F N
|
||||
F0 "JP" 0 150 50 H V C CNN
|
||||
F1 "Device_Jumper" 0 -80 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
SolderJumper*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
A 0 -26 125 1426 373 0 1 0 N -98 50 99 50
|
||||
C -100 0 35 0 1 0 N
|
||||
C 100 0 35 0 1 0 N
|
||||
X 1 1 -300 0 165 R 50 50 0 1 P
|
||||
X 2 2 300 0 165 L 50 50 0 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_LED_RGB
|
||||
#
|
||||
DEF Device_LED_RGB D 0 0 Y N 1 F N
|
||||
F0 "D" 0 370 50 H V C CNN
|
||||
F1 "Device_LED_RGB" 0 -350 50 H V C CNN
|
||||
F2 "" 0 -50 50 H I C CNN
|
||||
F3 "" 0 -50 50 H I C CNN
|
||||
$FPLIST
|
||||
LED*
|
||||
LED_SMD:*
|
||||
LED_THT:*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
T 0 -75 -250 50 0 0 0 B Normal 0 C C
|
||||
T 0 -75 -50 50 0 0 0 G Normal 0 C C
|
||||
T 0 -75 150 50 0 0 0 R Normal 0 C C
|
||||
S 50 -50 50 50 0 1 0 N
|
||||
S 50 50 50 50 0 1 0 N
|
||||
S 50 150 50 250 0 1 0 N
|
||||
S 50 250 50 250 0 1 0 N
|
||||
S 110 330 -110 -300 0 1 10 f
|
||||
P 2 0 1 0 -50 -200 -100 -200 N
|
||||
P 2 0 1 0 -50 -200 50 -200 N
|
||||
P 2 0 1 0 -50 -150 -50 -250 N
|
||||
P 2 0 1 8 -50 -150 -50 -250 N
|
||||
P 2 0 1 0 -50 0 -100 0 N
|
||||
P 2 0 1 8 -50 50 -50 -50 N
|
||||
P 2 0 1 0 -50 200 -100 200 N
|
||||
P 2 0 1 0 -50 200 50 200 N
|
||||
P 2 0 1 8 -50 250 -50 150 N
|
||||
P 2 0 1 0 50 -200 100 -200 N
|
||||
P 2 0 1 0 50 0 -50 0 N
|
||||
P 2 0 1 0 50 0 100 0 N
|
||||
P 2 0 1 0 50 200 100 200 N
|
||||
P 3 0 1 0 -50 50 -50 -50 -50 -50 N
|
||||
P 3 0 1 0 -50 250 -50 150 -50 150 N
|
||||
P 4 0 1 8 50 -150 50 -250 -50 -200 50 -150 N
|
||||
P 4 0 1 8 50 50 50 -50 -50 0 50 50 N
|
||||
P 4 0 1 8 50 250 50 150 -50 200 50 250 N
|
||||
P 5 0 1 0 -40 -150 20 -90 -10 -90 20 -90 20 -120 N
|
||||
P 5 0 1 0 -40 50 20 110 -10 110 20 110 20 80 N
|
||||
P 5 0 1 0 -40 250 20 310 -10 310 20 310 20 280 N
|
||||
P 5 0 1 0 0 -150 60 -90 30 -90 60 -90 60 -120 N
|
||||
P 5 0 1 0 0 50 60 110 30 110 60 110 60 80 N
|
||||
P 5 0 1 0 0 250 60 310 30 310 60 310 60 280 N
|
||||
X RK 1 -200 200 100 R 50 50 1 1 P
|
||||
X GK 2 -200 0 100 R 50 50 1 1 P
|
||||
X BK 3 -200 -200 100 R 50 50 1 1 P
|
||||
X BA 4 200 -200 100 L 50 50 1 1 P
|
||||
X GA 5 200 0 100 L 50 50 1 1 P
|
||||
X RA 6 200 200 100 L 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_R
|
||||
#
|
||||
DEF Device_R R 0 0 N Y 1 F N
|
||||
F0 "R" 80 0 50 V V C CNN
|
||||
F1 "Device_R" 0 0 50 V V C CNN
|
||||
F2 "" -70 0 50 V I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
R_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -40 -100 40 100 0 1 10 N
|
||||
X ~ 1 0 150 50 D 50 50 1 1 P
|
||||
X ~ 2 0 -150 50 U 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Sensor_Temperature_DS18B20
|
||||
#
|
||||
DEF Sensor_Temperature_DS18B20 U 0 40 Y Y 1 F N
|
||||
F0 "U" -150 250 50 H V C CNN
|
||||
F1 "Sensor_Temperature_DS18B20" 250 250 50 H V C CNN
|
||||
F2 "Package_TO_SOT_THT:TO-92_Inline" -1000 -250 50 H I C CNN
|
||||
F3 "" -150 250 50 H I C CNN
|
||||
ALIAS DS1822 DS18B20 DS18S20 DS1821C
|
||||
$FPLIST
|
||||
TO*92*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
A -130 125 25 1 1799 0 1 10 N -105 125 -155 125
|
||||
C -130 -100 50 0 1 10 F
|
||||
S -200 200 200 -200 0 1 10 f
|
||||
S -105 -75 -155 0 0 1 10 F
|
||||
P 2 0 1 10 -155 25 -130 25 N
|
||||
P 2 0 1 10 -155 50 -130 50 N
|
||||
P 2 0 1 10 -155 75 -130 75 N
|
||||
P 2 0 1 10 -155 100 -130 100 N
|
||||
P 2 0 1 10 -155 125 -155 0 N
|
||||
P 2 0 1 10 -155 125 -130 125 N
|
||||
P 2 0 1 10 -105 125 -105 0 N
|
||||
X GND 1 0 -300 100 U 50 50 1 1 W
|
||||
X DQ 2 300 0 100 L 50 50 1 1 B
|
||||
X VDD 3 0 300 100 D 50 50 1 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Switch_SW_Push
|
||||
#
|
||||
DEF Switch_SW_Push SW 0 40 N N 1 F N
|
||||
F0 "SW" 50 100 50 H V L CNN
|
||||
F1 "Switch_SW_Push" 0 -60 50 H V C CNN
|
||||
F2 "" 0 200 50 H I C CNN
|
||||
F3 "" 0 200 50 H I C CNN
|
||||
DRAW
|
||||
C -80 0 20 0 1 0 N
|
||||
C 80 0 20 0 1 0 N
|
||||
P 2 0 1 0 0 50 0 120 N
|
||||
P 2 0 1 0 100 50 -100 50 N
|
||||
X 1 1 -200 0 100 R 50 50 0 1 P
|
||||
X 2 2 200 0 100 L 50 50 0 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# d1_mini_shield-rescue_CONN_01X08
|
||||
#
|
||||
DEF d1_mini_shield-rescue_CONN_01X08 P 0 40 Y N 1 F N
|
||||
F0 "P" 0 450 50 H V C CNN
|
||||
F1 "d1_mini_shield-rescue_CONN_01X08" 100 0 50 V V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
Pin_Header_Straight_1X08
|
||||
Pin_Header_Angled_1X08
|
||||
Socket_Strip_Straight_1X08
|
||||
Socket_Strip_Angled_1X08
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -400 50 400 0 1 0 N
|
||||
S -50 -345 10 -355 0 1 0 N
|
||||
S -50 -245 10 -255 0 1 0 N
|
||||
S -50 -145 10 -155 0 1 0 N
|
||||
S -50 -45 10 -55 0 1 0 N
|
||||
S -50 55 10 45 0 1 0 N
|
||||
S -50 155 10 145 0 1 0 N
|
||||
S -50 255 10 245 0 1 0 N
|
||||
S -50 355 10 345 0 1 0 N
|
||||
X P1 1 -200 350 150 R 50 50 1 1 P
|
||||
X P2 2 -200 250 150 R 50 50 1 1 P
|
||||
X P3 3 -200 150 150 R 50 50 1 1 P
|
||||
X P4 4 -200 50 150 R 50 50 1 1 P
|
||||
X P5 5 -200 -50 150 R 50 50 1 1 P
|
||||
X P6 6 -200 -150 150 R 50 50 1 1 P
|
||||
X P7 7 -200 -250 150 R 50 50 1 1 P
|
||||
X P8 8 -200 -350 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_+3.3V
|
||||
#
|
||||
DEF power_+3.3V #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -150 50 H I C CNN
|
||||
F1 "power_+3.3V" 0 140 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
ALIAS +3.3V
|
||||
DRAW
|
||||
P 2 0 1 0 -30 50 0 100 N
|
||||
P 2 0 1 0 0 0 0 100 N
|
||||
P 2 0 1 0 0 100 30 50 N
|
||||
X +3V3 1 0 0 0 U 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_+3V3
|
||||
#
|
||||
DEF power_+3V3 #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -150 50 H I C CNN
|
||||
F1 "power_+3V3" 0 140 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
P 2 0 1 0 -30 50 0 100 N
|
||||
P 2 0 1 0 0 0 0 100 N
|
||||
P 2 0 1 0 0 100 30 50 N
|
||||
X +3V3 1 0 0 0 U 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_+5V
|
||||
#
|
||||
DEF power_+5V #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -150 50 H I C CNN
|
||||
F1 "power_+5V" 0 140 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
P 2 0 1 0 -30 50 0 100 N
|
||||
P 2 0 1 0 0 0 0 100 N
|
||||
P 2 0 1 0 0 100 30 50 N
|
||||
X +5V 1 0 0 0 U 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# power_GND
|
||||
#
|
||||
DEF power_GND #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 -250 50 H I C CNN
|
||||
F1 "power_GND" 0 -150 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
|
||||
X GND 1 0 0 0 D 50 50 1 1 W N
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# tss721_TSS721
|
||||
#
|
||||
DEF tss721_TSS721 U 0 40 Y Y 1 F N
|
||||
F0 "U" 200 850 50 H V L CNN
|
||||
F1 "tss721_TSS721" 200 750 50 H V L CNN
|
||||
F2 "" 0 -850 50 H V C CIN
|
||||
F3 "" -200 -800 50 H V C CNN
|
||||
ALIAS TSS721A
|
||||
$FPLIST
|
||||
SOIC*3.9x9.9mm*Pitch1.27mm*
|
||||
TSSOP*4.4x5mm*Pitch0.65mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -500 -700 500 700 0 1 10 f
|
||||
X BUSL2 1 -600 400 100 R 50 50 1 1 I
|
||||
X VS 10 -600 0 100 R 50 50 1 1 P
|
||||
X VDD 11 0 800 100 D 50 50 1 1 W
|
||||
X RX 12 600 500 100 L 50 50 1 1 I
|
||||
X RXI 13 600 400 100 L 50 50 1 1 I I
|
||||
X RIS 14 300 -800 100 U 50 50 1 1 I
|
||||
X GND 15 0 -800 100 U 50 50 1 1 W
|
||||
X BUSL1 16 -600 500 100 R 50 50 1 1 I
|
||||
X VB 2 -600 -150 100 R 50 50 1 1 P
|
||||
X STC 3 -600 -500 100 R 50 50 1 1 P
|
||||
X RIDD 4 200 -800 100 U 50 50 1 1 O
|
||||
X PF 5 -600 100 100 R 50 50 1 1 I
|
||||
X SC 6 400 -800 100 U 50 50 1 1 P
|
||||
X TXI 7 600 100 100 L 50 50 1 1 O I
|
||||
X TX 8 600 200 100 L 50 50 1 1 O
|
||||
X BAT 9 -100 800 100 D 50 50 1 1 I
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
38
hardware/wemos_mbus_shield/kicad/d1_mini_shield-rescue.lib
Normal file
38
hardware/wemos_mbus_shield/kicad/d1_mini_shield-rescue.lib
Normal file
@ -0,0 +1,38 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# CONN_01X08
|
||||
#
|
||||
DEF CONN_01X08 P 0 40 Y N 1 F N
|
||||
F0 "P" 0 450 50 H V C CNN
|
||||
F1 "CONN_01X08" 100 0 50 V V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
Pin_Header_Straight_1X08
|
||||
Pin_Header_Angled_1X08
|
||||
Socket_Strip_Straight_1X08
|
||||
Socket_Strip_Angled_1X08
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -400 50 400 0 1 0 N
|
||||
S -50 -345 10 -355 0 1 0 N
|
||||
S -50 -245 10 -255 0 1 0 N
|
||||
S -50 -145 10 -155 0 1 0 N
|
||||
S -50 -45 10 -55 0 1 0 N
|
||||
S -50 55 10 45 0 1 0 N
|
||||
S -50 155 10 145 0 1 0 N
|
||||
S -50 255 10 245 0 1 0 N
|
||||
S -50 355 10 345 0 1 0 N
|
||||
X P1 1 -200 350 150 R 50 50 1 1 P
|
||||
X P2 2 -200 250 150 R 50 50 1 1 P
|
||||
X P3 3 -200 150 150 R 50 50 1 1 P
|
||||
X P4 4 -200 50 150 R 50 50 1 1 P
|
||||
X P5 5 -200 -50 150 R 50 50 1 1 P
|
||||
X P6 6 -200 -150 150 R 50 50 1 1 P
|
||||
X P7 7 -200 -250 150 R 50 50 1 1 P
|
||||
X P8 8 -200 -350 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
1852
hardware/wemos_mbus_shield/kicad/d1_mini_shield.kicad_pcb
Normal file
1852
hardware/wemos_mbus_shield/kicad/d1_mini_shield.kicad_pcb
Normal file
File diff suppressed because it is too large
Load Diff
482
hardware/wemos_mbus_shield/kicad/d1_mini_shield.net
Normal file
482
hardware/wemos_mbus_shield/kicad/d1_mini_shield.net
Normal file
@ -0,0 +1,482 @@
|
||||
(export (version D)
|
||||
(design
|
||||
(source /home/gunnar/src/AmsToMqttBridge/hardware/wemos_mbus_shield/kicad/d1_mini_shield.sch)
|
||||
(date "sø. 26. juni 2022 kl. 12.19 +0200")
|
||||
(tool "Eeschema 5.1.5+dfsg1-2build2")
|
||||
(sheet (number 1) (name /) (tstamps /)
|
||||
(title_block
|
||||
(title)
|
||||
(company)
|
||||
(rev)
|
||||
(date)
|
||||
(source d1_mini_shield.sch)
|
||||
(comment (number 1) (value ""))
|
||||
(comment (number 2) (value ""))
|
||||
(comment (number 3) (value ""))
|
||||
(comment (number 4) (value "")))))
|
||||
(components
|
||||
(comp (ref P1)
|
||||
(value CONN_01X08)
|
||||
(footprint D1_mini:D1_mini_Pin_Header)
|
||||
(libsource (lib d1_mini_shield-rescue) (part CONN_01X08) (description ""))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 5763EB78))
|
||||
(comp (ref P2)
|
||||
(value CONN_01X08)
|
||||
(footprint D1_mini:D1_mini_Pin_Header)
|
||||
(libsource (lib d1_mini_shield-rescue) (part CONN_01X08) (description ""))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 5763EBF2))
|
||||
(comp (ref U1)
|
||||
(value TSS721)
|
||||
(footprint Package_SO:SOIC-16_3.9x9.9mm_P1.27mm)
|
||||
(datasheet http://www.ti.com/lit/ds/symlink/tss721a.pdf)
|
||||
(libsource (lib tss721) (part TSS721) (description "TSS721A Meter Bus Transceiver, SOIC-16/TSSOP-16"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B826D2))
|
||||
(comp (ref J1)
|
||||
(value RJ45)
|
||||
(footprint Connector_RJ:RJ45_Amphenol_54602-x08_Horizontal)
|
||||
(datasheet ~)
|
||||
(libsource (lib Connector) (part RJ45) (description "RJ connector, 8P8C (8 positions 8 connected)"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B8AC34))
|
||||
(comp (ref R4)
|
||||
(value 220)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B8CAA8))
|
||||
(comp (ref R2)
|
||||
(value 220)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B8DB92))
|
||||
(comp (ref R3)
|
||||
(value 82k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B9F861))
|
||||
(comp (ref R1)
|
||||
(value 470)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62B9FC37))
|
||||
(comp (ref C2)
|
||||
(value 1u)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BA06BE))
|
||||
(comp (ref C1)
|
||||
(value 100n)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BA09E7))
|
||||
(comp (ref R5)
|
||||
(value 100k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BED413))
|
||||
(comp (ref C3)
|
||||
(value 100n)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62BED9ED))
|
||||
(comp (ref JP1)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C331C0))
|
||||
(comp (ref JP2)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C365CA))
|
||||
(comp (ref JP3)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C36C70))
|
||||
(comp (ref D1)
|
||||
(value LED_RGB)
|
||||
(footprint LED_SMD:LED_RGB_PLCC-6)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part LED_RGB) (description "RGB LED, 6 pin package"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C43A7B))
|
||||
(comp (ref R9)
|
||||
(value 1k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C495F7))
|
||||
(comp (ref R8)
|
||||
(value 1k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C4BDE9))
|
||||
(comp (ref R10)
|
||||
(value 1k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C4C336))
|
||||
(comp (ref U2)
|
||||
(value DS18B20)
|
||||
(footprint Package_TO_SOT_THT:TO-92_Inline)
|
||||
(datasheet http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf)
|
||||
(libsource (lib Sensor_Temperature) (part DS18B20) (description "Programmable Resolution 1-Wire Digital Thermometer TO-92"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C6296F))
|
||||
(comp (ref R7)
|
||||
(value 4k7)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C6405D))
|
||||
(comp (ref SW1)
|
||||
(value SW_Push)
|
||||
(footprint Button_Switch_SMD:SW_SPST_B3U-3000P)
|
||||
(datasheet ~)
|
||||
(libsource (lib Switch) (part SW_Push) (description "Push button switch, generic, two pins"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C73229))
|
||||
(comp (ref R6)
|
||||
(value 10k)
|
||||
(footprint Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part R) (description Resistor))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62C73CE8))
|
||||
(comp (ref JP4)
|
||||
(value Jumper)
|
||||
(footprint Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm)
|
||||
(datasheet ~)
|
||||
(libsource (lib Device) (part Jumper) (description "Jumper, normally closed"))
|
||||
(sheetpath (names /) (tstamps /))
|
||||
(tstamp 62D1E97A)))
|
||||
(libparts
|
||||
(libpart (lib Connector) (part 8P8C)
|
||||
(aliases
|
||||
(alias RJ31)
|
||||
(alias RJ32)
|
||||
(alias RJ33)
|
||||
(alias RJ34)
|
||||
(alias RJ35)
|
||||
(alias RJ41)
|
||||
(alias RJ45)
|
||||
(alias RJ49)
|
||||
(alias RJ61))
|
||||
(description "RJ connector, 8P8C (8 positions 8 connected), RJ31/RJ32/RJ33/RJ34/RJ35/RJ41/RJ45/RJ49/RJ61")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp 8P8C*)
|
||||
(fp RJ31*)
|
||||
(fp RJ32*)
|
||||
(fp RJ33*)
|
||||
(fp RJ34*)
|
||||
(fp RJ35*)
|
||||
(fp RJ41*)
|
||||
(fp RJ45*)
|
||||
(fp RJ49*)
|
||||
(fp RJ61*))
|
||||
(fields
|
||||
(field (name Reference) J)
|
||||
(field (name Value) 8P8C))
|
||||
(pins
|
||||
(pin (num 1) (name ~) (type passive))
|
||||
(pin (num 2) (name ~) (type passive))
|
||||
(pin (num 3) (name ~) (type passive))
|
||||
(pin (num 4) (name ~) (type passive))
|
||||
(pin (num 5) (name ~) (type passive))
|
||||
(pin (num 6) (name ~) (type passive))
|
||||
(pin (num 7) (name ~) (type passive))
|
||||
(pin (num 8) (name ~) (type passive))))
|
||||
(libpart (lib Device) (part C)
|
||||
(description "Unpolarized capacitor")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp C_*))
|
||||
(fields
|
||||
(field (name Reference) C)
|
||||
(field (name Value) C))
|
||||
(pins
|
||||
(pin (num 1) (name ~) (type passive))
|
||||
(pin (num 2) (name ~) (type passive))))
|
||||
(libpart (lib Device) (part Jumper)
|
||||
(description "Jumper, normally closed")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp SolderJumper*))
|
||||
(fields
|
||||
(field (name Reference) JP)
|
||||
(field (name Value) Jumper))
|
||||
(pins
|
||||
(pin (num 1) (name 1) (type passive))
|
||||
(pin (num 2) (name 2) (type passive))))
|
||||
(libpart (lib Device) (part LED_RGB)
|
||||
(description "RGB LED, 6 pin package")
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp LED*)
|
||||
(fp LED_SMD:*)
|
||||
(fp LED_THT:*))
|
||||
(fields
|
||||
(field (name Reference) D)
|
||||
(field (name Value) LED_RGB))
|
||||
(pins
|
||||
(pin (num 1) (name RK) (type passive))
|
||||
(pin (num 2) (name GK) (type passive))
|
||||
(pin (num 3) (name BK) (type passive))
|
||||
(pin (num 4) (name BA) (type passive))
|
||||
(pin (num 5) (name GA) (type passive))
|
||||
(pin (num 6) (name RA) (type passive))))
|
||||
(libpart (lib Device) (part R)
|
||||
(description Resistor)
|
||||
(docs ~)
|
||||
(footprints
|
||||
(fp R_*))
|
||||
(fields
|
||||
(field (name Reference) R)
|
||||
(field (name Value) R))
|
||||
(pins
|
||||
(pin (num 1) (name ~) (type passive))
|
||||
(pin (num 2) (name ~) (type passive))))
|
||||
(libpart (lib Sensor_Temperature) (part MAX31820)
|
||||
(aliases
|
||||
(alias DS1822)
|
||||
(alias DS18B20)
|
||||
(alias DS18S20)
|
||||
(alias DS1821C))
|
||||
(description "1-Wire Ambient Temperature Sensor TO-92")
|
||||
(docs http://datasheets.maximintegrated.com/en/ds/MAX31820.pdf)
|
||||
(footprints
|
||||
(fp TO*92*))
|
||||
(fields
|
||||
(field (name Reference) U)
|
||||
(field (name Value) MAX31820)
|
||||
(field (name Footprint) Package_TO_SOT_THT:TO-92_Inline))
|
||||
(pins
|
||||
(pin (num 1) (name GND) (type power_in))
|
||||
(pin (num 2) (name DQ) (type BiDi))
|
||||
(pin (num 3) (name VDD) (type power_in))))
|
||||
(libpart (lib Switch) (part SW_Push)
|
||||
(description "Push button switch, generic, two pins")
|
||||
(docs ~)
|
||||
(fields
|
||||
(field (name Reference) SW)
|
||||
(field (name Value) SW_Push))
|
||||
(pins
|
||||
(pin (num 1) (name 1) (type passive))
|
||||
(pin (num 2) (name 2) (type passive))))
|
||||
(libpart (lib d1_mini_shield-rescue) (part CONN_01X08)
|
||||
(footprints
|
||||
(fp Pin_Header_Straight_1X08)
|
||||
(fp Pin_Header_Angled_1X08)
|
||||
(fp Socket_Strip_Straight_1X08)
|
||||
(fp Socket_Strip_Angled_1X08))
|
||||
(fields
|
||||
(field (name Reference) P)
|
||||
(field (name Value) CONN_01X08))
|
||||
(pins
|
||||
(pin (num 1) (name P1) (type passive))
|
||||
(pin (num 2) (name P2) (type passive))
|
||||
(pin (num 3) (name P3) (type passive))
|
||||
(pin (num 4) (name P4) (type passive))
|
||||
(pin (num 5) (name P5) (type passive))
|
||||
(pin (num 6) (name P6) (type passive))
|
||||
(pin (num 7) (name P7) (type passive))
|
||||
(pin (num 8) (name P8) (type passive))))
|
||||
(libpart (lib tss721) (part TSS721)
|
||||
(aliases
|
||||
(alias TSS721A))
|
||||
(description "TSS721A Meter Bus Transceiver, SOIC-16/TSSOP-16")
|
||||
(docs http://www.ti.com/lit/ds/symlink/tss721a.pdf)
|
||||
(footprints
|
||||
(fp SOIC*3.9x9.9mm*Pitch1.27mm*)
|
||||
(fp TSSOP*4.4x5mm*Pitch0.65mm*))
|
||||
(fields
|
||||
(field (name Reference) U)
|
||||
(field (name Value) TSS721))
|
||||
(pins
|
||||
(pin (num 1) (name BUSL2) (type input))
|
||||
(pin (num 2) (name VB) (type passive))
|
||||
(pin (num 3) (name STC) (type passive))
|
||||
(pin (num 4) (name RIDD) (type output))
|
||||
(pin (num 5) (name PF) (type input))
|
||||
(pin (num 6) (name SC) (type passive))
|
||||
(pin (num 7) (name TXI) (type output))
|
||||
(pin (num 8) (name TX) (type output))
|
||||
(pin (num 9) (name BAT) (type input))
|
||||
(pin (num 10) (name VS) (type passive))
|
||||
(pin (num 11) (name VDD) (type power_in))
|
||||
(pin (num 12) (name RX) (type input))
|
||||
(pin (num 13) (name RXI) (type input))
|
||||
(pin (num 14) (name RIS) (type input))
|
||||
(pin (num 15) (name GND) (type power_in))
|
||||
(pin (num 16) (name BUSL1) (type input)))))
|
||||
(libraries
|
||||
(library (logical Connector)
|
||||
(uri /usr/share/kicad/library/Connector.lib))
|
||||
(library (logical Device)
|
||||
(uri /usr/share/kicad/library/Device.lib))
|
||||
(library (logical Sensor_Temperature)
|
||||
(uri /usr/share/kicad/library/Sensor_Temperature.lib))
|
||||
(library (logical Switch)
|
||||
(uri /usr/share/kicad/library/Switch.lib))
|
||||
(library (logical d1_mini_shield-rescue)
|
||||
(uri /home/gunnar/src/AmsToMqttBridge/hardware/wemos_mbus_shield/kicad/d1_mini_shield-rescue.lib))
|
||||
(library (logical tss721)
|
||||
(uri /home/gunnar/src/AmsToMqttBridge/hardware/wemos_mbus_shield/kicad/tss721.lib)))
|
||||
(nets
|
||||
(net (code 1) (name TEMP)
|
||||
(node (ref R7) (pin 2))
|
||||
(node (ref U2) (pin 2))
|
||||
(node (ref P1) (pin 5))
|
||||
(node (ref JP3) (pin 2)))
|
||||
(net (code 2) (name +3V3)
|
||||
(node (ref R7) (pin 1))
|
||||
(node (ref U1) (pin 9))
|
||||
(node (ref P2) (pin 1))
|
||||
(node (ref R6) (pin 2))
|
||||
(node (ref D1) (pin 4))
|
||||
(node (ref D1) (pin 5))
|
||||
(node (ref D1) (pin 6))
|
||||
(node (ref U2) (pin 3)))
|
||||
(net (code 3) (name "Net-(D1-Pad1)")
|
||||
(node (ref R9) (pin 2))
|
||||
(node (ref D1) (pin 1)))
|
||||
(net (code 4) (name "Net-(D1-Pad2)")
|
||||
(node (ref D1) (pin 2))
|
||||
(node (ref R8) (pin 2)))
|
||||
(net (code 5) (name "Net-(D1-Pad3)")
|
||||
(node (ref D1) (pin 3))
|
||||
(node (ref R10) (pin 2)))
|
||||
(net (code 6) (name MBUS2)
|
||||
(node (ref J1) (pin 2))
|
||||
(node (ref R4) (pin 1)))
|
||||
(net (code 7) (name BTN_AP)
|
||||
(node (ref P1) (pin 4))
|
||||
(node (ref SW1) (pin 1))
|
||||
(node (ref R6) (pin 1)))
|
||||
(net (code 8) (name "Net-(R4-Pad2)")
|
||||
(node (ref U1) (pin 1))
|
||||
(node (ref R4) (pin 2)))
|
||||
(net (code 9) (name "Net-(R2-Pad2)")
|
||||
(node (ref R2) (pin 2))
|
||||
(node (ref U1) (pin 16)))
|
||||
(net (code 10) (name MBUS1)
|
||||
(node (ref J1) (pin 1))
|
||||
(node (ref R2) (pin 1)))
|
||||
(net (code 11) (name LED_R)
|
||||
(node (ref R9) (pin 1))
|
||||
(node (ref P2) (pin 4)))
|
||||
(net (code 12) (name "Net-(J1-Pad8)")
|
||||
(node (ref J1) (pin 8))
|
||||
(node (ref JP1) (pin 1)))
|
||||
(net (code 13) (name "Net-(J1-Pad5)")
|
||||
(node (ref J1) (pin 5))
|
||||
(node (ref JP2) (pin 1)))
|
||||
(net (code 14) (name "Net-(J1-Pad4)")
|
||||
(node (ref J1) (pin 4))
|
||||
(node (ref JP3) (pin 1)))
|
||||
(net (code 15) (name +5V)
|
||||
(node (ref P1) (pin 1))
|
||||
(node (ref JP1) (pin 2)))
|
||||
(net (code 16) (name "Net-(J1-Pad7)")
|
||||
(node (ref J1) (pin 7))
|
||||
(node (ref JP4) (pin 1)))
|
||||
(net (code 17) (name GND)
|
||||
(node (ref P1) (pin 2))
|
||||
(node (ref C3) (pin 2))
|
||||
(node (ref R3) (pin 1))
|
||||
(node (ref R1) (pin 1))
|
||||
(node (ref C2) (pin 1))
|
||||
(node (ref C1) (pin 1))
|
||||
(node (ref R5) (pin 2))
|
||||
(node (ref U1) (pin 15))
|
||||
(node (ref U2) (pin 1))
|
||||
(node (ref SW1) (pin 2))
|
||||
(node (ref JP4) (pin 2))
|
||||
(node (ref JP2) (pin 2)))
|
||||
(net (code 18) (name LED_G)
|
||||
(node (ref R8) (pin 1))
|
||||
(node (ref P2) (pin 5)))
|
||||
(net (code 19) (name "Net-(U1-Pad10)")
|
||||
(node (ref U1) (pin 10)))
|
||||
(net (code 20) (name "Net-(U1-Pad12)")
|
||||
(node (ref U1) (pin 12)))
|
||||
(net (code 21) (name "Net-(U1-Pad13)")
|
||||
(node (ref U1) (pin 13)))
|
||||
(net (code 22) (name "Net-(U1-Pad2)")
|
||||
(node (ref U1) (pin 2)))
|
||||
(net (code 23) (name "Net-(U1-Pad5)")
|
||||
(node (ref U1) (pin 5)))
|
||||
(net (code 24) (name "Net-(U1-Pad7)")
|
||||
(node (ref U1) (pin 7)))
|
||||
(net (code 25) (name "Net-(J1-Pad3)")
|
||||
(node (ref J1) (pin 3)))
|
||||
(net (code 26) (name "Net-(J1-Pad6)")
|
||||
(node (ref J1) (pin 6)))
|
||||
(net (code 27) (name /RST)
|
||||
(node (ref P2) (pin 8)))
|
||||
(net (code 28) (name /D4)
|
||||
(node (ref P1) (pin 3)))
|
||||
(net (code 29) (name /D1)
|
||||
(node (ref P1) (pin 6)))
|
||||
(net (code 30) (name /RX)
|
||||
(node (ref P1) (pin 7)))
|
||||
(net (code 31) (name /TX)
|
||||
(node (ref P1) (pin 8)))
|
||||
(net (code 32) (name /D8)
|
||||
(node (ref P2) (pin 2)))
|
||||
(net (code 33) (name /D0)
|
||||
(node (ref P2) (pin 6)))
|
||||
(net (code 34) (name /A0)
|
||||
(node (ref P2) (pin 7)))
|
||||
(net (code 35) (name "Net-(R3-Pad2)")
|
||||
(node (ref R3) (pin 2))
|
||||
(node (ref U1) (pin 4)))
|
||||
(net (code 36) (name HAN_TX)
|
||||
(node (ref R10) (pin 1))
|
||||
(node (ref U1) (pin 8))
|
||||
(node (ref P2) (pin 3)))
|
||||
(net (code 37) (name "Net-(C3-Pad1)")
|
||||
(node (ref U1) (pin 11))
|
||||
(node (ref C3) (pin 1))
|
||||
(node (ref R5) (pin 1)))
|
||||
(net (code 38) (name "Net-(R1-Pad2)")
|
||||
(node (ref R1) (pin 2))
|
||||
(node (ref U1) (pin 14)))
|
||||
(net (code 39) (name "Net-(C2-Pad2)")
|
||||
(node (ref C2) (pin 2))
|
||||
(node (ref U1) (pin 3)))
|
||||
(net (code 40) (name "Net-(C1-Pad2)")
|
||||
(node (ref U1) (pin 6))
|
||||
(node (ref C1) (pin 2)))))
|
||||
246
hardware/wemos_mbus_shield/kicad/d1_mini_shield.pro
Normal file
246
hardware/wemos_mbus_shield/kicad/d1_mini_shield.pro
Normal file
@ -0,0 +1,246 @@
|
||||
update=sø. 26. juni 2022 kl. 11.55 +0200
|
||||
version=1
|
||||
last_client=kicad
|
||||
[general]
|
||||
version=1
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
[schematic_editor]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
PlotDirectoryName=
|
||||
SubpartIdSeparator=0
|
||||
SubpartFirstId=65
|
||||
NetFmtName=Pcbnew
|
||||
SpiceAjustPassiveValues=0
|
||||
LabSize=50
|
||||
ERC_TestSimilarLabels=1
|
||||
[pcbnew]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
LastNetListRead=d1_mini_shield.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=0.25
|
||||
TrackWidth2=0.5
|
||||
ViaDiameter1=0.6
|
||||
ViaDrill1=0.4
|
||||
dPairWidth1=0.2
|
||||
dPairGap1=0.25
|
||||
dPairViaGap1=0.25
|
||||
SilkLineWidth=0.15
|
||||
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.15
|
||||
CourtyardLineWidth=0.05
|
||||
OthersLineWidth=0.15
|
||||
OthersTextSizeV=1
|
||||
OthersTextSizeH=1
|
||||
OthersTextSizeThickness=0.15
|
||||
OthersTextItalic=0
|
||||
OthersTextUpright=1
|
||||
SolderMaskClearance=0.2
|
||||
SolderMaskMinWidth=0
|
||||
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=0.25
|
||||
ViaDiameter=0.6
|
||||
ViaDrill=0.4
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
||||
725
hardware/wemos_mbus_shield/kicad/d1_mini_shield.sch
Normal file
725
hardware/wemos_mbus_shield/kicad/d1_mini_shield.sch
Normal file
@ -0,0 +1,725 @@
|
||||
EESchema Schematic File Version 4
|
||||
EELAYER 30 0
|
||||
EELAYER END
|
||||
$Descr A4 11693 8268
|
||||
encoding utf-8
|
||||
Sheet 1 1
|
||||
Title ""
|
||||
Date ""
|
||||
Rev ""
|
||||
Comp ""
|
||||
Comment1 ""
|
||||
Comment2 ""
|
||||
Comment3 ""
|
||||
Comment4 ""
|
||||
$EndDescr
|
||||
$Comp
|
||||
L d1_mini_shield-rescue:CONN_01X08 P1
|
||||
U 1 1 5763EB78
|
||||
P 8300 1850
|
||||
F 0 "P1" H 8300 2300 50 0000 C CNN
|
||||
F 1 "CONN_01X08" V 8400 1850 50 0000 C CNN
|
||||
F 2 "D1_mini:D1_mini_Pin_Header" H 8300 1850 50 0001 C CNN
|
||||
F 3 "" H 8300 1850 50 0000 C CNN
|
||||
1 8300 1850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L d1_mini_shield-rescue:CONN_01X08 P2
|
||||
U 1 1 5763EBF2
|
||||
P 9400 1850
|
||||
F 0 "P2" H 9400 2300 50 0000 C CNN
|
||||
F 1 "CONN_01X08" V 9500 1850 50 0000 C CNN
|
||||
F 2 "D1_mini:D1_mini_Pin_Header" H 9400 1850 50 0001 C CNN
|
||||
F 3 "" H 9400 1850 50 0000 C CNN
|
||||
1 9400 1850
|
||||
-1 0 0 -1
|
||||
$EndComp
|
||||
Text Label 8100 1500 2 60 ~ 0
|
||||
+5V
|
||||
Text Label 8100 1600 2 60 ~ 0
|
||||
GND
|
||||
Text Label 8100 1700 2 60 ~ 0
|
||||
D4
|
||||
Text Label 8100 1800 2 60 ~ 0
|
||||
D3
|
||||
Text Label 8100 1900 2 60 ~ 0
|
||||
D2
|
||||
Text Label 8100 2000 2 60 ~ 0
|
||||
D1
|
||||
Text Label 8100 2100 2 60 ~ 0
|
||||
RX
|
||||
Text Label 8100 2200 2 60 ~ 0
|
||||
TX
|
||||
Text Label 9600 1500 0 60 ~ 0
|
||||
+3.3V
|
||||
Text Label 9600 1600 0 60 ~ 0
|
||||
D8
|
||||
Text Label 9600 1700 0 60 ~ 0
|
||||
D7
|
||||
Text Label 9600 1800 0 60 ~ 0
|
||||
D6
|
||||
Text Label 9600 1900 0 60 ~ 0
|
||||
D5
|
||||
Text Label 9600 2000 0 60 ~ 0
|
||||
D0
|
||||
Text Label 9600 2100 0 60 ~ 0
|
||||
A0
|
||||
Text Label 9600 2200 0 60 ~ 0
|
||||
RST
|
||||
Text Notes 8750 1750 2 60 ~ 0
|
||||
GPIO2
|
||||
Text Notes 8750 1850 2 60 ~ 0
|
||||
GPIO0
|
||||
Text Notes 8750 1950 2 60 ~ 0
|
||||
GPIO4
|
||||
Text Notes 8750 2050 2 60 ~ 0
|
||||
GPIO5
|
||||
Text Notes 8900 1650 0 60 ~ 0
|
||||
GPIO15
|
||||
Text Notes 8900 1750 0 60 ~ 0
|
||||
GPIO13
|
||||
Text Notes 8900 1850 0 60 ~ 0
|
||||
GPIO12
|
||||
Text Notes 8900 1950 0 60 ~ 0
|
||||
GPIO14
|
||||
Text Notes 8900 2050 0 60 ~ 0
|
||||
GPIO16
|
||||
Text Notes 7550 1050 0 60 ~ 0
|
||||
D1 Mini Shield
|
||||
$Comp
|
||||
L tss721:TSS721 U1
|
||||
U 1 1 62B826D2
|
||||
P 3650 5550
|
||||
F 0 "U1" H 3650 6621 50 0000 C CNN
|
||||
F 1 "TSS721" H 3650 6530 50 0000 C CNN
|
||||
F 2 "Package_SO:SOIC-16_3.9x9.9mm_P1.27mm" H 3650 4700 50 0001 C CIN
|
||||
F 3 "http://www.ti.com/lit/ds/symlink/tss721a.pdf" H 3650 6439 50 0000 C CNN
|
||||
1 3650 5550
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0101
|
||||
U 1 1 62B89C7B
|
||||
P 2850 4750
|
||||
F 0 "#PWR0101" H 2850 4600 50 0001 C CNN
|
||||
F 1 "+3.3V" V 2865 4878 50 0000 L CNN
|
||||
F 2 "" H 2850 4750 50 0001 C CNN
|
||||
F 3 "" H 2850 4750 50 0001 C CNN
|
||||
1 2850 4750
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Connector:RJ45 J1
|
||||
U 1 1 62B8AC34
|
||||
P 1950 1850
|
||||
F 0 "J1" H 2007 2517 50 0000 C CNN
|
||||
F 1 "RJ45" H 2007 2426 50 0000 C CNN
|
||||
F 2 "Connector_RJ:RJ45_Amphenol_54602-x08_Horizontal" V 1950 1875 50 0001 C CNN
|
||||
F 3 "~" V 1950 1875 50 0001 C CNN
|
||||
1 1950 1850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R4
|
||||
U 1 1 62B8CAA8
|
||||
P 2750 5150
|
||||
F 0 "R4" V 2957 5150 50 0000 C CNN
|
||||
F 1 "220" V 2866 5150 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2680 5150 50 0001 C CNN
|
||||
F 3 "~" H 2750 5150 50 0001 C CNN
|
||||
1 2750 5150
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R2
|
||||
U 1 1 62B8DB92
|
||||
P 2500 5050
|
||||
F 0 "R2" V 2707 5050 50 0000 C CNN
|
||||
F 1 "220" V 2616 5050 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2430 5050 50 0001 C CNN
|
||||
F 3 "~" H 2500 5050 50 0001 C CNN
|
||||
1 2500 5050
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0102
|
||||
U 1 1 62B9F029
|
||||
P 1850 6050
|
||||
F 0 "#PWR0102" H 1850 5800 50 0001 C CNN
|
||||
F 1 "GND" H 1855 5877 50 0000 C CNN
|
||||
F 2 "" H 1850 6050 50 0001 C CNN
|
||||
F 3 "" H 1850 6050 50 0001 C CNN
|
||||
1 1850 6050
|
||||
-1 0 0 1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R3
|
||||
U 1 1 62B9F861
|
||||
P 2500 6300
|
||||
F 0 "R3" H 2570 6346 50 0000 L CNN
|
||||
F 1 "82k" H 2570 6255 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2430 6300 50 0001 C CNN
|
||||
F 3 "~" H 2500 6300 50 0001 C CNN
|
||||
1 2500 6300
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R1
|
||||
U 1 1 62B9FC37
|
||||
P 2250 6300
|
||||
F 0 "R1" H 2320 6346 50 0000 L CNN
|
||||
F 1 "470" H 2320 6255 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 2180 6300 50 0001 C CNN
|
||||
F 3 "~" H 2250 6300 50 0001 C CNN
|
||||
1 2250 6300
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:C C2
|
||||
U 1 1 62BA06BE
|
||||
P 2850 6050
|
||||
F 0 "C2" V 3102 6050 50 0000 C CNN
|
||||
F 1 "1u" V 3011 6050 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 2888 5900 50 0001 C CNN
|
||||
F 3 "~" H 2850 6050 50 0001 C CNN
|
||||
1 2850 6050
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:C C1
|
||||
U 1 1 62BA09E7
|
||||
P 1850 6300
|
||||
F 0 "C1" H 1965 6346 50 0000 L CNN
|
||||
F 1 "100n" H 1965 6255 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 1888 6150 50 0001 C CNN
|
||||
F 3 "~" H 1850 6300 50 0001 C CNN
|
||||
1 1850 6300
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
1850 6050 1850 6150
|
||||
Wire Wire Line
|
||||
2250 6050 2250 6150
|
||||
Wire Wire Line
|
||||
2500 6050 2500 6150
|
||||
Connection ~ 1850 6050
|
||||
Connection ~ 2250 6050
|
||||
Wire Wire Line
|
||||
2250 6050 2500 6050
|
||||
Wire Wire Line
|
||||
1850 6050 2250 6050
|
||||
Connection ~ 2500 6050
|
||||
Wire Wire Line
|
||||
3850 6450 3850 6350
|
||||
Wire Wire Line
|
||||
2250 6450 2250 6550
|
||||
Wire Wire Line
|
||||
3950 6550 3950 6350
|
||||
Wire Wire Line
|
||||
1850 6450 1850 6650
|
||||
Wire Wire Line
|
||||
4050 6650 4050 6350
|
||||
Wire Wire Line
|
||||
3050 6050 3000 6050
|
||||
Wire Wire Line
|
||||
2500 6050 2700 6050
|
||||
Wire Wire Line
|
||||
2700 6050 2700 6350
|
||||
Wire Wire Line
|
||||
2700 6350 3650 6350
|
||||
Connection ~ 2700 6050
|
||||
Wire Wire Line
|
||||
3850 6450 2500 6450
|
||||
Wire Wire Line
|
||||
2250 6550 3950 6550
|
||||
Wire Wire Line
|
||||
4050 6650 1850 6650
|
||||
Text GLabel 4350 5350 2 50 Output ~ 0
|
||||
HAN_TX
|
||||
Wire Wire Line
|
||||
4350 5350 4300 5350
|
||||
Wire Wire Line
|
||||
2850 4750 3550 4750
|
||||
$Comp
|
||||
L Device:R R5
|
||||
U 1 1 62BED413
|
||||
P 4650 4550
|
||||
F 0 "R5" V 4857 4550 50 0000 C CNN
|
||||
F 1 "100k" V 4766 4550 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 4580 4550 50 0001 C CNN
|
||||
F 3 "~" H 4650 4550 50 0001 C CNN
|
||||
1 4650 4550
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:C C3
|
||||
U 1 1 62BED9ED
|
||||
P 4650 4900
|
||||
F 0 "C3" V 4902 4900 50 0000 C CNN
|
||||
F 1 "100n" V 4811 4900 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 4688 4750 50 0001 C CNN
|
||||
F 3 "~" H 4650 4900 50 0001 C CNN
|
||||
1 4650 4900
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0103
|
||||
U 1 1 62BF4151
|
||||
P 4800 5050
|
||||
F 0 "#PWR0103" H 4800 4800 50 0001 C CNN
|
||||
F 1 "GND" H 4805 4877 50 0000 C CNN
|
||||
F 2 "" H 4800 5050 50 0001 C CNN
|
||||
F 3 "" H 4800 5050 50 0001 C CNN
|
||||
1 4800 5050
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
4800 4550 4800 4900
|
||||
Wire Wire Line
|
||||
4800 4900 4800 5050
|
||||
Connection ~ 4800 4900
|
||||
Wire Wire Line
|
||||
4500 4900 4500 4550
|
||||
Wire Wire Line
|
||||
4500 4550 3650 4550
|
||||
Wire Wire Line
|
||||
3650 4550 3650 4750
|
||||
Connection ~ 4500 4550
|
||||
Wire Notes Line
|
||||
1500 4050 5050 4050
|
||||
Wire Notes Line
|
||||
5050 4050 5050 6850
|
||||
Wire Notes Line
|
||||
5050 6850 1500 6850
|
||||
Wire Notes Line
|
||||
1500 6850 1500 4050
|
||||
Wire Notes Line
|
||||
7550 950 10200 950
|
||||
Wire Notes Line
|
||||
10200 950 10200 2750
|
||||
Wire Notes Line
|
||||
10200 2750 7550 2750
|
||||
Wire Notes Line
|
||||
7550 2750 7550 950
|
||||
Text GLabel 9800 1700 2 50 Input ~ 0
|
||||
HAN_TX
|
||||
Wire Wire Line
|
||||
9800 1700 9600 1700
|
||||
$Comp
|
||||
L power:+3V3 #PWR0104
|
||||
U 1 1 62C0EBC2
|
||||
P 9850 1500
|
||||
F 0 "#PWR0104" H 9850 1350 50 0001 C CNN
|
||||
F 1 "+3V3" V 9865 1628 50 0000 L CNN
|
||||
F 2 "" H 9850 1500 50 0001 C CNN
|
||||
F 3 "" H 9850 1500 50 0001 C CNN
|
||||
1 9850 1500
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
9850 1500 9600 1500
|
||||
Text GLabel 9800 1800 2 50 Output ~ 0
|
||||
LED_R
|
||||
Text GLabel 9800 1900 2 50 Output ~ 0
|
||||
LED_G
|
||||
Wire Wire Line
|
||||
9800 1800 9600 1800
|
||||
Wire Wire Line
|
||||
9800 1900 9600 1900
|
||||
$Comp
|
||||
L power:GND #PWR0105
|
||||
U 1 1 62C13452
|
||||
P 7850 1600
|
||||
F 0 "#PWR0105" H 7850 1350 50 0001 C CNN
|
||||
F 1 "GND" V 7855 1472 50 0000 R CNN
|
||||
F 2 "" H 7850 1600 50 0001 C CNN
|
||||
F 3 "" H 7850 1600 50 0001 C CNN
|
||||
1 7850 1600
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
8100 1600 7850 1600
|
||||
Text GLabel 7950 1800 0 50 Input ~ 0
|
||||
BTN_AP
|
||||
Wire Wire Line
|
||||
8100 1800 7950 1800
|
||||
Text GLabel 7950 1900 0 50 Input ~ 0
|
||||
TEMP
|
||||
Wire Wire Line
|
||||
8100 1900 7950 1900
|
||||
Wire Wire Line
|
||||
3050 5150 2900 5150
|
||||
Wire Wire Line
|
||||
3050 5050 2650 5050
|
||||
Text GLabel 2200 5050 0 50 Input ~ 0
|
||||
MBUS1
|
||||
Text GLabel 2200 5150 0 50 Input ~ 0
|
||||
MBUS2
|
||||
Wire Wire Line
|
||||
2350 5050 2200 5050
|
||||
Wire Wire Line
|
||||
2600 5150 2200 5150
|
||||
Text GLabel 2500 2150 2 50 Output ~ 0
|
||||
MBUS1
|
||||
Text GLabel 2500 2050 2 50 Output ~ 0
|
||||
MBUS2
|
||||
Wire Wire Line
|
||||
2500 2050 2350 2050
|
||||
Wire Wire Line
|
||||
2350 2150 2500 2150
|
||||
$Comp
|
||||
L Device:Jumper JP1
|
||||
U 1 1 62C331C0
|
||||
P 3300 1250
|
||||
F 0 "JP1" H 3300 1514 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 1423 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 1250 50 0001 C CNN
|
||||
F 3 "~" H 3300 1250 50 0001 C CNN
|
||||
1 3300 1250
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:Jumper JP2
|
||||
U 1 1 62C365CA
|
||||
P 3300 1850
|
||||
F 0 "JP2" H 3300 2114 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 2023 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 1850 50 0001 C CNN
|
||||
F 3 "~" H 3300 1850 50 0001 C CNN
|
||||
1 3300 1850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:Jumper JP3
|
||||
U 1 1 62C36C70
|
||||
P 3300 2200
|
||||
F 0 "JP3" H 3300 2464 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 2373 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 2200 50 0001 C CNN
|
||||
F 3 "~" H 3300 2200 50 0001 C CNN
|
||||
1 3300 2200
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
3000 1850 2900 1850
|
||||
Wire Wire Line
|
||||
2900 1850 2900 1750
|
||||
Wire Wire Line
|
||||
2350 1750 2900 1750
|
||||
Wire Wire Line
|
||||
2350 1850 2850 1850
|
||||
Wire Wire Line
|
||||
2850 1850 2850 2200
|
||||
Wire Wire Line
|
||||
2850 2200 3000 2200
|
||||
$Comp
|
||||
L power:GND #PWR0107
|
||||
U 1 1 62C3D94F
|
||||
P 3750 1850
|
||||
F 0 "#PWR0107" H 3750 1600 50 0001 C CNN
|
||||
F 1 "GND" V 3755 1722 50 0000 R CNN
|
||||
F 2 "" H 3750 1850 50 0001 C CNN
|
||||
F 3 "" H 3750 1850 50 0001 C CNN
|
||||
1 3750 1850
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
Text GLabel 3750 2200 2 50 Output ~ 0
|
||||
TEMP
|
||||
Wire Wire Line
|
||||
3750 1850 3600 1850
|
||||
Wire Wire Line
|
||||
3750 2200 3600 2200
|
||||
Wire Notes Line
|
||||
1450 950 4350 950
|
||||
Wire Notes Line
|
||||
4350 950 4350 2450
|
||||
Wire Notes Line
|
||||
4350 2450 1450 2450
|
||||
Wire Notes Line
|
||||
1450 2450 1450 950
|
||||
$Comp
|
||||
L Device:LED_RGB D1
|
||||
U 1 1 62C43A7B
|
||||
P 9550 4800
|
||||
F 0 "D1" H 9550 5297 50 0000 C CNN
|
||||
F 1 "LED_RGB" H 9550 5206 50 0000 C CNN
|
||||
F 2 "LED_SMD:LED_RGB_PLCC-6" H 9550 4750 50 0001 C CNN
|
||||
F 3 "~" H 9550 4750 50 0001 C CNN
|
||||
1 9550 4800
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0108
|
||||
U 1 1 62C44A94
|
||||
P 10000 4800
|
||||
F 0 "#PWR0108" H 10000 4650 50 0001 C CNN
|
||||
F 1 "+3.3V" V 10015 4928 50 0000 L CNN
|
||||
F 2 "" H 10000 4800 50 0001 C CNN
|
||||
F 3 "" H 10000 4800 50 0001 C CNN
|
||||
1 10000 4800
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
9750 4800 9900 4800
|
||||
Wire Wire Line
|
||||
9750 4600 9900 4600
|
||||
Wire Wire Line
|
||||
9900 4600 9900 4800
|
||||
Connection ~ 9900 4800
|
||||
Wire Wire Line
|
||||
9900 4800 10000 4800
|
||||
Wire Wire Line
|
||||
9900 4800 9900 5000
|
||||
Wire Wire Line
|
||||
9900 5000 9750 5000
|
||||
$Comp
|
||||
L Device:R R9
|
||||
U 1 1 62C495F7
|
||||
P 9100 4600
|
||||
F 0 "R9" V 9307 4600 50 0000 C CNN
|
||||
F 1 "1k" V 9216 4600 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 9030 4600 50 0001 C CNN
|
||||
F 3 "~" H 9100 4600 50 0001 C CNN
|
||||
1 9100 4600
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R8
|
||||
U 1 1 62C4BDE9
|
||||
P 8850 4800
|
||||
F 0 "R8" V 9057 4800 50 0000 C CNN
|
||||
F 1 "1k" V 8966 4800 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 8780 4800 50 0001 C CNN
|
||||
F 3 "~" H 8850 4800 50 0001 C CNN
|
||||
1 8850 4800
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R10
|
||||
U 1 1 62C4C336
|
||||
P 9100 5000
|
||||
F 0 "R10" V 9307 5000 50 0000 C CNN
|
||||
F 1 "1k" V 9216 5000 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 9030 5000 50 0001 C CNN
|
||||
F 3 "~" H 9100 5000 50 0001 C CNN
|
||||
1 9100 5000
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
9350 4600 9250 4600
|
||||
Wire Wire Line
|
||||
9350 4800 9000 4800
|
||||
Wire Wire Line
|
||||
9350 5000 9250 5000
|
||||
Text GLabel 8650 4600 0 50 Input ~ 0
|
||||
LED_R
|
||||
Text GLabel 8650 4800 0 50 Input ~ 0
|
||||
LED_G
|
||||
Text GLabel 8650 5000 0 50 Input ~ 0
|
||||
LED_B
|
||||
Wire Wire Line
|
||||
8700 4800 8650 4800
|
||||
Wire Wire Line
|
||||
8950 4600 8650 4600
|
||||
Wire Wire Line
|
||||
8950 5000 8650 5000
|
||||
Wire Notes Line
|
||||
8200 4050 10550 4050
|
||||
Wire Notes Line
|
||||
10550 4050 10550 5400
|
||||
Wire Notes Line
|
||||
10550 5400 8200 5400
|
||||
Wire Notes Line
|
||||
8200 5400 8200 4050
|
||||
$Comp
|
||||
L Sensor_Temperature:DS18B20 U2
|
||||
U 1 1 62C6296F
|
||||
P 6600 4900
|
||||
F 0 "U2" H 6370 4946 50 0000 R CNN
|
||||
F 1 "DS18B20" H 6370 4855 50 0000 R CNN
|
||||
F 2 "Package_TO_SOT_THT:TO-92_Inline" H 5600 4650 50 0001 C CNN
|
||||
F 3 "http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf" H 6450 5150 50 0001 C CNN
|
||||
1 6600 4900
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0109
|
||||
U 1 1 62C6373E
|
||||
P 6600 5350
|
||||
F 0 "#PWR0109" H 6600 5100 50 0001 C CNN
|
||||
F 1 "GND" H 6605 5177 50 0000 C CNN
|
||||
F 2 "" H 6600 5350 50 0001 C CNN
|
||||
F 3 "" H 6600 5350 50 0001 C CNN
|
||||
1 6600 5350
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0110
|
||||
U 1 1 62C63C02
|
||||
P 6600 4450
|
||||
F 0 "#PWR0110" H 6600 4300 50 0001 C CNN
|
||||
F 1 "+3.3V" H 6615 4623 50 0000 C CNN
|
||||
F 2 "" H 6600 4450 50 0001 C CNN
|
||||
F 3 "" H 6600 4450 50 0001 C CNN
|
||||
1 6600 4450
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R7
|
||||
U 1 1 62C6405D
|
||||
P 6900 4600
|
||||
F 0 "R7" H 6970 4646 50 0000 L CNN
|
||||
F 1 "4k7" H 6970 4555 50 0000 L CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 6830 4600 50 0001 C CNN
|
||||
F 3 "~" H 6900 4600 50 0001 C CNN
|
||||
1 6900 4600
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
6600 5200 6600 5350
|
||||
Wire Wire Line
|
||||
6600 4600 6600 4450
|
||||
Wire Wire Line
|
||||
6900 4900 6900 4750
|
||||
Wire Wire Line
|
||||
6900 4450 6600 4450
|
||||
Connection ~ 6600 4450
|
||||
Text GLabel 7050 4900 2 50 Output ~ 0
|
||||
TEMP
|
||||
Wire Wire Line
|
||||
7050 4900 6900 4900
|
||||
Connection ~ 6900 4900
|
||||
Wire Notes Line
|
||||
5750 4050 7500 4050
|
||||
Wire Notes Line
|
||||
7500 4050 7500 5750
|
||||
Wire Notes Line
|
||||
7500 5750 5750 5750
|
||||
Wire Notes Line
|
||||
5750 5750 5750 4050
|
||||
$Comp
|
||||
L Switch:SW_Push SW1
|
||||
U 1 1 62C73229
|
||||
P 5950 1400
|
||||
F 0 "SW1" H 5950 1685 50 0000 C CNN
|
||||
F 1 "SW_Push" H 5950 1594 50 0000 C CNN
|
||||
F 2 "Button_Switch_SMD:SW_SPST_B3U-3000P" H 5950 1600 50 0001 C CNN
|
||||
F 3 "~" H 5950 1600 50 0001 C CNN
|
||||
1 5950 1400
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:R R6
|
||||
U 1 1 62C73CE8
|
||||
P 5950 1700
|
||||
F 0 "R6" V 6157 1700 50 0000 C CNN
|
||||
F 1 "10k" V 6066 1700 50 0000 C CNN
|
||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" V 5880 1700 50 0001 C CNN
|
||||
F 3 "~" H 5950 1700 50 0001 C CNN
|
||||
1 5950 1700
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:GND #PWR0111
|
||||
U 1 1 62C76961
|
||||
P 6350 1400
|
||||
F 0 "#PWR0111" H 6350 1150 50 0001 C CNN
|
||||
F 1 "GND" V 6355 1272 50 0000 R CNN
|
||||
F 2 "" H 6350 1400 50 0001 C CNN
|
||||
F 3 "" H 6350 1400 50 0001 C CNN
|
||||
1 6350 1400
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L power:+3.3V #PWR0112
|
||||
U 1 1 62C776AD
|
||||
P 6350 1700
|
||||
F 0 "#PWR0112" H 6350 1550 50 0001 C CNN
|
||||
F 1 "+3.3V" V 6365 1828 50 0000 L CNN
|
||||
F 2 "" H 6350 1700 50 0001 C CNN
|
||||
F 3 "" H 6350 1700 50 0001 C CNN
|
||||
1 6350 1700
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
6350 1400 6150 1400
|
||||
Wire Wire Line
|
||||
6350 1700 6100 1700
|
||||
Wire Wire Line
|
||||
5750 1400 5550 1400
|
||||
Wire Wire Line
|
||||
5550 1400 5550 1550
|
||||
Wire Wire Line
|
||||
5550 1700 5800 1700
|
||||
Text GLabel 5450 1550 0 50 Output ~ 0
|
||||
BTN_AP
|
||||
Wire Wire Line
|
||||
5450 1550 5550 1550
|
||||
Connection ~ 5550 1550
|
||||
Wire Wire Line
|
||||
5550 1550 5550 1700
|
||||
Wire Notes Line
|
||||
5000 950 6850 950
|
||||
Wire Notes Line
|
||||
6850 950 6850 1950
|
||||
Wire Notes Line
|
||||
6850 1950 5000 1950
|
||||
Wire Notes Line
|
||||
5000 1950 5000 950
|
||||
Text GLabel 4350 5450 2 50 Output ~ 0
|
||||
LED_B
|
||||
Wire Wire Line
|
||||
4350 5450 4300 5450
|
||||
Wire Wire Line
|
||||
4300 5450 4300 5350
|
||||
Connection ~ 4300 5350
|
||||
Wire Wire Line
|
||||
4300 5350 4250 5350
|
||||
$Comp
|
||||
L power:+5V #PWR0106
|
||||
U 1 1 62D05402
|
||||
P 7850 1500
|
||||
F 0 "#PWR0106" H 7850 1350 50 0001 C CNN
|
||||
F 1 "+5V" V 7865 1628 50 0000 L CNN
|
||||
F 2 "" H 7850 1500 50 0001 C CNN
|
||||
F 3 "" H 7850 1500 50 0001 C CNN
|
||||
1 7850 1500
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
8100 1500 7850 1500
|
||||
$Comp
|
||||
L power:+5V #PWR0113
|
||||
U 1 1 62D0B1E1
|
||||
P 3750 1250
|
||||
F 0 "#PWR0113" H 3750 1100 50 0001 C CNN
|
||||
F 1 "+5V" V 3765 1378 50 0000 L CNN
|
||||
F 2 "" H 3750 1250 50 0001 C CNN
|
||||
F 3 "" H 3750 1250 50 0001 C CNN
|
||||
1 3750 1250
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
$Comp
|
||||
L Device:Jumper JP4
|
||||
U 1 1 62D1E97A
|
||||
P 3300 1550
|
||||
F 0 "JP4" H 3300 1814 50 0000 C CNN
|
||||
F 1 "Jumper" H 3300 1723 50 0000 C CNN
|
||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3300 1550 50 0001 C CNN
|
||||
F 3 "~" H 3300 1550 50 0001 C CNN
|
||||
1 3300 1550
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
Wire Wire Line
|
||||
3000 1250 2350 1250
|
||||
Wire Wire Line
|
||||
2350 1250 2350 1450
|
||||
Wire Wire Line
|
||||
3600 1250 3750 1250
|
||||
Wire Wire Line
|
||||
3600 1550 3600 1850
|
||||
Connection ~ 3600 1850
|
||||
Wire Wire Line
|
||||
2350 1550 3000 1550
|
||||
$EndSCHEMATC
|
||||
75272
hardware/wemos_mbus_shield/kicad/fp-info-cache
Normal file
75272
hardware/wemos_mbus_shield/kicad/fp-info-cache
Normal file
File diff suppressed because it is too large
Load Diff
3
hardware/wemos_mbus_shield/kicad/fp-lib-table
Normal file
3
hardware/wemos_mbus_shield/kicad/fp-lib-table
Normal file
@ -0,0 +1,3 @@
|
||||
(fp_lib_table
|
||||
(lib (name D1_mini)(type KiCad)(uri "$(KIPRJMOD)/lib/D1_mini.pretty")(options "")(descr ""))
|
||||
)
|
||||
@ -0,0 +1,27 @@
|
||||
(module Pin_Headers:Pin_Header_Straight_1x08 (layer F.Cu) (tedit 5766A5B6)
|
||||
(descr "Through hole pin header")
|
||||
(tags "pin header")
|
||||
(fp_text reference P1 (at 0.11176 -2.43586) (layer F.SilkS)
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_text value CONN_01X08 (at 0 -3.1) (layer F.Fab) hide
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_line (start -1.75 -1.75) (end -1.75 19.55) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start 1.75 -1.75) (end 1.75 19.55) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start -1.75 -1.75) (end 1.75 -1.75) (layer F.CrtYd) (width 0.05))
|
||||
(fp_line (start -1.75 19.55) (end 1.75 19.55) (layer F.CrtYd) (width 0.05))
|
||||
(pad 1 thru_hole rect (at 0 0) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 2 thru_hole oval (at 0 2.54) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 3 thru_hole oval (at 0 5.08) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 4 thru_hole oval (at 0 7.62) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 5 thru_hole oval (at 0 10.16) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 6 thru_hole oval (at 0 12.7) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 7 thru_hole oval (at 0 15.24) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(pad 8 thru_hole oval (at 0 17.78) (size 1.8 1.8) (drill 1.016) (layers *.Cu *.Mask F.SilkS))
|
||||
(model Pin_Headers.3dshapes/Pin_Header_Straight_1x08.wrl
|
||||
(at (xyz 0 -0.35 0))
|
||||
(scale (xyz 1 1 1))
|
||||
(rotate (xyz 0 0 90))
|
||||
)
|
||||
)
|
||||
@ -0,0 +1,54 @@
|
||||
(module OSHW (layer F.Cu) (tedit 5766B04E)
|
||||
(descr OSHW)
|
||||
(tags "Symbol, OSHW-Logo, Silk Screen,")
|
||||
(fp_text reference "" (at 0.09906 -4.38912) (layer F.SilkS) hide
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_text value OSHW (at 0 5) (layer F.Fab) hide
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
)
|
||||
(fp_line (start -1.78054 0.92964) (end -2.03962 1.49098) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.03962 1.49098) (end -1.50114 2.00914) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.50114 2.00914) (end -0.98044 1.7399) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.98044 1.7399) (end -0.70104 1.89992) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.73914 1.8796) (end 1.06934 1.6891) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.06934 1.6891) (end 1.50876 2.0193) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.50876 2.0193) (end 1.9812 1.52908) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.9812 1.52908) (end 1.69926 1.04902) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.69926 1.04902) (end 1.88976 0.57912) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.88976 0.57912) (end 2.49936 0.39116) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 2.49936 0.39116) (end 2.49936 -0.28956) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 2.49936 -0.28956) (end 1.94056 -0.42926) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.94056 -0.42926) (end 1.7399 -1.00076) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.7399 -1.00076) (end 2.00914 -1.47066) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 2.00914 -1.47066) (end 1.53924 -1.9812) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.53924 -1.9812) (end 1.02108 -1.71958) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.02108 -1.71958) (end 0.55118 -1.92024) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.55118 -1.92024) (end 0.381 -2.46126) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.381 -2.46126) (end -0.30988 -2.47904) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.30988 -2.47904) (end -0.5207 -1.9304) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.5207 -1.9304) (end -0.9398 -1.76022) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.9398 -1.76022) (end -1.49098 -2.02946) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.49098 -2.02946) (end -2.00914 -1.50114) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.00914 -1.50114) (end -1.76022 -0.96012) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.76022 -0.96012) (end -1.9304 -0.48006) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.9304 -0.48006) (end -2.47904 -0.381) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.47904 -0.381) (end -2.4892 0.32004) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -2.4892 0.32004) (end -1.9304 0.5207) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.9304 0.5207) (end -1.7907 0.91948) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.35052 0.89916) (end 0.65024 0.7493) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.65024 0.7493) (end 0.8509 0.55118) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.8509 0.55118) (end 1.00076 0.14986) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.00076 0.14986) (end 1.00076 -0.24892) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 1.00076 -0.24892) (end 0.8509 -0.59944) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.8509 -0.59944) (end 0.39878 -0.94996) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.39878 -0.94996) (end -0.0508 -1.00076) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.0508 -1.00076) (end -0.44958 -0.89916) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.44958 -0.89916) (end -0.8509 -0.55118) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.8509 -0.55118) (end -1.00076 -0.09906) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -1.00076 -0.09906) (end -0.94996 0.39878) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.94996 0.39878) (end -0.70104 0.70104) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.70104 0.70104) (end -0.35052 0.89916) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start -0.35052 0.89916) (end -0.70104 1.89992) (layer F.SilkS) (width 0.15))
|
||||
(fp_line (start 0.35052 0.89916) (end 0.7493 1.89992) (layer F.SilkS) (width 0.15))
|
||||
)
|
||||
BIN
hardware/wemos_mbus_shield/kicad/meta/brd.png
Normal file
BIN
hardware/wemos_mbus_shield/kicad/meta/brd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 KiB |
BIN
hardware/wemos_mbus_shield/kicad/meta/icon.png
Normal file
BIN
hardware/wemos_mbus_shield/kicad/meta/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
21
hardware/wemos_mbus_shield/kicad/meta/info.html
Normal file
21
hardware/wemos_mbus_shield/kicad/meta/info.html
Normal file
@ -0,0 +1,21 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>D1Shield</title>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P>This project template is the basis of an expansion board for the
|
||||
<A HREF="https://www.wemos.cc/en/latest/d1/d1_mini.html" TARGET="blank">D1 mini board</A>.
|
||||
<BR><BR>This base project includes a PCB edge defined
|
||||
as the same size as the D1 mini PCB with the connectors placed
|
||||
correctly to align the two boards. All IO present on the D1 mini
|
||||
board is connected to the project through the expansion
|
||||
headers. <BR><BR>The board looks like the following:
|
||||
</P>
|
||||
<P><IMG SRC="brd.png">
|
||||
</P>
|
||||
<p><i>Dwgs.User</i> layer show mechanical components of the D1mini board.</p>
|
||||
<P>©2016 Jérôme Labidurie<br/>
|
||||
Licence: <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC:BY-SA 3.0</a><br/>
|
||||
<a href="http://dinask.eu">dinask.eu</a></P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
4
hardware/wemos_mbus_shield/kicad/sym-lib-table
Normal file
4
hardware/wemos_mbus_shield/kicad/sym-lib-table
Normal file
@ -0,0 +1,4 @@
|
||||
(sym_lib_table
|
||||
(lib (name d1_mini_shield-rescue)(type Legacy)(uri ${KIPRJMOD}/d1_mini_shield-rescue.lib)(options "")(descr ""))
|
||||
(lib (name tss721)(type Legacy)(uri ${KIPRJMOD}/tss721.lib)(options "")(descr ""))
|
||||
)
|
||||
9
hardware/wemos_mbus_shield/kicad/tss721.dcm
Normal file
9
hardware/wemos_mbus_shield/kicad/tss721.dcm
Normal file
@ -0,0 +1,9 @@
|
||||
EESchema-DOCLIB Version 2.0
|
||||
#
|
||||
$CMP TSS721
|
||||
D TSS721A Meter Bus Transceiver, SOIC-16/TSSOP-16
|
||||
K MBUS Tranciever
|
||||
F http://www.ti.com/lit/ds/symlink/tss721a.pdf
|
||||
$ENDCMP
|
||||
#
|
||||
#End Doc Library
|
||||
37
hardware/wemos_mbus_shield/kicad/tss721.lib
Normal file
37
hardware/wemos_mbus_shield/kicad/tss721.lib
Normal file
@ -0,0 +1,37 @@
|
||||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# TSS721
|
||||
#
|
||||
DEF TSS721 U 0 40 Y Y 1 F N
|
||||
F0 "U" 200 850 50 H V L CNN
|
||||
F1 "TSS721" 200 750 50 H V L CNN
|
||||
F2 "" 0 -850 50 H V C CIN
|
||||
F3 "" -200 -800 50 H V C CNN
|
||||
ALIAS TSS721A
|
||||
$FPLIST
|
||||
SOIC*3.9x9.9mm*Pitch1.27mm*
|
||||
TSSOP*4.4x5mm*Pitch0.65mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -500 -700 500 700 0 1 10 f
|
||||
X BUSL2 1 -600 400 100 R 50 50 1 1 I
|
||||
X VS 10 -600 0 100 R 50 50 1 1 P
|
||||
X VDD 11 0 800 100 D 50 50 1 1 W
|
||||
X RX 12 600 500 100 L 50 50 1 1 I
|
||||
X RXI 13 600 400 100 L 50 50 1 1 I I
|
||||
X RIS 14 300 -800 100 U 50 50 1 1 I
|
||||
X GND 15 0 -800 100 U 50 50 1 1 W
|
||||
X BUSL1 16 -600 500 100 R 50 50 1 1 I
|
||||
X VB 2 -600 -150 100 R 50 50 1 1 P
|
||||
X STC 3 -600 -500 100 R 50 50 1 1 P
|
||||
X RIDD 4 200 -800 100 U 50 50 1 1 O
|
||||
X PF 5 -600 100 100 R 50 50 1 1 I
|
||||
X SC 6 400 -800 100 U 50 50 1 1 P
|
||||
X TXI 7 600 100 100 L 50 50 1 1 O I
|
||||
X TX 8 600 200 100 L 50 50 1 1 O
|
||||
X BAT 9 -100 800 100 D 50 50 1 1 I
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
||||
@ -657,6 +657,14 @@ bool AmsConfiguration::hasConfig() {
|
||||
configVersion = 0;
|
||||
return false;
|
||||
}
|
||||
case 94:
|
||||
configVersion = -1; // Prevent loop
|
||||
if(relocateConfig94()) {
|
||||
configVersion = 95;
|
||||
} else {
|
||||
configVersion = 0;
|
||||
return false;
|
||||
}
|
||||
case EEPROM_CHECK_SUM:
|
||||
return true;
|
||||
default:
|
||||
@ -822,6 +830,18 @@ bool AmsConfiguration::relocateConfig93() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool AmsConfiguration::relocateConfig94() {
|
||||
EnergyAccountingConfig eac;
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
EEPROM.get(CONFIG_ENERGYACCOUNTING_START, eac);
|
||||
eac.hours = 1;
|
||||
EEPROM.put(CONFIG_ENERGYACCOUNTING_START, eac);
|
||||
EEPROM.put(EEPROM_CONFIG_ADDRESS, 95);
|
||||
bool ret = EEPROM.commit();
|
||||
EEPROM.end();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool AmsConfiguration::save() {
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
EEPROM.put(EEPROM_CONFIG_ADDRESS, EEPROM_CHECK_SUM);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
#define EEPROM_SIZE 1024*3
|
||||
#define EEPROM_CHECK_SUM 94 // Used to check if config is stored. Change if structure changes
|
||||
#define EEPROM_CHECK_SUM 95 // Used to check if config is stored. Change if structure changes
|
||||
#define EEPROM_CONFIG_ADDRESS 0
|
||||
#define EEPROM_TEMP_CONFIG_ADDRESS 2048
|
||||
|
||||
@ -163,7 +163,8 @@ struct EntsoeConfig {
|
||||
|
||||
struct EnergyAccountingConfig {
|
||||
uint8_t thresholds[10];
|
||||
}; // 10
|
||||
uint8_t hours;
|
||||
}; // 11
|
||||
|
||||
struct TempSensorConfig {
|
||||
uint8_t address[8];
|
||||
@ -266,7 +267,8 @@ private:
|
||||
bool relocateConfig90(); // 2.0.0
|
||||
bool relocateConfig91(); // 2.0.2
|
||||
bool relocateConfig92(); // 2.0.3
|
||||
bool relocateConfig93(); // 2.1 beta
|
||||
bool relocateConfig93(); // 2.1.0
|
||||
bool relocateConfig94(); // 2.1.4
|
||||
|
||||
void saveToFs();
|
||||
bool loadFromFs(uint8_t version);
|
||||
|
||||
@ -383,17 +383,17 @@ bool AmsDataStorage::isDayHappy() {
|
||||
tmElements_t tm, last;
|
||||
|
||||
if(now < day.lastMeterReadTime) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(AmsDataStorage) Day %lld < %lld\n", (int64_t) now, (int64_t) day.lastMeterReadTime);
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(AmsDataStorage) Day %lld < %lld\n", (int64_t) now, (int64_t) day.lastMeterReadTime);
|
||||
return false;
|
||||
}
|
||||
if(now-day.lastMeterReadTime > 3600) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(AmsDataStorage) Day %lld - %lld > 3600\n", (int64_t) now, (int64_t) day.lastMeterReadTime);
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(AmsDataStorage) Day %lld - %lld > 3600\n", (int64_t) now, (int64_t) day.lastMeterReadTime);
|
||||
return false;
|
||||
}
|
||||
breakTime(tz->toLocal(now), tm);
|
||||
breakTime(tz->toLocal(day.lastMeterReadTime), last);
|
||||
if(tm.Hour > last.Hour) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(AmsDataStorage) Day %d > %d\n", tm.Hour, last.Hour);
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(AmsDataStorage) Day %d > %d\n", tm.Hour, last.Hour);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -411,17 +411,17 @@ bool AmsDataStorage::isMonthHappy() {
|
||||
tmElements_t tm, last;
|
||||
|
||||
if(now < month.lastMeterReadTime) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(AmsDataStorage) Month %lld < %lld\n", (int64_t) now, (int64_t) month.lastMeterReadTime);
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(AmsDataStorage) Month %lld < %lld\n", (int64_t) now, (int64_t) month.lastMeterReadTime);
|
||||
return false;
|
||||
}
|
||||
if(now-month.lastMeterReadTime > 86400) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(AmsDataStorage) Month %lld - %lld > 3600\n", (int64_t) now, (int64_t) month.lastMeterReadTime);
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(AmsDataStorage) Month %lld - %lld > 3600\n", (int64_t) now, (int64_t) month.lastMeterReadTime);
|
||||
return false;
|
||||
}
|
||||
breakTime(tz->toLocal(now), tm);
|
||||
breakTime(tz->toLocal(month.lastMeterReadTime), last);
|
||||
if(tm.Day > last.Day) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(AmsDataStorage) Month %d > %d\n", tm.Day, last.Day);
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(AmsDataStorage) Month %d > %d\n", tm.Day, last.Day);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -377,7 +377,8 @@ void setup() {
|
||||
config.setEnergyAccountingConfig(*eac);
|
||||
config.ackEnergyAccountingChange();
|
||||
}
|
||||
ea.setup(&ds, eapi, eac);
|
||||
ea.setup(&ds, eac);
|
||||
ea.setEapi(eapi);
|
||||
ws.setup(&config, &gpioConfig, &meterConfig, &meterState, &ds, &ea);
|
||||
|
||||
#if defined(ESP32)
|
||||
@ -523,6 +524,7 @@ void loop() {
|
||||
if(config.getEntsoeConfig(entsoe) && strlen(entsoe.token) > 0) {
|
||||
if(eapi == NULL) {
|
||||
eapi = new EntsoeApi(&Debug);
|
||||
ea.setEapi(eapi);
|
||||
ws.setEntsoeApi(eapi);
|
||||
}
|
||||
eapi->setup(entsoe);
|
||||
@ -567,7 +569,7 @@ void loop() {
|
||||
if(config.isEnergyAccountingChanged()) {
|
||||
EnergyAccountingConfig *eac = ea.getConfig();
|
||||
config.getEnergyAccountingConfig(*eac);
|
||||
ea.setup(&ds, eapi, eac);
|
||||
ea.setup(&ds, eac);
|
||||
config.ackEnergyAccountingChange();
|
||||
}
|
||||
|
||||
@ -884,14 +886,14 @@ bool readHanPort() {
|
||||
|
||||
bool saveData = false;
|
||||
if(!ds.isHappy() && now > BUILD_EPOCH) {
|
||||
debugD("Its time to update data storage");
|
||||
debugV("Its time to update data storage");
|
||||
tmElements_t tm;
|
||||
breakTime(now, tm);
|
||||
if(tm.Minute == 0) {
|
||||
debugD(" using actual data");
|
||||
debugV(" using actual data");
|
||||
saveData = ds.update(&data);
|
||||
} else if(meterState.getListType() >= 3) {
|
||||
debugD(" using estimated data");
|
||||
debugV(" using estimated data");
|
||||
saveData = ds.update(&meterState);
|
||||
}
|
||||
if(saveData) {
|
||||
@ -1406,6 +1408,8 @@ void configFileParse() {
|
||||
bool lNtp = false;
|
||||
bool lEntsoe = false;
|
||||
bool lEac = false;
|
||||
bool sEa = false;
|
||||
bool sDs = false;
|
||||
|
||||
SystemConfig sys;
|
||||
WiFiConfig wifi;
|
||||
@ -1632,6 +1636,7 @@ void configFileParse() {
|
||||
i++;
|
||||
}
|
||||
ds.setDayData(day);
|
||||
sDs = true;
|
||||
} else if(strncmp(buf, "monthplot ", 10) == 0) {
|
||||
int i = 0;
|
||||
MonthDataPoints month = { 5 }; // Use a version we know the multiplier of the data points
|
||||
@ -1654,17 +1659,29 @@ void configFileParse() {
|
||||
i++;
|
||||
}
|
||||
ds.setMonthData(month);
|
||||
sDs = true;
|
||||
} else if(strncmp(buf, "energyaccounting ", 17) == 0) {
|
||||
int i = 0;
|
||||
EnergyAccountingData ead = { 1 };
|
||||
uint8_t i = 0;
|
||||
EnergyAccountingData ead = { 3, 0,
|
||||
0, 0, 0,
|
||||
0, 0, // Peak 1
|
||||
0, 0, // Peak 2
|
||||
0, 0, // Peak 3
|
||||
0, 0, // Peak 4
|
||||
0, 0 // Peak 5
|
||||
};
|
||||
char * pch = strtok (buf+17," ");
|
||||
while (pch != NULL) {
|
||||
if(i == 1) {
|
||||
if(i == 0) {
|
||||
// Ignore version
|
||||
} else if(i == 1) {
|
||||
long val = String(pch).toInt();
|
||||
ead.month = val;
|
||||
} else if(i == 2) {
|
||||
double val = String(pch).toDouble();
|
||||
ead.maxHour = val * 100;
|
||||
if(val > 0.0) {
|
||||
ead.peaks[0] = { 1, (uint16_t) (val*100) };
|
||||
}
|
||||
} else if(i == 3) {
|
||||
double val = String(pch).toDouble();
|
||||
ead.costYesterday = val * 100;
|
||||
@ -1674,11 +1691,21 @@ void configFileParse() {
|
||||
} else if(i == 5) {
|
||||
double val = String(pch).toDouble();
|
||||
ead.costLastMonth = val * 100;
|
||||
} else if(i >= 6 && i < 18) {
|
||||
uint8_t hour = i-6;
|
||||
if(hour%2 == 0) {
|
||||
long val = String(pch).toInt();
|
||||
ead.peaks[hour/2].day = val;
|
||||
} else {
|
||||
double val = String(pch).toDouble();
|
||||
ead.peaks[hour/2].value = val * 100;
|
||||
}
|
||||
}
|
||||
pch = strtok (NULL, " ");
|
||||
i++;
|
||||
}
|
||||
ea.setData(ead);
|
||||
sEa = true;
|
||||
}
|
||||
memset(buf, 0, 1024);
|
||||
}
|
||||
@ -1698,7 +1725,7 @@ void configFileParse() {
|
||||
if(lDomo) config.setDomoticzConfig(domo);
|
||||
if(lNtp) config.setNtpConfig(ntp);
|
||||
if(lEntsoe) config.setEntsoeConfig(entsoe);
|
||||
ds.save();
|
||||
ea.save();
|
||||
if(sDs) ds.save();
|
||||
if(sEa) ea.save();
|
||||
config.save();
|
||||
}
|
||||
|
||||
@ -8,13 +8,16 @@ EnergyAccounting::EnergyAccounting(RemoteDebug* debugger) {
|
||||
this->debugger = debugger;
|
||||
}
|
||||
|
||||
void EnergyAccounting::setup(AmsDataStorage *ds, EntsoeApi *eapi, EnergyAccountingConfig *config) {
|
||||
void EnergyAccounting::setup(AmsDataStorage *ds, EnergyAccountingConfig *config) {
|
||||
this->ds = ds;
|
||||
this->eapi = eapi;
|
||||
this->config = config;
|
||||
this->currentThresholdIdx = 0;
|
||||
}
|
||||
|
||||
void EnergyAccounting::setEapi(EntsoeApi *eapi) {
|
||||
this->eapi = eapi;
|
||||
}
|
||||
|
||||
EnergyAccountingConfig* EnergyAccounting::getConfig() {
|
||||
return config;
|
||||
}
|
||||
@ -24,6 +27,7 @@ void EnergyAccounting::setTimezone(Timezone* tz) {
|
||||
}
|
||||
|
||||
bool EnergyAccounting::update(AmsData* amsData) {
|
||||
if(config == NULL) return false;
|
||||
time_t now = time(nullptr);
|
||||
if(now < BUILD_EPOCH) return false;
|
||||
if(tz == NULL) {
|
||||
@ -38,24 +42,39 @@ bool EnergyAccounting::update(AmsData* amsData) {
|
||||
if(!init) {
|
||||
currentHour = local.Hour;
|
||||
currentDay = local.Day;
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Initializing data at %lld\n", (int64_t) now);
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(EnergyAccounting) Initializing data at %lld\n", (int64_t) now);
|
||||
if(!load()) {
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Unable to load existing data");
|
||||
data = { 1, local.Month, 0, 0, 0, 0 };
|
||||
if(calcDayUse()) ret = true;
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Unable to load existing data\n");
|
||||
data = { 3, local.Month,
|
||||
0, 0, 0,
|
||||
0, 0, // Peak 1
|
||||
0, 0, // Peak 2
|
||||
0, 0, // Peak 3
|
||||
0, 0, // Peak 4
|
||||
0, 0 // Peak 5
|
||||
};
|
||||
} else if(debugger->isActive(RemoteDebug::DEBUG)) {
|
||||
for(uint8_t i = 0; i < 5; i++) {
|
||||
debugger->printf("(EnergyAccounting) Peak hour from day %d: %d\n", data.peaks[i].day, data.peaks[i].value*10);
|
||||
}
|
||||
debugger->printf("(EnergyAccounting) Loaded cost yesterday: %d, this month: %d, last month: %d\n", data.costYesterday, data.costThisMonth, data.costLastMonth);
|
||||
}
|
||||
init = true;
|
||||
}
|
||||
|
||||
if(!initPrice && eapi != NULL && eapi->getValueForHour(0) != ENTSOE_NO_VALUE) {
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Initializing prices at %lld\n", (int64_t) now);
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(EnergyAccounting) Initializing prices at %lld\n", (int64_t) now);
|
||||
calcDayCost();
|
||||
}
|
||||
|
||||
if(local.Hour != currentHour && (amsData->getListType() >= 3 || local.Minute == 1)) {
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) New local hour %d\n", local.Hour);
|
||||
|
||||
if(calcDayUse()) ret = true;
|
||||
tmElements_t oneHrAgo;
|
||||
breakTime(now-3600, oneHrAgo);
|
||||
uint16_t val = ds->getHourImport(oneHrAgo.Hour) / 10;
|
||||
ret |= updateMax(val, local.Day);
|
||||
|
||||
if(local.Hour > 0) {
|
||||
calcDayCost();
|
||||
}
|
||||
@ -77,7 +96,9 @@ bool EnergyAccounting::update(AmsData* amsData) {
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) New month %d\n", local.Month);
|
||||
data.costLastMonth = data.costThisMonth;
|
||||
data.costThisMonth = 0;
|
||||
data.maxHour = 0;
|
||||
for(uint8_t i = 0; i < 5; i++) {
|
||||
data.peaks[i] = { 0, 0 };
|
||||
}
|
||||
data.month = local.Month;
|
||||
currentThresholdIdx = 0;
|
||||
ret = true;
|
||||
@ -108,24 +129,6 @@ bool EnergyAccounting::update(AmsData* amsData) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool EnergyAccounting::calcDayUse() {
|
||||
time_t now = time(nullptr);
|
||||
tmElements_t local, utc;
|
||||
breakTime(tz->toLocal(now), local);
|
||||
|
||||
bool ret = false;
|
||||
uint8_t lim = local.Day == 1 ? local.Hour : 24;
|
||||
for(int i = 0; i < lim; i++) {
|
||||
breakTime(now - ((lim - i) * 3600), utc);
|
||||
int16_t val = ds->getHourImport(utc.Hour) / 10.0;
|
||||
if(val > data.maxHour) {
|
||||
data.maxHour = val;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void EnergyAccounting::calcDayCost() {
|
||||
time_t now = time(nullptr);
|
||||
tmElements_t local, utc;
|
||||
@ -203,7 +206,31 @@ uint8_t EnergyAccounting::getCurrentThreshold() {
|
||||
}
|
||||
|
||||
float EnergyAccounting::getMonthMax() {
|
||||
return data.maxHour / 100.0;
|
||||
uint8_t count = 0;
|
||||
uint32_t maxHour = 0.0;
|
||||
bool included[5] = { false, false, false, false, false };
|
||||
|
||||
while(count < config->hours) {
|
||||
uint8_t maxIdx = 0;
|
||||
uint16_t maxVal = 0;
|
||||
for(uint8_t i = 0; i < 5; i++) {
|
||||
if(included[i]) continue;
|
||||
if(data.peaks[i].value > maxVal) {
|
||||
maxVal = data.peaks[i].value;
|
||||
maxIdx = i;
|
||||
}
|
||||
}
|
||||
included[maxIdx] = true;
|
||||
count++;
|
||||
}
|
||||
|
||||
for(uint8_t i = 0; i < 5; i++) {
|
||||
if(!included[i]) continue;
|
||||
if(data.peaks[i].day > 0) {
|
||||
maxHour += data.peaks[i].value;
|
||||
}
|
||||
}
|
||||
return maxHour > 0 ? maxHour / count / 100.0 : 0.0;
|
||||
}
|
||||
|
||||
bool EnergyAccounting::load() {
|
||||
@ -219,15 +246,53 @@ bool EnergyAccounting::load() {
|
||||
File file = LittleFS.open(FILE_ENERGYACCOUNTING, "r");
|
||||
char buf[file.size()];
|
||||
file.readBytes(buf, file.size());
|
||||
EnergyAccountingData* data = (EnergyAccountingData*) buf;
|
||||
file.close();
|
||||
|
||||
if(data->version == 1) {
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf("(EnergyAccounting) Data version %d\n", buf[0]);
|
||||
if(buf[0] == 3) {
|
||||
EnergyAccountingData* data = (EnergyAccountingData*) buf;
|
||||
memcpy(&this->data, data, sizeof(this->data));
|
||||
ret = true;
|
||||
} else {
|
||||
ret = false;
|
||||
data = { 3, 0,
|
||||
0, 0, 0,
|
||||
0, 0, // Peak 1
|
||||
0, 0, // Peak 2
|
||||
0, 0, // Peak 3
|
||||
0, 0, // Peak 4
|
||||
0, 0 // Peak 5
|
||||
};
|
||||
if(buf[0] == 2) {
|
||||
EnergyAccountingData1* data = (EnergyAccountingData1*) buf;
|
||||
this->data.month = data->month;
|
||||
this->data.costYesterday = data->costYesterday;
|
||||
this->data.costThisMonth = data->costThisMonth;
|
||||
this->data.costLastMonth = data->costLastMonth;
|
||||
uint8_t b = 0;
|
||||
for(uint8_t i = sizeof(this->data); i < file.size(); i+=2) {
|
||||
this->data.peaks[b].day = b;
|
||||
memcpy(&this->data.peaks[b].value, buf+i, 2);
|
||||
b++;
|
||||
if(b >= config->hours) break;
|
||||
}
|
||||
ret = true;
|
||||
} else if(buf[0] == 1) {
|
||||
EnergyAccountingData1* data = (EnergyAccountingData1*) buf;
|
||||
this->data.month = data->month;
|
||||
this->data.costYesterday = data->costYesterday;
|
||||
this->data.costThisMonth = data->costThisMonth;
|
||||
this->data.costLastMonth = data->costLastMonth;
|
||||
this->data.peaks[0].day = 1;
|
||||
this->data.peaks[0].value = data->maxHour;
|
||||
ret = true;
|
||||
} else {
|
||||
if(debugger->isActive(RemoteDebug::WARNING)) debugger->printf("(EnergyAccounting) Unknown version\n");
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
||||
file.close();
|
||||
} else {
|
||||
if(debugger->isActive(RemoteDebug::WARNING)) debugger->printf("(EnergyAccounting) File not found\n");
|
||||
}
|
||||
|
||||
LittleFS.end();
|
||||
@ -246,7 +311,7 @@ bool EnergyAccounting::save() {
|
||||
File file = LittleFS.open(FILE_ENERGYACCOUNTING, "w");
|
||||
char buf[sizeof(data)];
|
||||
memcpy(buf, &data, sizeof(data));
|
||||
for(unsigned long i = 0; i < sizeof(data); i++) {
|
||||
for(uint8_t i = 0; i < sizeof(buf); i++) {
|
||||
file.write(buf[i]);
|
||||
}
|
||||
file.close();
|
||||
@ -263,3 +328,34 @@ EnergyAccountingData EnergyAccounting::getData() {
|
||||
void EnergyAccounting::setData(EnergyAccountingData& data) {
|
||||
this->data = data;
|
||||
}
|
||||
|
||||
bool EnergyAccounting::updateMax(uint16_t val, uint8_t day) {
|
||||
for(uint8_t i = 0; i < 5; i++) {
|
||||
if(data.peaks[i].day == day || data.peaks[i].day == 0) {
|
||||
if(val > data.peaks[i].value) {
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Adding new max %d for day %d which is larger than %d\n", val*10, day, data.peaks[i].value*10);
|
||||
data.peaks[i].day = day;
|
||||
data.peaks[i].value = val;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
uint16_t test = 0;
|
||||
uint8_t idx = 255;
|
||||
for(uint8_t i = 0; i < 5; i++) {
|
||||
if(val > data.peaks[i].value) {
|
||||
if(test < data.peaks[i].value) {
|
||||
test = data.peaks[i].value;
|
||||
idx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(idx < 5) {
|
||||
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Adding new max %d for day %d\n", val*10, day);
|
||||
data.peaks[idx].value = val;
|
||||
data.peaks[idx].day = day;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -6,7 +6,21 @@
|
||||
#include "AmsDataStorage.h"
|
||||
#include "entsoe/EntsoeApi.h"
|
||||
|
||||
struct EnergyAccountingPeak {
|
||||
uint8_t day;
|
||||
uint16_t value;
|
||||
};
|
||||
|
||||
struct EnergyAccountingData {
|
||||
uint8_t version;
|
||||
uint8_t month;
|
||||
uint16_t costYesterday;
|
||||
uint16_t costThisMonth;
|
||||
uint16_t costLastMonth;
|
||||
EnergyAccountingPeak peaks[5];
|
||||
};
|
||||
|
||||
struct EnergyAccountingData1 {
|
||||
uint8_t version;
|
||||
uint8_t month;
|
||||
uint16_t maxHour;
|
||||
@ -15,13 +29,16 @@ struct EnergyAccountingData {
|
||||
uint16_t costLastMonth;
|
||||
};
|
||||
|
||||
|
||||
class EnergyAccounting {
|
||||
public:
|
||||
EnergyAccounting(RemoteDebug*);
|
||||
void setup(AmsDataStorage *ds, EntsoeApi *eapi, EnergyAccountingConfig *config);
|
||||
void setup(AmsDataStorage *ds, EnergyAccountingConfig *config);
|
||||
void setEapi(EntsoeApi *eapi);
|
||||
void setTimezone(Timezone*);
|
||||
EnergyAccountingConfig* getConfig();
|
||||
bool update(AmsData* amsData);
|
||||
bool load();
|
||||
bool save();
|
||||
|
||||
double getUseThisHour();
|
||||
@ -51,9 +68,8 @@ private:
|
||||
double use, costHour, costDay;
|
||||
EnergyAccountingData data = { 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
bool load();
|
||||
bool calcDayUse();
|
||||
void calcDayCost();
|
||||
bool updateMax(uint16_t val, uint8_t day);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -606,6 +606,7 @@ void AmsWebServer::configThresholdsHtml() {
|
||||
for(int i = 0; i < 9; i++) {
|
||||
html.replace("{t" + String(i) + "}", String(config->thresholds[i]));
|
||||
}
|
||||
html.replace("{h}", String(config->hours));
|
||||
|
||||
server.setContentLength(html.length() + HEAD_HTML_LEN + FOOT_HTML_LEN);
|
||||
server.send_P(200, MIME_HTML, HEAD_HTML);
|
||||
@ -1353,6 +1354,7 @@ void AmsWebServer::handleSave() {
|
||||
eac.thresholds[6] = server.arg("t6").toInt();
|
||||
eac.thresholds[7] = server.arg("t7").toInt();
|
||||
eac.thresholds[8] = server.arg("t8").toInt();
|
||||
eac.hours = server.arg("h").toInt();
|
||||
config->setEnergyAccountingConfig(eac);
|
||||
}
|
||||
|
||||
@ -2268,7 +2270,7 @@ void AmsWebServer::configFileDownload() {
|
||||
EnergyAccountingConfig eac;
|
||||
config->getEnergyAccountingConfig(eac);
|
||||
|
||||
if(eac.thresholds[9] > 0) server.sendContent(buf, snprintf_P(buf, BufferSize, (char*) F("thresholds %d %d %d %d %d %d %d %d %d %d\n"),
|
||||
if(eac.thresholds[9] > 0) server.sendContent(buf, snprintf_P(buf, BufferSize, (char*) F("thresholds %d %d %d %d %d %d %d %d %d %d %d\n"),
|
||||
eac.thresholds[0],
|
||||
eac.thresholds[1],
|
||||
eac.thresholds[2],
|
||||
@ -2278,7 +2280,8 @@ void AmsWebServer::configFileDownload() {
|
||||
eac.thresholds[6],
|
||||
eac.thresholds[7],
|
||||
eac.thresholds[8],
|
||||
eac.thresholds[9]
|
||||
eac.thresholds[9],
|
||||
eac.hours
|
||||
));
|
||||
}
|
||||
|
||||
@ -2424,15 +2427,28 @@ void AmsWebServer::configFileDownload() {
|
||||
}
|
||||
|
||||
if(ea != NULL) {
|
||||
EnergyAccountingConfig eac;
|
||||
config->getEnergyAccountingConfig(eac);
|
||||
EnergyAccountingData ead = ea->getData();
|
||||
server.sendContent(buf, snprintf_P(buf, BufferSize, (char*) F("energyaccounting %d %d %.2f %.2f %.2f %.2f"),
|
||||
server.sendContent(buf, snprintf_P(buf, BufferSize, (char*) F("energyaccounting %d %d %.2f %.2f %.2f %.2f %d %.2f %d %.2f %d %.2f %d %.2f %d %.2f"),
|
||||
ead.version,
|
||||
ead.month,
|
||||
ead.maxHour / 100.0,
|
||||
0.0, // Old max
|
||||
ead.costYesterday / 100.0,
|
||||
ead.costThisMonth / 100.0,
|
||||
ead.costLastMonth / 100.0
|
||||
ead.costLastMonth / 100.0,
|
||||
ead.peaks[0].day,
|
||||
ead.peaks[0].value / 100.0,
|
||||
ead.peaks[1].day,
|
||||
ead.peaks[1].value / 100.0,
|
||||
ead.peaks[2].day,
|
||||
ead.peaks[2].value / 100.0,
|
||||
ead.peaks[3].day,
|
||||
ead.peaks[3].value / 100.0,
|
||||
ead.peaks[4].day,
|
||||
ead.peaks[4].value / 100.0
|
||||
));
|
||||
server.sendContent("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -103,6 +103,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-5 col-sm-6">
|
||||
<div class="m-2 input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Average of top</span>
|
||||
</div>
|
||||
<input class="form-control text-right" name="h" type="number" min="1" max="5" step="1" value="{h}"/>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row form-group">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user