Browse Source

mach add atmega328/ 9-8

sonnt 6 years ago
parent
commit
b54d855ff8
20 changed files with 2077 additions and 1544 deletions
  1. 78 0
      RFID.bak
  2. 78 0
      RFID.sch
  3. 0 608
      _saved_main.sch
  4. 340 0
      atmega328.bak
  5. 340 0
      atmega328.sch
  6. 1 1
      conecter.bak
  7. 1 1
      conecter.sch
  8. 235 0
      connectorsch.bak
  9. 235 0
      connectorsch.sch
  10. 1 1
      display.bak
  11. 1 1
      display.sch
  12. 1 1
      keypad.bak
  13. 1 1
      keypad.sch
  14. 145 348
      main.bak
  15. 145 348
      main.sch
  16. 15 4
      motor.bak
  17. 15 4
      motor.sch
  18. 95 52
      vinhome-cache.lib
  19. 169 87
      vinhome.bak
  20. 181 87
      vinhome.sch

+ 78 - 0
RFID.bak

@@ -0,0 +1,78 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 8 8
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x08 J?
+U 1 1 5B71F223
+P 1550 2300
+F 0 "J?" H 1470 1675 50  0000 C CNN
+F 1 "RFID_RC522" H 1470 1766 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x08_Pitch2.54mm" H 1550 2300 50  0001 C CNN
+F 3 "~" H 1550 2300 50  0001 C CNN
+	1    1550 2300
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B71F699
+P 1900 2600
+F 0 "#PWR?" H 1900 2450 50  0001 C CNN
+F 1 "+3V3" H 1915 2773 50  0000 C CNN
+F 2 "" H 1900 2600 50  0001 C CNN
+F 3 "" H 1900 2600 50  0001 C CNN
+	1    1900 2600
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	1750 2600 1900 2600
+Wire Wire Line
+	1750 2500 2100 2500
+Wire Wire Line
+	1750 2400 2100 2400
+$Comp
+L power:GND #PWR?
+U 1 1 5B71F74D
+P 2100 2400
+F 0 "#PWR?" H 2100 2150 50  0001 C CNN
+F 1 "GND" V 2105 2272 50  0000 R CNN
+F 2 "" H 2100 2400 50  0001 C CNN
+F 3 "" H 2100 2400 50  0001 C CNN
+	1    2100 2400
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	1750 2300 2050 2300
+Text HLabel 2050 2300 2    50   Input ~ 0
+IRQ
+Wire Wire Line
+	1750 2200 2050 2200
+Wire Wire Line
+	1750 2100 2050 2100
+Wire Wire Line
+	1750 2000 2050 2000
+Wire Wire Line
+	1750 1900 2050 1900
+Text HLabel 2050 2200 2    50   Input ~ 0
+MISO_RF
+Text HLabel 2050 2100 2    50   Input ~ 0
+MOSI_RF
+Text HLabel 2050 2000 2    50   Input ~ 0
+SCK_RF
+Text HLabel 2050 1900 2    50   Input ~ 0
+SDA_RF
+Text HLabel 2100 2500 2    50   Input ~ 0
+RST_RF
+$EndSCHEMATC

+ 78 - 0
RFID.sch

@@ -0,0 +1,78 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 8 8
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x08 J?
+U 1 1 5B71F223
+P 1550 2300
+F 0 "J?" H 1470 1675 50  0000 C CNN
+F 1 "RFID_RC522" H 1470 1766 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x08_Pitch2.54mm" H 1550 2300 50  0001 C CNN
+F 3 "~" H 1550 2300 50  0001 C CNN
+	1    1550 2300
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B71F699
+P 1900 2600
+F 0 "#PWR?" H 1900 2450 50  0001 C CNN
+F 1 "+3V3" H 1915 2773 50  0000 C CNN
+F 2 "" H 1900 2600 50  0001 C CNN
+F 3 "" H 1900 2600 50  0001 C CNN
+	1    1900 2600
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	1750 2600 1900 2600
+Wire Wire Line
+	1750 2500 2100 2500
+Wire Wire Line
+	1750 2400 2100 2400
+$Comp
+L power:GND #PWR?
+U 1 1 5B71F74D
+P 2100 2400
+F 0 "#PWR?" H 2100 2150 50  0001 C CNN
+F 1 "GND" V 2105 2272 50  0000 R CNN
+F 2 "" H 2100 2400 50  0001 C CNN
+F 3 "" H 2100 2400 50  0001 C CNN
+	1    2100 2400
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	1750 2300 2050 2300
+Text HLabel 2050 2300 2    50   Input ~ 0
+IRQ
+Wire Wire Line
+	1750 2200 2050 2200
+Wire Wire Line
+	1750 2100 2050 2100
+Wire Wire Line
+	1750 2000 2050 2000
+Wire Wire Line
+	1750 1900 2050 1900
+Text HLabel 2050 2200 2    50   Input ~ 0
+MISO_RF
+Text HLabel 2050 2100 2    50   Input ~ 0
+MOSI_RF
+Text HLabel 2050 2000 2    50   Input ~ 0
+SCK_RF
+Text HLabel 2050 1900 2    50   Input ~ 0
+SDA_RF
+Text HLabel 2100 2500 2    50   Input ~ 0
+RST_RF
+$EndSCHEMATC

+ 0 - 608
_saved_main.sch

@@ -1,608 +0,0 @@
-EESchema Schematic File Version 4
-LIBS:vinhome-cache
-EELAYER 26 0
-EELAYER END
-$Descr A4 11693 8268
-encoding utf-8
-Sheet 6 6
-Title ""
-Date ""
-Rev ""
-Comp ""
-Comment1 ""
-Comment2 ""
-Comment3 ""
-Comment4 ""
-$EndDescr
-$Comp
-L ESP8266:ESP-12E U?
-U 1 1 5B61664F
-P 4800 3150
-F 0 "U?" H 4800 3915 50  0000 C CNN
-F 1 "ESP-12E" H 4800 3824 50  0000 C CNN
-F 2 "ESP8266:ESP-12E_SMD" H 4800 3150 50  0001 C CNN
-F 3 "" H 4800 3150 50  0001 C CNN
-	1    4800 3150
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	3900 2850 3600 2850
-Text Label 3650 2850 0    50   ~ 0
-RST
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B618403
-P 3750 3550
-F 0 "#PWR?" H 3750 3400 50  0001 C CNN
-F 1 "+3V3" V 3765 3678 50  0000 L CNN
-F 2 "" H 3750 3550 50  0001 C CNN
-F 3 "" H 3750 3550 50  0001 C CNN
-	1    3750 3550
-	0    -1   -1   0   
-$EndComp
-Wire Wire Line
-	3900 3550 3800 3550
-$Comp
-L power:GND #PWR?
-U 1 1 5B6184D1
-P 5900 3550
-F 0 "#PWR?" H 5900 3300 50  0001 C CNN
-F 1 "GND" V 5905 3422 50  0000 R CNN
-F 2 "" H 5900 3550 50  0001 C CNN
-F 3 "" H 5900 3550 50  0001 C CNN
-	1    5900 3550
-	0    -1   -1   0   
-$EndComp
-Wire Wire Line
-	5700 3550 5900 3550
-$Comp
-L device:C_Small C?
-U 1 1 5B618730
-P 3800 3750
-F 0 "C?" H 3892 3796 50  0000 L CNN
-F 1 "105" H 3892 3705 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 3800 3750 50  0001 C CNN
-F 3 "" H 3800 3750 50  0001 C CNN
-	1    3800 3750
-	1    0    0    -1  
-$EndComp
-$Comp
-L power:GND #PWR?
-U 1 1 5B618843
-P 3800 3950
-F 0 "#PWR?" H 3800 3700 50  0001 C CNN
-F 1 "GND" H 3805 3777 50  0000 C CNN
-F 2 "" H 3800 3950 50  0001 C CNN
-F 3 "" H 3800 3950 50  0001 C CNN
-	1    3800 3950
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	3800 3650 3800 3550
-Connection ~ 3800 3550
-Wire Wire Line
-	3800 3550 3750 3550
-Wire Wire Line
-	3800 3850 3800 3950
-NoConn ~ 3900 2950
-Wire Wire Line
-	3900 3050 3600 3050
-Text Label 3650 3050 0    50   ~ 0
-CH_PD
-Wire Wire Line
-	3900 3150 3600 3150
-Wire Wire Line
-	3900 3250 3600 3250
-Wire Wire Line
-	3600 3350 3900 3350
-Wire Wire Line
-	3900 3450 3600 3450
-Wire Wire Line
-	5700 3250 6000 3250
-Wire Wire Line
-	5700 3350 6000 3350
-Wire Wire Line
-	5700 3450 6000 3450
-Wire Wire Line
-	4550 4050 4550 4250
-Wire Wire Line
-	4650 4050 4650 4250
-Wire Wire Line
-	4750 4050 4750 4250
-Wire Wire Line
-	4850 4050 4850 4250
-Wire Wire Line
-	4950 4050 4950 4250
-Wire Wire Line
-	5050 4050 5050 4250
-$Comp
-L device:R R?
-U 1 1 5B61A13D
-P 1250 2050
-F 0 "R?" V 1150 2050 50  0000 C CNN
-F 1 "12k" V 1250 2050 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1180 2050 50  0001 C CNN
-F 3 "" H 1250 2050 50  0001 C CNN
-	1    1250 2050
-	0    1    1    0   
-$EndComp
-$Comp
-L device:R R?
-U 1 1 5B61A490
-P 1250 2250
-F 0 "R?" V 1150 2250 50  0000 C CNN
-F 1 "12k" V 1250 2250 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1180 2250 50  0001 C CNN
-F 3 "" H 1250 2250 50  0001 C CNN
-	1    1250 2250
-	0    1    1    0   
-$EndComp
-$Comp
-L device:R R?
-U 1 1 5B61A4C8
-P 1250 2450
-F 0 "R?" V 1150 2450 50  0000 C CNN
-F 1 "12k" V 1250 2450 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1180 2450 50  0001 C CNN
-F 3 "" H 1250 2450 50  0001 C CNN
-	1    1250 2450
-	0    1    1    0   
-$EndComp
-$Comp
-L device:R R?
-U 1 1 5B61A4EA
-P 1250 2650
-F 0 "R?" V 1150 2650 50  0000 C CNN
-F 1 "12k" V 1250 2650 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1180 2650 50  0001 C CNN
-F 3 "" H 1250 2650 50  0001 C CNN
-	1    1250 2650
-	0    1    1    0   
-$EndComp
-$Comp
-L device:R R?
-U 1 1 5B61A5B4
-P 1250 2850
-F 0 "R?" V 1150 2850 50  0000 C CNN
-F 1 "12k" V 1250 2850 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1180 2850 50  0001 C CNN
-F 3 "" H 1250 2850 50  0001 C CNN
-	1    1250 2850
-	0    1    1    0   
-$EndComp
-Wire Wire Line
-	1100 2650 1000 2650
-Wire Wire Line
-	1000 2450 1100 2450
-Wire Wire Line
-	1100 2250 1000 2250
-Wire Wire Line
-	1100 2050 1000 2050
-Wire Wire Line
-	1000 2650 1000 2450
-Connection ~ 1000 2250
-Wire Wire Line
-	1000 2250 1000 2050
-Connection ~ 1000 2450
-Wire Wire Line
-	1000 2450 1000 2250
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B61BD51
-P 1000 1950
-F 0 "#PWR?" H 1000 1800 50  0001 C CNN
-F 1 "+3V3" H 1015 2123 50  0000 C CNN
-F 2 "" H 1000 1950 50  0001 C CNN
-F 3 "" H 1000 1950 50  0001 C CNN
-	1    1000 1950
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	1000 2050 1000 1950
-Connection ~ 1000 2050
-Wire Wire Line
-	1400 2050 1650 2050
-Wire Wire Line
-	1400 2250 1650 2250
-Wire Wire Line
-	1400 2450 1650 2450
-Wire Wire Line
-	1100 2850 1000 2850
-$Comp
-L power:GND #PWR?
-U 1 1 5B61EC07
-P 1000 2950
-F 0 "#PWR?" H 1000 2700 50  0001 C CNN
-F 1 "GND" H 1005 2777 50  0000 C CNN
-F 2 "" H 1000 2950 50  0001 C CNN
-F 3 "" H 1000 2950 50  0001 C CNN
-	1    1000 2950
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	1000 2950 1000 2850
-Text Label 1450 2050 0    50   ~ 0
-GPIO0
-Text Label 1450 2250 0    50   ~ 0
-GPIO2
-Text Label 1450 2450 0    50   ~ 0
-CH_PD
-Text Label 1450 2650 0    50   ~ 0
-RST
-Text Label 1450 2850 0    50   ~ 0
-GPIO15
-$Comp
-L device:C_Small C?
-U 1 1 5B620CF1
-P 2000 2750
-F 0 "C?" H 2092 2796 50  0000 L CNN
-F 1 "103" H 2092 2705 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 2000 2750 50  0001 C CNN
-F 3 "" H 2000 2750 50  0001 C CNN
-	1    2000 2750
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	1400 2850 1800 2850
-$Comp
-L power:GND #PWR?
-U 1 1 5B621FFB
-P 2000 2950
-F 0 "#PWR?" H 2000 2700 50  0001 C CNN
-F 1 "GND" H 2005 2777 50  0000 C CNN
-F 2 "" H 2000 2950 50  0001 C CNN
-F 3 "" H 2000 2950 50  0001 C CNN
-	1    2000 2950
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	1400 2650 2000 2650
-Wire Wire Line
-	2000 2950 2000 2850
-Text HLabel 6000 2850 2    50   Input ~ 0
-TXD
-Text HLabel 6000 2950 2    50   Input ~ 0
-RXD
-Wire Wire Line
-	5700 2850 6000 2850
-Wire Wire Line
-	5700 2950 6000 2950
-Wire Wire Line
-	5700 3050 6000 3050
-Wire Wire Line
-	5700 3150 6000 3150
-Text HLabel 6000 3050 2    50   Input ~ 0
-P.5
-Text HLabel 6000 3150 2    50   Input ~ 0
-P.4
-Text HLabel 6000 3250 2    50   Input ~ 0
-P.0
-Text HLabel 6000 3350 2    50   Input ~ 0
-P.2
-Text HLabel 6000 3450 2    50   Input ~ 0
-P.15
-Text HLabel 4650 4250 3    50   Input ~ 0
-MISO
-Text HLabel 4750 4250 3    50   Input ~ 0
-P.9
-Text HLabel 4850 4250 3    50   Input ~ 0
-P.10
-Text HLabel 4950 4250 3    50   Input ~ 0
-MOSI
-Text HLabel 5050 4250 3    50   Input ~ 0
-SCLK
-Text HLabel 3600 3150 0    50   Input ~ 0
-P.16
-Text HLabel 3600 3250 0    50   Input ~ 0
-P.14
-Text HLabel 3600 3350 0    50   Input ~ 0
-P.12
-Text HLabel 3600 3450 0    50   Input ~ 0
-P.13
-NoConn ~ 4550 4250
-Text Label 5700 3450 0    50   ~ 0
-GPIO15
-Text Label 5700 3250 0    50   ~ 0
-GPIO0
-Text Label 5700 3350 0    50   ~ 0
-GPIO2
-$Comp
-L Connector:Conn_01x02 J?
-U 1 1 5B62DC1E
-P 1050 3700
-F 0 "J?" H 970 3375 50  0000 C CNN
-F 1 "select boot" H 970 3466 50  0000 C CNN
-F 2 "Pin_Headers:Pin_Header_Straight_1x02_Pitch2.54mm" H 1050 3700 50  0001 C CNN
-F 3 "~" H 1050 3700 50  0001 C CNN
-	1    1050 3700
-	-1   0    0    1   
-$EndComp
-$Comp
-L power:GND #PWR?
-U 1 1 5B62E025
-P 1400 3750
-F 0 "#PWR?" H 1400 3500 50  0001 C CNN
-F 1 "GND" H 1405 3577 50  0000 C CNN
-F 2 "" H 1400 3750 50  0001 C CNN
-F 3 "" H 1400 3750 50  0001 C CNN
-	1    1400 3750
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	1250 3700 1400 3700
-Wire Wire Line
-	1400 3700 1400 3750
-Wire Wire Line
-	1250 3600 1600 3600
-Text Label 1350 3600 0    50   ~ 0
-GPIO0
-$Comp
-L MCU_ST_STM8:STM8S003F3P U?
-U 1 1 5B69698B
-P 8750 3250
-F 0 "U?" H 8750 4228 50  0000 C CNN
-F 1 "STM8S003F3P" H 8750 4137 50  0000 C CNN
-F 2 "Housings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mm" H 7600 2450 50  0001 L CIN
-F 3 "http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00024550.pdf" H 8700 2850 50  0001 C CNN
-	1    8750 3250
-	1    0    0    -1  
-$EndComp
-$Comp
-L device:C_Small C?
-U 1 1 5B69841A
-P 7300 4050
-F 0 "C?" H 7392 4096 50  0000 L CNN
-F 1 "104" H 7392 4005 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 7300 4050 50  0001 C CNN
-F 3 "" H 7300 4050 50  0001 C CNN
-	1    7300 4050
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7300 3950 7300 3850
-Wire Wire Line
-	7300 3850 7450 3850
-$Comp
-L power:GND #PWR?
-U 1 1 5B698F7D
-P 8750 4400
-F 0 "#PWR?" H 8750 4150 50  0001 C CNN
-F 1 "GND" H 8755 4227 50  0000 C CNN
-F 2 "" H 8750 4400 50  0001 C CNN
-F 3 "" H 8750 4400 50  0001 C CNN
-	1    8750 4400
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	8750 4400 8750 4150
-$Comp
-L power:GND #PWR?
-U 1 1 5B699A1E
-P 7300 4300
-F 0 "#PWR?" H 7300 4050 50  0001 C CNN
-F 1 "GND" H 7305 4127 50  0000 C CNN
-F 2 "" H 7300 4300 50  0001 C CNN
-F 3 "" H 7300 4300 50  0001 C CNN
-	1    7300 4300
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7300 4300 7300 4150
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B69A7B0
-P 8750 2200
-F 0 "#PWR?" H 8750 2050 50  0001 C CNN
-F 1 "+3V3" H 8765 2373 50  0000 C CNN
-F 2 "" H 8750 2200 50  0001 C CNN
-F 3 "" H 8750 2200 50  0001 C CNN
-	1    8750 2200
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	8750 2200 8750 2300
-$Comp
-L device:C_Small C?
-U 1 1 5B69B71F
-P 9000 2300
-F 0 "C?" V 8771 2300 50  0000 C CNN
-F 1 "104" V 8862 2300 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 9000 2300 50  0001 C CNN
-F 3 "" H 9000 2300 50  0001 C CNN
-	1    9000 2300
-	0    1    1    0   
-$EndComp
-Wire Wire Line
-	8900 2300 8750 2300
-Connection ~ 8750 2300
-Wire Wire Line
-	8750 2300 8750 2450
-$Comp
-L power:GND #PWR?
-U 1 1 5B69C3FA
-P 9250 2300
-F 0 "#PWR?" H 9250 2050 50  0001 C CNN
-F 1 "GND" H 9255 2127 50  0000 C CNN
-F 2 "" H 9250 2300 50  0001 C CNN
-F 3 "" H 9250 2300 50  0001 C CNN
-	1    9250 2300
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	9100 2300 9250 2300
-$Comp
-L device:R R?
-U 1 1 5B69D306
-P 7400 2450
-F 0 "R?" H 7470 2496 50  0000 L CNN
-F 1 "103" H 7470 2405 50  0000 L CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 7330 2450 50  0001 C CNN
-F 3 "" H 7400 2450 50  0001 C CNN
-	1    7400 2450
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7400 2600 7400 2750
-Wire Wire Line
-	7400 2750 7450 2750
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B69E095
-P 7400 2150
-F 0 "#PWR?" H 7400 2000 50  0001 C CNN
-F 1 "+3V3" H 7415 2323 50  0000 C CNN
-F 2 "" H 7400 2150 50  0001 C CNN
-F 3 "" H 7400 2150 50  0001 C CNN
-	1    7400 2150
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7400 2150 7400 2300
-Wire Wire Line
-	6950 2750 7400 2750
-Connection ~ 7400 2750
-Wire Wire Line
-	7450 3050 6950 3050
-Text Label 7050 2750 0    50   ~ 0
-NRST
-Text Label 7050 3050 0    50   ~ 0
-SWIM
-Wire Wire Line
-	7450 3150 6950 3150
-Text Label 7050 3150 0    50   ~ 0
-RST
-NoConn ~ 10050 2950
-NoConn ~ 10050 3150
-NoConn ~ 10050 3250
-NoConn ~ 10050 3450
-NoConn ~ 10050 3550
-NoConn ~ 10050 3650
-NoConn ~ 10050 3750
-NoConn ~ 10050 3850
-NoConn ~ 7450 3250
-NoConn ~ 7450 3350
-NoConn ~ 7450 3450
-NoConn ~ 7450 3550
-$Comp
-L Connector:Conn_01x04 J?
-U 1 1 5B6AC160
-P 6750 1200
-F 0 "J?" H 6670 775 50  0000 C CNN
-F 1 "nap stm8" H 6670 866 50  0000 C CNN
-F 2 "Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm" H 6750 1200 50  0001 C CNN
-F 3 "~" H 6750 1200 50  0001 C CNN
-	1    6750 1200
-	-1   0    0    1   
-$EndComp
-Wire Wire Line
-	6950 1000 7200 1000
-Wire Wire Line
-	6950 1100 7200 1100
-Wire Wire Line
-	6950 1200 7200 1200
-Wire Wire Line
-	6950 1300 7200 1300
-$Comp
-L power:GND #PWR?
-U 1 1 5B6B301A
-P 7200 1300
-F 0 "#PWR?" H 7200 1050 50  0001 C CNN
-F 1 "GND" H 7205 1127 50  0000 C CNN
-F 2 "" H 7200 1300 50  0001 C CNN
-F 3 "" H 7200 1300 50  0001 C CNN
-	1    7200 1300
-	1    0    0    -1  
-$EndComp
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B6B30D6
-P 7200 1000
-F 0 "#PWR?" H 7200 850 50  0001 C CNN
-F 1 "+3V3" H 7215 1173 50  0000 C CNN
-F 2 "" H 7200 1000 50  0001 C CNN
-F 3 "" H 7200 1000 50  0001 C CNN
-	1    7200 1000
-	1    0    0    -1  
-$EndComp
-Text Label 7000 1100 0    50   ~ 0
-SWIM
-Text Label 7000 1200 0    50   ~ 0
-NRST
-$Comp
-L device:Crystal_GND23 Y?
-U 1 1 5B6B527A
-P 10450 2750
-F 0 "Y?" V 10404 2991 50  0000 L CNN
-F 1 "Crystal_GND23" V 10495 2991 50  0000 L CNN
-F 2 "Crystals:Crystal_SMD_EuroQuartz_X22-4pin_2.5x2.0mm" H 10450 2750 50  0001 C CNN
-F 3 "" H 10450 2750 50  0001 C CNN
-	1    10450 2750
-	0    1    1    0   
-$EndComp
-Wire Wire Line
-	10050 2850 10200 2850
-Wire Wire Line
-	10200 2850 10200 3000
-Wire Wire Line
-	10200 3000 10450 3000
-Wire Wire Line
-	10450 3000 10450 2900
-Wire Wire Line
-	10050 2750 10050 2550
-Wire Wire Line
-	10050 2550 10450 2550
-Wire Wire Line
-	10450 2550 10450 2600
-$Comp
-L device:C_Small C?
-U 1 1 5B6BAFD9
-P 10650 3000
-F 0 "C?" V 10421 3000 50  0000 C CNN
-F 1 "20pF" V 10512 3000 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805" H 10650 3000 50  0001 C CNN
-F 3 "" H 10650 3000 50  0001 C CNN
-	1    10650 3000
-	0    1    1    0   
-$EndComp
-$Comp
-L device:C_Small C?
-U 1 1 5B6BB094
-P 10650 2550
-F 0 "C?" V 10421 2550 50  0000 C CNN
-F 1 "20pF" V 10512 2550 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805" H 10650 2550 50  0001 C CNN
-F 3 "" H 10650 2550 50  0001 C CNN
-	1    10650 2550
-	0    1    1    0   
-$EndComp
-Wire Wire Line
-	10450 2550 10550 2550
-Connection ~ 10450 2550
-Wire Wire Line
-	10450 3000 10550 3000
-Connection ~ 10450 3000
-Wire Wire Line
-	10750 2550 10750 2750
-Wire Wire Line
-	10650 2750 10750 2750
-Connection ~ 10750 2750
-Wire Wire Line
-	10750 2750 10750 3000
-$Comp
-L power:GND #PWR?
-U 1 1 5B6C7C4B
-P 10750 3100
-F 0 "#PWR?" H 10750 2850 50  0001 C CNN
-F 1 "GND" H 10755 2927 50  0000 C CNN
-F 2 "" H 10750 3100 50  0001 C CNN
-F 3 "" H 10750 3100 50  0001 C CNN
-	1    10750 3100
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	10750 3100 10750 3000
-Connection ~ 10750 3000
-Wire Wire Line
-	10250 2750 10650 2750
-Connection ~ 10650 2750
-$EndSCHEMATC

