Browse Source

mach nguyen ly 8-8

sonnt 4 years ago
parent
commit
7283f59d80
17 changed files with 2603 additions and 147 deletions
  1. 608 0
      _saved_main.sch
  2. 117 0
      conecter.bak
  3. 54 1
      conecter.sch
  4. 91 0
      display.bak
  5. 81 0
      keypad.bak
  6. 608 0
      main.bak
  7. 243 107
      main.sch
  8. 5 5
      _saved_motor.sch
  9. 5 5
      motor.sch
  10. 3 0
      sym-lib-table
  11. 464 0
      vinhome-cache.lib
  12. 3 0
      vinhome-rescue.dcm
  13. 58 0
      vinhome-rescue.lib
  14. 163 0
      vinhome.bak
  15. 1 0
      vinhome.kicad_pcb
  16. 33 0
      vinhome.pro
  17. 66 29
      vinhome.sch

+ 608 - 0
_saved_main.sch

@@ -0,0 +1,608 @@
+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

+ 117 - 0
conecter.bak

@@ -0,0 +1,117 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 4 6
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x04 J?
+U 1 1 5B626E99
+P 2750 2350
+F 0 "J?" H 2670 1925 50  0000 C CNN
+F 1 "nap UART" H 2670 2016 50  0000 C CNN
+F 2 "" H 2750 2350 50  0001 C CNN
+F 3 "~" H 2750 2350 50  0001 C CNN
+	1    2750 2350
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B626FCD
+P 3200 2100
+F 0 "#PWR?" H 3200 1950 50  0001 C CNN
+F 1 "+3V3" H 3215 2273 50  0000 C CNN
+F 2 "" H 3200 2100 50  0001 C CNN
+F 3 "" H 3200 2100 50  0001 C CNN
+	1    3200 2100
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	2950 2150 3200 2150
+Wire Wire Line
+	3200 2150 3200 2100
+$Comp
+L power:GND #PWR?
+U 1 1 5B62702F
+P 3250 2250
+F 0 "#PWR?" H 3250 2000 50  0001 C CNN
+F 1 "GND" V 3255 2122 50  0000 R CNN
+F 2 "" H 3250 2250 50  0001 C CNN
+F 3 "" H 3250 2250 50  0001 C CNN
+	1    3250 2250
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	2950 2250 3250 2250
+Wire Wire Line
+	2950 2350 3200 2350
+Text HLabel 3200 2350 2    50   Input ~ 0
+TXD
+Text HLabel 3200 2450 2    50   Input ~ 0
+RXD
+Wire Wire Line
+	2950 2450 3200 2450
+Text HLabel 3200 2800 2    50   Input ~ 0
+OUT1
+Text HLabel 3200 2900 2    50   Input ~ 0
+OUT2
+Text HLabel 3200 3000 2    50   Input ~ 0
+OUT3
+Text HLabel 3200 3100 2    50   Input ~ 0
+OUT4
+Wire Wire Line
+	2950 2800 3200 2800
+Wire Wire Line
+	2950 2900 3200 2900
+Wire Wire Line
+	2950 3000 3200 3000
+Wire Wire Line
+	2950 3100 3200 3100
+$Comp
+L Connector:Conn_01x06 J?
+U 1 1 5B698610
+P 2750 3100
+F 0 "J?" H 2670 2575 50  0000 C CNN
+F 1 "Conn_01x06" H 2670 2666 50  0000 C CNN
+F 2 "" H 2750 3100 50  0001 C CNN
+F 3 "~" H 2750 3100 50  0001 C CNN
+	1    2750 3100
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B69887E
+P 3300 3300
+F 0 "#PWR?" H 3300 3150 50  0001 C CNN
+F 1 "+3V3" H 3315 3473 50  0000 C CNN
+F 2 "" H 3300 3300 50  0001 C CNN
+F 3 "" H 3300 3300 50  0001 C CNN
+	1    3300 3300
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	2950 3300 3300 3300
+$Comp
+L power:GND #PWR?
+U 1 1 5B69892C
+P 3200 3200
+F 0 "#PWR?" H 3200 2950 50  0001 C CNN
+F 1 "GND" V 3205 3072 50  0000 R CNN
+F 2 "" H 3200 3200 50  0001 C CNN
+F 3 "" H 3200 3200 50  0001 C CNN
+	1    3200 3200
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	2950 3200 3200 3200
+$EndSCHEMATC

+ 54 - 1
conecter.sch

@@ -4,7 +4,7 @@ EELAYER 26 0
 EELAYER END
 $Descr A4 11693 8268
 encoding utf-8
-Sheet 5 6
+Sheet 4 6
 Title ""
 Date ""
 Rev ""
@@ -61,4 +61,57 @@ Text HLabel 3200 2450 2    50   Input ~ 0
 RXD
 Wire Wire Line
 	2950 2450 3200 2450
