Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-a6-v1.3sp + 0.5V Analog Input
#1
Hello again,

I have the KC868-a6-v1.3sp and a pressure sensor (0..150 psi / 0.5..4.5 V). I noticed my values were being capped at about 40 psi / 1.5 V. 
I verified with my fluke loop calibrator, and indeed have a limit at 1.5 V.

The image below shows the raw value being capped at 1.01.
I tried moving the input to the second, but I received the exact same values (capped).

Below code is used for both test with input 36 and 39.

You have any recommendations

Code:
       
  - platform: adc
    pin:
      number: 39
    unit_of_measurement: 'psi'
    name: 'Water Pressure Sprinkler'
    update_interval: 0.5s
    filters:

      - sliding_window_moving_average:
          window_size: 10
          send_every: 10


   
Reply
#2
you can see this code for analog 0-5v input.
Code:
  - platform: adc
    pin: 39
    name: "A1 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
Reply
#3
Ah yes, I must have missed the attenuation. Thank you so much, my apologies.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)