Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
E16p Analog Inputs
#3
(10-30-2023, 09:06 PM)admin Wrote: E16P have 4CH analog input ports.  A1,A2 for dc 0-5v signal input. A3,A4 for 4-20mA signal input.
here is ESPHome config yaml deom for monitor analog sensor, you can check it: https://www.kincony.com/forum/showthread.php?tid=3432
if you want read SHT31 sensor, it's easy, just see SHT31 ESPHome config file at here: https://esphome.io/components/sensor/sht3xd.html

That's great thanks,

I have managed to get both water and temperature/humidity sensors setup now cheers. Here is my Yaml, As you can see i have adapted the code for one sensor on pin 36 that works by returning a value between 0-2.5v and pin 35 that works by returning a value between 0-5v, this code is to convert values from both sensors so they are displayed as a percentage on a scale so i know what % of water there is remaining in my water tank.

# Individual sensors
sensor:
  - platform: sht3xd
    temperature:
      name: "Van Temperature i2c"
    humidity:
      name: "Van Humidity i2c"
    address: 0x44
    update_interval: 1s
 
  #analog sensor for water level
  - platform: adc
    pin: 36
    name: "Water level CH1 Voltage"
    update_interval: 1s
    attenuation: 11db
    filters:
      - lambda:
          if (x >= 3.11) {
            return x * 64.06640;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 60.40;
          }
 #ultrasonic sensor for water level
  - platform: adc
    pin: 35
    name: "Ultrasonic water level ch2 Voltage"
    update_interval: 1s
    attenuation: 11db
    filters:
      # - multiply: 1.51515
      - lambda:
          if (x >= 3.11) {
            return x * 32.03320;
          } else if (x <= 0.10) {
            return 0;
          } else {
            return x * 30.20;
          }
Reply


Messages In This Thread
E16p Analog Inputs - by Hunter42069 - 10-30-2023, 05:37 PM
RE: E16p Analog Inputs - by admin - 10-30-2023, 09:06 PM
RE: E16p Analog Inputs - by Hunter42069 - 11-01-2023, 06:02 PM
RE: E16p Analog Inputs - by admin - 11-01-2023, 10:33 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)