+ 340 - 0
atmega328.bak

@@ -0,0 +1,340 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 6 8
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L atmel:ATMEGA328P-AU U?
+U 1 1 5B6CC01A
+P 5700 4150
+F 0 "U?" H 5750 5517 50  0000 C CNN
+F 1 "ATMEGA328P-AU" H 5750 5426 50  0000 C CNN
+F 2 "Housings_QFP:TQFP-32_7x7mm_Pitch0.8mm" H 5700 4150 50  0001 C CIN
+F 3 "http://www.atmel.com/images/atmel-8271-8-bit-avr-microcontroller-atmega48a-48pa-88a-88pa-168a-168pa-328-328p_datasheet.pdf" H 5700 4150 50  0001 C CNN
+	1    5700 4150
+	1    0    0    -1  
+$EndComp
+NoConn ~ 4800 4400
+NoConn ~ 4800 4500
+Connection ~ 4800 5250
+$Comp
+L power:GND #PWR?
+U 1 1 5B6CC2E7
+P 4800 5400
+F 0 "#PWR?" H 4800 5150 50  0001 C CNN
+F 1 "GND" H 4805 5227 50  0000 C CNN
+F 2 "" H 4800 5400 50  0001 C CNN
+F 3 "" H 4800 5400 50  0001 C CNN
+	1    4800 5400
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	4800 5150 4800 5250
+Wire Wire Line
+	4800 5400 4800 5350
+Wire Wire Line
+	4800 5250 4800 5350
+Connection ~ 4800 5350
+Wire Wire Line
+	4800 3650 4800 3350
+Connection ~ 4800 3150
+Wire Wire Line
+	4800 3150 4800 3050
+Connection ~ 4800 3350
+Wire Wire Line
+	4800 3350 4800 3150
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6CC572
+P 4800 2850
+F 0 "#PWR?" H 4800 2700 50  0001 C CNN
+F 1 "+3V3" H 4815 3023 50  0000 C CNN
+F 2 "" H 4800 2850 50  0001 C CNN
+F 3 "" H 4800 2850 50  0001 C CNN
+	1    4800 2850
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	4800 2850 4800 3050
+Connection ~ 4800 3050
+$Comp
+L device:C_Small C?
+U 1 1 5B6CC796
+P 4700 3650
+F 0 "C?" V 4471 3650 50  0000 C CNN
+F 1 "104" V 4562 3650 50  0000 C CNN
+F 2 "" H 4700 3650 50  0001 C CNN
+F 3 "" H 4700 3650 50  0001 C CNN
+	1    4700 3650
+	0    1    1    0   
+$EndComp
+Connection ~ 4800 3650
+$Comp
+L power:GND #PWR?
+U 1 1 5B6CC845
+P 4500 3650
+F 0 "#PWR?" H 4500 3400 50  0001 C CNN
+F 1 "GND" H 4505 3477 50  0000 C CNN
+F 2 "" H 4500 3650 50  0001 C CNN
+F 3 "" H 4500 3650 50  0001 C CNN
+	1    4500 3650
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	4600 3650 4500 3650
+$Comp
+L device:Crystal_GND24_Small Y?
+U 1 1 5B6CCC42
+P 7000 3700
+F 0 "Y?" V 6954 3866 50  0000 L CNN
+F 1 "16MHZ" V 7045 3866 50  0000 L CNN
+F 2 "Crystals:Crystal_SMD_5032-4pin_5.0x3.2mm" H 7000 3700 50  0001 C CNN
+F 3 "" H 7000 3700 50  0001 C CNN
+	1    7000 3700
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	6850 3650 6850 3600
+Wire Wire Line
+	6850 3600 7000 3600
+Wire Wire Line
+	6700 3650 6850 3650
+Wire Wire Line
+	6700 3750 6850 3750
+Wire Wire Line
+	6850 3750 6850 3800
+Wire Wire Line
+	6850 3800 7000 3800
+$Comp
+L device:C_Small C?
+U 1 1 5B6CD364
+P 7300 3600
+F 0 "C?" V 7071 3600 50  0000 C CNN
+F 1 "20pF" V 7162 3600 50  0000 C CNN
+F 2 "" H 7300 3600 50  0001 C CNN
+F 3 "" H 7300 3600 50  0001 C CNN
+	1    7300 3600
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	7200 3600 7000 3600
+Connection ~ 7000 3600
+$Comp
+L device:C_Small C?
+U 1 1 5B6CD756
+P 7300 3800
+F 0 "C?" V 7071 3800 50  0000 C CNN
+F 1 "20pF" V 7400 3850 50  0000 C CNN
+F 2 "" H 7300 3800 50  0001 C CNN
+F 3 "" H 7300 3800 50  0001 C CNN
+	1    7300 3800
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	7000 3800 7200 3800
+Connection ~ 7000 3800
+$Comp
+L power:GND #PWR?
+U 1 1 5B6CDA03
+P 7500 3700
+F 0 "#PWR?" H 7500 3450 50  0001 C CNN
+F 1 "GND" V 7505 3572 50  0000 R CNN
+F 2 "" H 7500 3700 50  0001 C CNN
+F 3 "" H 7500 3700 50  0001 C CNN
+	1    7500 3700
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	7400 3600 7400 3700
+Wire Wire Line
+	6875 3700 7125 3700
+Connection ~ 7400 3700
+Wire Wire Line
+	7400 3700 7400 3800
+Connection ~ 7125 3700
+Wire Wire Line
+	7125 3700 7400 3700
+Wire Wire Line
+	6700 4650 6915 4650
+Wire Wire Line
+	6700 4750 6910 4750
+Text Label 6775 4650 0    50   ~ 0
+RXD_AT
+Text Label 6785 4750 0    50   ~ 0
+TXD_AT
+Text Label 6800 4500 0    50   ~ 0
+RESET
+Wire Wire Line
+	6700 3050 7000 3050
+Wire Wire Line
+	6700 3150 7000 3150
+Wire Wire Line
+	6700 3250 7000 3250
+Wire Wire Line
+	6700 3350 7000 3350
+Wire Wire Line
+	6700 3450 7000 3450
+Wire Wire Line
+	6700 3550 7000 3550
+Wire Wire Line
+	6700 3900 7000 3900
+Wire Wire Line
+	6700 4000 7000 4000
+Wire Wire Line
+	6700 4100 7000 4100
+Wire Wire Line
+	6700 4200 7000 4200
+Wire Wire Line
+	6700 4300 7000 4300
+Wire Wire Line
+	6700 4400 7000 4400
+Wire Wire Line
+	6700 4850 6950 4850
+Wire Wire Line
+	6700 4950 6950 4950
+Wire Wire Line
+	6700 5050 6950 5050
+Wire Wire Line
+	6700 5150 6950 5150
+Wire Wire Line
+	6700 5250 6950 5250
+Wire Wire Line
+	6700 5350 6950 5350
+Text HLabel 7000 3050 2    50   Input ~ 0
+PB0
+Text HLabel 7000 3150 2    50   Input ~ 0
+PB1
+Text HLabel 7000 3250 2    50   Input ~ 0
+PB2
+Text HLabel 7000 3350 2    50   Input ~ 0
+MOSI
+Text HLabel 7000 3450 2    50   Input ~ 0
+MISO
+Text HLabel 7000 3550 2    50   Input ~ 0
+SCK
+Text HLabel 7000 3900 2    50   Input ~ 0
+PC0
+Text HLabel 7000 4000 2    50   Input ~ 0
+PC1
+Text HLabel 7000 4100 2    50   Input ~ 0
+PC2
+Text HLabel 7000 4200 2    50   Input ~ 0
+PC3
+Text HLabel 7000 4300 2    50   Input ~ 0
+SDA
+Text HLabel 7000 4400 2    50   Input ~ 0
+SCL
+Text HLabel 6950 4850 2    50   Input ~ 0
+PD2
+Text HLabel 6950 4950 2    50   Input ~ 0
+PD3
+Text HLabel 6950 5050 2    50   Input ~ 0
+PD4
+Text HLabel 6950 5150 2    50   Input ~ 0
+PD5
+Text HLabel 6950 5250 2    50   Input ~ 0
+PD6
+Text HLabel 6950 5350 2    50   Input ~ 0
+PD7
+$Comp
+L Connector:Conn_01x05 J?
+U 1 1 5B6D7EF3
+P 1350 1550
+F 0 "J?" H 1270 1125 50  0000 C CNN
+F 1 "nap serial atmega328" H 1450 1250 50  0000 C CNN
+F 2 "" H 1350 1550 50  0001 C CNN
+F 3 "~" H 1350 1550 50  0001 C CNN
+	1    1350 1550
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6D8146
+P 1650 1750
+F 0 "#PWR?" H 1650 1600 50  0001 C CNN
+F 1 "+3V3" H 1665 1923 50  0000 C CNN
+F 2 "" H 1650 1750 50  0001 C CNN
+F 3 "" H 1650 1750 50  0001 C CNN
+	1    1650 1750
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	1550 1750 1650 1750
+$Comp
+L power:GND #PWR?
+U 1 1 5B6D8D77
+P 1750 1650
+F 0 "#PWR?" H 1750 1400 50  0001 C CNN
+F 1 "GND" V 1755 1522 50  0000 R CNN
+F 2 "" H 1750 1650 50  0001 C CNN
+F 3 "" H 1750 1650 50  0001 C CNN
+	1    1750 1650
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	1550 1650 1750 1650
+Wire Wire Line
+	1550 1550 1850 1550
+Text Label 1650 1550 0    50   ~ 0
+TXD_AT
+Wire Wire Line
+	1550 1450 1850 1450
+Text Label 1650 1450 0    50   ~ 0
+RXD_AT
+Wire Wire Line
+	1550 1350 1750 1350
+$Comp
+L device:C_Small C?
+U 1 1 5B6DC171
+P 1850 1350
+F 0 "C?" V 1621 1350 50  0000 C CNN
+F 1 "104" V 1712 1350 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 1850 1350 50  0001 C CNN
+F 3 "" H 1850 1350 50  0001 C CNN
+	1    1850 1350
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	1950 1350 2200 1350
+Text Label 2000 1350 0    50   ~ 0
+RESET
+Wire Wire Line
+	6700 4500 7400 4500
+$Comp
+L device:R R?
+U 1 1 5B6EB8E6
+P 7550 4500
+F 0 "R?" V 7757 4500 50  0000 C CNN
+F 1 "10k" V 7666 4500 50  0000 C CNN
+F 2 "Resistors_SMD:R_0805_HandSoldering" V 7480 4500 50  0001 C CNN
+F 3 "" H 7550 4500 50  0001 C CNN
+	1    7550 4500
+	0    -1   -1   0   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6ECCB2
+P 7800 4500
+F 0 "#PWR?" H 7800 4350 50  0001 C CNN
+F 1 "+3V3" V 7815 4628 50  0000 L CNN
+F 2 "" H 7800 4500 50  0001 C CNN
+F 3 "" H 7800 4500 50  0001 C CNN
+	1    7800 4500
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	7700 4500 7800 4500
+Wire Wire Line
+	7400 3700 7500 3700
+$EndSCHEMATC