+Text HLabel 3200 2800 2    50   Input ~ 0
+OUT1
+Text HLabel 3200 2900 2    50   Input ~ 0
+OUT2
+Text HLabel 3200 3000 2    50   Input ~ 0
+OUT3
+Text HLabel 3200 3100 2    50   Input ~ 0
+OUT4
+Wire Wire Line
+	2950 2800 3200 2800
+Wire Wire Line
+	2950 2900 3200 2900
+Wire Wire Line
+	2950 3000 3200 3000
+Wire Wire Line
+	2950 3100 3200 3100
+$Comp
+L Connector:Conn_01x06 J?
+U 1 1 5B698610
+P 2750 3100
+F 0 "J?" H 2670 2575 50  0000 C CNN
+F 1 "Conn_01x06" H 2670 2666 50  0000 C CNN
+F 2 "" H 2750 3100 50  0001 C CNN
+F 3 "~" H 2750 3100 50  0001 C CNN
+	1    2750 3100
+	-1   0    0    1   
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B69887E
+P 3300 3300
+F 0 "#PWR?" H 3300 3150 50  0001 C CNN
+F 1 "+3V3" H 3315 3473 50  0000 C CNN
+F 2 "" H 3300 3300 50  0001 C CNN
+F 3 "" H 3300 3300 50  0001 C CNN
+	1    3300 3300
+	-1   0    0    1   
+$EndComp
+Wire Wire Line
+	2950 3300 3300 3300
+$Comp
+L power:GND #PWR?
+U 1 1 5B69892C
+P 3200 3200
+F 0 "#PWR?" H 3200 2950 50  0001 C CNN
+F 1 "GND" V 3205 3072 50  0000 R CNN
+F 2 "" H 3200 3200 50  0001 C CNN
+F 3 "" H 3200 3200 50  0001 C CNN
+	1    3200 3200
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	2950 3200 3200 3200
 $EndSCHEMATC

+ 91 - 0
display.bak

@@ -0,0 +1,91 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 2 6
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x08 J?
+U 1 1 5B62B126
+P 2250 2350
+F 0 "J?" H 2170 2867 50  0000 C CNN
+F 1 "LCD TFT 2.4 inch" H 2170 2776 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x08_Pitch2.54mm" H 2250 2350 50  0001 C CNN
+F 3 "~" H 2250 2350 50  0001 C CNN
+	1    2250 2350
+	-1   0    0    -1  
+$EndComp
+$Comp
+L power:GND #PWR?
+U 1 1 5B62B5E5
+P 2600 2050
+F 0 "#PWR?" H 2600 1800 50  0001 C CNN
+F 1 "GND" V 2605 1922 50  0000 R CNN
+F 2 "" H 2600 2050 50  0001 C CNN
+F 3 "" H 2600 2050 50  0001 C CNN
+	1    2600 2050
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	2450 2050 2600 2050
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B62B66C
+P 2950 2100
+F 0 "#PWR?" H 2950 1950 50  0001 C CNN
+F 1 "+3V3" H 2965 2273 50  0000 C CNN
+F 2 "" H 2950 2100 50  0001 C CNN
+F 3 "" H 2950 2100 50  0001 C CNN
+	1    2950 2100
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	2450 2150 2950 2150
+Wire Wire Line
+	2950 2150 2950 2100
+Wire Wire Line
+	2450 2250 2800 2250
+Wire Wire Line
+	2450 2350 2800 2350
+Wire Wire Line
+	2450 2450 2800 2450
+Wire Wire Line
+	2450 2550 2800 2550
+Wire Wire Line
+	2450 2750 2800 2750
+Text HLabel 2800 2250 2    50   Input ~ 0
+CLK
+Text HLabel 2800 2350 2    50   Input ~ 0
+MOSI
+Text HLabel 2800 2450 2    50   Input ~ 0
+RES
+Text HLabel 2800 2550 2    50   Input ~ 0
+DC
+Text HLabel 2800 2750 2    50   Input ~ 0
+MISO
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B62B951
+P 3150 2600
+F 0 "#PWR?" H 3150 2450 50  0001 C CNN
+F 1 "+3V3" H 3165 2773 50  0000 C CNN
+F 2 "" H 3150 2600 50  0001 C CNN
+F 3 "" H 3150 2600 50  0001 C CNN
+	1    3150 2600
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	3150 2650 3150 2600
+Wire Wire Line
+	2450 2650 3150 2650
+$EndSCHEMATC

+ 81 - 0
keypad.bak

@@ -0,0 +1,81 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 5 6
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L Connector:Conn_01x04 J?
+U 1 1 5B628A4A
+P 1650 2300
+F 0 "J?" H 1570 1875 50  0000 C CNN
+F 1 "Conn_01x04" H 1570 1966 50  0000 C CNN
+F 2 "Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm" H 1650 2300 50  0001 C CNN
+F 3 "~" H 1650 2300 50  0001 C CNN
+	1    1650 2300
+	-1   0    0    1   
+$EndComp
+$Comp
+L device:C_Small C?
+U 1 1 5B628D63
+P 2200 2100
+F 0 "C?" H 2292 2146 50  0000 L CNN
+F 1 "C_Small" H 2292 2055 50  0000 L CNN
+F 2 "Capacitors_SMD:C_0805_HandSoldering" H 2200 2100 50  0001 C CNN
+F 3 "" H 2200 2100 50  0001 C CNN
+	1    2200 2100
+	1    0    0    -1  
+$EndComp
+$Comp
+L power:+3V3 #PWR?
+U 1 1 5B628E8A
+P 1850 1900
+F 0 "#PWR?" H 1850 1750 50  0001 C CNN
+F 1 "+3V3" H 1865 2073 50  0000 C CNN
+F 2 "" H 1850 1900 50  0001 C CNN
+F 3 "" H 1850 1900 50  0001 C CNN
+	1    1850 1900
+	1    0    0    -1  
+$EndComp
+Wire Wire Line
+	1850 1900 1850 2000
+Wire Wire Line
+	1850 2200 2200 2200
+Wire Wire Line
+	1850 2000 2200 2000
+Connection ~ 1850 2000
+Wire Wire Line
+	1850 2000 1850 2100
+$Comp
+L power:GND #PWR?
+U 1 1 5B628F47
+P 2450 2200
+F 0 "#PWR?" H 2450 1950 50  0001 C CNN
+F 1 "GND" V 2455 2072 50  0000 R CNN
+F 2 "" H 2450 2200 50  0001 C CNN
+F 3 "" H 2450 2200 50  0001 C CNN
+	1    2450 2200
+	0    -1   -1   0   
+$EndComp
+Wire Wire Line
+	2200 2200 2450 2200
+Connection ~ 2200 2200
+Wire Wire Line
+	1850 2300 2150 2300
+Wire Wire Line
+	1850 2400 2150 2400
+Text HLabel 2150 2300 2    50   Input ~ 0
+SCL
+Text HLabel 2150 2400 2    50   Input ~ 0
+SDO
+$EndSCHEMATC

+ 608 - 0
main.bak

@@ -0,0 +1,608 @@
+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 "" 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

+ 243 - 107
main.sch

@@ -20,7 +20,7 @@ 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" H 4800 3150 50  0001 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  
@@ -118,147 +118,147 @@ Wire Wire Line
 $Comp
 L device:R R?
 U 1 1 5B61A13D
-P 1650 1950
-F 0 "R?" V 1550 1950 50  0000 C CNN
-F 1 "12k" V 1650 1950 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1580 1950 50  0001 C CNN
-F 3 "" H 1650 1950 50  0001 C CNN
-	1    1650 1950
+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 1650 2150
-F 0 "R?" V 1550 2150 50  0000 C CNN
-F 1 "12k" V 1650 2150 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1580 2150 50  0001 C CNN
-F 3 "" H 1650 2150 50  0001 C CNN
-	1    1650 2150
+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 1650 2350
-F 0 "R?" V 1550 2350 50  0000 C CNN
-F 1 "12k" V 1650 2350 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1580 2350 50  0001 C CNN
-F 3 "" H 1650 2350 50  0001 C CNN
-	1    1650 2350
+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 1650 2550
-F 0 "R?" V 1550 2550 50  0000 C CNN
-F 1 "12k" V 1650 2550 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1580 2550 50  0001 C CNN
-F 3 "" H 1650 2550 50  0001 C CNN
-	1    1650 2550
+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 1650 2750
-F 0 "R?" V 1550 2750 50  0000 C CNN
-F 1 "12k" V 1650 2750 50  0000 C CNN
-F 2 "Resistors_SMD:R_0805_HandSoldering" V 1580 2750 50  0001 C CNN
-F 3 "" H 1650 2750 50  0001 C CNN
-	1    1650 2750
+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
-	1500 2550 1400 2550
+	1100 2650 1000 2650
 Wire Wire Line
-	1400 2350 1500 2350
+	1000 2450 1100 2450
 Wire Wire Line
-	1500 2150 1400 2150
+	1100 2250 1000 2250
 Wire Wire Line
-	1500 1950 1400 1950
+	1100 2050 1000 2050
 Wire Wire Line
-	1400 2550 1400 2350
-Connection ~ 1400 2150
+	1000 2650 1000 2450
+Connection ~ 1000 2250
 Wire Wire Line
-	1400 2150 1400 1950
-Connection ~ 1400 2350
+	1000 2250 1000 2050
+Connection ~ 1000 2450
 Wire Wire Line
-	1400 2350 1400 2150
+	1000 2450 1000 2250
 $Comp
 L power:+3V3 #PWR?
 U 1 1 5B61BD51
-P 1400 1850
-F 0 "#PWR?" H 1400 1700 50  0001 C CNN
-F 1 "+3V3" H 1415 2023 50  0000 C CNN
-F 2 "" H 1400 1850 50  0001 C CNN
-F 3 "" H 1400 1850 50  0001 C CNN
-	1    1400 1850
+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
-	1400 1950 1400 1850
-Connection ~ 1400 1950
+	1000 2050 1000 1950
+Connection ~ 1000 2050
 Wire Wire Line
-	1800 1950 2050 1950
+	1400 2050 1650 2050
 Wire Wire Line
-	1800 2150 2050 2150
+	1400 2250 1650 2250
 Wire Wire Line
-	1800 2350 2050 2350
+	1400 2450 1650 2450
 Wire Wire Line
-	1500 2750 1400 2750
+	1100 2850 1000 2850
 $Comp
 L power:GND #PWR?
 U 1 1 5B61EC07
-P 1400 2850
-F 0 "#PWR?" H 1400 2600 50  0001 C CNN
-F 1 "GND" H 1405 2677 50  0000 C CNN
-F 2 "" H 1400 2850 50  0001 C CNN
-F 3 "" H 1400 2850 50  0001 C CNN
-	1    1400 2850
+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
-	1400 2850 1400 2750
-Text Label 1850 1950 0    50   ~ 0
+	1000 2950 1000 2850
+Text Label 1450 2050 0    50   ~ 0
 GPIO0
-Text Label 1850 2150 0    50   ~ 0
+Text Label 1450 2250 0    50   ~ 0
 GPIO2
-Text Label 1850 2350 0    50   ~ 0
+Text Label 1450 2450 0    50   ~ 0
 CH_PD
-Text Label 1850 2550 0    50   ~ 0
+Text Label 1450 2650 0    50   ~ 0
 RST
-Text Label 1850 2750 0    50   ~ 0
+Text Label 1450 2850 0    50   ~ 0
 GPIO15
 $Comp
 L device:C_Small C?
 U 1 1 5B620CF1
-P 2400 2650
-F 0 "C?" H 2492 2696 50  0000 L CNN
-F 1 "103" H 2492 2605 50  0000 L CNN
-F 2 "Capacitors_SMD:C_0805_HandSoldering" H 2400 2650 50  0001 C CNN
-F 3 "" H 2400 2650 50  0001 C CNN
-	1    2400 2650
+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
-	1800 2750 2200 2750
+	1400 2850 1800 2850
 $Comp
 L power:GND #PWR?
 U 1 1 5B621FFB
