Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106041

Help needed for 5V analog water pressure transducer switch, ESPhome and HA

$
0
0

@R3plic8 wrote:

Hi, I am hoping someone would be able to assist me getting a water pressure transducer to operate a relay for water pump with given pressure readings. Im Struggling to grasp the concept of ADC, Lambda, ect.

Im using a Nodemcu V3 lolin,
DFRobot sen0257 water pressure transducer

  • Sensing range: 0 - 1.6 MPa
  • Input Voltage: 5VDC
  • Output Voltage: 0.5 - 4.5 VDC
    (Linearly corresponding to 0 - 1.6 MPa)
  • Accuary: 0.5% - 1% FS
    And a 2 channel 5V relay. (only using one channel for now)

So as it stands and fighting with this for a while, I have the pressure transducer signal pin connected via a 2k trim pot voltage divider dropping 4.5V to 3.3V for the A0 pin on the node dev board
The sensor is getting a signal on the ADC between 0-1V and the sensor state is showing between 0-4.5V it seems in the log.
This how ever is probably not accurate and have gotten to the point. where im actually now not to bothered with calibrating correctly or converting the Voltage into mBar and PSI readings.

I need to get this working one way or another quite urgently. I have tried a few options in the ESPhome using on_range_value and the switch.toggle ect, but just dont seem to be coming right with getting the switch to automate.

switch:
  - platform: gpio
    pin: D1
    name: "Water Pump"
    id: waterpump


sensor:
  - platform: adc
    pin: A0
    name: "Water Pressure"
    id: 'WaterPressure'
    unit_of_measurement: "V"
    filters:
      - multiply: 3.3
    on_value_range:
        - below: 1.0
          then:
            - switch.turn_on: waterpump
        - above: 2.0
          then:
            - switch.turn_off: waterpump
    update_interval: 5s

Schematic - https://i.ibb.co/FDwFWYt/transducer-Relay-bb.png

For now i would be grateful if i could just get the switch to operate by sensor voltage level and calibrate the automation to the voltage provided with a external pressure gauge. If anyone is able to point me in the right direction, or offer assistance it would be a huge help. Thank you

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 106041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>