+ 340 - 0
atmega328.sch

@@ -0,0 +1,340 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 6 8
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L atmel:ATMEGA328P-AU U?
+U 1 1 5B6CC01A
+P 5700 4150
+F 0 "U?" H 5750 5517 50  0000 C CNN
+F 1 "ATMEGA328P-AU" H 5750 5426 50  0000 C CNN
+F 2 "Housings_QFP:TQFP-32_7x7mm_Pitch0.8mm" H 5700 4150 50  0001 C CIN
+F 3 "http://www.atmel.com/images/atmel-8271-8-bit-avr-microcontroller-atmega48a-48pa-88a-88pa-168a-168pa-328-328p_datasheet.pdf" H 5700 4150 50  0001 C CNN
+	1    5700 4150
+	1    0    0    -1  
+$EndComp
+NoConn ~ 4800 4400
+NoConn ~ 4800 4500
+Connection ~ 4800 5250
+$Comp
+L power:GND #PWR?
+U 1 1 5B6CC2E7
+P 4800 5400
+F 0 "#PWR?" H 4800 5150 50  0001 C CNN
+F 1 "GND" H 4805 5227 50  0000 C CNN
+F 2 "" H 4800 5400 50  0001 C CNN
+F 3 "" H 4800 5400 50  0001 C CNN
+	1    4800 5400
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	4800 5150 4800 5250
+Wire Wire Line
+	4800 5400 4800 5350
+Wire Wire Line
+	4800 5250 4800 5350
+Connection ~ 4800 5350
+Wire Wire Line
+	4800 3650 4800 3350
+Connection ~ 4800 3150
+Wire Wire Line
+	4800 3150 4800 3050
+Connection ~ 4800 3350
+Wire Wire Line
+	4800 3350 4800 3150
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6CC572
+P 4800 2850
+F 0 "#PWR?" H 4800 2700 50  0001 C CNN
+F 1 "+3V3" H 4815 3023 50  0000 C CNN
+F 2 "" H 4800 2850 50  0001 C CNN
+F 3 "" H 4800 2850 50  0001 C CNN
+	1    4800 2850
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	4800 2850 4800 3050
+Connection ~ 4800 3050
+$Comp
+L device:C_Small C?
+U 1 1 5B6CC796
+P 4700 3650
+F 0 "C?" V 4471 3650 50  0000 C CNN
+F 1 "104" V 4562 3650 50  0000 C CNN
+F 2 "" H 4700 3650 50  0001 C CNN
+F 3 "" H 4700 3650 50  0001 C CNN
+	1    4700 3650
+	0    1    1    0   
+$EndComp
+Connection ~ 4800 3650
+$Comp
+L power:GND #PWR?
+U 1 1 5B6CC845
+P 4500 3650
+F 0 "#PWR?" H 4500 3400 50  0001 C CNN
+F 1 "GND" H 4505 3477 50  0000 C CNN
+F 2 "" H 4500 3650 50  0001 C CNN
+F 3 "" H 4500 3650 50  0001 C CNN
+	1    4500 3650
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	4600 3650 4500 3650
+$Comp
+L device:Crystal_GND24_Small Y?
+U 1 1 5B6CCC42
+P 7000 3700
+F 0 "Y?" V 6954 3866 50  0000 L CNN
+F 1 "16MHZ" V 7045 3866 50  0000 L CNN
+F 2 "Crystals:Crystal_SMD_5032-4pin_5.0x3.2mm" H 7000 3700 50  0001 C CNN
+F 3 "" H 7000 3700 50  0001 C CNN
+	1    7000 3700
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	6850 3650 6850 3600
+Wire Wire Line
+	6850 3600 7000 3600
+Wire Wire Line
+	6700 3650 6850 3650
+Wire Wire Line
+	6700 3750 6850 3750
+Wire Wire Line
+	6850 3750 6850 3800
+Wire Wire Line
+	6850 3800 7000 3800
+$Comp
+L device:C_Small C?
+U 1 1 5B6CD364
+P 7300 3600
+F 0 "C?" V 7071 3600 50  0000 C CNN
+F 1 "20pF" V 7162 3600 50  0000 C CNN
+F 2 "" H 7300 3600 50  0001 C CNN
+F 3 "" H 7300 3600 50  0001 C CNN
+	1    7300 3600
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	7200 3600 7000 3600
+Connection ~ 7000 3600
+$Comp
+L device:C_Small C?
+U 1 1 5B6CD756
+P 7300 3800
+F 0 "C?" V 7071 3800 50  0000 C CNN
+F 1 "20pF" V 7400 3850 50  0000 C CNN
+F 2 "" H 7300 3800 50  0001 C CNN
+F 3 "" H 7300 3800 50  0001 C CNN
+	1    7300 3800
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	7000 3800 7200 3800
+Connection ~ 7000 3800
+$Comp
+L power:GND #PWR?
+U 1 1 5B6CDA03
+P 7500 3700
+F 0 "#PWR?" H 7500 3450 50  0001 C CNN
+F 1 "GND" V 7505 3572 50  0000 R CNN
+F 2 "" H 7500 3700 50  0001 C CNN
+F 3 "" H 7500 3700 50  0001 C CNN
+	1    7500 3700
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	7400 3600 7400 3700
+Wire Wire Line
+	6875 3700 7125 3700
+Connection ~ 7400 3700
+Wire Wire Line
+	7400 3700 7400 3800
+Connection ~ 7125 3700
+Wire Wire Line
+	7125 3700 7400 3700
+Wire Wire Line
+	6700 4650 6915 4650
+Wire Wire Line
+	6700 4750 6910 4750
+Text Label 6775 4650 0    50   ~ 0
+RXD_AT
+Text Label 6785 4750 0    50   ~ 0
+TXD_AT
+Text Label 6800 4500 0    50   ~ 0
+RESET
+Wire Wire Line
+	6700 3050 7000 3050
+Wire Wire Line
+	6700 3150 7000 3150
+Wire Wire Line
+	6700 3250 7000 3250
+Wire Wire Line
+	6700 3350 7000 3350
+Wire Wire Line
+	6700 3450 7000 3450
+Wire Wire Line
+	6700 3550 7000 3550
+Wire Wire Line
+	6700 3900 7000 3900
+Wire Wire Line
+	6700 4000 7000 4000
+Wire Wire Line
+	6700 4100 7000 4100
+Wire Wire Line
+	6700 4200 7000 4200
+Wire Wire Line
+	6700 4300 7000 4300
+Wire Wire Line
+	6700 4400 7000 4400
+Wire Wire Line
+	6700 4850 6950 4850
+Wire Wire Line
+	6700 4950 6950 4950
+Wire Wire Line
+	6700 5050 6950 5050
+Wire Wire Line
+	6700 5150 6950 5150
+Wire Wire Line
+	6700 5250 6950 5250
+Wire Wire Line
+	6700 5350 6950 5350
+Text HLabel 7000 3050 2    50   Input ~ 0
+PB0
+Text HLabel 7000 3150 2    50   Input ~ 0
+PB1
+Text HLabel 7000 3250 2    50   Input ~ 0
+PB2
+Text HLabel 7000 3350 2    50   Input ~ 0
+MOSI
+Text HLabel 7000 3450 2    50   Input ~ 0
+MISO
+Text HLabel 7000 3550 2    50   Input ~ 0
+SCK
+Text HLabel 7000 3900 2    50   Input ~ 0
+PC0
+Text HLabel 7000 4000 2    50   Input ~ 0
+PC1
+Text HLabel 7000 4100 2    50   Input ~ 0
+PC2
+Text HLabel 7000 4200 2    50   Input ~ 0
+PC3
+Text HLabel 7000 4300 2    50   Input ~ 0
+SDA
+Text HLabel 7000 4400 2    50   Input ~ 0
+SCL
+Text HLabel 6950 4850 2    50   Input ~ 0
+PD2
+Text HLabel 6950 4950 2    50   Input ~ 0
+PD3
+Text HLabel 6950 5050 2    50   Input ~ 0
+PD4
+Text HLabel 6950 5150 2    50   Input ~ 0
+PD5
+Text HLabel 6950 5250 2    50   Input ~ 0
+PD6
+Text HLabel 6950 5350 2    50   Input ~ 0
+PD7
+$Comp
+L Connector:Conn_01x05 J?
+U 1 1 5B6D7EF3
+P 1350 1550
+F 0 "J?" H 1270 1125 50  0000 C CNN
+F 1 "nap serial atmega328" H 1450 1250 50  0000 C CNN
+F 2 "" H 1350 1550 50  0001 C CNN
+F 3 "~" H 1350 1550 50  0001 C CNN
+	1    1350 1550
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6D8146
+P 1650 1750
+F 0 "#PWR?" H 1650 1600 50  0001 C CNN
+F 1 "+3V3" H 1665 1923 50  0000 C CNN
+F 2 "" H 1650 1750 50  0001 C CNN
+F 3 "" H 1650 1750 50  0001 C CNN
+	1    1650 1750
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	1550 1750 1650 1750
+$Comp
+L power:GND #PWR?
+U 1 1 5B6D8D77
+P 1750 1650
+F 0 "#PWR?" H 1750 1400 50  0001 C CNN
+F 1 "GND" V 1755 1522 50  0000 R CNN
+F 2 "" H 1750 1650 50  0001 C CNN
+F 3 "" H 1750 1650 50  0001 C CNN
+	1    1750 1650
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	1550 1650 1750 1650
+Wire Wire Line
+	1550 1550 1850 1550
+Text Label 1650 1550 0    50   ~ 0
+TXD_AT
+Wire Wire Line
+	1550 1450 1850 1450
+Text Label 1650 1450 0    50   ~ 0
+RXD_AT
+Wire Wire Line
+	1550 1350 1750 1350
+$Comp
+L device:C_Small C?
+U 1 1 5B6DC171
+P 1850 1350
+F 0 "C?" V 1621 1350 50  0000 C CNN
+F 1 "104" V 1712 1350 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 1850 1350 50  0001 C CNN
+F 3 "" H 1850 1350 50  0001 C CNN
+	1    1850 1350
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	1950 1350 2200 1350
+Text Label 2000 1350 0    50   ~ 0
+RESET
+Wire Wire Line
+	6700 4500 7400 4500
+$Comp
+L device:R R?
+U 1 1 5B6EB8E6
+P 7550 4500
+F 0 "R?" V 7757 4500 50  0000 C CNN
+F 1 "10k" V 7666 4500 50  0000 C CNN
+F 2 "Resistors_SMD:R_0805_HandSoldering" V 7480 4500 50  0001 C CNN
+F 3 "" H 7550 4500 50  0001 C CNN
+	1    7550 4500
+	0    -1   -1   0   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6ECCB2
+P 7800 4500
+F 0 "#PWR?" H 7800 4350 50  0001 C CNN
+F 1 "+3V3" V 7815 4628 50  0000 L CNN
+F 2 "" H 7800 4500 50  0001 C CNN
+F 3 "" H 7800 4500 50  0001 C CNN
+	1    7800 4500
+	0    1    1    0   
+$EndComp
+Wire Wire Line
+	7700 4500 7800 4500
+Wire Wire Line
+	7400 3700 7500 3700
+$EndSCHEMATC

+ 1 - 1
conecter.bak

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 4 6
+Sheet 4 7
 Title ""
 Date ""
 Rev ""

+ 1 - 1
conecter.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 4 6
+Sheet 4 7
 Title ""
 Date ""
 Rev ""

+ 235 - 0
connectorsch.bak

@@ -0,0 +1,235 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 7 8
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x05 J?
+U 1 1 5B6EED46
+P 3850 1800
+F 0 "J?" H 3770 1375 50  0000 C CNN
+F 1 "connector-ESP" H 3770 1466 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x05_Pitch2.54mm" H 3850 1800 50  0001 C CNN
+F 3 "~" H 3850 1800 50  0001 C CNN
+	1    3850 1800
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B6EF154
+P 4250 2000
+F 0 "C?" V 4150 2150 50  0000 C CNN
+F 1 "104" V 4200 2150 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 4250 2000 50  0001 C CNN
+F 3 "" H 4250 2000 50  0001 C CNN
+	1    4250 2000
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6EF3C1
+P 4250 2150
+F 0 "#PWR?" H 4250 2000 50  0001 C CNN
+F 1 "+3V3" H 4265 2323 50  0000 C CNN
+F 2 "" H 4250 2150 50  0001 C CNN
+F 3 "" H 4250 2150 50  0001 C CNN
+	1    4250 2150
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	4050 2000 4050 2100
+Wire Wire Line
+	4050 2100 4250 2100
+Wire Wire Line
+	4250 2100 4250 2150
+Connection ~ 4250 2100
+Wire Wire Line
+	4050 1900 4250 1900
+Wire Wire Line
+	4250 1900 4450 1900
+Connection ~ 4250 1900
+$Comp
+L power:GND #PWR?
+U 1 1 5B6EFEBA
+P 4450 1900
+F 0 "#PWR?" H 4450 1650 50  0001 C CNN
+F 1 "GND" V 4455 1772 50  0000 R CNN
+F 2 "" H 4450 1900 50  0001 C CNN
+F 3 "" H 4450 1900 50  0001 C CNN
+	1    4450 1900
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	4050 1600 4400 1600
+Wire Wire Line
+	4050 1700 4400 1700
+Wire Wire Line
+	4050 1800 4400 1800
+Text HLabel 4400 1600 2    50   Input ~ 0
+OUT_ESP1
+Text HLabel 4400 1700 2    50   Input ~ 0
+OUT_ESP2
+Text HLabel 4400 1800 2    50   Input ~ 0
+OUT_ESP3
+$Comp
+L Connector:Conn_01x07 J?
+U 1 1 5B6F3435
+P 5450 1850
+F 0 "J?" H 5370 1325 50  0000 C CNN
+F 1 "Conn_01x07" H 5370 1416 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x07_Pitch2.54mm" H 5450 1850 50  0001 C CNN
+F 3 "~" H 5450 1850 50  0001 C CNN
+	1    5450 1850
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B6F365D
+P 5950 2150
+F 0 "C?" V 5850 2300 50  0000 C CNN
+F 1 "104" V 5900 2300 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 5950 2150 50  0001 C CNN
+F 3 "" H 5950 2150 50  0001 C CNN
+	1    5950 2150
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6F36D4
+P 5950 2350
+F 0 "#PWR?" H 5950 2200 50  0001 C CNN
+F 1 "+3V3" H 5965 2523 50  0000 C CNN
+F 2 "" H 5950 2350 50  0001 C CNN
+F 3 "" H 5950 2350 50  0001 C CNN
+	1    5950 2350
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	5650 2150 5850 2150
+Wire Wire Line
+	5850 2150 5850 2250
+Wire Wire Line
+	5850 2250 5950 2250
+Wire Wire Line
+	5950 2350 5950 2250
+Connection ~ 5950 2250
+Wire Wire Line
+	5650 2050 5950 2050
+$Comp
+L power:GND #PWR?
+U 1 1 5B6F3F67
+P 6100 2050
+F 0 "#PWR?" H 6100 1800 50  0001 C CNN
+F 1 "GND" V 6105 1922 50  0000 R CNN
+F 2 "" H 6100 2050 50  0001 C CNN
+F 3 "" H 6100 2050 50  0001 C CNN
+	1    6100 2050
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	5950 2050 6100 2050
+Connection ~ 5950 2050
+Wire Wire Line
+	5650 1550 6000 1550
+Wire Wire Line
+	5650 1650 6000 1650
+Wire Wire Line
+	5650 1750 6000 1750
+Wire Wire Line
+	5650 1850 6000 1850
+Wire Wire Line
+	5650 1950 6000 1950
+Text HLabel 6000 1550 2    50   Input ~ 0
+OUT_ESP4
+Text HLabel 6000 1650 2    50   Input ~ 0
+OUT_ESP5
+Text HLabel 6000 1750 2    50   Input ~ 0
+OUT_ESP6
+Text HLabel 6000 1850 2    50   Input ~ 0
+OUT_ESP7
+Text HLabel 6000 1950 2    50   Input ~ 0
+OUT_ESP8
+$Comp
+L Connector:Conn_01x06 J?
+U 1 1 5B6FFC44
+P 7000 1850
+F 0 "J?" H 6920 1325 50  0000 C CNN
+F 1 "Conn_01x06" H 6920 1416 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x06_Pitch2.54mm" H 7000 1850 50  0001 C CNN
+F 3 "~" H 7000 1850 50  0001 C CNN
+	1    7000 1850
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B6FFDBD
+P 7500 2050
+F 0 "C?" V 7400 2050 50  0000 C CNN
+F 1 "104" V 7600 2050 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 7500 2050 50  0001 C CNN
+F 3 "" H 7500 2050 50  0001 C CNN
+	1    7500 2050
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6FFE3F
+P 7500 2200
+F 0 "#PWR?" H 7500 2050 50  0001 C CNN
+F 1 "+3V3" H 7515 2373 50  0000 C CNN
+F 2 "" H 7500 2200 50  0001 C CNN
+F 3 "" H 7500 2200 50  0001 C CNN
+	1    7500 2200
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	7200 2050 7200 2150
+Wire Wire Line
+	7200 2150 7500 2150
+Wire Wire Line
+	7500 2200 7500 2150
+Connection ~ 7500 2150
+Wire Wire Line
+	7200 1950 7500 1950
+$Comp
+L power:GND #PWR?
+U 1 1 5B7010FE
+P 7600 1950
+F 0 "#PWR?" H 7600 1700 50  0001 C CNN
+F 1 "GND" V 7605 1822 50  0000 R CNN
+F 2 "" H 7600 1950 50  0001 C CNN
+F 3 "" H 7600 1950 50  0001 C CNN
+	1    7600 1950
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	7500 1950 7600 1950
+Connection ~ 7500 1950
+Wire Wire Line
+	7200 1550 7550 1550
+Wire Wire Line
+	7200 1650 7550 1650
+Wire Wire Line
+	7200 1750 7550 1750
+Wire Wire Line
+	7200 1850 7550 1850
+Text HLabel 7550 1550 2    50   Input ~ 0
+OUT_ESP9
+Text HLabel 7550 1650 2    50   Input ~ 0
+OUT_ESP10
+Text HLabel 7550 1750 2    50   Input ~ 0
+OUT_ESP11
+Text HLabel 7550 1850 2    50   Input ~ 0
+OUT_ESP12
+$EndSCHEMATC

