-->
Page 1 of 1

ESP8266 + 0-5v pressur trancduser

PostPosted: Sat Dec 19, 2015 12:33 pm
by tazzat
How can i connect up a pressure transduser to the ESP8266?

like this one
http://www.ebay.com/itm/30psi-0-5-4-5V- ... SU&vxp=mtr

Re: ESP8266 + 0-5v pressur trancduser

PostPosted: Sat Dec 19, 2015 11:35 pm
by Timpanogos Slim
All you need is an i2c adc and a level converter.

something like a pcf8591p is cheap and effective.

http://www.aliexpress.com/item/Free-shi ... 80082.html

And of course an i2c-compatible level converter:

http://www.aliexpress.com/item/Free-shi ... 53538.html

Re: ESP8266 + 0-5v pressur trancduser

PostPosted: Sun Dec 20, 2015 5:35 am
by jankop
Two resistors for internal ADC.

Re: ESP8266 + 0-5v pressur trancduser

PostPosted: Sun Dec 20, 2015 5:54 am
by trackerj
Option 1:

You can use the ESP8266 Internal ADC with a simple Resistor Voltage divider (see picture and descriptions in link).


Long story short, you can use the simple formula:
Image

Vout=Vin*R2/(R1+R2).

If you need Vin_max = 5V and Vout_max = 1V
- > In this case you can choose 40K and 10K for the resistors.

Actually I will suggest you to use 39K and 9k1 , for a Vout_max = 0.946V when Vin_max=5V, for some reasons that you will discover as soon as you will start playing with the ESP8266 internal ADC :).

Option 2:
For a higher resolution you need a dedicated ADC, like the 18 Bit MCP3421. You can find there examples and driver.