● HA작업)ESP32-S3 N16R8 개발 보드, WS2812 LED, CH340, C타입과 인체감지 LD2410C 작업


  • 링크


  • 컨텐츠 정보


    본문

    ● HA작업)ESP32-S3 N16R8 개발 보드, WS2812 LED, CH340, C타입과  인체감지 LD2410C 작업

    ESP32-S3 N16R8 개발 보드, WS2812 LED, CH340, C타입,

    ESP32, S3, BT, 2.4G 와이파이 모듈, Arduino 8MB PSRAM 16MB 플래시

    https://ko.aliexpress.com/item/1005006370275059.html?

    https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html


    3232235521_1716622885.6753.png

    2개 구입 테스트 결과  wifi수신율이 좋은  아래 제품 으로 변경 적용


    Hi-Link 전자 HLK-LD2410c 모션 상태 센서 레이더 모듈, 24G 스마트 인간 존재, LD2410C,

    https://ko.aliexpress.com/item/1005006217221814.html?

    3232235521_1716623047.6541.png


    3232235521_1716622832.8446.png

    3232235521_1716623416.1067.png

    #pin연결 정보 셜정

    # ESP32  pin 전원은 5v/GND 으로 연결
    mmwave out : GPIO2
    # tx_pin: GPIO17 <---> RX 2410c
    # rx_pin: GPIO18 <---> TX 2410c

    주)tx 43,rx44에서 17,18으로 변경

    3232235521_1716623029.7027.png


    wifi 수신율이 좋은  화장실사용은 아래 제품으로 변경

    3232235521_1716731004.3969.png

    ESP32-S3 N16R8 LED RGB를 켜는 방법

    https://community.home-assistant.io/t/esp32-s3-n16r8-how-to-turn-on-led-rgb/696704/15

    https://github.com/esphome/issues/issues/5746

    https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html



    # light:
      - platform: esp32_rmt_led_strip
        rgb_order: RBG
        pin: GPIO48
        num_leds: 3
        rmt_channel: 2
        chipset: ws2812
        name: "mmwave_My_Light"
        id: RGB_right_sw

    3232235521_1716730499.1939.png

    적용 소스

    esphome:
      name: esp32-s3-ble1
      friendly_name: esp32_s3_ble1
     
    esp32:
      board: esp32-s3-devkitc-1
      framework:
        type: arduino

    # Enable logging
    # logger:

    # Enable Home Assistant API
    api:
      encryption:
        key: "3S6VfgIsq5OI1NWBpgRfGoKaeHX++FMkOwyOtZyBhD0="

    ota:
      password: "33a68e0138dcc1ad088c3e3e71c14a4a"

    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      power_save_mode: LIGHT  
      manual_ip:
        static_ip: 192.168.0.75
        gateway: 192.168.0.1
        subnet: 255.255.255.0
        dns1: 8.8.8.8
        dns2: 8.8.4.4
    # IP Address: 192.168.0.75
      # Enable fallback hotspot (captive portal) in case wifi connection fails
      ap:
        ssid: "Esp32-S3-Ble1 Fallback Hotspot"
        password: "2nwSNwr0stM7"

    captive_portal:


    # ===========================================  #
    # ESP32  pin
    # mmwave GPIO2
    # ledc  GPIO4
    # tx_pin: GPIO1
    # rx_pin: GPIO3
    # 2410_pir GPIO15

    # ESP32-C3FH4  pin
    # mmwave GPIO2
    # ledc  GPIO5
    # tx_pin: GPIO21
    # rx_pin: GPIO20

    # ESP32-s3  pin
    # mmwave GPIO2
    # ledc  GPIO4
    # tx_pin: GPIO17
    # rx_pin: GPIO318
    # ===========================================  #

    web_server:
      port: 80
      version: 2
      include_internal: true

    logger:
      # level: ERROR
      # baud_rate: 0
      level: DEBUG  
    uart:
      # tx_pin: GPIO43
      # rx_pin: GPIO44
      tx_pin: GPIO17
      rx_pin: GPIO18
      baud_rate: 256000
      parity: NONE
      stop_bits: 1
     

    ld2410:
      id: my_ld2410

    sensor:
      - platform: ld2410
        light:
          name: light
        moving_distance:
          name: Moving Distance
        still_distance:
          name: Still Distance
        moving_energy:
          name: Move Energy
        still_energy:
          name: Still Energy


        detection_distance:
          name: Detection Distance
        g0:
          move_energy:
            name: g0 move energy
          still_energy:
            name: g0 still energy
        g1:
          move_energy:
            name: g1 move energy
          still_energy:
            name: g1 still energy
        g2:
          move_energy:
            name: g2 move energy
          still_energy:
            name: g2 still energy
        g3:
          move_energy:
            name: g3 move energy
          still_energy:
            name: g3 still energy
        g4:
          move_energy:
            name: g4 move energy
          still_energy:
            name: g4 still energy
        g5:
          move_energy:
            name: g5 move energy
          still_energy:
            name: g5 still energy
        g6:
          move_energy:
            name: g6 move energy
          still_energy:
            name: g6 still energy
        g7:
          move_energy:
            name: g7 move energy
          still_energy:
            name: g7 still energy
        g8:
          move_energy:
            name: g8 move energy
          still_energy:
            name: g8 still energy

      - platform: uptime
        name: Uptime Sensor    
    # 8888888888888888888888888888888888888888   #
    # sensor:
      - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
        name: "WiFi Signal dB"
        id: wifi_signal_db
        update_interval: 60s
        entity_category: "diagnostic"

      - platform: copy # Reports the WiFi signal strength in %
        source_id: wifi_signal_db
        name: "WiFi Signal Percent"
        filters:
          - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
        unit_of_measurement: "Signal %"
        entity_category: "diagnostic"
        device_class: ""
      #  99999999999999999999999999999999999999999999999999999 #


    binary_sensor:
      - platform: ld2410
        has_target:
          name: Presence
        has_moving_target:
          name: Moving Target
        # 888888888888888888888888888 ERROR 대응 #
        # has_still_target:
        #   name: Still Target
        # 2024_0513_1531_32
        has_still_target:
          name: Still Target
          filters:
            - delayed_on: 15s
            - delayed_off: 15s
            # 9999999999999999999
        out_pin_presence_status:
          name: out pin presence status


    # 8888888888888888888888888
    # binary_sensor:
      # - platform: gpio
      #   pin: GPIO15
      #   name: "PIR_Sensor_out15"
      #   device_class: motion
      #   id: pir_sensor_only_GPIO15

    # binary_sensor:
      - platform: gpio
        device_class: PRESENCE
        pin:
          number: GPIO2
          mode: INPUT_PULLUP
        name: mmwave_ld2410c_out2
        filters:
          - delayed_off: 10ms
        on_press:
          then:
            - light.turn_on: RGB_right_sw
        on_release:
          then:
            - light.turn_off: RGB_right_sw

    # ===========================================  #
    # ESP32  pin
    # mmwave GPIO2
    # ledc  GPIO4
    # tx_pin: GPIO1
    # rx_pin: GPIO3
    # 2410_pir GPIO15

    # ESP32-C3FH4  pin
    # mmwave GPIO2
    # ledc  GPIO5
    # tx_pin: GPIO21
    # rx_pin: GPIO20
    # ESP32-s3_2024_0526_1658_54
    # mmwave GPIO2
    # ledc  GPIO5
    # tx_pin: GPIO43 --> 17
    # rx_pin: GPIO44 --- 18
    # ===========================================  #

    output:
      - platform: ledc
        pin: GPIO4
        id: led_output
        inverted: true

    light:
      - platform: binary
        name: "mmwave_LED_light"
        output: led_output
        id: pir_led_output_sw
        # 2024_0510_2221_53
    # light:
      - platform: esp32_rmt_led_strip
        rgb_order: RBG
        pin: GPIO48
        num_leds: 3
        rmt_channel: 2
        chipset: ws2812
        name: "mmwave_My_Light"
        id: RGB_right_sw

    switch:
      - platform: restart
        name: "Restart Node"#
        id: restart_id
    # 9999999999999999999999999999999999

    # switch:
      - platform: ld2410
        engineering_mode:
          name: "engineering mode"
        bluetooth:
          name: "control bluetooth"



    number:
      - platform: ld2410
        timeout:
          name: timeout

        light_threshold:
          name: light threshold
        max_move_distance_gate:
          name: max move distance gate
        max_still_distance_gate:
          name: max still distance gate
        g0:
          move_threshold:
            name: g0 move threshold
          still_threshold:
            name: g0 still threshold
        g1:
          move_threshold:
            name: g1 move threshold
          still_threshold:
            name: g1 still threshold
        g2:
          move_threshold:
            name: g2 move threshold
          still_threshold:
            name: g2 still threshold
        g3:
          move_threshold:
            name: g3 move threshold
          still_threshold:
            name: g3 still threshold
        g4:
          move_threshold:
            name: g4 move threshold
          still_threshold:
            name: g4 still threshold
        g5:
          move_threshold:
            name: g5 move threshold
          still_threshold:
            name: g5 still threshold
        g6:
          move_threshold:
            name: g6 move threshold
          still_threshold:
            name: g6 still threshold
        g7:
          move_threshold:
            name: g7 move threshold
          still_threshold:
            name: g7 still threshold
        g8:
          move_threshold:
            name: g8 move threshold
          still_threshold:
            name: g8 still threshold

    button:
      - platform: ld2410
        factory_reset:
          name: "factory reset"
        restart:
          name: "restart"
        query_params:
          name: query params

    text_sensor:
      - platform: ld2410
        version:
          name: "firmware version"
        mac_address:
          name: "mac address"
    # 8888888888888888888888888888888888888888      #
    # text_sensor:
      - platform: wifi_info
        ip_address:
          name: Address
          id: ip
        ssid:
          name: SSID
        mac_address:
          name: Mac
    # 999999999999999999999999999999999999999999
    select:
      - platform: ld2410
        distance_resolution:
          name: "distance resolution"
        baud_rate:
          name: "baud rate"
        light_function:
          name: light function
        out_pin_level:
          name: out pin level
    # 2024_0508_2051_54

    ☞ https://11q.kr 에 등록된 자료 입니다. ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다♠1.png


    뷰PDF add1,add2



    관련자료

    댓글 0
    등록된 댓글이 없습니다.



    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-12-18 17:08:13

    오늘의 홈 현황


    • 현재 접속자♨ 194(1) 명
    • 오늘 가입자※ 1 명
    • 어제 가입자※ 5 명
    • 주간 가입자※ 13 명
    • 오늘 방문자 2,183 명
    • 어제 방문자 2,429 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,894,957 명
    • 전체 게시물※ 8,876 개
    • 전체 댓글수※ 25,288 개
    • 전체 회원수 11,372 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