+ 235 - 0
connectorsch.sch

@@ -0,0 +1,235 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 7 8
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x05 J?
+U 1 1 5B6EED46
+P 3850 1800
+F 0 "J?" H 3770 1375 50  0000 C CNN
+F 1 "connector-ESP" H 3770 1466 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x05_Pitch2.54mm" H 3850 1800 50  0001 C CNN
+F 3 "~" H 3850 1800 50  0001 C CNN
+	1    3850 1800
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B6EF154
+P 4250 2000
+F 0 "C?" V 4150 2150 50  0000 C CNN
+F 1 "104" V 4200 2150 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 4250 2000 50  0001 C CNN
+F 3 "" H 4250 2000 50  0001 C CNN
+	1    4250 2000
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6EF3C1
+P 4250 2150
+F 0 "#PWR?" H 4250 2000 50  0001 C CNN
+F 1 "+3V3" H 4265 2323 50  0000 C CNN
+F 2 "" H 4250 2150 50  0001 C CNN
+F 3 "" H 4250 2150 50  0001 C CNN
+	1    4250 2150
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	4050 2000 4050 2100
+Wire Wire Line
+	4050 2100 4250 2100
+Wire Wire Line
+	4250 2100 4250 2150
+Connection ~ 4250 2100
+Wire Wire Line
+	4050 1900 4250 1900
+Wire Wire Line
+	4250 1900 4450 1900
+Connection ~ 4250 1900
+$Comp
+L power:GND #PWR?
+U 1 1 5B6EFEBA
+P 4450 1900
+F 0 "#PWR?" H 4450 1650 50  0001 C CNN
+F 1 "GND" V 4455 1772 50  0000 R CNN
+F 2 "" H 4450 1900 50  0001 C CNN
+F 3 "" H 4450 1900 50  0001 C CNN
+	1    4450 1900
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	4050 1600 4400 1600
+Wire Wire Line
+	4050 1700 4400 1700
+Wire Wire Line
+	4050 1800 4400 1800
+Text HLabel 4400 1600 2    50   Input ~ 0
+OUT_ESP1
+Text HLabel 4400 1700 2    50   Input ~ 0
+OUT_ESP2
+Text HLabel 4400 1800 2    50   Input ~ 0
+OUT_ESP3
+$Comp
+L Connector:Conn_01x07 J?
+U 1 1 5B6F3435
+P 5450 1850
+F 0 "J?" H 5370 1325 50  0000 C CNN
+F 1 "Conn_01x07" H 5370 1416 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x07_Pitch2.54mm" H 5450 1850 50  0001 C CNN
+F 3 "~" H 5450 1850 50  0001 C CNN
+	1    5450 1850
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B6F365D
+P 5950 2150
+F 0 "C?" V 5850 2300 50  0000 C CNN
+F 1 "104" V 5900 2300 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 5950 2150 50  0001 C CNN
+F 3 "" H 5950 2150 50  0001 C CNN
+	1    5950 2150
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6F36D4
+P 5950 2350
+F 0 "#PWR?" H 5950 2200 50  0001 C CNN
+F 1 "+3V3" H 5965 2523 50  0000 C CNN
+F 2 "" H 5950 2350 50  0001 C CNN
+F 3 "" H 5950 2350 50  0001 C CNN
+	1    5950 2350
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	5650 2150 5850 2150
+Wire Wire Line
+	5850 2150 5850 2250
+Wire Wire Line
+	5850 2250 5950 2250
+Wire Wire Line
+	5950 2350 5950 2250
+Connection ~ 5950 2250
+Wire Wire Line
+	5650 2050 5950 2050
+$Comp
+L power:GND #PWR?
+U 1 1 5B6F3F67
+P 6100 2050
+F 0 "#PWR?" H 6100 1800 50  0001 C CNN
+F 1 "GND" V 6105 1922 50  0000 R CNN
+F 2 "" H 6100 2050 50  0001 C CNN
+F 3 "" H 6100 2050 50  0001 C CNN
+	1    6100 2050
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	5950 2050 6100 2050
+Connection ~ 5950 2050
+Wire Wire Line
+	5650 1550 6000 1550
+Wire Wire Line
+	5650 1650 6000 1650
+Wire Wire Line
+	5650 1750 6000 1750
+Wire Wire Line
+	5650 1850 6000 1850
+Wire Wire Line
+	5650 1950 6000 1950
+Text HLabel 6000 1550 2    50   Input ~ 0
+OUT_ESP4
+Text HLabel 6000 1650 2    50   Input ~ 0
+OUT_ESP5
+Text HLabel 6000 1750 2    50   Input ~ 0
+OUT_ESP6
+Text HLabel 6000 1850 2    50   Input ~ 0
+OUT_ESP7
+Text HLabel 6000 1950 2    50   Input ~ 0
+OUT_ESP8
+$Comp
+L Connector:Conn_01x06 J?
+U 1 1 5B6FFC44
+P 7000 1850
+F 0 "J?" H 6920 1325 50  0000 C CNN
+F 1 "Conn_01x06" H 6920 1416 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x06_Pitch2.54mm" H 7000 1850 50  0001 C CNN
+F 3 "~" H 7000 1850 50  0001 C CNN
+	1    7000 1850
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B6FFDBD
+P 7500 2050
+F 0 "C?" V 7400 2050 50  0000 C CNN
+F 1 "104" V 7600 2050 50  0000 C CNN
+F 2 "Capacitors_SMD:C_0805" H 7500 2050 50  0001 C CNN
+F 3 "" H 7500 2050 50  0001 C CNN
+	1    7500 2050
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6FFE3F
+P 7500 2200
+F 0 "#PWR?" H 7500 2050 50  0001 C CNN
+F 1 "+3V3" H 7515 2373 50  0000 C CNN
+F 2 "" H 7500 2200 50  0001 C CNN
+F 3 "" H 7500 2200 50  0001 C CNN
+	1    7500 2200
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	7200 2050 7200 2150
+Wire Wire Line
+	7200 2150 7500 2150
+Wire Wire Line
+	7500 2200 7500 2150
+Connection ~ 7500 2150
+Wire Wire Line
+	7200 1950 7500 1950
+$Comp
+L power:GND #PWR?
+U 1 1 5B7010FE
+P 7600 1950
+F 0 "#PWR?" H 7600 1700 50  0001 C CNN
+F 1 "GND" V 7605 1822 50  0000 R CNN
+F 2 "" H 7600 1950 50  0001 C CNN
+F 3 "" H 7600 1950 50  0001 C CNN
+	1    7600 1950
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	7500 1950 7600 1950
+Connection ~ 7500 1950
+Wire Wire Line
+	7200 1550 7550 1550
+Wire Wire Line
+	7200 1650 7550 1650
+Wire Wire Line
+	7200 1750 7550 1750
+Wire Wire Line
+	7200 1850 7550 1850
+Text HLabel 7550 1550 2    50   Input ~ 0
+OUT_ESP9
+Text HLabel 7550 1650 2    50   Input ~ 0
+OUT_ESP10
+Text HLabel 7550 1750 2    50   Input ~ 0
+OUT_ESP11
+Text HLabel 7550 1850 2    50   Input ~ 0
+OUT_ESP12
+$EndSCHEMATC

+ 1 - 1
display.bak

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 2 6
+Sheet 2 8
 Title ""
 Date ""
 Rev ""

+ 1 - 1
display.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 2 6
+Sheet 2 8
 Title ""
 Date ""
 Rev ""

+ 1 - 1
keypad.bak

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 5 6
+Sheet 4 8
 Title ""
 Date ""
 Rev ""

+ 1 - 1
keypad.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 5 6
+Sheet 4 8
 Title ""
 Date ""
 Rev ""

+ 145 - 348
main.bak

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 6 6
+Sheet 5 8
 Title ""
 Date ""
 Rev ""
@@ -17,104 +17,104 @@ $EndDescr
 $Comp
 L ESP8266:ESP-12E U?
 U 1 1 5B61664F
-P 4800 3150
-F 0 "U?" H 4800 3915 50  0000 C CNN
-F 1 "ESP-12E" H 4800 3824 50  0000 C CNN
-F 2 "ESP8266:ESP-12E_SMD" H 4800 3150 50  0001 C CNN
-F 3 "" H 4800 3150 50  0001 C CNN
-	1    4800 3150
+P 5400 3100
+F 0 "U?" H 5400 3865 50  0000 C CNN
+F 1 "ESP-12E" H 5400 3774 50  0000 C CNN
+F 2 "ESP8266:ESP-12E_SMD" H 5400 3100 50  0001 C CNN
+F 3 "" H 5400 3100 50  0001 C CNN
+	1    5400 3100
 	1    0    0    -1  
 $EndComp
 Wire Wire Line
-	3900 2850 3600 2850
-Text Label 3650 2850 0    50   ~ 0
+	4500 2800 4200 2800
+Text Label 4250 2800 0    50   ~ 0
 RST
 $Comp
 L power:+3V3 #PWR?
 U 1 1 5B618403
-P 3750 3550
-F 0 "#PWR?" H 3750 3400 50  0001 C CNN
-F 1 "+3V3" V 3765 3678 50  0000 L CNN
-F 2 "" H 3750 3550 50  0001 C CNN
-F 3 "" H 3750 3550 50  0001 C CNN
-	1    3750 3550
+P 4350 3500
+F 0 "#PWR?" H 4350 3350 50  0001 C CNN
+F 1 "+3V3" V 4365 3628 50  0000 L CNN
+F 2 "" H 4350 3500 50  0001 C CNN
+F 3 "" H 4350 3500 50  0001 C CNN
+	1    4350 3500
 	0    -1   -1   0   
 $EndComp
 Wire Wire Line
-	3900 3550 3800 3550
+	4500 3500 4400 3500
 $Comp
 L power:GND #PWR?
 U 1 1 5B6184D1
-P 5900 3550
-F 0 "#PWR?" H 5900 3300 50  0001 C CNN
-F 1 "GND" V 5905 3422 50  0000 R CNN
-F 2 "" H 5900 3550 50  0001 C CNN
-F 3 "" H 5900 3550 50  0001 C CNN
-	1    5900 3550
+P 6500 3500
+F 0 "#PWR?" H 6500 3250 50  0001 C CNN
+F 1 "GND" V 6505 3372 50  0000 R CNN
+F 2 "" H 6500 3500 50  0001 C CNN
+F 3 "" H 6500 3500 50  0001 C CNN
+	1    6500 3500
 	0    -1   -1   0   
 $EndComp
 Wire Wire Line
-	5700 3550 5900 3550
+	6300 3500 6500 3500
 $Comp
 L device:C_Small C?
 U 1 1 5B618730
-P 3800 3750
-F 0 "C?" H 3892 3796 50  0000 L CNN
-F 1 "105" H 3892 3705 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 3800 3750 50  0001 C CNN
-F 3 "" H 3800 3750 50  0001 C CNN
-	1    3800 3750
+P 4400 3700
+F 0 "C?" H 4492 3746 50  0000 L CNN
+F 1 "105" H 4492 3655 50  0000 L CNN
+F 2 "Capacitors_SMD:C_0805_HandSoldering" H 4400 3700 50  0001 C CNN
+F 3 "" H 4400 3700 50  0001 C CNN
+	1    4400 3700
 	1    0    0    -1  
 $EndComp
 $Comp
 L power:GND #PWR?
 U 1 1 5B618843
-P 3800 3950
-F 0 "#PWR?" H 3800 3700 50  0001 C CNN
-F 1 "GND" H 3805 3777 50  0000 C CNN
-F 2 "" H 3800 3950 50  0001 C CNN
-F 3 "" H 3800 3950 50  0001 C CNN
-	1    3800 3950
+P 4400 3900
+F 0 "#PWR?" H 4400 3650 50  0001 C CNN
+F 1 "GND" H 4405 3727 50  0000 C CNN
+F 2 "" H 4400 3900 50  0001 C CNN
+F 3 "" H 4400 3900 50  0001 C CNN
+	1    4400 3900
 	1    0    0    -1  
 $EndComp
 Wire Wire Line
-	3800 3650 3800 3550
-Connection ~ 3800 3550
+	4400 3600 4400 3500
+Connection ~ 4400 3500
 Wire Wire Line
-	3800 3550 3750 3550
+	4400 3500 4350 3500
 Wire Wire Line
-	3800 3850 3800 3950
-NoConn ~ 3900 2950
+	4400 3800 4400 3900
+NoConn ~ 4500 2900
 Wire Wire Line
-	3900 3050 3600 3050
-Text Label 3650 3050 0    50   ~ 0
+	4500 3000 4200 3000
+Text Label 4250 3000 0    50   ~ 0
 CH_PD
 Wire Wire Line
-	3900 3150 3600 3150
+	4500 3100 4200 3100
 Wire Wire Line
-	3900 3250 3600 3250
+	4500 3200 4200 3200
 Wire Wire Line
-	3600 3350 3900 3350
+	4200 3300 4500 3300
 Wire Wire Line
-	3900 3450 3600 3450
+	4500 3400 4200 3400
 Wire Wire Line
-	5700 3250 6000 3250
+	6300 3200 6600 3200
 Wire Wire Line
-	5700 3350 6000 3350
+	6300 3300 6600 3300
 Wire Wire Line
-	5700 3450 6000 3450
+	6300 3400 6600 3400
 Wire Wire Line
-	4550 4050 4550 4250
+	5150 4000 5150 4200
 Wire Wire Line
-	4650 4050 4650 4250
+	5250 4000 5250 4200
 Wire Wire Line
-	4750 4050 4750 4250
+	5350 4000 5350 4200
 Wire Wire Line
-	4850 4050 4850 4250
+	5450 4000 5450 4200
 Wire Wire Line
-	4950 4050 4950 4250
+	5550 4000 5550 4200
 Wire Wire Line
-	5050 4050 5050 4250
+	5650 4000 5650 4200
 $Comp
 L device:R R?
 U 1 1 5B61A13D
@@ -259,52 +259,20 @@ Wire Wire Line
 	1400 2650 2000 2650
 Wire Wire Line
 	2000 2950 2000 2850
-Text HLabel 6000 2850 2    50   Input ~ 0
-TXD
-Text HLabel 6000 2950 2    50   Input ~ 0
-RXD
 Wire Wire Line
-	5700 2850 6000 2850
-Wire Wire Line
-	5700 2950 6000 2950
-Wire Wire Line
-	5700 3050 6000 3050
-Wire Wire Line
-	5700 3150 6000 3150
-Text HLabel 6000 3050 2    50   Input ~ 0
-P.5
-Text HLabel 6000 3150 2    50   Input ~ 0
-P.4
-Text HLabel 6000 3250 2    50   Input ~ 0
-P.0
-Text HLabel 6000 3350 2    50   Input ~ 0
-P.2
-Text HLabel 6000 3450 2    50   Input ~ 0
-P.15
-Text HLabel 4650 4250 3    50   Input ~ 0
-MISO
-Text HLabel 4750 4250 3    50   Input ~ 0
-P.9
-Text HLabel 4850 4250 3    50   Input ~ 0
-P.10
-Text HLabel 4950 4250 3    50   Input ~ 0
-MOSI
-Text HLabel 5050 4250 3    50   Input ~ 0
-SCLK
-Text HLabel 3600 3150 0    50   Input ~ 0
-P.16
-Text HLabel 3600 3250 0    50   Input ~ 0
-P.14
-Text HLabel 3600 3350 0    50   Input ~ 0
-P.12
-Text HLabel 3600 3450 0    50   Input ~ 0
-P.13
-NoConn ~ 4550 4250
-Text Label 5700 3450 0    50   ~ 0
+	6300 2800 6600 2800
+Wire Wire Line
+	6300 2900 6600 2900
+Wire Wire Line
+	6300 3000 6600 3000
+Wire Wire Line
+	6300 3100 6600 3100
+NoConn ~ 5150 4200
+Text Label 6300 3400 0    50   ~ 0
 GPIO15
-Text Label 5700 3250 0    50   ~ 0
+Text Label 6300 3200 0    50   ~ 0
 GPIO0
-Text Label 5700 3350 0    50   ~ 0
+Text Label 6300 3300 0    50   ~ 0
 GPIO2
 $Comp
 L Connector:Conn_01x02 J?
@@ -337,272 +305,101 @@ Wire Wire Line
 Text Label 1350 3600 0    50   ~ 0
 GPIO0
 $Comp
-L MCU_ST_STM8:STM8S003F3P U?
-U 1 1 5B69698B
-P 8750 3250
-F 0 "U?" H 8750 4228 50  0000 C CNN
-F 1 "STM8S003F3P" H 8750 4137 50  0000 C CNN
-F 2 "Housings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mm" H 7600 2450 50  0001 L CIN
-F 3 "http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00024550.pdf" H 8700 2850 50  0001 C CNN
-	1    8750 3250
-	1    0    0    -1  
-$EndComp
-$Comp
-L device:C_Small C?
-U 1 1 5B69841A
-P 7300 4050
-F 0 "C?" H 7392 4096 50  0000 L CNN
-F 1 "104" H 7392 4005 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 7300 4050 50  0001 C CNN
-F 3 "" H 7300 4050 50  0001 C CNN
-	1    7300 4050
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7300 3950 7300 3850
-Wire Wire Line
-	7300 3850 7450 3850
-$Comp
-L power:GND #PWR?
-U 1 1 5B698F7D
-P 8750 4400
-F 0 "#PWR?" H 8750 4150 50  0001 C CNN
-F 1 "GND" H 8755 4227 50  0000 C CNN
-F 2 "" H 8750 4400 50  0001 C CNN
-F 3 "" H 8750 4400 50  0001 C CNN
-	1    8750 4400
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	8750 4400 8750 4150
-$Comp
-L power:GND #PWR?
-U 1 1 5B699A1E
-P 7300 4300
-F 0 "#PWR?" H 7300 4050 50  0001 C CNN
-F 1 "GND" H 7305 4127 50  0000 C CNN
-F 2 "" H 7300 4300 50  0001 C CNN
-F 3 "" H 7300 4300 50  0001 C CNN
-	1    7300 4300
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7300 4300 7300 4150
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B69A7B0
-P 8750 2200
-F 0 "#PWR?" H 8750 2050 50  0001 C CNN
-F 1 "+3V3" H 8765 2373 50  0000 C CNN
-F 2 "" H 8750 2200 50  0001 C CNN
-F 3 "" H 8750 2200 50  0001 C CNN
-	1    8750 2200
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	8750 2200 8750 2300
-$Comp
-L device:C_Small C?
-U 1 1 5B69B71F
-P 9000 2300
-F 0 "C?" V 8771 2300 50  0000 C CNN
-F 1 "104" V 8862 2300 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 9000 2300 50  0001 C CNN
-F 3 "" H 9000 2300 50  0001 C CNN
-	1    9000 2300
-	0    1    1    0   
-$EndComp
-Wire Wire Line
-	8900 2300 8750 2300
-Connection ~ 8750 2300
-Wire Wire Line
-	8750 2300 8750 2450
-$Comp
-L power:GND #PWR?
-U 1 1 5B69C3FA
-P 9250 2300
-F 0 "#PWR?" H 9250 2050 50  0001 C CNN
-F 1 "GND" H 9255 2127 50  0000 C CNN
-F 2 "" H 9250 2300 50  0001 C CNN
-F 3 "" H 9250 2300 50  0001 C CNN
-	1    9250 2300
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	9100 2300 9250 2300
-$Comp
-L device:R R?
-U 1 1 5B69D306
-P 7400 2450
-F 0 "R?" H 7470 2496 50  0000 L CNN
-F 1 "103" H 7470 2405 50  0000 L CNN
-F 2 "" V 7330 2450 50  0001 C CNN
-F 3 "" H 7400 2450 50  0001 C CNN
-	1    7400 2450
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7400 2600 7400 2750
-Wire Wire Line
-	7400 2750 7450 2750
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B69E095
-P 7400 2150
-F 0 "#PWR?" H 7400 2000 50  0001 C CNN
-F 1 "+3V3" H 7415 2323 50  0000 C CNN
-F 2 "" H 7400 2150 50  0001 C CNN
-F 3 "" H 7400 2150 50  0001 C CNN
-	1    7400 2150
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7400 2150 7400 2300
-Wire Wire Line
-	6950 2750 7400 2750
-Connection ~ 7400 2750
-Wire Wire Line
-	7450 3050 6950 3050
-Text Label 7050 2750 0    50   ~ 0
-NRST
-Text Label 7050 3050 0    50   ~ 0
-SWIM
-Wire Wire Line
-	7450 3150 6950 3150
-Text Label 7050 3150 0    50   ~ 0
-RST
-NoConn ~ 10050 2950
-NoConn ~ 10050 3150
-NoConn ~ 10050 3250
-NoConn ~ 10050 3450
-NoConn ~ 10050 3550
-NoConn ~ 10050 3650
-NoConn ~ 10050 3750
-NoConn ~ 10050 3850
-NoConn ~ 7450 3250
-NoConn ~ 7450 3350
-NoConn ~ 7450 3450
-NoConn ~ 7450 3550
-$Comp
 L Connector:Conn_01x04 J?
-U 1 1 5B6AC160
-P 6750 1200
-F 0 "J?" H 6670 775 50  0000 C CNN
-F 1 "nap stm8" H 6670 866 50  0000 C CNN
-F 2 "Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm" H 6750 1200 50  0001 C CNN
-F 3 "~" H 6750 1200 50  0001 C CNN
-	1    6750 1200
+U 1 1 5B6C3707
+P 1050 4450
+F 0 "J?" H 970 4025 50  0000 C CNN
+F 1 "nap" H 970 4116 50  0000 C CNN
+F 2 "" H 1050 4450 50  0001 C CNN
+F 3 "~" H 1050 4450 50  0001 C CNN
+	1    1050 4450
 	-1   0    0    1   
 $EndComp
-Wire Wire Line
-	6950 1000 7200 1000
-Wire Wire Line
-	6950 1100 7200 1100
-Wire Wire Line
-	6950 1200 7200 1200
-Wire Wire Line
-	6950 1300 7200 1300
-$Comp
-L power:GND #PWR?
-U 1 1 5B6B301A
-P 7200 1300
-F 0 "#PWR?" H 7200 1050 50  0001 C CNN
-F 1 "GND" H 7205 1127 50  0000 C CNN
-F 2 "" H 7200 1300 50  0001 C CNN
-F 3 "" H 7200 1300 50  0001 C CNN
-	1    7200 1300
-	1    0    0    -1  
-$EndComp
 $Comp
 L power:+3V3 #PWR?
-U 1 1 5B6B30D6
-P 7200 1000
-F 0 "#PWR?" H 7200 850 50  0001 C CNN
-F 1 "+3V3" H 7215 1173 50  0000 C CNN
-F 2 "" H 7200 1000 50  0001 C CNN
-F 3 "" H 7200 1000 50  0001 C CNN
-	1    7200 1000
-	1    0    0    -1  
+U 1 1 5B6C4359
+P 1250 4800
+F 0 "#PWR?" H 1250 4650 50  0001 C CNN
+F 1 "+3V3" H 1265 4973 50  0000 C CNN
+F 2 "" H 1250 4800 50  0001 C CNN
+F 3 "" H 1250 4800 50  0001 C CNN
+	1    1250 4800
+	-1   0    0    1   
 $EndComp
-Text Label 7000 1100 0    50   ~ 0
-SWIM
-Text Label 7000 1200 0    50   ~ 0
-NRST
 $Comp
-L device:Crystal_GND23 Y?
-U 1 1 5B6B527A
-P 10450 2750
-F 0 "Y?" V 10404 2991 50  0000 L CNN
-F 1 "Crystal_GND23" V 10495 2991 50  0000 L CNN
-F 2 "Crystals:Crystal_SMD_EuroQuartz_X22-4pin_2.5x2.0mm" H 10450 2750 50  0001 C CNN
-F 3 "" H 10450 2750 50  0001 C CNN
-	1    10450 2750
-	0    1    1    0   
+L power:GND #PWR?
+U 1 1 5B6C4F86
+P 1550 4450
+F 0 "#PWR?" H 1550 4200 50  0001 C CNN
+F 1 "GND" V 1555 4322 50  0000 R CNN
+F 2 "" H 1550 4450 50  0001 C CNN
+F 3 "" H 1550 4450 50  0001 C CNN
+	1    1550 4450
+	0    -1   -1   0   
 $EndComp
 Wire Wire Line
-	10050 2850 10200 2850
-Wire Wire Line
-	10200 2850 10200 3000
+	1250 4450 1450 4450
 Wire Wire Line
-	10200 3000 10450 3000
-Wire Wire Line
-	10450 3000 10450 2900
-Wire Wire Line
-	10050 2750 10050 2550
-Wire Wire Line
-	10050 2550 10450 2550
-Wire Wire Line
-	10450 2550 10450 2600
-$Comp
-L device:C_Small C?
-U 1 1 5B6BAFD9
-P 10650 3000
-F 0 "C?" V 10421 3000 50  0000 C CNN
-F 1 "20pF" V 10512 3000 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805" H 10650 3000 50  0001 C CNN
-F 3 "" H 10650 3000 50  0001 C CNN
-	1    10650 3000
-	0    1    1    0   
-$EndComp
+	1250 4800 1250 4650
 $Comp
 L device:C_Small C?
-U 1 1 5B6BB094
-P 10650 2550
-F 0 "C?" V 10421 2550 50  0000 C CNN
-F 1 "20pF" V 10512 2550 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805" H 10650 2550 50  0001 C CNN
-F 3 "" H 10650 2550 50  0001 C CNN
-	1    10650 2550
-	0    1    1    0   
+U 1 1 5B6C7440
+P 1450 4550
+F 0 "C?" H 1542 4596 50  0000 L CNN
+F 1 "104" H 1542 4505 50  0000 L CNN
+F 2 "Capacitors_SMD:C_0805" H 1450 4550 50  0001 C CNN
+F 3 "" H 1450 4550 50  0001 C CNN
+	1    1450 4550
+	1    0    0    -1  
 $EndComp
+Connection ~ 1450 4450
 Wire Wire Line
-	10450 2550 10550 2550
-Connection ~ 10450 2550
+	1450 4450 1550 4450
 Wire Wire Line
-	10450 3000 10550 3000
-Connection ~ 10450 3000
+	1450 4650 1250 4650
+Connection ~ 1250 4650
 Wire Wire Line
-	10750 2550 10750 2750
+	1250 4650 1250 4550
 Wire Wire Line
-	10650 2750 10750 2750
-Connection ~ 10750 2750
+	1250 4250 1650 4250
 Wire Wire Line
-	10750 2750 10750 3000
-$Comp
-L power:GND #PWR?
-U 1 1 5B6C7C4B
-P 10750 3100
-F 0 "#PWR?" H 10750 2850 50  0001 C CNN
-F 1 "GND" H 10755 2927 50  0000 C CNN
-F 2 "" H 10750 3100 50  0001 C CNN
-F 3 "" H 10750 3100 50  0001 C CNN
-	1    10750 3100
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	10750 3100 10750 3000
-Connection ~ 10750 3000
-Wire Wire Line
-	10250 2750 10650 2750
-Connection ~ 10650 2750
+	1250 4350 1650 4350
+Text Label 6400 2800 0    50   ~ 0
+TXD
+Text Label 6400 2900 0    50   ~ 0
+RXD
+Text Label 1350 4350 0    50   ~ 0
+TXD
+Text Label 1350 4250 0    50   ~ 0
+RXD
+Text HLabel 4200 2800 0    50   Input ~ 0
+RST
+Text HLabel 6600 3300 2    50   Input ~ 0
+SDA_ESP
+Text HLabel 4200 3200 0    50   Input ~ 0
+SCL_ESP
+Text HLabel 6600 3000 2    50   Input ~ 0
+GPIO5
+Text HLabel 6600 3100 2    50   Input ~ 0
+GPIO4
+Text HLabel 6600 3200 2    50   Input ~ 0
+GPIO0
+Text HLabel 6600 3400 2    50   Input ~ 0
+GPIO15
+Text HLabel 4200 3100 0    50   Input ~ 0
+GPIO16
+Text HLabel 4200 3300 0    50   Input ~ 0
+GPIO12
+Text HLabel 4200 3400 0    50   Input ~ 0
+GPIO13
+Text HLabel 5250 4200 3    50   Input ~ 0
+MISO_ESP
+Text HLabel 5350 4200 3    50   Input ~ 0
+GPIO9
+Text HLabel 5450 4200 3    50   Input ~ 0
+GPIO10
+Text HLabel 5550 4200 3    50   Input ~ 0
+MOSI_ESP
+Text HLabel 5650 4200 3    50   Input ~ 0
+SCLK_ESP
 $EndSCHEMATC

+ 145 - 348
main.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 6 6
+Sheet 5 8
 Title ""
 Date ""
 Rev ""
@@ -17,104 +17,104 @@ $EndDescr
 $Comp
 L ESP8266:ESP-12E U?
 U 1 1 5B61664F
-P 4800 3150
-F 0 "U?" H 4800 3915 50  0000 C CNN
-F 1 "ESP-12E" H 4800 3824 50  0000 C CNN
-F 2 "ESP8266:ESP-12E_SMD" H 4800 3150 50  0001 C CNN
-F 3 "" H 4800 3150 50  0001 C CNN
-	1    4800 3150
+P 5400 3100
+F 0 "U?" H 5400 3865 50  0000 C CNN
+F 1 "ESP-12E" H 5400 3774 50  0000 C CNN
+F 2 "ESP8266:ESP-12E_SMD" H 5400 3100 50  0001 C CNN
+F 3 "" H 5400 3100 50  0001 C CNN
+	1    5400 3100
 	1    0    0    -1  
 $EndComp
 Wire Wire Line
-	3900 2850 3600 2850
-Text Label 3650 2850 0    50   ~ 0
+	4500 2800 4200 2800
+Text Label 4250 2800 0    50   ~ 0
 RST
 $Comp
 L power:+3V3 #PWR?
 U 1 1 5B618403
-P 3750 3550
-F 0 "#PWR?" H 3750 3400 50  0001 C CNN
-F 1 "+3V3" V 3765 3678 50  0000 L CNN
-F 2 "" H 3750 3550 50  0001 C CNN
-F 3 "" H 3750 3550 50  0001 C CNN
-	1    3750 3550
+P 4350 3500
+F 0 "#PWR?" H 4350 3350 50  0001 C CNN
+F 1 "+3V3" V 4365 3628 50  0000 L CNN
+F 2 "" H 4350 3500 50  0001 C CNN
+F 3 "" H 4350 3500 50  0001 C CNN
+	1    4350 3500
 	0    -1   -1   0   
 $EndComp
 Wire Wire Line
-	3900 3550 3800 3550
+	4500 3500 4400 3500
 $Comp
 L power:GND #PWR?
 U 1 1 5B6184D1
-P 5900 3550
-F 0 "#PWR?" H 5900 3300 50  0001 C CNN
-F 1 "GND" V 5905 3422 50  0000 R CNN
-F 2 "" H 5900 3550 50  0001 C CNN
-F 3 "" H 5900 3550 50  0001 C CNN
-	1    5900 3550
+P 6500 3500
+F 0 "#PWR?" H 6500 3250 50  0001 C CNN
+F 1 "GND" V 6505 3372 50  0000 R CNN
+F 2 "" H 6500 3500 50  0001 C CNN
+F 3 "" H 6500 3500 50  0001 C CNN
+	1    6500 3500
 	0    -1   -1   0   
 $EndComp
 Wire Wire Line
-	5700 3550 5900 3550
+	6300 3500 6500 3500
 $Comp
 L device:C_Small C?
 U 1 1 5B618730
-P 3800 3750
-F 0 "C?" H 3892 3796 50  0000 L CNN
-F 1 "105" H 3892 3705 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 3800 3750 50  0001 C CNN
-F 3 "" H 3800 3750 50  0001 C CNN
-	1    3800 3750
+P 4400 3700
+F 0 "C?" H 4492 3746 50  0000 L CNN
+F 1 "105" H 4492 3655 50  0000 L CNN
+F 2 "Capacitors_SMD:C_0805_HandSoldering" H 4400 3700 50  0001 C CNN
+F 3 "" H 4400 3700 50  0001 C CNN
+	1    4400 3700
 	1    0    0    -1  
 $EndComp
 $Comp
 L power:GND #PWR?
 U 1 1 5B618843
-P 3800 3950
-F 0 "#PWR?" H 3800 3700 50  0001 C CNN
-F 1 "GND" H 3805 3777 50  0000 C CNN
-F 2 "" H 3800 3950 50  0001 C CNN
-F 3 "" H 3800 3950 50  0001 C CNN
-	1    3800 3950
+P 4400 3900
+F 0 "#PWR?" H 4400 3650 50  0001 C CNN
+F 1 "GND" H 4405 3727 50  0000 C CNN
+F 2 "" H 4400 3900 50  0001 C CNN
+F 3 "" H 4400 3900 50  0001 C CNN
+	1    4400 3900
 	1    0    0    -1  
 $EndComp
 Wire Wire Line
-	3800 3650 3800 3550
-Connection ~ 3800 3550
+	4400 3600 4400 3500
+Connection ~ 4400 3500
 Wire Wire Line
-	3800 3550 3750 3550
+	4400 3500 4350 3500
 Wire Wire Line
-	3800 3850 3800 3950
-NoConn ~ 3900 2950
+	4400 3800 4400 3900
+NoConn ~ 4500 2900
 Wire Wire Line
-	3900 3050 3600 3050
-Text Label 3650 3050 0    50   ~ 0
+	4500 3000 4200 3000
+Text Label 4250 3000 0    50   ~ 0
 CH_PD
 Wire Wire Line
-	3900 3150 3600 3150
+	4500 3100 4200 3100
 Wire Wire Line
-	3900 3250 3600 3250
+	4500 3200 4200 3200
 Wire Wire Line
-	3600 3350 3900 3350
+	4200 3300 4500 3300
 Wire Wire Line
-	3900 3450 3600 3450
+	4500 3400 4200 3400
 Wire Wire Line
