Difference between revisions of "Analog Pressure sensor"

From Let's Control It
Jump to navigation Jump to search
Line 8: Line 8:
  
  
you want to measure pressure of liquids like oil or water, you could buy one of the pressure sensors on the internet, like this one:
+
If you want to measure pressure of liquids like oil or water, you could buy one of the pressure sensors on the internet, like this one:
  
 
[[File:PSI100.jpg]] [[File:PSI100_conn.jpg]]
 
[[File:PSI100.jpg]] [[File:PSI100_conn.jpg]]
Line 14: Line 14:
 
[[File:PSI.png]]
 
[[File:PSI.png]]
  
It is very easy to install, has an analog output and a linear conversion.
+
The advantages: It is very easy to install, has an analog output and a linear conversion.
 
There are however a number of challenges:
 
There are however a number of challenges:
 
  1 If you want to measure pressure in Bar, how is it converted from PSI
 
  1 If you want to measure pressure in Bar, how is it converted from PSI
 +
  With one of the many freely available converters on the internet, you can easily discover that 1 Bar (100.000 Pascal)    equals to 14,5037737796859 PSI (pound per square inch). This sensor ranges from 0 to 6,89475729 Bar.
 +
 
  2 How can voltages higher than 1.0 or 3.3 volts be measured with the on-board ADC
 
  2 How can voltages higher than 1.0 or 3.3 volts be measured with the on-board ADC
 +
  If the output impedance of the sensor is low enough, you can use a simple resistor network to create a voltage divider from let's say 5 volt to 3,3 volt.
 +
 
  3 How can you make sensible readings with ESPEasy
 
  3 How can you make sensible readings with ESPEasy
 +
  It takes some physics and math to answer this question and some calculations have to be made, but fortunateley ESPEasy allows for that.
  
  Ad. 1 With one of the many freely available converters on the internet, you can easily discover that 1 Bar (100.000 Pascal)  equals to 14,5037737796859 PSI (pound per square inch). This sensor ranges from 0 to 6,89475729 Bar.
+
  Ad. 1  
 
  Ad. 2 It only takes a simple network of resistors to match measured voltages to the input specifications of the ESP8266
 
  Ad. 2 It only takes a simple network of resistors to match measured voltages to the input specifications of the ESP8266
 
  Ad. 3 This takes some calculation.
 
  Ad. 3 This takes some calculation.
 
----
 
----

Revision as of 09:07, 10 September 2016

WIP.gif

It is not too difficult to connect an analog sensor to the ESP, but there are a number of issues to be addressed.

- Some on board ADCs have a range from 0 ~ 1 volt, others from 0 ~ 3.3 volt.
- The on board ADC has a 10 bit accuracy. This means that a full scale 1 volt (or 3.3 volt) read as 1023.
- In spite of the high accuracy of the ADC, it operates in a very noisy environment. Don't expect high precision readings.
- There are many more considerations. Just take a few minutes to read this posting as an example. [1]


If you want to measure pressure of liquids like oil or water, you could buy one of the pressure sensors on the internet, like this one:

PSI100.jpg PSI100 conn.jpg

PSI.png

The advantages: It is very easy to install, has an analog output and a linear conversion. There are however a number of challenges:

1 If you want to measure pressure in Bar, how is it converted from PSI
  With one of the many freely available converters on the internet, you can easily discover that 1 Bar (100.000 Pascal)    equals to 14,5037737796859 PSI (pound per square inch). This sensor ranges from 0 to 6,89475729 Bar.
2 How can voltages higher than 1.0 or 3.3 volts be measured with the on-board ADC
  If the output impedance of the sensor is low enough, you can use a simple resistor network to create a voltage divider from let's say 5 volt to 3,3 volt.
3 How can you make sensible readings with ESPEasy
  It takes some physics and math to answer this question and some calculations have to be made, but fortunateley ESPEasy allows for that.
Ad. 1 
Ad. 2 It only takes a simple network of resistors to match measured voltages to the input specifications of the ESP8266
Ad. 3 This takes some calculation.