Added zero cross detector

This commit is contained in:
David Lenfesty 2018-07-11 10:22:44 -06:00
parent 602201ad75
commit 7f294b4d93
4 changed files with 141 additions and 2 deletions

View File

@ -116,6 +116,42 @@ X P4 4 -200 -150 150 R 50 50 1 1 P
ENDDRAW ENDDRAW
ENDDEF ENDDEF
# #
# FOD814-D
#
DEF FOD814-D U 0 40 Y Y 1 F N
F0 "U" 0 -250 60 H V C CNN
F1 "FOD814-D" -50 450 60 H V C CNN
F2 "" -50 0 60 H V C CNN
F3 "" -50 0 60 H V C CNN
DRAW
S -400 400 350 -200 0 1 0 N
P 2 0 1 0 -300 50 -200 50 N
P 2 0 1 0 -250 -50 -250 -100 N
P 2 0 1 0 -250 50 -250 -50 N
P 2 0 1 0 -250 150 -250 250 N
P 2 0 1 0 -250 250 -250 300 N
P 2 0 1 0 -150 150 -50 150 N
P 2 0 1 0 -100 50 -100 -50 N
P 2 0 1 0 50 100 0 150 N
P 2 0 1 0 100 150 100 50 N
P 2 0 1 0 100 200 100 0 N
P 2 0 1 0 150 -100 350 -100 N
P 2 0 1 0 250 -100 200 -150 N
P 2 0 1 0 250 -100 200 -50 N
P 3 0 1 0 -100 -50 -100 -100 -400 -100 N
P 3 0 1 0 -100 150 -100 300 -400 300 N
P 3 0 1 0 -50 100 50 100 0 50 N
P 3 0 1 0 100 50 150 0 150 -100 N
P 4 0 1 0 -300 150 -200 150 -250 50 -300 150 N
P 4 0 1 0 -150 50 -100 150 -50 50 -150 50 N
P 4 0 1 0 100 150 150 200 150 300 350 300 N
X AC 1 -400 300 200 R 50 50 1 1 I N
X AC 2 -400 -100 200 R 50 50 1 1 I N
X EMITTER 3 350 -100 200 L 50 50 1 1 I N
X COLLECTOR 4 350 300 200 L 50 50 1 1 I N
ENDDRAW
ENDDEF
#
# GND # GND
# #
DEF GND #PWR 0 0 Y Y 1 F P DEF GND #PWR 0 0 Y Y 1 F P

View File

@ -1,4 +1,4 @@
update=Tue 10 Jul 2018 04:04:44 PM MDT update=Wed 11 Jul 2018 10:13:06 AM MDT
version=1 version=1
last_client=kicad last_client=kicad
[pcbnew] [pcbnew]
@ -60,3 +60,4 @@ LibName28=contrib
LibName29=valves LibName29=valves
LibName30=digikey-UltraLibrarian/KiCAD/symbols LibName30=digikey-UltraLibrarian/KiCAD/symbols
LibName31=stm32f030f4p6 LibName31=stm32f030f4p6
LibName32=fod814-d

View File