-	5700 3250 6000 3250
+	6300 3200 6600 3200
 Wire Wire Line
-	5700 3350 6000 3350
+	6300 3300 6600 3300
 Wire Wire Line
-	5700 3450 6000 3450
+	6300 3400 6600 3400
 Wire Wire Line
-	4550 4050 4550 4250
+	5150 4000 5150 4200
 Wire Wire Line
-	4650 4050 4650 4250
+	5250 4000 5250 4200
 Wire Wire Line
-	4750 4050 4750 4250
+	5350 4000 5350 4200
 Wire Wire Line
-	4850 4050 4850 4250
+	5450 4000 5450 4200
 Wire Wire Line
-	4950 4050 4950 4250
+	5550 4000 5550 4200
 Wire Wire Line
-	5050 4050 5050 4250
+	5650 4000 5650 4200
 $Comp
 L device:R R?
 U 1 1 5B61A13D
@@ -259,52 +259,20 @@ Wire Wire Line
 	1400 2650 2000 2650
 Wire Wire Line
 	2000 2950 2000 2850
-Text HLabel 6000 2850 2    50   Input ~ 0
-TXD
-Text HLabel 6000 2950 2    50   Input ~ 0
-RXD
 Wire Wire Line
-	5700 2850 6000 2850
-Wire Wire Line
-	5700 2950 6000 2950
-Wire Wire Line
-	5700 3050 6000 3050
-Wire Wire Line
-	5700 3150 6000 3150
-Text HLabel 6000 3050 2    50   Input ~ 0
-P.5
-Text HLabel 6000 3150 2    50   Input ~ 0
-P.4
-Text HLabel 6000 3250 2    50   Input ~ 0
-P.0
-Text HLabel 6000 3350 2    50   Input ~ 0
-P.2
-Text HLabel 6000 3450 2    50   Input ~ 0
-P.15
-Text HLabel 4650 4250 3    50   Input ~ 0
-MISO
-Text HLabel 4750 4250 3    50   Input ~ 0
-P.9
-Text HLabel 4850 4250 3    50   Input ~ 0
-P.10
-Text HLabel 4950 4250 3    50   Input ~ 0
-MOSI
-Text HLabel 5050 4250 3    50   Input ~ 0
-SCLK
-Text HLabel 3600 3150 0    50   Input ~ 0
-P.16
-Text HLabel 3600 3250 0    50   Input ~ 0
-P.14
-Text HLabel 3600 3350 0    50   Input ~ 0
-P.12
-Text HLabel 3600 3450 0    50   Input ~ 0
-P.13
-NoConn ~ 4550 4250
-Text Label 5700 3450 0    50   ~ 0
+	6300 2800 6600 2800
+Wire Wire Line
+	6300 2900 6600 2900
+Wire Wire Line
+	6300 3000 6600 3000
+Wire Wire Line
+	6300 3100 6600 3100
+NoConn ~ 5150 4200
+Text Label 6300 3400 0    50   ~ 0
 GPIO15
-Text Label 5700 3250 0    50   ~ 0
+Text Label 6300 3200 0    50   ~ 0
 GPIO0
-Text Label 5700 3350 0    50   ~ 0
+Text Label 6300 3300 0    50   ~ 0
 GPIO2
 $Comp
 L Connector:Conn_01x02 J?
@@ -337,272 +305,101 @@ Wire Wire Line
 Text Label 1350 3600 0    50   ~ 0
 GPIO0
 $Comp
-L MCU_ST_STM8:STM8S003F3P U?
-U 1 1 5B69698B
-P 8750 3250
-F 0 "U?" H 8750 4228 50  0000 C CNN
-F 1 "STM8S003F3P" H 8750 4137 50  0000 C CNN
-F 2 "Housings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mm" H 7600 2450 50  0001 L CIN
-F 3 "http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00024550.pdf" H 8700 2850 50  0001 C CNN
-	1    8750 3250
-	1    0    0    -1  
-$EndComp
-$Comp
-L device:C_Small C?
-U 1 1 5B69841A
-P 7300 4050
-F 0 "C?" H 7392 4096 50  0000 L CNN
-F 1 "104" H 7392 4005 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 7300 4050 50  0001 C CNN
-F 3 "" H 7300 4050 50  0001 C CNN
-	1    7300 4050
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7300 3950 7300 3850
-Wire Wire Line
-	7300 3850 7450 3850
-$Comp
-L power:GND #PWR?
-U 1 1 5B698F7D
-P 8750 4400
-F 0 "#PWR?" H 8750 4150 50  0001 C CNN
-F 1 "GND" H 8755 4227 50  0000 C CNN
-F 2 "" H 8750 4400 50  0001 C CNN
-F 3 "" H 8750 4400 50  0001 C CNN
-	1    8750 4400
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	8750 4400 8750 4150
-$Comp
-L power:GND #PWR?
-U 1 1 5B699A1E
-P 7300 4300
-F 0 "#PWR?" H 7300 4050 50  0001 C CNN
-F 1 "GND" H 7305 4127 50  0000 C CNN
-F 2 "" H 7300 4300 50  0001 C CNN
-F 3 "" H 7300 4300 50  0001 C CNN
-	1    7300 4300
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7300 4300 7300 4150
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B69A7B0
-P 8750 2200
-F 0 "#PWR?" H 8750 2050 50  0001 C CNN
-F 1 "+3V3" H 8765 2373 50  0000 C CNN
-F 2 "" H 8750 2200 50  0001 C CNN
-F 3 "" H 8750 2200 50  0001 C CNN
-	1    8750 2200
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	8750 2200 8750 2300
-$Comp
-L device:C_Small C?
-U 1 1 5B69B71F
-P 9000 2300
-F 0 "C?" V 8771 2300 50  0000 C CNN
-F 1 "104" V 8862 2300 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 9000 2300 50  0001 C CNN
-F 3 "" H 9000 2300 50  0001 C CNN
-	1    9000 2300
-	0    1    1    0   
-$EndComp
-Wire Wire Line
-	8900 2300 8750 2300
-Connection ~ 8750 2300
-Wire Wire Line
-	8750 2300 8750 2450
-$Comp
-L power:GND #PWR?
-U 1 1 5B69C3FA
-P 9250 2300
-F 0 "#PWR?" H 9250 2050 50  0001 C CNN
-F 1 "GND" H 9255 2127 50  0000 C CNN
-F 2 "" H 9250 2300 50  0001 C CNN
-F 3 "" H 9250 2300 50  0001 C CNN
-	1    9250 2300
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	9100 2300 9250 2300
-$Comp
-L device:R R?
-U 1 1 5B69D306
-P 7400 2450
-F 0 "R?" H 7470 2496 50  0000 L CNN
-F 1 "103" H 7470 2405 50  0000 L CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 7330 2450 50  0001 C CNN
-F 3 "" H 7400 2450 50  0001 C CNN
-	1    7400 2450
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7400 2600 7400 2750
-Wire Wire Line
-	7400 2750 7450 2750
-$Comp
-L power:+3V3 #PWR?
-U 1 1 5B69E095
-P 7400 2150
-F 0 "#PWR?" H 7400 2000 50  0001 C CNN
-F 1 "+3V3" H 7415 2323 50  0000 C CNN
-F 2 "" H 7400 2150 50  0001 C CNN
-F 3 "" H 7400 2150 50  0001 C CNN
-	1    7400 2150
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	7400 2150 7400 2300
-Wire Wire Line
-	6950 2750 7400 2750
-Connection ~ 7400 2750
-Wire Wire Line
-	7450 3050 6950 3050
-Text Label 7050 2750 0    50   ~ 0
-NRST
-Text Label 7050 3050 0    50   ~ 0
-SWIM
-Wire Wire Line
-	7450 3150 6950 3150
-Text Label 7050 3150 0    50   ~ 0
-RST
-NoConn ~ 10050 2950
-NoConn ~ 10050 3150
-NoConn ~ 10050 3250
-NoConn ~ 10050 3450
-NoConn ~ 10050 3550
-NoConn ~ 10050 3650
-NoConn ~ 10050 3750
-NoConn ~ 10050 3850
-NoConn ~ 7450 3250
-NoConn ~ 7450 3350
-NoConn ~ 7450 3450
-NoConn ~ 7450 3550
-$Comp
 L Connector:Conn_01x04 J?
-U 1 1 5B6AC160
-P 6750 1200
-F 0 "J?" H 6670 775 50  0000 C CNN
-F 1 "nap stm8" H 6670 866 50  0000 C CNN
-F 2 "Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm" H 6750 1200 50  0001 C CNN
-F 3 "~" H 6750 1200 50  0001 C CNN
-	1    6750 1200
+U 1 1 5B6C3707
+P 1050 4450
+F 0 "J?" H 970 4025 50  0000 C CNN
+F 1 "nap" H 970 4116 50  0000 C CNN
+F 2 "" H 1050 4450 50  0001 C CNN
+F 3 "~" H 1050 4450 50  0001 C CNN
+	1    1050 4450
 	-1   0    0    1   
 $EndComp
-Wire Wire Line
-	6950 1000 7200 1000
-Wire Wire Line
-	6950 1100 7200 1100
-Wire Wire Line
-	6950 1200 7200 1200
-Wire Wire Line
-	6950 1300 7200 1300
-$Comp
-L power:GND #PWR?
-U 1 1 5B6B301A
-P 7200 1300
-F 0 "#PWR?" H 7200 1050 50  0001 C CNN
-F 1 "GND" H 7205 1127 50  0000 C CNN
-F 2 "" H 7200 1300 50  0001 C CNN
-F 3 "" H 7200 1300 50  0001 C CNN
-	1    7200 1300
-	1    0    0    -1  
-$EndComp
 $Comp
 L power:+3V3 #PWR?
-U 1 1 5B6B30D6
-P 7200 1000
-F 0 "#PWR?" H 7200 850 50  0001 C CNN
-F 1 "+3V3" H 7215 1173 50  0000 C CNN
-F 2 "" H 7200 1000 50  0001 C CNN
-F 3 "" H 7200 1000 50  0001 C CNN
-	1    7200 1000
-	1    0    0    -1  
+U 1 1 5B6C4359
+P 1250 4800
+F 0 "#PWR?" H 1250 4650 50  0001 C CNN
+F 1 "+3V3" H 1265 4973 50  0000 C CNN
+F 2 "" H 1250 4800 50  0001 C CNN
+F 3 "" H 1250 4800 50  0001 C CNN
+	1    1250 4800
+	-1   0    0    1   
 $EndComp
-Text Label 7000 1100 0    50   ~ 0
-SWIM
-Text Label 7000 1200 0    50   ~ 0
-NRST
 $Comp
-L device:Crystal_GND23 Y?
-U 1 1 5B6B527A
-P 10450 2750
-F 0 "Y?" V 10404 2991 50  0000 L CNN
-F 1 "Crystal_GND23" V 10495 2991 50  0000 L CNN
-F 2 "Crystals:Crystal_SMD_EuroQuartz_X22-4pin_2.5x2.0mm" H 10450 2750 50  0001 C CNN
-F 3 "" H 10450 2750 50  0001 C CNN
-	1    10450 2750
-	0    1    1    0   
+L power:GND #PWR?
+U 1 1 5B6C4F86
+P 1550 4450
+F 0 "#PWR?" H 1550 4200 50  0001 C CNN
+F 1 "GND" V 1555 4322 50  0000 R CNN
+F 2 "" H 1550 4450 50  0001 C CNN
+F 3 "" H 1550 4450 50  0001 C CNN
+	1    1550 4450
+	0    -1   -1   0   
 $EndComp
 Wire Wire Line
-	10050 2850 10200 2850
-Wire Wire Line
-	10200 2850 10200 3000
+	1250 4450 1450 4450
 Wire Wire Line
-	10200 3000 10450 3000
-Wire Wire Line
-	10450 3000 10450 2900
-Wire Wire Line
-	10050 2750 10050 2550
-Wire Wire Line
-	10050 2550 10450 2550
-Wire Wire Line
-	10450 2550 10450 2600
-$Comp
-L device:C_Small C?
-U 1 1 5B6BAFD9
-P 10650 3000
-F 0 "C?" V 10421 3000 50  0000 C CNN
-F 1 "20pF" V 10512 3000 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805" H 10650 3000 50  0001 C CNN
-F 3 "" H 10650 3000 50  0001 C CNN
-	1    10650 3000
-	0    1    1    0   
-$EndComp
+	1250 4800 1250 4650
 $Comp
 L device:C_Small C?
-U 1 1 5B6BB094
-P 10650 2550
-F 0 "C?" V 10421 2550 50  0000 C CNN
-F 1 "20pF" V 10512 2550 50  0000 C CNN
-F 2 "Capacitors_SMD:C_0805" H 10650 2550 50  0001 C CNN
-F 3 "" H 10650 2550 50  0001 C CNN
-	1    10650 2550
-	0    1    1    0   
+U 1 1 5B6C7440
+P 1450 4550
+F 0 "C?" H 1542 4596 50  0000 L CNN
+F 1 "104" H 1542 4505 50  0000 L CNN
+F 2 "Capacitors_SMD:C_0805" H 1450 4550 50  0001 C CNN
+F 3 "" H 1450 4550 50  0001 C CNN
+	1    1450 4550
+	1    0    0    -1  
 $EndComp
+Connection ~ 1450 4450
 Wire Wire Line
-	10450 2550 10550 2550
-Connection ~ 10450 2550
+	1450 4450 1550 4450
 Wire Wire Line
-	10450 3000 10550 3000
-Connection ~ 10450 3000
+	1450 4650 1250 4650
+Connection ~ 1250 4650
 Wire Wire Line
-	10750 2550 10750 2750
+	1250 4650 1250 4550
 Wire Wire Line
-	10650 2750 10750 2750
-Connection ~ 10750 2750
+	1250 4250 1650 4250
 Wire Wire Line
-	10750 2750 10750 3000
-$Comp
-L power:GND #PWR?
-U 1 1 5B6C7C4B
-P 10750 3100
-F 0 "#PWR?" H 10750 2850 50  0001 C CNN
-F 1 "GND" H 10755 2927 50  0000 C CNN
-F 2 "" H 10750 3100 50  0001 C CNN
-F 3 "" H 10750 3100 50  0001 C CNN
-	1    10750 3100
-	1    0    0    -1  
-$EndComp
-Wire Wire Line
-	10750 3100 10750 3000
-Connection ~ 10750 3000
-Wire Wire Line
-	10250 2750 10650 2750
-Connection ~ 10650 2750
+	1250 4350 1650 4350
+Text Label 6400 2800 0    50   ~ 0
+TXD
+Text Label 6400 2900 0    50   ~ 0
+RXD
+Text Label 1350 4350 0    50   ~ 0
+TXD
+Text Label 1350 4250 0    50   ~ 0
+RXD
+Text HLabel 4200 2800 0    50   Input ~ 0
+RST
+Text HLabel 6600 3300 2    50   Input ~ 0
+SDA_ESP
+Text HLabel 4200 3200 0    50   Input ~ 0
+SCL_ESP
+Text HLabel 6600 3000 2    50   Input ~ 0
+GPIO5
+Text HLabel 6600 3100 2    50   Input ~ 0
+GPIO4
+Text HLabel 6600 3200 2    50   Input ~ 0
+GPIO0
+Text HLabel 6600 3400 2    50   Input ~ 0
+GPIO15
+Text HLabel 4200 3100 0    50   Input ~ 0
+GPIO16
+Text HLabel 4200 3300 0    50   Input ~ 0
+GPIO12
+Text HLabel 4200 3400 0    50   Input ~ 0
+GPIO13
+Text HLabel 5250 4200 3    50   Input ~ 0
+MISO_ESP
+Text HLabel 5350 4200 3    50   Input ~ 0
+GPIO9
+Text HLabel 5450 4200 3    50   Input ~ 0
+GPIO10
+Text HLabel 5550 4200 3    50   Input ~ 0
+MOSI_ESP
+Text HLabel 5650 4200 3    50   Input ~ 0
+SCLK_ESP
 $EndSCHEMATC

+ 15 - 4
motor.bak

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 3 6
+Sheet 3 8
 Title ""
 Date ""
 Rev ""
@@ -297,7 +297,7 @@ U 1 1 5B6875E8
 P 8050 4750
 F 0 "J?" H 7970 5167 50  0000 C CNN
 F 1 "sensor clock" H 7970 5076 50  0000 C CNN
-F 2 "" H 8050 4750 50  0001 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x05_Pitch2.54mm" H 8050 4750 50  0001 C CNN
 F 3 "~" H 8050 4750 50  0001 C CNN
 	1    8050 4750
 	-1   0    0    -1  
@@ -329,10 +329,21 @@ Wire Wire Line
 	8250 4850 8600 4850
 Wire Wire Line
 	8250 4950 8600 4950
-Text HLabel 9350 4900 2    50   Input ~ 0
+Text HLabel 8600 4850 2    50   Input ~ 0
 NO
 Wire Wire Line
 	8600 5000 8600 4950
-Text HLabel 9350 4750 2    50   Input ~ 0
+Text HLabel 8600 4750 2    50   Input ~ 0
 open
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6B040E
+P 8600 5000
+F 0 "#PWR?" H 8600 4850 50  0001 C CNN
+F 1 "+3V3" H 8615 5173 50  0000 C CNN
+F 2 "" H 8600 5000 50  0001 C CNN
+F 3 "" H 8600 5000 50  0001 C CNN
+	1    8600 5000
+	-1   0    0    1   
+$EndComp
 $EndSCHEMATC

+ 15 - 4
motor.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 3 6
+Sheet 3 8
 Title ""
 Date ""
 Rev ""
@@ -297,7 +297,7 @@ U 1 1 5B6875E8
 P 8050 4750
 F 0 "J?" H 7970 5167 50  0000 C CNN
 F 1 "sensor clock" H 7970 5076 50  0000 C CNN
