- KiCad schematic and PCB layout (45x35mm board) - Full BOM with JLCPCB part numbers - ESPHome firmware configuration - 3D-printable wall-mount enclosure (OpenSCAD + STL) - Pin mapping and power budget documentation
416 lines
14 KiB
Plaintext
416 lines
14 KiB
Plaintext
(kicad_sch
|
|
(version 20230121)
|
|
(generator "custom")
|
|
(uuid "e63e39d7-6ac0-4ffd-8aa3-1841a4541b55")
|
|
(paper "A3")
|
|
|
|
(title_block
|
|
(title "ESP32-S3 Presence Sensor")
|
|
(date "2026-03-29")
|
|
(rev "1.0")
|
|
(comment 1 "Wall-mount presence sensor with camera")
|
|
(comment 2 "ESP32-S3 + OV5640 + LD2410C + AM312 + SHT41 + BH1750")
|
|
)
|
|
|
|
;; =====================================================
|
|
;; POWER SECTION - USB-C Input + 3.3V Regulation
|
|
;; =====================================================
|
|
|
|
(text "USB-C Power Input + 3.3V LDO"
|
|
(at 25 25 0)
|
|
(effects (font (size 3 3) (thickness 0.5)) (justify left))
|
|
)
|
|
|
|
;; USB-C Connector (USB4125-GF-A - 16 pin USB-C)
|
|
(symbol
|
|
(lib_id "Connector:USB_C_Receptacle_USB2.0")
|
|
(at 40 60 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000001")
|
|
(property "Reference" "J1" (at 40 42 0))
|
|
(property "Value" "USB_C_16P" (at 40 44 0))
|
|
(property "Footprint" "Connector_USB:USB_C_Receptacle_GCT_USB4125" (at 40 60 0))
|
|
(property "JLCPCB" "C2765186" (at 40 60 0))
|
|
)
|
|
|
|
;; ESD Protection (USBLC6-2SC6)
|
|
(symbol
|
|
(lib_id "Power_Protection:USBLC6-2SC6")
|
|
(at 70 60 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000002")
|
|
(property "Reference" "U1" (at 70 50 0))
|
|
(property "Value" "USBLC6-2SC6" (at 70 52 0))
|
|
(property "Footprint" "Package_TO_SOT_SMD:SOT-23-6" (at 70 60 0))
|
|
(property "JLCPCB" "C7519" (at 70 60 0))
|
|
)
|
|
|
|
;; AMS1117-3.3 LDO Regulator
|
|
(symbol
|
|
(lib_id "Regulator_Linear:AMS1117-3.3")
|
|
(at 100 55 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000003")
|
|
(property "Reference" "U2" (at 100 47 0))
|
|
(property "Value" "AMS1117-3.3" (at 100 49 0))
|
|
(property "Footprint" "Package_TO_SOT_SMD:SOT-223-3_TabPin2" (at 100 55 0))
|
|
(property "JLCPCB" "C6186" (at 100 55 0))
|
|
)
|
|
|
|
;; Input capacitor 10uF
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 90 65 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000004")
|
|
(property "Reference" "C1" (at 92 63 0))
|
|
(property "Value" "10uF" (at 92 67 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 90 65 0))
|
|
(property "JLCPCB" "C15850" (at 90 65 0))
|
|
)
|
|
|
|
;; Output capacitor 22uF
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 110 65 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000005")
|
|
(property "Reference" "C2" (at 112 63 0))
|
|
(property "Value" "22uF" (at 112 67 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 110 65 0))
|
|
(property "JLCPCB" "C45783" (at 110 65 0))
|
|
)
|
|
|
|
;; Output capacitor 100nF decoupling
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 120 65 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000006")
|
|
(property "Reference" "C3" (at 122 63 0))
|
|
(property "Value" "100nF" (at 122 67 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 120 65 0))
|
|
(property "JLCPCB" "C1525" (at 120 65 0))
|
|
)
|
|
|
|
;; =====================================================
|
|
;; MCU - ESP32-S3-WROOM-1 (N16R8)
|
|
;; =====================================================
|
|
|
|
(text "ESP32-S3-WROOM-1 (N16R8) - Main MCU"
|
|
(at 25 100 0)
|
|
(effects (font (size 3 3) (thickness 0.5)) (justify left))
|
|
)
|
|
|
|
(symbol
|
|
(lib_id "RF_Module:ESP32-S3-WROOM-1")
|
|
(at 80 160 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000010")
|
|
(property "Reference" "U3" (at 80 115 0))
|
|
(property "Value" "ESP32-S3-WROOM-1-N16R8" (at 80 117 0))
|
|
(property "Footprint" "RF_Module:ESP32-S3-WROOM-1" (at 80 160 0))
|
|
(property "JLCPCB" "C2913202" (at 80 160 0))
|
|
(property "Description" "ESP32-S3 WiFi+BLE module, 16MB Flash, 8MB PSRAM" (at 80 160 0))
|
|
)
|
|
|
|
;; Boot button (GPIO0)
|
|
(symbol
|
|
(lib_id "Switch:SW_Push")
|
|
(at 35 145 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000011")
|
|
(property "Reference" "SW1" (at 35 140 0))
|
|
(property "Value" "BOOT" (at 35 150 0))
|
|
(property "Footprint" "Button_Switch_SMD:SW_SPST_PTS810" (at 35 145 0))
|
|
(property "JLCPCB" "C116501" (at 35 145 0))
|
|
)
|
|
|
|
;; Reset button (EN)
|
|
(symbol
|
|
(lib_id "Switch:SW_Push")
|
|
(at 35 160 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000012")
|
|
(property "Reference" "SW2" (at 35 155 0))
|
|
(property "Value" "RESET" (at 35 165 0))
|
|
(property "Footprint" "Button_Switch_SMD:SW_SPST_PTS810" (at 35 160 0))
|
|
(property "JLCPCB" "C116501" (at 35 160 0))
|
|
)
|
|
|
|
;; ESP32-S3 decoupling caps (3x 100nF + 1x 10uF)
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 55 120 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000013")
|
|
(property "Reference" "C4" (at 57 118 0))
|
|
(property "Value" "100nF" (at 57 122 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 55 120 0))
|
|
)
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 62 120 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000014")
|
|
(property "Reference" "C5" (at 64 118 0))
|
|
(property "Value" "100nF" (at 64 122 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 62 120 0))
|
|
)
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 69 120 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000015")
|
|
(property "Reference" "C6" (at 71 118 0))
|
|
(property "Value" "10uF" (at 71 122 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 69 120 0))
|
|
)
|
|
|
|
;; Status LED
|
|
(symbol
|
|
(lib_id "Device:LED")
|
|
(at 130 140 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000016")
|
|
(property "Reference" "D1" (at 132 138 0))
|
|
(property "Value" "LED_Blue" (at 132 142 0))
|
|
(property "Footprint" "LED_SMD:LED_0402_1005Metric" (at 130 140 0))
|
|
(property "JLCPCB" "C2286" (at 130 140 0))
|
|
)
|
|
|
|
;; LED resistor
|
|
(symbol
|
|
(lib_id "Device:R")
|
|
(at 130 130 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000017")
|
|
(property "Reference" "R1" (at 132 130 0))
|
|
(property "Value" "1K" (at 134 130 0))
|
|
(property "Footprint" "Resistor_SMD:R_0402_1005Metric" (at 130 130 0))
|
|
(property "JLCPCB" "C11702" (at 130 130 0))
|
|
)
|
|
|
|
;; =====================================================
|
|
;; CAMERA - OV5640 via 24-pin FPC connector
|
|
;; =====================================================
|
|
|
|
(text "OV5640 5MP Camera Module (24-pin FPC)"
|
|
(at 170 25 0)
|
|
(effects (font (size 3 3) (thickness 0.5)) (justify left))
|
|
)
|
|
|
|
;; 24-pin FPC connector for OV5640
|
|
(symbol
|
|
(lib_id "Connector_Generic:Conn_01x24")
|
|
(at 190 80 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000020")
|
|
(property "Reference" "J2" (at 190 42 0))
|
|
(property "Value" "FPC_24P_OV5640" (at 190 44 0))
|
|
(property "Footprint" "Connector_FFC-FPC:Molex_503480-2400_1x24-1MP_P0.50mm_Horizontal" (at 190 80 0))
|
|
(property "JLCPCB" "C2856805" (at 190 80 0))
|
|
(property "Description" "24-pin 0.5mm FPC connector for OV5640 camera module" (at 190 80 0))
|
|
)
|
|
|
|
;; Camera power filter caps
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 175 50 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000021")
|
|
(property "Reference" "C7" (at 177 48 0))
|
|
(property "Value" "10uF" (at 177 52 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 175 50 0))
|
|
)
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 182 50 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000022")
|
|
(property "Reference" "C8" (at 184 48 0))
|
|
(property "Value" "100nF" (at 184 52 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 182 50 0))
|
|
)
|
|
|
|
;; Camera 1.8V LDO (for DOVDD)
|
|
(symbol
|
|
(lib_id "Regulator_Linear:AP2112K-1.8")
|
|
(at 210 50 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000023")
|
|
(property "Reference" "U4" (at 210 42 0))
|
|
(property "Value" "AP2112K-1.8" (at 210 44 0))
|
|
(property "Footprint" "Package_TO_SOT_SMD:SOT-23-5" (at 210 50 0))
|
|
(property "JLCPCB" "C51118" (at 210 50 0))
|
|
(property "Description" "1.8V LDO for camera DOVDD" (at 210 50 0))
|
|
)
|
|
|
|
;; Camera 2.8V LDO (for AVDD)
|
|
(symbol
|
|
(lib_id "Regulator_Linear:AP2112K-2.8")
|
|
(at 210 70 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000024")
|
|
(property "Reference" "U5" (at 210 62 0))
|
|
(property "Value" "AP2112K-2.8" (at 210 64 0))
|
|
(property "Footprint" "Package_TO_SOT_SMD:SOT-23-5" (at 210 70 0))
|
|
(property "JLCPCB" "C51114" (at 210 70 0))
|
|
(property "Description" "2.8V LDO for camera AVDD" (at 210 70 0))
|
|
)
|
|
|
|
;; 24MHz crystal oscillator for camera XCLK (if not using ESP32 LEDC PWM)
|
|
;; Note: ESP32-S3 can generate XCLK via LEDC, so crystal is optional
|
|
;; Using LEDC output from GPIO15 instead
|
|
|
|
;; =====================================================
|
|
;; mmWave RADAR - HLK-LD2410C
|
|
;; =====================================================
|
|
|
|
(text "HLK-LD2410C 24GHz mmWave Presence Radar"
|
|
(at 170 120 0)
|
|
(effects (font (size 3 3) (thickness 0.5)) (justify left))
|
|
)
|
|
|
|
;; LD2410C connector (5-pin: VCC, GND, TX, RX, OUT)
|
|
(symbol
|
|
(lib_id "Connector_Generic:Conn_01x05")
|
|
(at 200 145 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000030")
|
|
(property "Reference" "J3" (at 200 135 0))
|
|
(property "Value" "LD2410C" (at 200 137 0))
|
|
(property "Footprint" "Connector_PinHeader_1.27mm:PinHeader_1x05_P1.27mm_Vertical" (at 200 145 0))
|
|
(property "Description" "HLK-LD2410C 24GHz mmWave radar module connector" (at 200 145 0))
|
|
(pin_names
|
|
(pin "1" "VCC_5V")
|
|
(pin "2" "GND")
|
|
(pin "3" "UART_TX")
|
|
(pin "4" "UART_RX")
|
|
(pin "5" "OUT")
|
|
)
|
|
)
|
|
|
|
;; LD2410C decoupling
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 215 140 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000031")
|
|
(property "Reference" "C9" (at 217 138 0))
|
|
(property "Value" "10uF" (at 217 142 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 215 140 0))
|
|
)
|
|
|
|
;; =====================================================
|
|
;; PIR SENSOR - AM312
|
|
;; =====================================================
|
|
|
|
(text "AM312 PIR Motion Sensor"
|
|
(at 170 170 0)
|
|
(effects (font (size 3 3) (thickness 0.5)) (justify left))
|
|
)
|
|
|
|
;; AM312 connector (3-pin: VCC, OUT, GND)
|
|
(symbol
|
|
(lib_id "Connector_Generic:Conn_01x03")
|
|
(at 200 190 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000040")
|
|
(property "Reference" "J4" (at 200 182 0))
|
|
(property "Value" "AM312_PIR" (at 200 184 0))
|
|
(property "Footprint" "Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical" (at 200 190 0))
|
|
(property "Description" "AM312 mini PIR sensor, 3.3V, digital output" (at 200 190 0))
|
|
(pin_names
|
|
(pin "1" "VCC_3V3")
|
|
(pin "2" "OUT")
|
|
(pin "3" "GND")
|
|
)
|
|
)
|
|
|
|
;; PIR pulldown resistor
|
|
(symbol
|
|
(lib_id "Device:R")
|
|
(at 215 190 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000041")
|
|
(property "Reference" "R2" (at 217 190 0))
|
|
(property "Value" "10K" (at 219 190 0))
|
|
(property "Footprint" "Resistor_SMD:R_0402_1005Metric" (at 215 190 0))
|
|
(property "JLCPCB" "C25744" (at 215 190 0))
|
|
)
|
|
|
|
;; =====================================================
|
|
;; I2C BUS - SHT41 + BH1750
|
|
;; =====================================================
|
|
|
|
(text "I2C Sensors: SHT41 (Temp/Humidity) + BH1750 (Light)"
|
|
(at 25 220 0)
|
|
(effects (font (size 3 3) (thickness 0.5)) (justify left))
|
|
)
|
|
|
|
;; SHT41 Temperature & Humidity Sensor
|
|
(symbol
|
|
(lib_id "Sensor:SHT4x")
|
|
(at 60 250 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000050")
|
|
(property "Reference" "U6" (at 60 238 0))
|
|
(property "Value" "SHT41" (at 60 240 0))
|
|
(property "Footprint" "Sensor_Humidity:Sensirion_DFN-4-1EP_1.5x1.5mm_P0.8mm_EP0.5x0.5mm" (at 60 250 0))
|
|
(property "JLCPCB" "C2911456" (at 60 250 0))
|
|
(property "Description" "Digital temp/humidity sensor, ±0.2°C, I2C, 1.5x1.5mm" (at 60 250 0))
|
|
)
|
|
|
|
;; SHT41 decoupling
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 80 250 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000051")
|
|
(property "Reference" "C10" (at 82 248 0))
|
|
(property "Value" "100nF" (at 82 252 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 80 250 0))
|
|
)
|
|
|
|
;; BH1750 Ambient Light Sensor
|
|
(symbol
|
|
(lib_id "Sensor_Optical:BH1750FVI")
|
|
(at 60 285 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000052")
|
|
(property "Reference" "U7" (at 60 273 0))
|
|
(property "Value" "BH1750FVI" (at 60 275 0))
|
|
(property "Footprint" "Package_SO:WSOF-6_1.4x1.7mm_P0.5mm" (at 60 285 0))
|
|
(property "JLCPCB" "C78960" (at 60 285 0))
|
|
(property "Description" "Ambient light sensor, 1-65535 lux, I2C, 1.6x1.6mm" (at 60 285 0))
|
|
)
|
|
|
|
;; BH1750 decoupling
|
|
(symbol
|
|
(lib_id "Device:C")
|
|
(at 80 285 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000053")
|
|
(property "Reference" "C11" (at 82 283 0))
|
|
(property "Value" "100nF" (at 82 287 0))
|
|
(property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 80 285 0))
|
|
)
|
|
|
|
;; I2C pull-up resistors
|
|
(symbol
|
|
(lib_id "Device:R")
|
|
(at 40 235 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000054")
|
|
(property "Reference" "R3" (at 42 235 0))
|
|
(property "Value" "4.7K" (at 44 235 0))
|
|
(property "Footprint" "Resistor_SMD:R_0402_1005Metric" (at 40 235 0))
|
|
(property "JLCPCB" "C25900" (at 40 235 0))
|
|
(property "Description" "I2C SDA pull-up" (at 40 235 0))
|
|
)
|
|
(symbol
|
|
(lib_id "Device:R")
|
|
(at 48 235 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000055")
|
|
(property "Reference" "R4" (at 50 235 0))
|
|
(property "Value" "4.7K" (at 52 235 0))
|
|
(property "Footprint" "Resistor_SMD:R_0402_1005Metric" (at 48 235 0))
|
|
(property "JLCPCB" "C25900" (at 48 235 0))
|
|
(property "Description" "I2C SCL pull-up" (at 48 235 0))
|
|
)
|
|
|
|
;; =====================================================
|
|
;; MOUNTING HOLES
|
|
;; =====================================================
|
|
|
|
(symbol
|
|
(lib_id "Mechanical:MountingHole")
|
|
(at 250 260 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000060")
|
|
(property "Reference" "H1" (at 252 258 0))
|
|
(property "Value" "MountingHole" (at 252 262 0))
|
|
(property "Footprint" "MountingHole:MountingHole_2.2mm_M2_Pad" (at 250 260 0))
|
|
)
|
|
(symbol
|
|
(lib_id "Mechanical:MountingHole")
|
|
(at 260 260 0)
|
|
(uuid "a1000001-0001-0001-0001-000000000061")
|
|
(property "Reference" "H2" (at 262 258 0))
|
|
(property "Value" "MountingHole" (at 262 262 0))
|
|
(property "Footprint" "MountingHole:MountingHole_2.2mm_M2_Pad" (at 260 260 0))
|
|
)
|
|
)
|