Adafruit 1085 (ADS1115)

image

If inputs are on the top and outputs are on the bottom of a node, why does the attached node for ADS1115 ADC have analog inputs A0 - A3 on the bottom? Is this correct? The sensor will be attached to an input for the ADC to convert.

I think the confusion is that the ADS1115 chip has input pins. That means the chip reads in values. Arduino/XOD will read those values, and the node you are using will spit out those values, so the node in your XOD program has output pins to return the value of the chip’s input pins. As you switch from hardware to software, the sense of what a “pin” does is going to change. The hardware input pin gets data that you will want to read. The software gets that value from hardware, then “outputs” it to your program.

The same is true in reverse. If you have an output pin on the Arduino, your program needs to send data to it, so any node sending that data will need an input pin to get the data from your program, then it will send that to the hardware output pin.

OK, if that’s the case shouldn’t the labels be D0 - D3? It’s an ADC. Where should the input from the sensor go? Are sensors shown in the XOD? I was going to use an analog sensor node. Is that necessary? What is the point of the A0 - A3, it’s an I2C component? Thank you for the quick response.

The sensor calls them “channels” A0-A3, so the person writing the node for it chose to stick with those names. I2C is the communication protocol used to talk to many peripherals (including this part). How that communication is done and what the returned data means is completely dependent on the part being communicated with. The node you specified above should allow you to read the values the chip sees on its input pins into your program, but only if you specify the correct address for your chip & wire the hardware correctly. What those values mean will depend on what you are connecting to the chip. What you do with those values inside your program is totally up to you. An analog-read or analog sensor node would be for reading from an analog pin on the arduino, which converts the input into a digital number; the chip you are using already does that conversion, so you just need to use the digital number coming from the node above.

It’s starting to sink in a little. Thank you for your patience. The part i can’t get over is the physical module doesn’t have any output pins other than the SCL and SDA for the I2C bus. Are you saying I don’t have to supply the node with inputs in XOD? The module has input pins A0 - A3. Are you curtain the node was constructed right?

Yes. The node is constructed correctly.

I’m starting to have fun with this ADS1115 ADC (no sarcasm). The node is working great! I’m curious why I can’t get the digital output anywhere close to the 16 bit number that Adafruit claims. Even if it were 16 bit divided by the 4 channels (16,384 = 65,536 / 4). It seams closer to the 12 bit ADS1015. I’m currently using only 1 channel, with a gain of 1.5. Will it do any gain between .66 and 16? That was another question I had. The example in Adafruit shows .66 (default), 1, 2, 4, 8, 16. My guess is 1.5 is not a valid gain value? My input voltage (to ADC) is 0.9V - 3.3V. What are your thoughts?