Value with sensor unplugged

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
basti
New user
Posts: 8
Joined: 08 Apr 2024, 09:16

Value with sensor unplugged

#1 Post by basti » 15 Apr 2024, 12:58

Hello everyone, I have built a small pressure sensor using an ESP8266 and an ADS1115 (ESPeasy firmware of course).
It works pretty well so far. The only thing that bothers me is that as soon as I unplug it, I still get a pressure value or the ADS outputs a voltage.
I've already tried to eliminate this with a pull-down resistor, but that doesn't work so well (I get a negative pressure reading).
Do you have any idea how I can solve the whole thing in an elegant way, so that I only get "0" as a pressure value or possibly also "unplugged" as a test?

TD-er
Core team member
Posts: 8762
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Value with sensor unplugged

#2 Post by TD-er » 15 Apr 2024, 15:14

What is the range of expected values of this sensor?
If it is an analog sensor, adding some pull-up or -down resistor will introduce an error in the reading.
Maybe if using some high resistance value, the error is not an issue.

How is the sensor connected to the ADS and which sensor do you use?

basti
New user
Posts: 8
Joined: 08 Apr 2024, 09:16

Re: Value with sensor unplugged

#3 Post by basti » 15 Apr 2024, 20:09

TD-er wrote: 15 Apr 2024, 15:14 What is the range of expected values of this sensor?
If it is an analog sensor, adding some pull-up or -down resistor will introduce an error in the reading.
Maybe if using some high resistance value, the error is not an issue.

How is the sensor connected to the ADS and which sensor do you use?
I am using an analog sensor. It has an output of 0.5 - 4.5 V. The sensor is connected directly to pin A0 of the ADS1115. In "idle" mode, i.e. when the sensor is disconnected, the ADS outputs a voltage of about 1 V. I have already tried using a 10 kOhm resistor, but unfortunately this is not the solution. The pressure value only goes negative as soon as I connect the sensor, but I get back to 0 bar (I set this with the formula). However, I have not yet tested whether there are larger deviations upwards (when I increase the pressure).

Best regards
Basti

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests