If thatās the case, you could use the ADC sensor in ESPHome, though you might need a voltage divider to scale down that input voltage depending on what ESP board you use and what input voltage range it can read.
I want to get this going too and use ESPHome.io but I am having difficulty figuring out exactly what the equation should be. I originally used the Arduino IDE to upload a simple equation from a youtube video I found, it seemed to work very well and gave me the pressure Iād expect.
Iām very interested if anyone has an accurate equation for this. When I get it installed as a last-ditch effort Iāll use empirical data correlating values with my fixed gauge pressure but itāll be a little while before that happens. :-/
@malesci, since I cared more about precision and less about accuracy for comparison between two sensors, I ended up using empirical data and a 4th degree polynomial fit. See the resulting ESPHome equation here: Water filter quality and water softener status
Hello Iām using a wemos D1 mini and ads plantform on esphome.
The sensors wire are connected on 5vcc, gnd and pin 0. Unfortunately I received always fixed value from the sensor, always 1V. Became 3.3 if I multiply for 3.3 of course.
Can you help me to understand configuration and wire connections? Maybe I need some resistors?
Thank you in advance
@malesci, how are you changing the pressure when expecting different voltages? My device is 0-175psi (0-1.2MPa) which is a significant range. If youāre blowing into it, expecting a change in voltage itāll be within the noise, you can probably only generate about 1 or 2psi by mouth. If you look at my picture above, itās really simple:
RED = 5V
BLACK = GND
YELLOW = A0
If youāre getting a constant 1V while varying the actual pressure significantly then your sensor is damaged.
But.
Does the Wemos d1 Mini read more than one volt?
I am trying to use this sensor with this chip, but from what I read Wemos D1 Mini, ESP8266 can only distinguish between 0-1v
And the sensor transmits from 0.5 to 4.5
How do you convert this?
Iāve found a digital level switcher but that one steps it down from 5V to 3v
Hi @alnavasa, I just did this as a proof of concept. When I built the final solution, I used an ads1115 which gives you 4 analog inputs and each one can have a range of -0.3V-5.5V. Along with that there are more bits to represent the actual analog voltage (higher resolution). Best of all itās supported by ESPHome. You might be able to go with a resistor divider to knock the voltage down cheaplyā¦ good luck!
Replying in case anyone else finds and follows this old threadā¦ So I did something similar to this post, attaching a pressure transducer to a D1-mini. I attached directly without a separate ADC.
My pressure transducer is a 100psi model from aliexpress, powered directly from the 5V pin on the D1-mini.
Iām able to get away with this, because Iām never expecting pressures that will give a voltage over 3.3V (which would burn out the D1 mini).
The above comments about āThe D1 mini can only take voltages from 0-1Vā are technically true, but misleading. There is a built in divider that scales down 0-3.3V to 0-1V before presenting it to the ADC. (You can see this in the raw values you get from the pin). The (x*3.3) part scales up the value to the real input voltage. The -0.5 is because 0 psi corresponds to 0.5V on the raw input voltage. The x25 is because 1V of input voltagw corresponds to 25psi (voltage range from 0.5V @ 0psi to 4.5V @ 100 psi).
So as long as my input pressure stays below 70psi/3.3V Iām golden. (Typical pressures for my system are about 25-30psi)
It does not matter which ESP board you use ā so long as it supports iĀ²c. Iāve used Wemos D1 Mini, NodeMCU, and ESP32s in my house and they all support iĀ²c.
Thereās a ton of detail in there and I posted my complete YAML file. Be warned though, the logic is pretty in-depth and you likely donāt need all of it.