Page 1 of 1
Best ADC for 5v pressure sensor
Posted: Wed Jun 07, 2017 2:55 pm
by cscuilla
I'm hoping to read data from a pressure sensor like this from my raspi..
http://www.ebay.com/itm/Pressure-transd ... bZ&vxp=mtr
Does anyone know of an ADC which will work for this??
thanks for your time!
-Craig
Re: Best ADC for 5v pressure sensor
Posted: Wed Jun 07, 2017 4:21 pm
by Ferdinand
Hi cscuilla,
Did you follow this link?
https://raspberrypi.stackexchange.com/q ... berry-pi-2
You will need an ad converter. The output range of the your sensor is 0.5 ~ 4.5 V. Check of your adc can handle this input range. You need a level shifter because the i2c scl and sda lines are 5V and your pi can handle 3.3 V only.
See also Adafruit for more information:
https://cdn-learn.adafruit.com/download ... akouts.pdf
Re: Best ADC for 5v pressure sensor
Posted: Wed Jun 07, 2017 5:29 pm
by cscuilla
Thank you for the links. From the first post, it looks like I can use an
ads1115.
Do you know would I still need a level shifter?? I didn't quite understand that part.
thanks again!
Re: Best ADC for 5v pressure sensor
Posted: Thu Jun 08, 2017 7:51 pm
by Ferdinand
You do need a level shifter to protect your pi (3.3 V) because your adc runs on a 5 V. Otherwise you will fry your pi.
For more info read this:
https://nathan.chantrell.net/20120610/r ... nt-voltage
Re: Best ADC for 5v pressure sensor
Posted: Thu Jun 08, 2017 8:12 pm
by cscuilla
Thank you. I am planning to ordering the following. Do you think it will work? Can anyone help with the wiring??
Level Converter
https://www.amazon.com/XINY-Raspberry-c ... +converter
ADC
https://www.amazon.com/HiLetgo-ADS1115- ... ds=ads1115
Re: Best ADC for 5v pressure sensor
Posted: Thu Jun 08, 2017 8:41 pm
by Ferdinand
Or this level shifter from adafruit:
https://www.adafruit.com/product/757
Don't forget the most important: Software!
Do you have a (python) module driver for your ads1115?
Before you are buying parts make a drawing!!! And post it here.
Re: Best ADC for 5v pressure sensor
Posted: Thu Jun 08, 2017 9:48 pm
by mahjongg
If you interface it with I2C, and the i2C device excepts 3V3 high levels you don't need level shifters. I2C uses open collector outputs so the high level is determined by the pull-ups, which on a PI pull up to 3V3, which is fine for most I2C IC's even if they run on 5V themselves.
The ADS1115 needs an ViH of at least 70% of VCC, so for 5V it needs 3.5V, which is slightly to high, so as a solution I recommend lowering VCC to 4.5V (using a diode to drop 0.5V from the VCC), or simply power the ADS1115 with 3.3V.
If both of these solutions are unacceptable, then indeed you should use level converters in this case.
Re: Best ADC for 5v pressure sensor
Posted: Fri Jun 09, 2017 7:42 am
by Ferdinand
Method one:
Remember the pressure sensor must be fed by a clean 5 V linear power supply. If you are using voltage drop devices, like a diode, then you can not handle the the full range of the sensor.
Method two:
You may use a resistor divider (potentiometer) for the output of the sensor and run the adc on 3.3 V. In that case a level shifter is not needed. Don't use 3.3 V of the raspberry pi. It is to noisy.
Use a clean linear 3.3 V power supply if you connect the adc to 3.3 V but your sensor needs a clean 5 V power supply too. See also the application notes for more information.
I2c:
If you are using more then one i2c 5 V slave devices, like an adc, then use a level shifter, because all 10k pull up resistors are in parallel. The voltage levels of the i2c lines rises to a frying pi level.
If you are experimenting, use a level shifter.
I think method one is to go for. It is less complicated.
Re: Best ADC for 5v pressure sensor
Posted: Fri Jun 09, 2017 1:28 pm
by cscuilla
Thanks for the info! Excuse my ignorance, I only have experience w/ 1-wire digital sensors. I think I will go with a Level shifter. Here is my plan so far. Any advise/wiring help is greatly appreciated..
ADS 1115
Level converter
https://www.amazon.com/XINY-Raspberry-c ... +converter
5v power supply for rPI
5v power supply for ADS 1115
Im planning to start with this python library and see if i can get it to work..
https://github.com/adafruit/Adafruit_Python_ADS1x15
Thanks again for all the help
Re: Best ADC for 5v pressure sensor
Posted: Sat Jun 10, 2017 1:41 pm
by Ferdinand
Hi cscuilla,
This article explains how to connect a potentiometer, in your case a pressure sensor, and interfacing to your pi.
http://www.python-exemplary.com/index_e ... dc.inc.php
To prevent weird readings
Input AIN0 and AIN1 are internally connected to PGA (default)
Connect AIN1 to GND or disable AIN1 in Config Register MUX[2:0]
Set PGA (programmable gain amplifier) to 1 because your max sensor output is 4.5 V.
Config Register
bits 14-12 MUX (see datasheet ADS1115)
set mux[2:0] to 100. -> AIN0 (single ended) all other inputs are connected internally via MUX to GND.
(AINp = AIN0 and AINn =GND see datasheet).
see also youtube ads1115 videos
Re: Best ADC for 5v pressure sensor
Posted: Thu May 03, 2018 8:14 am
by erlic32
looks like I am late in party, you can use old but much better solution by interfacing pressure sensor with Raspberry pi using
4-20mA current loop receiver which is very easy to use, let me know you required reference code if you require