-P 2400 2850
-F 0 "#PWR?" H 2400 2600 50  0001 C CNN
-F 1 "GND" H 2405 2677 50  0000 C CNN
-F 2 "" H 2400 2850 50  0001 C CNN
-F 3 "" H 2400 2850 50  0001 C CNN
-	1    2400 2850
+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
-	1800 2550 2400 2550
+	1400 2650 2000 2650
 Wire Wire Line
-	2400 2850 2400 2750
+	2000 2950 2000 2850
 Text HLabel 6000 2850 2    50   Input ~ 0
 TXD
 Text HLabel 6000 2950 2    50   Input ~ 0
@@ -309,32 +309,32 @@ GPIO2
 $Comp
 L Connector:Conn_01x02 J?
 U 1 1 5B62DC1E
-P 1450 3600
-F 0 "J?" H 1370 3275 50  0000 C CNN
-F 1 "select boot" H 1370 3366 50  0000 C CNN
-F 2 "Pin_Headers:Pin_Header_Straight_1x02_Pitch2.54mm" H 1450 3600 50  0001 C CNN
-F 3 "~" H 1450 3600 50  0001 C CNN
-	1    1450 3600
+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 1800 3650
-F 0 "#PWR?" H 1800 3400 50  0001 C CNN
-F 1 "GND" H 1805 3477 50  0000 C CNN
-F 2 "" H 1800 3650 50  0001 C CNN
-F 3 "" H 1800 3650 50  0001 C CNN
-	1    1800 3650
+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
-	1650 3600 1800 3600
+	1250 3700 1400 3700
 Wire Wire Line
-	1800 3600 1800 3650
+	1400 3700 1400 3750
 Wire Wire Line
-	1650 3500 2000 3500
-Text Label 1750 3500 0    50   ~ 0
+	1250 3600 1600 3600
+Text Label 1350 3600 0    50   ~ 0
 GPIO0
 $Comp
 L MCU_ST_STM8:STM8S003F3P U?
@@ -348,17 +348,6 @@ F 3 "http://www.st.com/st-web-ui/static/active/en/resource/technical/document/da
 	1    0    0    -1  
 $EndComp
 $Comp
-L vinhome-rescue:SWITCH_PUSHBUTTONC&K_KSS-adafruit SW?
-U 1 1 5B697455
-P 2850 2550
-F 0 "SW?" H 2850 2805 50  0000 C CNN
-F 1 "SWITCH_PUSHBUTTONC&K_KSS" H 2850 2714 50  0000 C CNN
-F 2 "iot_Swich:smd_push" H 2880 2700 20  0001 C CNN
-F 3 "" H 2850 2550 50  0001 C CNN
-	1    2850 2550
-	1    0    0    -1  
-$EndComp
-$Comp
 L device:C_Small C?
 U 1 1 5B69841A
 P 7300 4050
@@ -447,7 +436,7 @@ 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 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  
@@ -469,4 +458,151 @@ F 3 "" H 7400 2150 50  0001 C CNN
 $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

+ 5 - 5
_saved_motor.sch

@@ -329,10 +329,10 @@ Wire Wire Line
 	8250 4850 8600 4850
 Wire Wire Line
 	8250 4950 8600 4950
-Text HLabel 9050 4950 2    50   Input ~ 0
-open
-Text HLabel 9150 5100 2    50   Input ~ 0
+Text HLabel 9350 4900 2    50   Input ~ 0
 NO
-Text Label 8350 4950 0    50   ~ 0
-com
+Wire Wire Line
+	8600 5000 8600 4950
+Text HLabel 9350 4750 2    50   Input ~ 0
+open
 $EndSCHEMATC

+ 5 - 5
motor.sch

@@ -329,10 +329,10 @@ Wire Wire Line
 	8250 4850 8600 4850
 Wire Wire Line
 	8250 4950 8600 4950
-Text HLabel 8600 4750 2    50   Input ~ 0
-open
-Text HLabel 8600 4850 2    50   Input ~ 0
+Text HLabel 9350 4900 2    50   Input ~ 0
 NO
-Text Label 8350 4950 0    50   ~ 0
-com
+Wire Wire Line
+	8600 5000 8600 4950
+Text HLabel 9350 4750 2    50   Input ~ 0
+open
 $EndSCHEMATC

+ 3 - 0
sym-lib-table

@@ -0,0 +1,3 @@
+(sym_lib_table
+  (lib (name vinhome-rescue)(type Legacy)(uri ${KIPRJMOD}/vinhome-rescue.lib)(options "")(descr ""))
+)

+ 464 - 0
vinhome-cache.lib