@ -30,6 +30,7 @@ LIBS:contrib
LIBS:valves LIBS:valves
LIBS:symbols LIBS:symbols
LIBS:stm32f030f4p6 LIBS:stm32f030f4p6
LIBS:fod814-d
LIBS:AC-LED-Control-cache LIBS:AC-LED-Control-cache
EELAYER 25 0 EELAYER 25 0
EELAYER END EELAYER END
@ -423,7 +424,7 @@ NoConn ~ 2850 1700
NoConn ~ 1550 1100 NoConn ~ 1550 1100
NoConn ~ 1550 1200 NoConn ~ 1550 1200
Text Label 1550 1300 2 60 ~ 0 Text Label 1550 1300 2 60 ~ 0
STWM_~RST STM_~RST
Text Label 3150 4050 0 60 ~ 0 Text Label 3150 4050 0 60 ~ 0
STM_~RST STM_~RST
Wire Wire Line Wire Wire Line
@ -556,4 +557,97 @@ Wire Notes Line
1950 6550 800 6550 1950 6550 800 6550
Wire Notes Line Wire Notes Line
800 6550 800 5750 800 6550 800 5750
Text Notes 4950 4500 0 60 ~ 0
Zero Cross Detector
$Comp
L R R?
U 1 1 5B46350A
P 5700 4900
F 0 "R?" V 5780 4900 50 0000 C CNN
F 1 "16K" V 5700 4900 50 0000 C CNN
F 2 "" V 5630 4900 50 0000 C CNN
F 3 "" H 5700 4900 50 0000 C CNN
1 5700 4900
0 1 1 0
$EndComp
$Comp
L FOD814-D U?
U 1 1 5B46379C
P 6250 5200
F 0 "U?" H 6250 4950 60 0000 C CNN
F 1 "FOD814-D" H 6200 5650 60 0000 C CNN
F 2 "" H 6200 5200 60 0000 C CNN
F 3 "" H 6200 5200 60 0000 C CNN
1 6250 5200
1 0 0 -1
$EndComp
$Comp
L R R?
U 1 1 5B463817
P 5700 5300
F 0 "R?" V 5780 5300 50 0000 C CNN
F 1 "16K" V 5700 5300 50 0000 C CNN
F 2 "" V 5630 5300 50 0000 C CNN
F 3 "" H 5700 5300 50 0000 C CNN
1 5700 5300
0 1 1 0
$EndComp
Wire Wire Line
5550 4900 5200 4900
Wire Wire Line
5550 5300 5200 5300
Text Label 5200 4900 2 60 ~ 0
AC_H
Text Label 5200 5300 2 60 ~ 0
AC_N
Wire Wire Line
6600 4900 7100 4900
$Comp
L R R?
U 1 1 5B463CCD
P 6850 4750
F 0 "R?" V 6930 4750 50 0000 C CNN
F 1 "2K" V 6850 4750 50 0000 C CNN
F 2 "" V 6780 4750 50 0000 C CNN
F 3 "" H 6850 4750 50 0000 C CNN
1 6850 4750
1 0 0 -1
$EndComp
$Comp
L +3V3 #PWR?
U 1 1 5B463D3E
P 6850 4600
F 0 "#PWR?" H 6850 4450 50 0001 C CNN
F 1 "+3V3" H 6850 4740 50 0000 C CNN
F 2 "" H 6850 4600 50 0000 C CNN
F 3 "" H 6850 4600 50 0000 C CNN
1 6850 4600
1 0 0 -1
$EndComp
Connection ~ 6850 4900
Text Label 7100 4900 0 60 ~ 0
ZERO_CROSS
Wire Wire Line
6600 5300 6850 5300
Wire Wire Line
6850 5300 6850 5400
$Comp
L GND #PWR?
U 1 1 5B464157
P 6850 5400
F 0 "#PWR?" H 6850 5150 50 0001 C CNN
F 1 "GND" H 6850 5250 50 0000 C CNN
F 2 "" H 6850 5400 50 0000 C CNN
F 3 "" H 6850 5400 50 0000 C CNN
1 6850 5400
1 0 0 -1
$EndComp
Wire Notes Line
4950 4400 7700 4400
Wire Notes Line
7700 4400 7700 5600
Wire Notes Line
7700 5600 4950 5600
Wire Notes Line
4950 5600 4950 4400
$EndSCHEMATC $EndSCHEMATC

View File

@ -46,3 +46,11 @@ QH' is an output pin, it clocks out the value in QH.
STM32F030 I2C Pins: STM32F030 I2C Pins:
- PA9: I2C1_SCL - PA9: I2C1_SCL
- PA10: I2C1_SDA - PA10: I2C1_SDA
How do I determine the I2C address?
- I can hardcode it (annoying to change, have to have seperate binaries)
- I can listen on I2C...
I know what to do. Have a default address to listen to, but you can change it over I2C. It stores this address in EEPROM so it persists across reflashes.
Easy-peasy.