ADS1015 Connection on RPI

#1

Hey All,

I have an ADS1015 connected to my Raspberry Pi3 B+ but i cant see it or attach it to my Cayenne dashboard. The ADS is for reading analog pressure sensors from 0-550 psig. Output on the sensors is .5-4.5v. This is connected and reading fine on sample program code.
Why wont Cayenne read the ADS at all?

0 Likes

#2

are you using the ADS1015 plugin?

0 Likes

#3

Yes, ADS plug in is on the Pi. Do I need to call on it or import it somewhere?

0 Likes

#4

i am referring to this https://github.com/myDevicesIoT/cayenne-plugin-ads1xxx. have you added it?

0 Likes

#5

Yes, it is in there.
/home/pi/cayenne-plugin-ads1xxx

0 Likes

#6

Got it! Reloaded and restarted. That part is good! Reading all 4 channels.
Now… I need to change the analog 0.0 voltage value to PSI. The range will be 0-500 psi. The pressure transducers are .5 - 4.5 volts.
.5 being 0 psi and 4.5 volts being 550 psi
Is there a pressure module that will work with this range? The only module for pressure that I see is for barometric pressure which is way too low.

0 Likes

#7

which barometric pressure sensor are you using? can you provide some link?

0 Likes

#8

Not using a barometric sensor.

This one is .5 to 4 5 volts

Measures between 0 - 550 psi

Kevin Williams

Commercial Food Equipment Service Instructor

Wake Tech Community College

Email correspondence to and from this address may be subject to the North Carolina Public Records law and may be disclosed to third parties by an authorized state official (NCGS. ch. 132). Student educational records are subject to FERPA.

0 Likes

#9

so the output from these sensor is 0.5 to 4.5 which you are able to read from the sensor?
now you want to map it to values 0 to 550? try this simple function which does this:

def map(x, in_min, in_max, out_min, out_max):
    return int((x-in_min) * (out_max-out_min) / (in_max-in_min) + out_min)

which is similar to Arduino map function.
you may also want to use the cayenne Python library to add your device, as it gives more freedom on what you wan to show: https://github.com/myDevicesIoT/Cayenne-MQTT-Python

0 Likes

#10

Thank you. I will try it.

Kevin Williams

Commercial Food Equipment Service Instructor

Wake Tech Community College

Email correspondence to and from this address may be subject to the North Carolina Public Records law and may be disclosed to third parties by an authorized state official (NCGS. ch. 132). Student educational records are subject to FERPA.

0 Likes