@@ -0,0 +1,464 @@
+EESchema-LIBRARY Version 2.4
+#encoding utf-8
+#
+# Connector:Conn_01x02
+#
+DEF Connector:Conn_01x02 J 0 40 Y N 1 F N
+F0 "J" 0 100 50 H V C CNN
+F1 "Connector:Conn_01x02" 0 -200 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 -95 0 -105 1 1 6 N
+S -50 5 0 -5 1 1 6 N
+S -50 50 50 -150 1 1 10 f
+X Pin_1 1 -200 0 150 R 50 50 1 1 P
+X Pin_2 2 -200 -100 150 R 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Connector:Conn_01x04
+#
+DEF Connector:Conn_01x04 J 0 40 Y N 1 F N
+F0 "J" 0 200 50 H V C CNN
+F1 "Connector:Conn_01x04" 0 -300 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 -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 150 50 -250 1 1 10 f
+X Pin_1 1 -200 100 150 R 50 50 1 1 P
+X Pin_2 2 -200 0 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 -200 150 R 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Connector:Conn_01x05
+#
+DEF Connector:Conn_01x05 J 0 40 Y N 1 F N
+F0 "J" 0 300 50 H V C CNN
+F1 "Connector:Conn_01x05" 0 -300 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 -195 0 -205 1 1 6 N
+S -50 -95 0 -105 1 1 6 N
+S -50 5 0 -5 1 1 6 N
+S -50 105 0 95 1 1 6 N
+S -50 205 0 195 1 1 6 N
+S -50 250 50 -250 1 1 10 f
+X Pin_1 1 -200 200 150 R 50 50 1 1 P
+X Pin_2 2 -200 100 150 R 50 50 1 1 P
+X Pin_3 3 -200 0 150 R 50 50 1 1 P
+X Pin_4 4 -200 -100 150 R 50 50 1 1 P
+X Pin_5 5 -200 -200 150 R 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Connector:Conn_01x06
+#
+DEF Connector:Conn_01x06 J 0 40 Y N 1 F N
+F0 "J" 0 300 50 H V C CNN
+F1 "Connector:Conn_01x06" 0 -400 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ Connector*:*_??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 250 50 -350 1 1 10 f
+X Pin_1 1 -200 200 150 R 50 50 1 1 P
+X Pin_2 2 -200 100 150 R 50 50 1 1 P
+X Pin_3 3 -200 0 150 R 50 50 1 1 P
+X Pin_4 4 -200 -100 150 R 50 50 1 1 P
+X Pin_5 5 -200 -200 150 R 50 50 1 1 P
+X Pin_6 6 -200 -300 150 R 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# Connector:Conn_01x08
+#
+DEF Connector:Conn_01x08 J 0 40 Y N 1 F N
+F0 "J" 0 400 50 H V C CNN
+F1 "Connector:Conn_01x08" 0 -500 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ Connector*:*_??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 -395 0 -405 1 1 6 N
+S -50 -295 0 -305 1 1 6 N
+S -50 -195 0 -205 1 1 6 N
+S -50 -95 0 -105 1 1 6 N
+S -50 5 0 -5 1 1 6 N
+S -50 105 0 95 1 1 6 N
+S -50 205 0 195 1 1 6 N
+S -50 305 0 295 1 1 6 N
+S -50 350 50 -450 1 1 10 f
+X Pin_1 1 -200 300 150 R 50 50 1 1 P
+X Pin_2 2 -200 200 150 R 50 50 1 1 P
+X Pin_3 3 -200 100 150 R 50 50 1 1 P
+X Pin_4 4 -200 0 150 R 50 50 1 1 P
+X Pin_5 5 -200 -100 150 R 50 50 1 1 P
+X Pin_6 6 -200 -200 150 R 50 50 1 1 P
+X Pin_7 7 -200 -300 150 R 50 50 1 1 P
+X Pin_8 8 -200 -400 150 R 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# ESP8266:ESP-12E
+#
+DEF ESP8266:ESP-12E U 0 40 Y Y 1 F N
+F0 "U" 0 -100 50 H V C CNN
+F1 "ESP8266:ESP-12E" 0 100 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ ESP-12E
+ ESP-12E_SMD
+$ENDFPLIST
+DRAW
+S -600 -600 600 600 1 0 0 N
+X REST 1 -900 300 300 R 50 50 1 1 I
+X GPIO15 10 900 -300 300 L 50 50 1 1 B
+X GPIO2 11 900 -200 300 L 50 50 1 1 B
+X GPIO0 12 900 -100 300 L 50 50 1 1 B
+X GPIO4 13 900 0 300 L 50 50 1 1 B
+X GPIO5 14 900 100 300 L 50 50 1 1 B
+X RXD 15 900 200 300 L 50 50 1 1 I
+X TXD 16 900 300 300 L 50 50 1 1 O
+X CS0 17 -250 -900 300 U 50 50 1 1 B
+X MISO 18 -150 -900 300 U 50 50 1 1 B
+X GPIO9 19 -50 -900 300 U 50 50 1 1 B
+X ADC 2 -900 200 300 R 50 50 1 1 P
+X GPIO10 20 50 -900 300 U 50 50 1 1 B
+X MOSI 21 150 -900 300 U 50 50 1 1 B
+X SCLK 22 250 -900 300 U 50 50 1 1 B
+X CH_PD 3 -900 100 300 R 50 50 1 1 I
+X GPIO16 4 -900 0 300 R 50 50 1 1 B
+X GPIO14 5 -900 -100 300 R 50 50 1 1 B
+X GPIO12 6 -900 -200 300 R 50 50 1 1 B
+X GPIO13 7 -900 -300 300 R 50 50 1 1 B
+X VCC 8 -900 -400 300 R 50 50 1 1 W
+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
+F0 "M" 100 100 50 H V L CNN
+F1 "Motor:Motor_DC" 100 -200 50 H V L TNN
+F2 "" 0 -90 50 H I C CNN
+F3 "" 0 -90 50 H I C CNN
+$FPLIST
+ Pin_Headers:Pin_Header_Straight_1x02
+ Connect:bornier2
+ TerminalBlock*2pol
+$ENDFPLIST
+DRAW
+C 0 -60 128 0 1 10 N
+P 5 0 0 0 -50 -130 -50 20 0 -80 50 20 50 -130 N
+P 2 0 1 0 0 -300 0 -280 N
+P 2 0 1 0 0 -188 0 -204 N
+P 2 0 1 0 0 68 0 82 N
+P 2 0 1 0 0 80 0 100 N
+X + 1 0 200 100 D 50 50 1 1 P
+X - 2 0 -300 100 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# device:CP1
+#
+DEF device:CP1 C 0 10 N N 1 F N
+F0 "C" 25 100 50 H V L CNN
+F1 "device:CP1" 25 -100 50 H V L CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ CP_*
+$ENDFPLIST
+DRAW
+A 0 -150 128 1287 513 0 1 20 N -80 -50 80 -50
+P 2 0 1 20 -80 30 80 30 N
+P 2 0 1 0 -70 90 -30 90 N
+P 2 0 1 0 -50 70 -50 110 N
+X ~ 1 0 150 110 D 50 50 1 1 P
+X ~ 2 0 -150 130 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# device:C_Small
+#
+DEF device:C_Small C 0 10 N N 1 F N
+F0 "C" 10 70 50 H V L CNN
+F1 "device:C_Small" 10 -80 50 H V L CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ C_*
+$ENDFPLIST
+DRAW
+P 2 0 1 13 -60 -20 60 -20 N
+P 2 0 1 12 -60 20 60 20 N
+X ~ 1 0 100 80 D 50 50 1 1 P
+X ~ 2 0 -100 80 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# device:Crystal_GND23
+#
+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
+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
+ENDDRAW
+ENDDEF
+#
+# device:D_Schottky
+#
+DEF device:D_Schottky D 0 40 N N 1 F N
+F0 "D" 0 100 50 H V C CNN
+F1 "device:D_Schottky" 0 -100 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ TO-???*
+ *SingleDiode
+ *_Diode_*
+ *SingleDiode*
+ D_*
+$ENDFPLIST
+DRAW
+P 2 0 1 0 50 0 -50 0 N
+P 4 0 1 8 50 50 50 -50 -50 0 50 50 N
+P 6 0 1 8 -75 25 -75 50 -50 50 -50 -50 -25 -50 -25 -25 N
+X K 1 -150 0 100 R 50 50 1 1 P
+X A 2 150 0 100 L 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# device:Q_NMOS_GSD
+#
+DEF device:Q_NMOS_GSD Q 0 0 Y N 1 F N
+F0 "Q" 200 50 50 H V L CNN
+F1 "device:Q_NMOS_GSD" 200 -50 50 H V L CNN
+F2 "" 200 100 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+C 65 0 111 0 1 10 N
+C 100 -70 11 0 1 0 F
+C 100 70 11 0 1 0 F
+P 2 0 1 0 2 0 10 0 N
+P 2 0 1 0 30 -70 100 -70 N
+P 2 0 1 10 30 -50 30 -90 N
+P 2 0 1 0 30 0 100 0 N
+P 2 0 1 10 30 20 30 -20 N
+P 2 0 1 0 30 70 100 70 N
+P 2 0 1 10 30 90 30 50 N
+P 2 0 1 0 100 -70 100 -100 N
+P 2 0 1 0 100 -70 100 0 N
+P 2 0 1 0 100 100 100 70 N
+P 3 0 1 10 10 75 10 -75 10 -75 N
+P 4 0 1 0 40 0 80 15 80 -15 40 0 F
+P 4 0 1 0 100 -70 130 -70 130 70 100 70 N
+P 4 0 1 0 110 20 115 15 145 15 150 10 N
+P 4 0 1 0 130 15 115 -10 145 -10 130 15 N
+X G 1 -200 0 200 R 50 50 1 1 I
+X S 2 100 -200 100 U 50 50 1 1 P
+X D 3 100 200 100 D 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# device:R
+#
+DEF device:R R 0 0 N Y 1 F N
+F0 "R" 80 0 50 V V C CNN
+F1 "device:R" 0 0 50 V V C CNN
+F2 "" -70 0 50 V I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ R_*
+ R_*
+$ENDFPLIST
+DRAW
+S -40 -100 40 100 0 1 10 N
+X ~ 1 0 150 50 D 50 50 1 1 P
+X ~ 2 0 -150 50 U 50 50 1 1 P
+ENDDRAW
+ENDDEF
+#
+# power:+12V
+#
+DEF power:+12V #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -150 50 H I C CNN
+F1 "power:+12V" 0 140 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+P 2 0 1 0 -30 50 0 100 N
+P 2 0 1 0 0 0 0 100 N
+P 2 0 1 0 0 100 30 50 N
+X +12V 1 0 0 0 U 50 50 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# power:+3V3
+#
+DEF power:+3V3 #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -150 50 H I C CNN
+F1 "power:+3V3" 0 140 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+ALIAS +3.3V
+DRAW
+P 2 0 1 0 -30 50 0 100 N
+P 2 0 1 0 0 0 0 100 N
+P 2 0 1 0 0 100 30 50 N
+X +3V3 1 0 0 0 U 50 50 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# power:GND
+#
+DEF power:GND #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -250 50 H I C CNN
+F1 "power:GND" 0 -150 50 H V C CNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
+X GND 1 0 0 0 D 50 50 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# vinhome-rescue:12V-SparkFun-Aesthetics
+#
+DEF vinhome-rescue:12V-SparkFun-Aesthetics #SUPPLY 0 40 N N 1 L P
+F0 "#SUPPLY" 0 0 50 H I L BNN
+F1 "vinhome-rescue:12V-SparkFun-Aesthetics" -40 140 50 H V L BNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+P 2 1 0 0 0 0 0 100 N
+P 2 1 0 0 0 100 -30 50 N
+P 2 1 0 0 30 50 0 100 N
+X 12V ~ 0 0 100 U 40 40 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# vinhome-rescue:HX_mini_360-lanhnd
+#
+DEF vinhome-rescue:HX_mini_360-lanhnd U 0 40 Y Y 1 F N
+F0 "U" -400 -200 50 H V C CNN
+F1 "vinhome-rescue:HX_mini_360-lanhnd" -50 50 50 H V C CNN
+F2 "" -400 -200 50 H I C CNN
+F3 "" -400 -200 50 H I C CNN
+DRAW
+S -400 200 400 -200 0 1 0 N
+X IN+ 1 -500 150 100 R 50 50 1 1 I
+X OUT+ 2 500 150 100 L 50 50 1 1 I
+X OUT- 3 500 -100 100 L 50 50 1 1 I
+X IN- 4 -500 -100 100 R 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+#End Library