-F 2 "" H 8050 4750 50  0001 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x05_Pitch2.54mm" H 8050 4750 50  0001 C CNN
 F 3 "~" H 8050 4750 50  0001 C CNN
 	1    8050 4750
 	-1   0    0    -1  
@@ -329,10 +329,21 @@ Wire Wire Line
 	8250 4850 8600 4850
 Wire Wire Line
 	8250 4950 8600 4950
-Text HLabel 9350 4900 2    50   Input ~ 0
+Text HLabel 8600 4850 2    50   Input ~ 0
 NO
 Wire Wire Line
 	8600 5000 8600 4950
-Text HLabel 9350 4750 2    50   Input ~ 0
+Text HLabel 8600 4750 2    50   Input ~ 0
 open
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B6B040E
+P 8600 5000
+F 0 "#PWR?" H 8600 4850 50  0001 C CNN
+F 1 "+3V3" H 8615 5173 50  0000 C CNN
+F 2 "" H 8600 5000 50  0001 C CNN
+F 3 "" H 8600 5000 50  0001 C CNN
+	1    8600 5000
+	-1   0    0    1   
+$EndComp
 $EndSCHEMATC

+ 95 - 52
vinhome-cache.lib

@@ -115,6 +115,40 @@ X Pin_6 6 -200 -300 150 R 50 50 1 1 P
 ENDDRAW
 ENDDEF
 #
+# Connector:Conn_01x07
+#
+DEF Connector:Conn_01x07 J 0 40 Y N 1 F N
+F0 "J" 0 400 50 H V C CNN
+F1 "Connector:Conn_01x07" 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*:*_??x*mm*
+ Connector*:*1x??x*mm*
+ Pin?Header?Straight?1X*
+ Pin?Header?Angled?1X*
+ Socket?Strip?Straight?1X*
+ Socket?Strip?Angled?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 305 0 295 1 1 6 N
+S -50 350 50 -350 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
+ENDDRAW
+ENDDEF
+#
 # Connector:Conn_01x08
 #
 DEF Connector:Conn_01x08 J 0 40 Y N 1 F N
@@ -189,41 +223,6 @@ X GND 9 900 -400 300 L 50 50 1 1 W
 ENDDRAW
 ENDDEF
 #
-# MCU_ST_STM8:STM8S003F3P
-#
-DEF MCU_ST_STM8:STM8S003F3P U 0 40 Y Y 1 F N
-F0 "U" -1150 800 50 H V L CNN
-F1 "MCU_ST_STM8:STM8S003F3P" -1150 700 50 H V L CNN
-F2 "Housings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mm" -1150 -800 50 H I L CIN
-F3 "" -50 -400 50 H I C CNN
-$FPLIST
- TSSOP*
-$ENDFPLIST
-DRAW
-S -1150 650 1150 -750 0 1 10 f
-X PD4/TIM2_CH1/BEEP/UART1_CK 1 -1300 -100 150 R 50 50 1 1 B
-X [SPI_NSS]TIM2_CH3/PA3 10 1300 300 150 L 50 50 1 1 B
-X [TIM1_BKIN]I2C_SDA/PB5 11 1300 0 150 L 50 50 1 1 B
-X [ADC_ETR]I2C_SCL/PB4 12 1300 100 150 L 50 50 1 1 B
-X [TIM1_CH1N]TIM1_CH3/PC3 13 1300 -200 150 L 50 50 1 1 B
-X [TIM1_CH2N]AIN2/TIM1_CH4/PC4 14 1300 -300 150 L 50 50 1 1 B
-X [TIM2_CH1]SPI_SCK/PC5 15 1300 -400 150 L 50 50 1 1 B
-X [TIM1_CH1]SPI_MOSI/PC6 16 1300 -500 150 L 50 50 1 1 B
-X [TIM1_CH2]SPI_MISO/PC7 17 1300 -600 150 L 50 50 1 1 B
-X PD1/SWIM 18 -1300 200 150 R 50 50 1 1 B
-X PD2/AIN3[TIM2_CH3] 19 -1300 100 150 R 50 50 1 1 B
-X PD5/AIN5/UART1_TX 2 -1300 -200 150 R 50 50 1 1 B
-X PD3/AIN4/TIM2_CH2 20 -1300 0 150 R 50 50 1 1 B
-X PD6/AIN6/UART1_RX 3 -1300 -300 150 R 50 50 1 1 B
-X NRST 4 -1300 500 150 R 50 50 1 1 I
-X OSCIN/PA1 5 1300 500 150 L 50 50 1 1 B
-X OSCOUT/PA2 6 1300 400 150 L 50 50 1 1 B
-X VSS 7 0 -900 150 U 50 50 1 1 w
-X Vcap 8 -1300 -600 150 R 50 50 1 1 P
-X VDD 9 0 800 150 D 50 50 1 1 W
-ENDDRAW
-ENDDEF
-#
 # Motor:Motor_DC
 #
 DEF Motor:Motor_DC M 0 0 Y Y 1 F N
@@ -248,6 +247,54 @@ X - 2 0 -300 100 U 50 50 1 1 P
 ENDDRAW
 ENDDEF
 #
+# atmel:ATMEGA328P-AU
+#
+DEF atmel:ATMEGA328P-AU U 0 40 Y Y 1 F N
+F0 "U" -750 1250 50 H V L BNN
+F1 "atmel:ATMEGA328P-AU" 400 -1400 50 H V L BNN
+F2 "Housings_QFP:TQFP-32_7x7mm_Pitch0.8mm" 0 0 50 H I C CIN
+F3 "" 0 0 50 H I C CNN
+ALIAS ATMEGA48A-AU ATMEGA48PA-AU ATMEGA88A-AU ATMEGA88PA-AU ATMEGA168PA-AU ATMEGA328-AU ATMEGA328P-AU
+$FPLIST
+ TQFP*7x7mm*Pitch0.8mm*
+$ENDFPLIST
+DRAW
+S -750 1200 850 -1300 0 1 10 f
+X (PCINT19/OC2B/INT1)PD3 1 1000 -800 150 L 40 40 1 1 B
+X (PCINT22/OC0A/AIN0)PD6 10 1000 -1100 150 L 40 40 1 1 B
+X (PCINT23/AIN1)PD7 11 1000 -1200 150 L 40 40 1 1 B
+X (PCINT0/CLKO/ICP1)PB0 12 1000 1100 150 L 40 40 1 1 B
+X (PCINT1/OC1A)PB1 13 1000 1000 150 L 40 40 1 1 B
+X (PCINT2/OC1B/~SS~)PB2 14 1000 900 150 L 40 40 1 1 B
+X (PCINT3/OC2A/MOSI)PB3 15 1000 800 150 L 40 40 1 1 B
+X (PCINT4/MISO)PB4 16 1000 700 150 L 40 40 1 1 B
+X (PCINT5/SCK)PB5 17 1000 600 150 L 40 40 1 1 B
+X AVCC 18 -900 800 150 R 40 40 1 1 W
+X ADC6 19 -900 -250 150 R 40 40 1 1 I
+X (PCINT20/XCK/T0)PD4 2 1000 -900 150 L 40 40 1 1 B
+X AREF 20 -900 500 150 R 40 40 1 1 B
+X GND 21 -900 -1000 150 R 40 40 1 1 W
+X ADC7 22 -900 -350 150 R 40 40 1 1 I
+X (PCINT8/ADC0)PC0 23 1000 250 150 L 40 40 1 1 B
+X (PCINT9/ADC1)PC1 24 1000 150 150 L 40 40 1 1 B
+X (PCINT10/ADC2)PC2 25 1000 50 150 L 40 40 1 1 B
+X (PCINT11/ADC3)PC3 26 1000 -50 150 L 40 40 1 1 B
+X (PCINT12/SDA/ADC4)PC4 27 1000 -150 150 L 40 40 1 1 B
+X (PCINT13/SCL/ADC5)PC5 28 1000 -250 150 L 40 40 1 1 B
+X (PCINT14/~RESET~)PC6 29 1000 -350 150 L 40 40 1 1 B
+X GND 3 -900 -1200 150 R 40 40 1 1 W
+X (PCINT16/RXD)PD0 30 1000 -500 150 L 40 40 1 1 B
+X (PCINT17/TXD)PD1 31 1000 -600 150 L 40 40 1 1 B
+X (PCINT18/INT0)PD2 32 1000 -700 150 L 40 40 1 1 B
+X VCC 4 -900 1100 150 R 40 40 1 1 W
+X GND 5 -900 -1100 150 R 40 40 1 1 W
+X VCC 6 -900 1000 150 R 40 40 1 1 W
+X (PCINT6/XTAL1/TOSC1)PB6 7 1000 500 150 L 40 40 1 1 B
+X (PCINT7/XTAL2/TOSC2)PB7 8 1000 400 150 L 40 40 1 1 B
+X (PCINT21/OC0B/T1)PD5 9 1000 -1000 150 L 40 40 1 1 B
+ENDDRAW
+ENDDEF
+#
 # device:CP1
 #
 DEF device:CP1 C 0 10 N N 1 F N
@@ -286,30 +333,26 @@ X ~ 2 0 -100 80 U 50 50 1 1 P
 ENDDRAW
 ENDDEF
 #
-# device:Crystal_GND23
+# device:Crystal_GND24_Small
 #
-DEF device:Crystal_GND23 Y 0 40 Y N 1 F N
-F0 "Y" 125 200 50 H V L CNN
-F1 "device:Crystal_GND23" 125 125 50 H V L CNN
+DEF device:Crystal_GND24_Small Y 0 40 Y N 1 F N
+F0 "Y" 50 175 50 H V L CNN
+F1 "device:Crystal_GND24_Small" 50 100 50 H V L CNN
 F2 "" 0 0 50 H I C CNN
 F3 "" 0 0 50 H I C CNN
 $FPLIST
  Crystal*
 $ENDFPLIST
 DRAW
-S -45 100 45 -100 0 1 12 N
-P 2 0 1 0 -100 0 -80 0 N
-P 2 0 1 20 -80 -50 -80 50 N
-P 2 0 1 0 0 -150 0 -140 N
-P 2 0 1 0 0 140 0 150 N
-P 2 0 1 20 80 -50 80 50 N
-P 2 0 1 0 80 0 100 0 N
-P 4 0 1 0 -100 -90 -100 -140 100 -140 100 -90 N
-P 4 0 1 0 -100 90 -100 140 100 140 100 90 N
-X 1 1 -150 0 50 R 50 50 1 1 P
-X 2 2 0 200 50 D 50 50 1 1 P
-X 3 3 0 -200 50 U 50 50 1 1 P
-X 4 4 150 0 50 L 50 50 1 1 P
+S -30 -60 30 60 0 1 0 N
+P 2 0 1 15 -50 -30 -50 30 N
+P 2 0 1 15 50 -30 50 30 N
+P 4 0 1 0 -50 -50 -50 -75 50 -75 50 -50 N
+P 4 0 1 0 -50 50 -50 75 50 75 50 50 N
+X 1 1 -100 0 50 R 50 50 1 1 P
+X 2 2 0 -125 50 U 50 50 1 1 P
+X 3 3 100 0 50 L 50 50 1 1 P
+X 4 4 0 125 50 D 50 50 1 1 P
 ENDDRAW
 ENDDEF
 #

+ 169 - 87
vinhome.bak

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 1 6
+Sheet 1 8
 Title ""
 Date ""
 Rev ""
@@ -15,149 +15,231 @@ Comment3 ""
 Comment4 ""
 $EndDescr
 $Sheet
-S 5150 1650 1750 850 
+S 6700 2100 900  1050
 U 5B616228
 F0 "Sheet5B616227" 50
 F1 "display.sch" 50
-F2 "CLK" I R 6900 2350 50 
-F3 "MOSI" I R 6900 2250 50 
-F4 "RES" I R 6900 2050 50 
-F5 "DC" I R 6900 2150 50 
-F6 "MISO" I R 6900 1950 50 
+F2 "CLK" I L 6700 2950 50 
+F3 "MOSI" I L 6700 2850 50 
+F4 "RES" I L 6700 2650 50 
+F5 "DC" I L 6700 2750 50 
+F6 "MISO" I L 6700 2550 50 
 $EndSheet
 $Sheet
-S 1950 3050 1750 1350
+S 2850 2950 850  1050
 U 5B6162EC
 F0 "Sheet5B6162EB" 50
 F1 "motor.sch" 50
-F2 "motor" I R 3700 3250 50 
-F3 "open" I R 3700 3350 50 
-F4 "NO" I R 3700 3450 50 
+F2 "motor" I R 3700 3650 50 
+F3 "open" I R 3700 3750 50 
+F4 "NO" I R 3700 3850 50 
 $EndSheet
 $Sheet
-S 2400 4650 1250 1050
-U 5B626CB4
-F0 "Sheet5B626CB3" 50
-F1 "conecter.sch" 50
-F2 "TXD" I R 3650 5500 50 
-F3 "RXD" I R 3650 5400 50 
-F4 "OUT1" I R 3650 4800 50 
-F5 "OUT2" I R 3650 4900 50 
-F6 "OUT3" I R 3650 5000 50 
-F7 "OUT4" I R 3650 5100 50 
-$EndSheet
-$Sheet
-S 7750 3200 850  550 
+S 6750 3850 850  550 
 U 5B629A42
 F0 "Sheet5B629A41" 50
 F1 "keypad.sch" 50
-F2 "SCL" I L 7750 3450 50 
-F3 "SDO" I L 7750 3550 50 
+F2 "SCL" I L 6750 4100 50 
+F3 "SDO" I L 6750 4200 50 
 $EndSheet
 $Sheet
-S 4600 2850 2350 1500
-U 5B627057
-F0 "Sheet5B627056" 50
+S 4650 5150 1150 1050
+U 5B6C14E1
+F0 "Sheet5B6C14E0" 50
 F1 "main.sch" 50
-F2 "TXD" I L 4600 4150 50 
-F3 "RXD" I L 4600 4050 50 
-F4 "P.5" I R 6950 3500 50 
-F5 "P.4" I R 6950 3600 50 
-F6 "MISO" I R 6950 3350 50 
-F7 "P.0" I L 4600 3600 50 
-F8 "P.2" I L 4600 3250 50 
-F9 "P.15" I L 4600 3350 50 
-F10 "P.9" I R 6950 3150 50 
-F11 "P.10" I R 6950 3250 50 
-F12 "MOSI" I R 6950 3050 50 
-F13 "SCLK" I R 6950 2950 50 
-F14 "P.16" I L 4600 3450 50 
-F15 "P.14" I L 4600 3700 50 
-F16 "P.12" I L 4600 3800 50 
-F17 "P.13" I L 4600 3900 50 
+F2 "SDA_ESP" I R 5800 5250 50 
+F3 "SCL_ESP" I R 5800 5350 50 
+F4 "RST" I R 5800 5450 50 
+F5 "GPIO5" I R 5800 5600 50 
+F6 "GPIO4" I R 5800 5700 50 
+F7 "GPIO0" I R 5800 5800 50 
+F8 "GPIO15" I R 5800 5900 50 
+F9 "GPIO16" I L 4650 5250 50 
+F10 "GPIO13" I L 4650 5350 50 
+F11 "GPIO12" I L 4650 5450 50 
+F12 "GPIO9" I L 4650 5750 50 
+F13 "GPIO10" I L 4650 5850 50 
+F14 "MOSI_ESP" I L 4650 5950 50 
+F15 "SCLK_ESP" I L 4650 6050 50 
+F16 "MISO_ESP" I L 4650 5650 50 
+$EndSheet
+$Sheet
+S 4600 3500 1400 1250
+U 5B6C3004
+F0 "Sheet5B6C3003" 50
+F1 "atmega328.sch" 50
+F2 "SDA" I R 6000 4650 50 
+F3 "SCL" I R 6000 4550 50 
+F4 "MISO" I R 6000 3950 50 
+F5 "MOSI" I R 6000 3650 50 
+F6 "PB1" I R 6000 3750 50 
+F7 "PB2" I R 6000 3850 50 
+F8 "SCK" I R 6000 3550 50 
+F9 "PC0" I R 6000 4100 50 
+F10 "PC1" I R 6000 4200 50 
+F11 "PC2" I L 4600 3650 50 
+F12 "PC3" I L 4600 3750 50 
+F13 "PD2" I L 4600 3850 50 
+F14 "PD3" I L 4600 4250 50 
+F15 "PD4" I L 4600 4350 50 
+F16 "PD5" I L 4600 4450 50 
+F17 "PD6" I L 4600 4550 50 
+F18 "PD7" I L 4600 4650 50 
+F19 "PB0" I R 6000 4450 50 
 $EndSheet
 Wire Wire Line
-	6900 2350 7100 2350
+	5800 5250 6100 5250
+Wire Wire Line
+	6100 5250 6100 4650
+Wire Wire Line
+	6100 4650 6000 4650
+Wire Wire Line
+	5800 5350 6150 5350
+Wire Wire Line
+	6150 5350 6150 4550
+Wire Wire Line
+	6150 4550 6000 4550
+Wire Wire Line
+	6000 4100 6750 4100
+Wire Wire Line
+	6000 4200 6750 4200
+Wire Wire Line
+	3700 3650 4600 3650
+Wire Wire Line
+	3700 3750 4600 3750
+Wire Wire Line
+	3700 3850 4600 3850
 Wire Wire Line
-	7100 2350 7100 2950
+	6000 4450 6250 4450
 Wire Wire Line
-	7100 2950 6950 2950
+	6250 4450 6250 5450
 Wire Wire Line
-	6900 2250 7150 2250
+	6250 5450 5800 5450
 Wire Wire Line
-	7150 2250 7150 3050
+	5800 5900 6050 5900
 Wire Wire Line
-	7150 3050 6950 3050
+	6050 5900 6050 6850
 Wire Wire Line
