mirror of https://github.com/rusefi/wideband.git
Merge branch 'master' of https://github.com/mck1117/wideband
This commit is contained in:
commit
07a1c489f5
|
@ -0,0 +1,345 @@
|
|||
EESchema-LIBRARY Version 2.4
|
||||
#encoding utf-8
|
||||
#
|
||||
# Amplifier_Operational_MCP6004
|
||||
#
|
||||
DEF Amplifier_Operational_MCP6004 U 0 5 Y Y 5 L N
|
||||
F0 "U" 0 200 50 H V L CNN
|
||||
F1 "Amplifier_Operational_MCP6004" 0 -200 50 H V L CNN
|
||||
F2 "" -50 100 50 H I C CNN
|
||||
F3 "" 50 200 50 H I C CNN
|
||||
ALIAS LM324 TLC274 TLC279 TL074 LM324A MCP6004 TL084 TL064 LMV324 LMC6484 MCP604 MC33079 MC33174 MC33179 OPA1604 OPA1679 OPA4134 OPA4340UA OPA4376 MCP6L94 TSV914 ADA4807-4 TSV994
|
||||
$FPLIST
|
||||
SOIC*3.9x8.7mm*P1.27mm*
|
||||
DIP*W7.62mm*
|
||||
TSSOP*4.4x5mm*P0.65mm*
|
||||
SSOP*5.3x6.2mm*P0.65mm*
|
||||
MSOP*3x3mm*P0.5mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 4 1 1 10 -200 200 200 0 -200 -200 -200 200 f
|
||||
P 4 2 1 10 -200 200 200 0 -200 -200 -200 200 f
|
||||
P 4 3 1 10 -200 200 200 0 -200 -200 -200 200 f
|
||||
P 4 4 1 10 -200 200 200 0 -200 -200 -200 200 f
|
||||
X ~ 1 300 0 100 L 50 50 1 1 O
|
||||
X - 2 -300 -100 100 R 50 50 1 1 I
|
||||
X + 3 -300 100 100 R 50 50 1 1 I
|
||||
X + 5 -300 100 100 R 50 50 2 1 I
|
||||
X - 6 -300 -100 100 R 50 50 2 1 I
|
||||
X ~ 7 300 0 100 L 50 50 2 1 O
|
||||
X + 10 -300 100 100 R 50 50 3 1 I
|
||||
X ~ 8 300 0 100 L 50 50 3 1 O
|
||||
X - 9 -300 -100 100 R 50 50 3 1 I
|
||||
X + 12 -300 100 100 R 50 50 4 1 I
|
||||
X - 13 -300 -100 100 R 50 50 4 1 I
|
||||
X ~ 14 300 0 100 L 50 50 4 1 O
|
||||
X V- 11 -100 -300 150 U 50 50 5 1 W
|
||||
X V+ 4 -100 300 150 D 50 50 5 1 W
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Connector_Generic_Conn_01x06
|
||||
#
|
||||
DEF Connector_Generic_Conn_01x06 J 0 40 Y N 1 F N
|
||||
F0 "J" 0 300 50 H V C CNN
|
||||
F1 "Connector_Generic_Conn_01x06" 0 -400 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
Connector*:*_1x??_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -295 0 -305 1 1 6 N
|
||||
S -50 -195 0 -205 1 1 6 N
|
||||
S -50 -95 0 -105 1 1 6 N
|
||||
S -50 5 0 -5 1 1 6 N
|
||||
S -50 105 0 95 1 1 6 N
|
||||
S -50 205 0 195 1 1 6 N
|
||||
S -50 250 50 -350 1 1 10 f
|
||||
X Pin_1 1 -200 200 150 R 50 50 1 1 P
|
||||
X Pin_2 2 -200 100 150 R 50 50 1 1 P
|
||||
X Pin_3 3 -200 0 150 R 50 50 1 1 P
|
||||
X Pin_4 4 -200 -100 150 R 50 50 1 1 P
|
||||
X Pin_5 5 -200 -200 150 R 50 50 1 1 P
|
||||
X Pin_6 6 -200 -300 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Connector_Generic_Conn_01x08
|
||||
#
|
||||
DEF Connector_Generic_Conn_01x08 J 0 40 Y N 1 F N
|
||||
F0 "J" 0 400 50 H V C CNN
|
||||
F1 "Connector_Generic_Conn_01x08" 0 -500 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
Connector*:*_1x??_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -395 0 -405 1 1 6 N
|
||||
S -50 -295 0 -305 1 1 6 N
|
||||
S -50 -195 0 -205 1 1 6 N
|
||||
S -50 -95 0 -105 1 1 6 N
|
||||
S -50 5 0 -5 1 1 6 N
|
||||
S -50 105 0 95 1 1 6 N
|
||||
S -50 205 0 195 1 1 6 N
|
||||
S -50 305 0 295 1 1 6 N
|
||||
S -50 350 50 -450 1 1 10 f
|
||||
X Pin_1 1 -200 300 150 R 50 50 1 1 P
|
||||
X Pin_2 2 -200 200 150 R 50 50 1 1 P
|
||||
X Pin_3 3 -200 100 150 R 50 50 1 1 P
|
||||
X Pin_4 4 -200 0 150 R 50 50 1 1 P
|
||||
X Pin_5 5 -200 -100 150 R 50 50 1 1 P
|
||||
X Pin_6 6 -200 -200 150 R 50 50 1 1 P
|
||||
X Pin_7 7 -200 -300 150 R 50 50 1 1 P
|
||||
X Pin_8 8 -200 -400 150 R 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Connector_Generic_Conn_02x05_Odd_Even
|
||||
#
|
||||
DEF Connector_Generic_Conn_02x05_Odd_Even J 0 40 Y N 1 F N
|
||||
F0 "J" 50 300 50 H V C CNN
|
||||
F1 "Connector_Generic_Conn_02x05_Odd_Even" 50 -300 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
Connector*:*_2x??_*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -50 -195 0 -205 1 1 6 N
|
||||
S -50 -95 0 -105 1 1 6 N
|
||||
S -50 5 0 -5 1 1 6 N
|
||||
S -50 105 0 95 1 1 6 N
|
||||
S -50 205 0 195 1 1 6 N
|
||||
S -50 250 150 -250 1 1 10 f
|
||||
S 150 -195 100 -205 1 1 6 N
|
||||
S 150 -95 100 -105 1 1 6 N
|
||||
S 150 5 100 -5 1 1 6 N
|
||||
S 150 105 100 95 1 1 6 N
|
||||
S 150 205 100 195 1 1 6 N
|
||||
X Pin_1 1 -200 200 150 R 50 50 1 1 P
|
||||
X Pin_10 10 300 -200 150 L 50 50 1 1 P
|
||||
X Pin_2 2 300 200 150 L 50 50 1 1 P
|
||||
X Pin_3 3 -200 100 150 R 50 50 1 1 P
|
||||
X Pin_4 4 300 100 150 L 50 50 1 1 P
|
||||
X Pin_5 5 -200 0 150 R 50 50 1 1 P
|
||||
X Pin_6 6 300 0 150 L 50 50 1 1 P
|
||||
X Pin_7 7 -200 -100 150 R 50 50 1 1 P
|
||||
X Pin_8 8 300 -100 150 L 50 50 1 1 P
|
||||
X Pin_9 9 -200 -200 150 R 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_LED
|
||||
#
|
||||
DEF Device_LED D 0 40 N N 1 F N
|
||||
F0 "D" 0 100 50 H V C CNN
|
||||
F1 "Device_LED" 0 -100 50 H V C CNN
|
||||
F2 "" 0 0 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
$FPLIST
|
||||
LED*
|
||||
LED_SMD:*
|
||||
LED_THT:*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 2 0 1 8 -50 -50 -50 50 N
|
||||
P 2 0 1 0 -50 0 50 0 N
|
||||
P 4 0 1 8 50 -50 50 50 -50 0 50 -50 N
|
||||
P 5 0 1 0 -120 -30 -180 -90 -150 -90 -180 -90 -180 -60 N
|
||||
P 5 0 1 0 -70 -30 -130 -90 -100 -90 -130 -90 -130 -60 N
|
||||
X K 1 -150 0 100 R 50 50 1 1 P
|
||||
X A 2 150 0 100 L 50 50 1 1 P
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Device_Q_NMOS_GDS
|
||||
#
|
||||
DEF Device_Q_NMOS_GDS Q 0 0 Y N 1 F N
|
||||
F0 "Q" 200 50 50 H V L CNN
|
||||
F1 "Device_Q_NMOS_GDS" 200 -50 50 H V L CNN
|
||||
F2 "" 200 100 50 H I C CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
DRAW
|
||||
C 65 0 110 0 1 10 N
|
||||
C 100 -70 10 0 1 0 F
|
||||
C 100 70 10 0 1 0 F
|
||||
P 2 0 1 0 10 0 -100 0 N
|
||||
P 2 0 1 10 10 75 10 -75 N
|
||||
P 2 0 1 10 30 -50 30 -90 N
|
||||
P 2 0 1 10 30 20 30 -20 N
|
||||
P 2 0 1 10 30 90 30 50 N
|
||||
P 2 0 1 0 100 100 100 70 N
|
||||
P 3 0 1 0 100 -100 100 0 30 0 N
|
||||
P 4 0 1 0 30 -70 130 -70 130 70 30 70 N
|
||||
P 4 0 1 0 40 0 80 15 80 -15 40 0 F
|
||||
P 4 0 1 0 110 20 115 15 145 15 150 10 N
|
||||
P 4 0 1 0 130 15 115 -10 145 -10 130 15 N
|
||||
X G 1 -200 0 100 R 50 50 1 1 I
|
||||
X D 2 100 200 100 D 50 50 1 1 P
|
||||
X S 3 100 -200 100 U 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
|
||||
#
|
||||
# MCU_ST_STM32F0_STM32F042K6Ux
|
||||
#
|
||||
DEF MCU_ST_STM32F0_STM32F042K6Ux U 0 20 Y Y 1 F N
|
||||
F0 "U" -400 850 50 H V L CNN
|
||||
F1 "MCU_ST_STM32F0_STM32F042K6Ux" 200 850 50 H V L CNN
|
||||
F2 "Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm" -400 -900 50 H I R CNN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
ALIAS STM32F042K6Ux
|
||||
$FPLIST
|
||||
QFN*1EP*5x5mm*P0.5mm*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -400 -900 400 800 0 1 10 f
|
||||
X VDD 1 -100 900 100 D 50 50 1 1 W
|
||||
X PA4 10 500 300 100 L 50 50 1 1 B
|
||||
X PA5 11 500 200 100 L 50 50 1 1 B
|
||||
X PA6 12 500 100 100 L 50 50 1 1 B
|
||||
X PA7 13 500 0 100 L 50 50 1 1 B
|
||||
X PB0 14 -500 0 100 R 50 50 1 1 B
|
||||
X PB1 15 -500 -100 100 R 50 50 1 1 B
|
||||
X PB2 16 -500 -200 100 R 50 50 1 1 B
|
||||
X VDDIO2 17 100 900 100 D 50 50 1 1 W
|
||||
X PA8 18 500 -100 100 L 50 50 1 1 B
|
||||
X PA9 19 500 -200 100 L 50 50 1 1 B
|
||||
X PF0 2 -500 400 100 R 50 50 1 1 I
|
||||
X PA10 20 500 -300 100 L 50 50 1 1 B
|
||||
X PA11 21 500 -400 100 L 50 50 1 1 B
|
||||
X PA12 22 500 -500 100 L 50 50 1 1 B
|
||||
X PA13 23 500 -600 100 L 50 50 1 1 B
|
||||
X PA14 24 500 -700 100 L 50 50 1 1 B
|
||||
X PA15 25 500 -800 100 L 50 50 1 1 B
|
||||
X PB3 26 -500 -300 100 R 50 50 1 1 B
|
||||
X PB4 27 -500 -400 100 R 50 50 1 1 B
|
||||
X PB5 28 -500 -500 100 R 50 50 1 1 B
|
||||
X PB6 29 -500 -600 100 R 50 50 1 1 B
|
||||
X PF1 3 -500 300 100 R 50 50 1 1 I
|
||||
X PB7 30 -500 -700 100 R 50 50 1 1 B
|
||||
X PF11 31 -500 200 100 R 50 50 1 1 B
|
||||
X PB8 32 -500 -800 100 R 50 50 1 1 B
|
||||
X VSS 33 0 -1000 100 U 50 50 1 1 W
|
||||
X NRST 4 -500 700 100 R 50 50 1 1 I
|
||||
X VDDA 5 0 900 100 D 50 50 1 1 W
|
||||
X PA0 6 500 700 100 L 50 50 1 1 B
|
||||
X PA1 7 500 600 100 L 50 50 1 1 B
|
||||
X PA2 8 500 500 100 L 50 50 1 1 B
|
||||
X PA3 9 500 400 100 L 50 50 1 1 B
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
# Regulator_Linear_XC6206PxxxMR
|
||||
#
|
||||
DEF Regulator_Linear_XC6206PxxxMR U 0 10 Y Y 1 F N
|
||||
F0 "U" -150 125 50 H V C CNN
|
||||
F1 "Regulator_Linear_XC6206PxxxMR" 0 125 50 H V L CNN
|
||||
F2 "Package_TO_SOT_SMD:SOT-23" 0 225 50 H I C CIN
|
||||
F3 "" 0 0 50 H I C CNN
|
||||
ALIAS APE8865N-15-HF-3 APE8865N-16-HF-3 APE8865N-17-HF-3 APE8865N-18-HF-3 APE8865N-19-HF-3 APE8865N-20-HF-3 APE8865N-21-HF-3 APE8865N-22-HF-3 APE8865N-23-HF-3 APE8865N-24-HF-3 APE8865N-25-HF-3 APE8865N-26-HF-3 APE8865N-27-HF-3 APE8865N-28-HF-3 APE8865N-29-HF-3 APE8865N-30-HF-3 APE8865N-31-HF-3 APE8865N-32-HF-3 APE8865N-33-HF-3 AP2127N-1.0 AP2127N-1.2 AP2127N-1.5 AP2127N-1.8 AP2127N-2.5 AP2127N-2.8 AP2127N-3.0 AP2127N-3.3 XC6206PxxxMR
|
||||
$FPLIST
|
||||
SOT?23*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
S -200 75 200 -200 0 1 10 f
|
||||
X GND 1 0 -300 100 U 50 50 1 1 W
|
||||
X VO 2 300 0 100 L 50 50 1 1 w
|
||||
X VI 3 -300 0 100 R 50 50 1 1 W
|
||||
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_+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
|
||||
#
|
||||
# power_PWR_FLAG
|
||||
#
|
||||
DEF power_PWR_FLAG #FLG 0 0 N N 1 F P
|
||||
F0 "#FLG" 0 75 50 H I C CNN
|
||||
F1 "power_PWR_FLAG" 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 -40 75 0 100 40 75 0 50 N
|
||||
X pwr 1 0 0 0 U 50 50 0 0 w
|
||||
ENDDRAW
|
||||
ENDDEF
|
||||
#
|
||||
#End Library
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,243 @@
|
|||
update=Thursday, September 17, 2020 at 11:00:43 PM
|
||||
version=1
|
||||
last_client=kicad
|
||||
[general]
|
||||
version=1
|
||||
RootSch=
|
||||
BoardNm=
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
[eeschema/libraries]
|
||||
[pcbnew]
|
||||
version=1
|
||||
PageLayoutDescrFile=
|
||||
LastNetListRead=
|
||||
CopperLayerCount=2
|
||||
BoardThickness=1.6
|
||||
AllowMicroVias=0
|
||||
AllowBlindVias=0
|
||||
RequireCourtyardDefinitions=0
|
||||
ProhibitOverlappingCourtyards=1
|
||||
MinTrackWidth=0.1651
|
||||
MinViaDiameter=0.4
|
||||
MinViaDrill=0.3
|
||||
MinMicroViaDiameter=0.2
|
||||
MinMicroViaDrill=0.09999999999999999
|
||||
MinHoleToHole=0.25
|
||||
TrackWidth1=0.25
|
||||
TrackWidth2=0.25
|
||||
TrackWidth3=0.5
|
||||
TrackWidth4=3
|
||||
ViaDiameter1=0.6
|
||||
ViaDrill1=0.3
|
||||
ViaDiameter2=0.6
|
||||
ViaDrill2=0.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.1651
|
||||
TrackWidth=0.25
|
||||
ViaDiameter=0.6
|
||||
ViaDrill=0.3
|
||||
uViaDiameter=0.3
|
||||
uViaDrill=0.1
|
||||
dPairWidth=0.2
|
||||
dPairGap=0.25
|
||||
dPairViaGap=0.25
|
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,7 @@ endif
|
|||
|
||||
# C++ specific options here (added to USE_OPT).
|
||||
ifeq ($(USE_CPPOPT),)
|
||||
USE_CPPOPT = -fno-rtti -fno-exceptions
|
||||
USE_CPPOPT = -fno-rtti -fno-exceptions -ffast-math -funsafe-math-optimizations
|
||||
endif
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data.
|
||||
|
@ -83,7 +83,7 @@ endif
|
|||
#
|
||||
|
||||
# Define project name here
|
||||
PROJECT = ch
|
||||
PROJECT = wideband
|
||||
|
||||
# Target settings.
|
||||
MCU = cortex-m0
|
||||
|
@ -119,9 +119,11 @@ CSRC = $(ALLCSRC) cfg/board.c
|
|||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CPPSRC = $(ALLCPPSRC) \
|
||||
pwm.cpp \
|
||||
analog_input.cpp \
|
||||
can.cpp \
|
||||
can_helper.cpp \
|
||||
lambda_lookup.cpp \
|
||||
pwm.cpp \
|
||||
main.cpp
|
||||
|
||||
# List ASM source files here.
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
#include "analog_input.h"
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
#define ADC_OVERSAMPLE 8
|
||||
|
||||
static adcsample_t adcBuffer[3 * ADC_OVERSAMPLE];
|
||||
|
||||
ADCConversionGroup convGroup =
|
||||
{
|
||||
false, 3, nullptr, nullptr,
|
||||
0, // CFGR1
|
||||
ADC_TR(0, 0), // TR
|
||||
ADC_SMPR_SMP_28P5, // SMPR
|
||||
ADC_CHSELR_CHSEL0 | ADC_CHSELR_CHSEL1 | ADC_CHSELR_CHSEL2
|
||||
};
|
||||
|
||||
static float AverageSamples(adcsample_t* buffer, size_t idx)
|
||||
{
|
||||
uint32_t sum = 0;
|
||||
|
||||
for (size_t i = 0; i < ADC_OVERSAMPLE; i++)
|
||||
{
|
||||
sum += buffer[idx];
|
||||
idx += ADC_OVERSAMPLE;
|
||||
}
|
||||
|
||||
constexpr float scale = 3.3f / (2048 * ADC_OVERSAMPLE);
|
||||
|
||||
return (float)sum * scale;
|
||||
}
|
||||
|
||||
AnalogResult AnalogSample()
|
||||
{
|
||||
adcConvert(&ADCD1, &convGroup, adcBuffer, ADC_OVERSAMPLE);
|
||||
|
||||
return
|
||||
{
|
||||
.NernstVoltage = AverageSamples(adcBuffer, 0),
|
||||
.VirtualGroundVoltage = AverageSamples(adcBuffer, 1),
|
||||
.PumpCurrentVoltage = AverageSamples(adcBuffer, 2),
|
||||
};
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
struct AnalogResult
|
||||
{
|
||||
float NernstVoltage;
|
||||
float VirtualGroundVoltage;
|
||||
float PumpCurrentVoltage;
|
||||
};
|
||||
|
||||
AnalogResult AnalogSample();
|
|
@ -12,8 +12,6 @@ static const CANConfig canConfig500 =
|
|||
void InitCan()
|
||||
{
|
||||
canStart(&CAND1, &canConfig500);
|
||||
|
||||
CanTxMessage::setDevice(CAND1);
|
||||
}
|
||||
|
||||
struct StandardDataFrame
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
/*static*/ CANDriver* CanTxMessage::s_device = nullptr;
|
||||
|
||||
/*static*/ void CanTxMessage::setDevice(CANDriver& device) {
|
||||
s_device = &device;
|
||||
}
|
||||
|
||||
CanTxMessage::CanTxMessage(uint32_t eid, uint8_t dlc) {
|
||||
m_frame.IDE = CAN_IDE_STD;
|
||||
m_frame.EID = eid;
|
||||
|
@ -17,10 +11,8 @@ CanTxMessage::CanTxMessage(uint32_t eid, uint8_t dlc) {
|
|||
}
|
||||
|
||||
CanTxMessage::~CanTxMessage() {
|
||||
auto device = s_device;
|
||||
|
||||
// 100 ms timeout
|
||||
canTransmit(device, CAN_ANY_MAILBOX, &m_frame, TIME_MS2I(100));
|
||||
canTransmit(&CAND1, CAN_ANY_MAILBOX, &m_frame, TIME_MS2I(100));
|
||||
}
|
||||
|
||||
uint8_t& CanTxMessage::operator[](size_t index) {
|
||||
|
|
|
@ -25,11 +25,6 @@ public:
|
|||
*/
|
||||
~CanTxMessage();
|
||||
|
||||
/**
|
||||
* Configures the device for all messages to transmit from.
|
||||
*/
|
||||
static void setDevice(CANDriver& device);
|
||||
|
||||
/**
|
||||
* @brief Read & write the raw underlying 8-byte buffer.
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
class Gpio
|
||||
{
|
||||
public:
|
||||
Gpio(ioline_t line) : m_line(line) {};
|
||||
|
||||
void Set()
|
||||
{
|
||||
palSetLine(m_line);
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
palClearLine(m_line);
|
||||
}
|
||||
|
||||
private:
|
||||
const ioline_t m_line;
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
static const float pumpCurrentMa[24] = { -2.0f, -1.602f, -1.243f, -0.927f, -0.8f, -0.652f, -0.405f, -0.183f, -0.106f, -0.04f, 0.0f, 0.015f, 0.097f, 0.193f, 0.25f, 0.329f, 0.671f, 0.938f, 1.15f, 1.385f, 1.7f, 2.0f, 2.15f, 2.25 };
|
||||
static const float phi[24] = { 1.538461538f, 1.428571429f, 1.333333333f, 1.25f, 1.216545012f, 1.176470588f, 1.111111111f, 1.052631579f, 1.030927835f, 1.01010101f, 0.997008973f, 0.99009901f, 0.952380952f, 0.909090909f, 0.883392226f, 0.848176421f, 0.699790063f, 0.587889477f, 0.502512563f, 0.410846343f, 0.292997363f, 0.185494342f, 0.133226752f, 0.098823994 };
|
|
@ -1,6 +1,7 @@
|
|||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
|
||||
#include "analog_input.h"
|
||||
#include "can.h"
|
||||
#include "pwm.h"
|
||||
|
||||
|
@ -14,7 +15,7 @@ Pwm pumpDac(PWMD3, 1, 48000000, 1024);
|
|||
/*
|
||||
* Application entry point.
|
||||
*/
|
||||
int main(void) {
|
||||
int main() {
|
||||
halInit();
|
||||
chSysInit();
|
||||
|
||||
|
@ -23,7 +24,12 @@ int main(void) {
|
|||
heaterPwm.Start();
|
||||
pumpDac.Start();
|
||||
|
||||
heaterPwm.SetDuty(0.2f);
|
||||
pumpDac.SetDuty(0.4f);
|
||||
|
||||
while (true) {
|
||||
auto result = AnalogSample();
|
||||
|
||||
// dummy data
|
||||
SendCanData(0.5f, 300);
|
||||
chThdSleepMilliseconds(10);
|
||||
|
|
Loading…
Reference in New Issue