+ 3 - 0
vinhome-rescue.dcm

@@ -0,0 +1,3 @@
+EESchema-DOCLIB  Version 2.0
+#
+#End Doc Library

+ 58 - 0
vinhome-rescue.lib

@@ -0,0 +1,58 @@
+EESchema-LIBRARY Version 2.4
+#encoding utf-8
+#
+# 12V-SparkFun-Aesthetics
+#
+DEF 12V-SparkFun-Aesthetics #SUPPLY 0 40 N N 1 L P
+F0 "#SUPPLY" 0 0 50 H I L BNN
+F1 "12V-SparkFun-Aesthetics" -40 140 50 H V L BNN
+F2 "" 0 0 50 H I C CNN
+F3 "" 0 0 50 H I C CNN
+DRAW
+P 2 1 0 0 0 0 0 100 N
+P 2 1 0 0 0 100 -30 50 N
+P 2 1 0 0 30 50 0 100 N
+X 12V ~ 0 0 100 U 40 40 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# HX_mini_360-lanhnd
+#
+DEF HX_mini_360-lanhnd U 0 40 Y Y 1 F N
+F0 "U" -400 -200 50 H V C CNN
+F1 "HX_mini_360-lanhnd" -50 50 50 H V C CNN
+F2 "" -400 -200 50 H I C CNN
+F3 "" -400 -200 50 H I C CNN
+DRAW
+S -400 200 400 -200 0 1 0 N
+X IN+ 1 -500 150 100 R 50 50 1 1 I
+X OUT+ 2 500 150 100 L 50 50 1 1 I
+X OUT- 3 500 -100 100 L 50 50 1 1 I
+X IN- 4 -500 -100 100 R 50 50 1 1 I
+ENDDRAW
+ENDDEF
+#
+# SWITCH_PUSHBUTTONC&K_KSS-adafruit
+#
+DEF SWITCH_PUSHBUTTONC&K_KSS-adafruit SW 0 40 N N 1 L N
+F0 "SW" -100 140 50 H V L BNN
+F1 "SWITCH_PUSHBUTTONC&K_KSS-adafruit" -100 -90 50 H V L BNN
+F2 "BTN_CK_KSS" 30 150 20 H I C CNN
+F3 "" 0 0 50 H I C CNN
+$FPLIST
+ *BTN_CK_KSS*
+ *TACT_PANA-EVQ*
+ *PUSHBUTTON_SMD_SJ*
+$ENDFPLIST
+DRAW
+P 2 1 0 0 -100 50 0 50 N
+P 2 1 0 0 -25 90 0 90 N
+P 2 1 0 0 0 50 0 90 N
+P 2 1 0 0 0 50 100 50 N
+P 2 1 0 0 0 90 25 90 N
+X P$1 P$1 -200 0 100 R 40 40 1 1 P
+X P$2 P$2 200 0 100 L 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+#End Library