-	6950 3150 7250 3150
+	6050 6850 3700 6850
 Wire Wire Line
-	7250 3150 7250 2150
+	5800 5800 6100 5800
 Wire Wire Line
-	7250 2150 6900 2150
+	6100 5800 6100 6750
 Wire Wire Line
-	6900 2050 7300 2050
+	6100 6750 3700 6750
 Wire Wire Line
-	7300 2050 7300 3250
+	5800 5700 6200 5700
 Wire Wire Line
-	7300 3250 6950 3250
+	6200 5700 6200 6650
 Wire Wire Line
-	6950 3350 7400 3350
+	6200 6650 3700 6650
 Wire Wire Line
-	7400 3350 7400 1950
+	5800 5600 6300 5600
 Wire Wire Line
-	7400 1950 6900 1950
+	6300 5600 6300 6550
 Wire Wire Line
-	3700 3250 4600 3250
+	6300 6550 3700 6550
 Wire Wire Line
-	3700 3350 4600 3350
+	6000 3950 6450 3950
 Wire Wire Line
-	3700 3450 4600 3450
+	6450 3950 6450 2550
 Wire Wire Line
-	6950 3500 7400 3500
+	6450 2550 6700 2550
 Wire Wire Line
-	7400 3500 7400 3450
+	6000 3850 6400 3850
 Wire Wire Line
-	7400 3450 7750 3450
+	6400 3850 6400 2650
 Wire Wire Line
-	6950 3600 7400 3600
+	6400 2650 6700 2650
 Wire Wire Line
-	7400 3600 7400 3550
+	6000 3750 6350 3750
 Wire Wire Line
-	7400 3550 7750 3550
+	6350 3750 6350 2750
 Wire Wire Line
-	3650 5400 4450 5400
+	6350 2750 6700 2750
 Wire Wire Line
-	4450 5400 4450 4050
+	6000 3650 6250 3650
 Wire Wire Line
-	4450 4050 4600 4050
+	6250 3650 6250 2850
 Wire Wire Line
-	4600 4150 4500 4150
+	6250 2850 6700 2850
 Wire Wire Line
-	4500 4150 4500 5500
+	6000 3550 6200 3550
+Wire Wire Line
+	6200 3550 6200 2950
+Wire Wire Line
+	6200 2950 6700 2950
+Wire Wire Line
+	3700 5650 4650 5650
+Wire Wire Line
+	3700 5750 4650 5750
+Wire Wire Line
+	3700 5850 4650 5850
+Wire Wire Line
+	3700 5950 4650 5950
+Wire Wire Line
+	3700 6050 4650 6050
+Wire Wire Line
+	3700 5450 4650 5450
+Wire Wire Line
+	3700 5350 4650 5350
+Wire Wire Line
+	3700 5250 4650 5250
+$Sheet
+S 2950 5150 750  1900
+U 5B71E55D
+F0 "Sheet5B71E55C" 50
+F1 "connectorsch.sch" 50
+F2 "OUT_ESP1" I R 3700 5250 50 
+F3 "OUT_ESP2" I R 3700 5350 50 
+F4 "OUT_ESP3" I R 3700 5450 50 
+F5 "OUT_ESP4" I R 3700 5650 50 
+F6 "OUT_ESP5" I R 3700 5750 50 
+F7 "OUT_ESP6" I R 3700 5850 50 
+F8 "OUT_ESP7" I R 3700 5950 50 
+F9 "OUT_ESP8" I R 3700 6050 50 
+F10 "OUT_ESP9" I R 3700 6550 50 
+F11 "OUT_ESP10" I R 3700 6650 50 
+F12 "OUT_ESP11" I R 3700 6750 50 
+F13 "OUT_ESP12" I R 3700 6850 50 
+$EndSheet
+$Sheet
+S 2850 4150 850  850 
+U 5B71ECD0
+F0 "Sheet5B71ECCF" 50
+F1 "RFID.sch" 50
+F2 "RST_RF" I R 3700 4250 50 
+F3 "IRQ" I R 3700 4350 50 
+F4 "MISO_RF" I R 3700 4450 50 
+F5 "MOSI_RF" I R 3700 4550 50 
+F6 "SCK_RF" I R 3700 4650 50 
+F7 "SDA_RF" I R 3700 4750 50 
+$EndSheet
 Wire Wire Line
-	4500 5500 3650 5500
+	3700 4250 4600 4250
 Wire Wire Line
-	3650 4800 3950 4800
+	3700 4450 4250 4450
 Wire Wire Line
-	3950 4800 3950 3600
+	4250 4450 4250 4350
 Wire Wire Line
-	3950 3600 4600 3600
+	4250 4350 4600 4350
 Wire Wire Line
-	4600 3700 4000 3700
+	3700 4550 4300 4550
 Wire Wire Line
-	4000 3700 4000 4900
+	4300 4550 4300 4450
 Wire Wire Line
-	4000 4900 3650 4900
+	4300 4450 4600 4450
 Wire Wire Line
-	3650 5000 4050 5000
+	3700 4650 4350 4650
 Wire Wire Line
-	4050 5000 4050 3800
+	4350 4650 4350 4550
 Wire Wire Line
-	4050 3800 4600 3800
+	4350 4550 4600 4550
 Wire Wire Line
-	4600 3900 4100 3900
+	3700 4750 4400 4750
 Wire Wire Line
-	4100 3900 4100 5100
+	4400 4750 4400 4650
 Wire Wire Line
-	4100 5100 3650 5100
+	4400 4650 4600 4650
+NoConn ~ 3700 4350
 $EndSCHEMATC

+ 181 - 87
vinhome.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 1 6
+Sheet 1 8
 Title ""
 Date ""
 Rev ""
@@ -15,149 +15,243 @@ Comment3 ""
 Comment4 ""
 $EndDescr
 $Sheet
-S 5150 1650 1750 850 
+S 6700 2100 900  1050
 U 5B616228
 F0 "Sheet5B616227" 50
 F1 "display.sch" 50
-F2 "CLK" I R 6900 2350 50 
-F3 "MOSI" I R 6900 2250 50 
-F4 "RES" I R 6900 2050 50 
-F5 "DC" I R 6900 2150 50 
-F6 "MISO" I R 6900 1950 50 
+F2 "CLK" I L 6700 2950 50 
+F3 "MOSI" I L 6700 2850 50 
+F4 "RES" I L 6700 2650 50 
+F5 "DC" I L 6700 2750 50 
+F6 "MISO" I L 6700 2550 50 
 $EndSheet
 $Sheet
-S 1950 3050 1750 1350
+S 2850 2100 850  1050
 U 5B6162EC
 F0 "Sheet5B6162EB" 50
 F1 "motor.sch" 50
-F2 "motor" I R 3700 3250 50 
-F3 "open" I R 3700 3350 50 
-F4 "NO" I R 3700 3450 50 
+F2 "motor" I R 3700 2800 50 
+F3 "open" I R 3700 2900 50 
+F4 "NO" I R 3700 3000 50 
 $EndSheet
 $Sheet
-S 2400 4650 1250 1050
-U 5B626CB4
-F0 "Sheet5B626CB3" 50
-F1 "conecter.sch" 50
-F2 "TXD" I R 3650 5500 50 
-F3 "RXD" I R 3650 5400 50 
-F4 "OUT1" I R 3650 4800 50 
-F5 "OUT2" I R 3650 4900 50 
-F6 "OUT3" I R 3650 5000 50 
-F7 "OUT4" I R 3650 5100 50 
-$EndSheet
-$Sheet
-S 7750 3200 850  550 
+S 6750 3850 850  550 
 U 5B629A42
 F0 "Sheet5B629A41" 50
 F1 "keypad.sch" 50
-F2 "SCL" I L 7750 3450 50 
-F3 "SDO" I L 7750 3550 50 
+F2 "SCL" I L 6750 4100 50 
+F3 "SDO" I L 6750 4200 50 
 $EndSheet
 $Sheet
-S 4600 2850 2350 1500
-U 5B627057
-F0 "Sheet5B627056" 50
+S 4650 5150 1150 1050
+U 5B6C14E1
+F0 "Sheet5B6C14E0" 50
 F1 "main.sch" 50
-F2 "TXD" I L 4600 4150 50 
-F3 "RXD" I L 4600 4050 50 
-F4 "P.5" I R 6950 3500 50 
-F5 "P.4" I R 6950 3600 50 
-F6 "MISO" I R 6950 3350 50 
-F7 "P.0" I L 4600 3600 50 
-F8 "P.2" I L 4600 3250 50 
-F9 "P.15" I L 4600 3350 50 
-F10 "P.9" I R 6950 3150 50 
-F11 "P.10" I R 6950 3250 50 
-F12 "MOSI" I R 6950 3050 50 
-F13 "SCLK" I R 6950 2950 50 
-F14 "P.16" I L 4600 3450 50 
-F15 "P.14" I L 4600 3700 50 
-F16 "P.12" I L 4600 3800 50 
-F17 "P.13" I L 4600 3900 50 
+F2 "SDA_ESP" I R 5800 5250 50 
+F3 "SCL_ESP" I R 5800 5350 50 
+F4 "RST" I R 5800 5450 50 
+F5 "GPIO5" I R 5800 5600 50 
+F6 "GPIO4" I R 5800 5700 50 
+F7 "GPIO0" I R 5800 5800 50 
+F8 "GPIO15" I R 5800 5900 50 
+F9 "GPIO16" I L 4650 5250 50 
+F10 "GPIO13" I L 4650 5350 50 
+F11 "GPIO12" I L 4650 5450 50 
+F12 "GPIO9" I L 4650 5750 50 
+F13 "GPIO10" I L 4650 5850 50 
+F14 "MOSI_ESP" I L 4650 5950 50 
+F15 "SCLK_ESP" I L 4650 6050 50 
+F16 "MISO_ESP" I L 4650 5650 50 
 $EndSheet
+$Sheet
+S 4600 3500 1400 1250
+U 5B6C3004
+F0 "Sheet5B6C3003" 50
+F1 "atmega328.sch" 50
+F2 "SDA" I R 6000 4650 50 
+F3 "SCL" I R 6000 4550 50 
+F4 "MISO" I R 6000 3950 50 
+F5 "MOSI" I R 6000 3650 50 
+F6 "PB1" I R 6000 3750 50 
+F7 "PB2" I R 6000 3850 50 
+F8 "SCK" I R 6000 3550 50 
+F9 "PC0" I R 6000 4100 50 
+F10 "PC1" I R 6000 4200 50 
+F11 "PC2" I L 4600 3650 50 
+F12 "PC3" I L 4600 3750 50 
+F13 "PD2" I L 4600 3850 50 
+F14 "PD3" I L 4600 4250 50 
+F15 "PD4" I L 4600 4350 50 
+F16 "PD5" I L 4600 4450 50 
+F17 "PD6" I L 4600 4550 50 
+F18 "PD7" I L 4600 4650 50 
+F19 "PB0" I R 6000 4450 50 
+$EndSheet
+Wire Wire Line
+	5800 5250 6100 5250
+Wire Wire Line
+	6100 5250 6100 4650
+Wire Wire Line
+	6100 4650 6000 4650
+Wire Wire Line
+	5800 5350 6150 5350
+Wire Wire Line
+	6150 5350 6150 4550
+Wire Wire Line
+	6150 4550 6000 4550
+Wire Wire Line
+	6000 4100 6750 4100
+Wire Wire Line
+	6000 4200 6750 4200
+Wire Wire Line
+	6000 4450 6250 4450
+Wire Wire Line
+	6250 4450 6250 5450
+Wire Wire Line
+	6250 5450 5800 5450
+Wire Wire Line
+	5800 5900 6050 5900
+Wire Wire Line
+	6050 5900 6050 6850
 Wire Wire Line
-	6900 2350 7100 2350
+	6050 6850 3700 6850
 Wire Wire Line
-	7100 2350 7100 2950
+	5800 5800 6100 5800
 Wire Wire Line
-	7100 2950 6950 2950
+	6100 5800 6100 6750
 Wire Wire Line
-	6900 2250 7150 2250
+	6100 6750 3700 6750
 Wire Wire Line
-	7150 2250 7150 3050
+	5800 5700 6200 5700
 Wire Wire Line
-	7150 3050 6950 3050
+	6200 5700 6200 6650
 Wire Wire Line
-	6950 3150 7250 3150
+	6200 6650 3700 6650
 Wire Wire Line
-	7250 3150 7250 2150
+	5800 5600 6300 5600
 Wire Wire Line
-	7250 2150 6900 2150
+	6300 5600 6300 6550
 Wire Wire Line
-	6900 2050 7300 2050
+	6300 6550 3700 6550
 Wire Wire Line
-	7300 2050 7300 3250
+	6000 3950 6450 3950
 Wire Wire Line
-	7300 3250 6950 3250
+	6450 3950 6450 2550
 Wire Wire Line
-	6950 3350 7400 3350
+	6450 2550 6700 2550
 Wire Wire Line
-	7400 3350 7400 1950
+	6000 3850 6400 3850
 Wire Wire Line
-	7400 1950 6900 1950
+	6400 3850 6400 2650
 Wire Wire Line
-	3700 3250 4600 3250
+	6400 2650 6700 2650
 Wire Wire Line
-	3700 3350 4600 3350
+	6000 3750 6350 3750
 Wire Wire Line
-	3700 3450 4600 3450
+	6350 3750 6350 2750
 Wire Wire Line
-	6950 3500 7400 3500
+	6350 2750 6700 2750
 Wire Wire Line
-	7400 3500 7400 3450
+	6000 3650 6250 3650
+Wire Wire Line
+	6250 3650 6250 2850
+Wire Wire Line
+	6250 2850 6700 2850
+Wire Wire Line
+	6000 3550 6200 3550
+Wire Wire Line
+	6200 3550 6200 2950
+Wire Wire Line
+	6200 2950 6700 2950
+Wire Wire Line
+	3700 5650 4650 5650
+Wire Wire Line
+	3700 5750 4650 5750
+Wire Wire Line
+	3700 5850 4650 5850
+Wire Wire Line
+	3700 5950 4650 5950
+Wire Wire Line
+	3700 6050 4650 6050
+Wire Wire Line
+	3700 5450 4650 5450
+Wire Wire Line
+	3700 5350 4650 5350
+Wire Wire Line
+	3700 5250 4650 5250
+$Sheet
+S 2950 5150 750  1900
+U 5B71E55D
+F0 "Sheet5B71E55C" 50
+F1 "connectorsch.sch" 50
+F2 "OUT_ESP1" I R 3700 5250 50 
+F3 "OUT_ESP2" I R 3700 5350 50 
+F4 "OUT_ESP3" I R 3700 5450 50 
+F5 "OUT_ESP4" I R 3700 5650 50 
+F6 "OUT_ESP5" I R 3700 5750 50 
+F7 "OUT_ESP6" I R 3700 5850 50 
+F8 "OUT_ESP7" I R 3700 5950 50 
+F9 "OUT_ESP8" I R 3700 6050 50 
+F10 "OUT_ESP9" I R 3700 6550 50 
+F11 "OUT_ESP10" I R 3700 6650 50 
+F12 "OUT_ESP11" I R 3700 6750 50 
+F13 "OUT_ESP12" I R 3700 6850 50 
+$EndSheet
+$Sheet
+S 2850 4150 850  850 
+U 5B71ECD0
+F0 "Sheet5B71ECCF" 50
+F1 "RFID.sch" 50
+F2 "RST_RF" I R 3700 4250 50 
+F3 "IRQ" I R 3700 4350 50 
+F4 "MISO_RF" I R 3700 4450 50 
+F5 "MOSI_RF" I R 3700 4550 50 
+F6 "SCK_RF" I R 3700 4650 50 
+F7 "SDA_RF" I R 3700 4750 50 
+$EndSheet
 Wire Wire Line
-	7400 3450 7750 3450
+	3700 4250 4600 4250
 Wire Wire Line
-	6950 3600 7400 3600
+	3700 4450 4250 4450
 Wire Wire Line
-	7400 3600 7400 3550
+	4250 4450 4250 4350
 Wire Wire Line
-	7400 3550 7750 3550
+	4250 4350 4600 4350
 Wire Wire Line
-	3650 5400 4450 5400
+	3700 4550 4300 4550
 Wire Wire Line
-	4450 5400 4450 4050
+	4300 4550 4300 4450
 Wire Wire Line
-	4450 4050 4600 4050
+	4300 4450 4600 4450
 Wire Wire Line
-	4600 4150 4500 4150
+	3700 4650 4350 4650
 Wire Wire Line
-	4500 4150 4500 5500
+	4350 4650 4350 4550
 Wire Wire Line
-	4500 5500 3650 5500
+	4350 4550 4600 4550
 Wire Wire Line
-	3650 4800 3950 4800
+	3700 4750 4400 4750
 Wire Wire Line
-	3950 4800 3950 3600
+	4400 4750 4400 4650
 Wire Wire Line
-	3950 3600 4600 3600
+	4400 4650 4600 4650
+NoConn ~ 3700 4350
 Wire Wire Line
-	4600 3700 4000 3700
+	3700 3000 3800 3000
 Wire Wire Line
-	4000 3700 4000 4900
+	3800 3000 3800 3850
 Wire Wire Line
-	4000 4900 3650 4900
+	3800 3850 4600 3850
 Wire Wire Line
-	3650 5000 4050 5000
+	3700 2900 3850 2900
 Wire Wire Line
-	4050 5000 4050 3800
+	3850 2900 3850 3750
 Wire Wire Line
-	4050 3800 4600 3800
+	3850 3750 4600 3750
 Wire Wire Line
-	4600 3900 4100 3900
+	4600 3650 3900 3650
 Wire Wire Line
-	4100 3900 4100 5100
+	3900 3650 3900 2800
 Wire Wire Line
-	4100 5100 3650 5100
+	3900 2800 3700 2800
 $EndSCHEMATC