+ 163 - 0
vinhome.bak

@@ -0,0 +1,163 @@
+EESchema Schematic File Version 4
+LIBS:vinhome-cache
+EELAYER 26 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 1 6
+Title ""
+Date ""
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Sheet
+S 5150 1650 1750 850 
+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 
+$EndSheet
+$Sheet
+S 1950 3050 1750 1350
+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 
+$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 
+U 5B629A42
+F0 "Sheet5B629A41" 50
+F1 "keypad.sch" 50
+F2 "SCL" I L 7750 3450 50 
+F3 "SDO" I L 7750 3550 50 
+$EndSheet
+$Sheet
+S 4600 2850 2350 1500
+U 5B627057
+F0 "Sheet5B627056" 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 
+$EndSheet
+Wire Wire Line
+	6900 2350 7100 2350
+Wire Wire Line
+	7100 2350 7100 2950
+Wire Wire Line
+	7100 2950 6950 2950
+Wire Wire Line
+	6900 2250 7150 2250
+Wire Wire Line
+	7150 2250 7150 3050
+Wire Wire Line
+	7150 3050 6950 3050
+Wire Wire Line
+	6950 3150 7250 3150
+Wire Wire Line
+	7250 3150 7250 2150
+Wire Wire Line
+	7250 2150 6900 2150
+Wire Wire Line
+	6900 2050 7300 2050
+Wire Wire Line
+	7300 2050 7300 3250
+Wire Wire Line
+	7300 3250 6950 3250
+Wire Wire Line
+	6950 3350 7400 3350
+Wire Wire Line
+	7400 3350 7400 1950
+Wire Wire Line
+	7400 1950 6900 1950
+Wire Wire Line
+	3700 3250 4600 3250
+Wire Wire Line
+	3700 3350 4600 3350
+Wire Wire Line
+	3700 3450 4600 3450
+Wire Wire Line
+	6950 3500 7400 3500
+Wire Wire Line
+	7400 3500 7400 3450
+Wire Wire Line
+	7400 3450 7750 3450
+Wire Wire Line
+	6950 3600 7400 3600
+Wire Wire Line
+	7400 3600 7400 3550
+Wire Wire Line
+	7400 3550 7750 3550
+Wire Wire Line
+	3650 5400 4450 5400
+Wire Wire Line
+	4450 5400 4450 4050
+Wire Wire Line
+	4450 4050 4600 4050
+Wire Wire Line
+	4600 4150 4500 4150
+Wire Wire Line
+	4500 4150 4500 5500
+Wire Wire Line
+	4500 5500 3650 5500
+Wire Wire Line
+	3650 4800 3950 4800
+Wire Wire Line
+	3950 4800 3950 3600
+Wire Wire Line
+	3950 3600 4600 3600
+Wire Wire Line
+	4600 3700 4000 3700
+Wire Wire Line
+	4000 3700 4000 4900
+Wire Wire Line
+	4000 4900 3650 4900
+Wire Wire Line
+	3650 5000 4050 5000
+Wire Wire Line
+	4050 5000 4050 3800
+Wire Wire Line
+	4050 3800 4600 3800
+Wire Wire Line
+	4600 3900 4100 3900
+Wire Wire Line
+	4100 3900 4100 5100
+Wire Wire Line
+	4100 5100 3650 5100
+$EndSCHEMATC

+ 1 - 0
vinhome.kicad_pcb

@@ -0,0 +1 @@
+(kicad_pcb (version 4) (host kicad "dummy file") )

+ 33 - 0
vinhome.pro

@@ -0,0 +1,33 @@
+update=22/05/2015 07:44:53
+version=1
+last_client=kicad
+[general]
+version=1
+RootSch=
+BoardNm=
+[pcbnew]
+version=1
+LastNetListRead=
+UseCmpFile=1
+PadDrill=0.600000000000
+PadDrillOvalY=0.600000000000
+PadSizeH=1.500000000000
+PadSizeV=1.500000000000
+PcbTextSizeV=1.500000000000
+PcbTextSizeH=1.500000000000
+PcbTextThickness=0.300000000000
+ModuleTextSizeV=1.000000000000
+ModuleTextSizeH=1.000000000000
+ModuleTextSizeThickness=0.150000000000
+SolderMaskClearance=0.000000000000
+SolderMaskMinWidth=0.000000000000
+DrawSegmentWidth=0.200000000000
+BoardOutlineThickness=0.100000000000
+ModuleOutlineThickness=0.150000000000
+[cvpcb]
+version=1
+NetIExt=net
+[eeschema]
+version=1
+LibDir=
+[eeschema/libraries]

+ 66 - 29
vinhome.sch

@@ -35,44 +35,36 @@ F3 "open" I R 3700 3350 50
 F4 "NO" I R 3700 3450 50 
 $EndSheet
 $Sheet
-S 7500 4550 1250 1050
+S 2400 4650 1250 1050
 U 5B626CB4
 F0 "Sheet5B626CB3" 50
 F1 "conecter.sch" 50
-F2 "TXD" I L 7500 4900 50 
-F3 "RXD" I L 7500 4800 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
-Wire Wire Line
-	7300 4200 6950 4200
-Wire Wire Line
-	7350 4100 6950 4100
-Wire Wire Line
-	7500 4900 7300 4900
-Wire Wire Line
-	7500 4800 7350 4800
-Wire Wire Line
-	7350 4800 7350 4100
-Wire Wire Line
-	7300 4900 7300 4200
 $Sheet
-S 7350 3450 850  550 
+S 7750 3200 850  550 
 U 5B629A42
 F0 "Sheet5B629A41" 50
 F1 "keypad.sch" 50
-F2 "SCL" I L 7350 3700 50 
-F3 "SDO" I L 7350 3800 50 
+F2 "SCL" I L 7750 3450 50 
+F3 "SDO" I L 7750 3550 50 
 $EndSheet
 $Sheet
 S 4600 2850 2350 1500
 U 5B627057
 F0 "Sheet5B627056" 50
 F1 "main.sch" 50
-F2 "TXD" I R 6950 4200 50 
-F3 "RXD" I R 6950 4100 50 
-F4 "P.5" I R 6950 3700 50 
-F5 "P.4" I R 6950 3800 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 3150 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 
@@ -80,14 +72,11 @@ 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 3550 50 
-F16 "P.12" I L 4600 3650 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 
 $EndSheet
 Wire Wire Line
-	6950 3700 7350 3700
-Wire Wire Line
-	6950 3800 7350 3800
-Wire Wire Line
 	6900 2350 7100 2350
 Wire Wire Line
 	7100 2350 7100 2950
@@ -123,4 +112,52 @@ Wire Wire Line
 	3700 3350 4600 3350
 Wire Wire Line
 	3700 3450 4600 3450
+Wire Wire Line
+	6950 3500 7400 3500
+Wire Wire Line
+	7400 3500 7400 3450
+Wire Wire Line
+	7400 3450 7750 3450
+Wire Wire Line
+	6950 3600 7400 3600
+Wire Wire Line
+	7400 3600 7400 3550
+Wire Wire Line
+	7400 3550 7750 3550
+Wire Wire Line
+	3650 5400 4450 5400
+Wire Wire Line
+	4450 5400 4450 4050
+Wire Wire Line
+	4450 4050 4600 4050
+Wire Wire Line
+	4600 4150 4500 4150
+Wire Wire Line
+	4500 4150 4500 5500
+Wire Wire Line
+	4500 5500 3650 5500
+Wire Wire Line
+	3650 4800 3950 4800
+Wire Wire Line
+	3950 4800 3950 3600
+Wire Wire Line
+	3950 3600 4600 3600
+Wire Wire Line
+	4600 3700 4000 3700
+Wire Wire Line
+	4000 3700 4000 4900
+Wire Wire Line
+	4000 4900 3650 4900
+Wire Wire Line
+	3650 5000 4050 5000
+Wire Wire Line
+	4050 5000 4050 3800
+Wire Wire Line
+	4050 3800 4600 3800
+Wire Wire Line
+	4600 3900 4100 3900
+Wire Wire Line
+	4100 3900 4100 5100
+Wire Wire Line
+	4100 5100 3650 5100
 $EndSCHEMATC