Hi, I recently purchased two ADS1015 sensors in order to try getting values of 4fingers while wearing a glove. After getting the parts, I decided to test it, using the Qwiic Shield for the Arduino Uno. From the shield, there is one qwiic connector going to the first ADS1015, and then another qwiic connector going from that sensor to the next one (daisy chained together). The code is supposed to print the values of the 4 fingers (example code #2 SetUp Hand), however, the values are clearly wrong. When just one sensor connector, the first image shows the output of the flex sensors completely straight. I knew this was wrong because when I had forgotten to hook up the sensors, all 4 fingers read 4095, so I knew that there was some issue present. When bending the sensors on both sensors, the values for finger 1 and 2 change in a weird way, while fingers 3 and 4 remain 4095.
I decided to run the same code, but with only one ads15103 connected. Now, finger one and two print values close to 1000 when unbent and drop once bent (the correct response), while 3 and 4 print 4095, showing they are not connected.
I have no clue what is going on, so if someone could help, that would be awesome! Thanks, Akash.
From your description, it sounds like you have not adjusted the address jumpers correctly to use more than one of the [Qwiic Flex Glove Controllers on a single I2C bus.
The second example in the [Hookup Guide has the I2C addresses set to default (connected to GND) and 0x4A (connected to SDA). Make sure you have adjusted the solder jumper on the back of the board to switch from GND to SDA. If you are not sure how to modify those jumpers, take a look at [this tutorial on working with Jumper pads and PCB Traces.
This is my first time dealing with jumper boards so I am a little confused. Below, I have attached pictured of my circuit right now. Would I work with the jumper pad on the Flex Glove that is connected to the Quiic Shield or the last one daisy chained? Also, for soldering the jumper pads, there are two rows of 3 leads, so what should I connect together? Sorry for all the questions.
Look at the pad labelled GND. You see a thin short trace connecting it to the middle pad. Cut that trace between the pads, and instead solder a jumper or blob between the pad labeled 3v3 and the middle pad on that row (between 3v3 and SCL). This will change the address to 0x49. Do this on one of the two boards; the other will remain at 0x48
Hi, I am still having trouble. Now, the one that I modified won’t give me any values when I bend it, whether or not it is hooked up with the other sensor too. Can you guide me on what to do? Thanks,
Is your code looking for the second board at the correct I2C address? Changing the jumper changed the address and if your code is looking for the old address it won’t find the board.
Try this modified test code with the modified board and see if it works then.
Hey Chris, that code works! I am getting values for the sensor that I soldered the pad between. How should I get values from the other sensor that is daisy chained though? I tried the following based on the code you sent but it is not working. Do you know what I am doing wrong? Thanks,
I am pretty sure I am not setting up the second one correctly. I am not too familiar with how these addresses work.
#include <SparkFun_ADS1015_Arduino_Library.h>
ADS1015 pinkySensor;
ADS1015 indexSensor;
uint16_t hand[4] = {0, 0, 0, 0};
void setup() {
Wire.begin();
Serial.begin(115200);
//Set up each sensor, change the addresses based on the location of each sensor
if (pinkySensor.begin(Wire, 100000, ADS1015_ADDRESS_SDA) == false) {
Serial.println("Pinky not found. Check wiring.");
while (1);
}
if (indexSensor.begin(Wire, 100000, ADS1015_ADDRESS_GND) == false) {
Serial.println("Index not found. Check wiring.");
while (1);
}
}
void loop() {
uint16_t data;
//Read and print our data
for (int finger = 0; finger < 2; finger++) {
hand[finger] = indexSensor.getAnalogData(finger);
hand[finger + 2] = pinkySensor.getAnalogData(finger);
}
for (int finger = 0; finger < 4; finger++)
{
Serial.print(finger);
Serial.print(": ");
Serial.print(hand[finger]);
Serial.print(" ");
}
Serial.println();
Try using [this example from the library and adjust this line:
if (pinkySensor.begin(ADS1015_ADDRESS_SDA) == false)
to this:
if (pinkySensor.begin(ADS1015_ADDRESS_VDD) == false)
That should work if the jumper is configured properly. If that does not work, the issue is most likely with the jumper modifications on your board. You may have a small solder bridge going between the center pad and the SCL pad for the address setting. Try carefully reworking that jumper to make sure there is no solder connecting the center pad to the SCL pin and that should fix the problem. If, after reworking, you continue to have issues with this board, please take a couple of new photos of that jumper and attach them to your reply.](SparkFun_ADS1015_Arduino_Library/examples/Qwiic_Flex_Glove_Controller/Example2_SetupHand/Example2_SetupHand.ino at master · sparkfun/SparkFun_ADS1015_Arduino_Library · GitHub)
Just one last question, the instructions on the product sheet say to cut the pull up resistors on the front of the board, like three rectangles that have a line connecting them. Should I also cut it, or just leave it how it is since its working?
I would leave the I2C pull-up jumper alone in this configuration. We include that jumper so users can disable the onboard pull-up resistors in long I2C chains. For example, if you have a circuit of, say, 10 I2C devices all with their own pull-up resistors, the combined resistance on your data and clock line can get so strong that the master device cannot drive them low to communicate with the slave devices. If you want to learn more about I2C communication, our [I2C Tutorial is a good place to start. [This document from TI on pull-up resistor calculation will go in much more detail on this specific piece of I2C communication.](http://www.ti.com/lit/an/slva689/slva689.pdf)](https://learn.sparkfun.com/tutorials/i2c)
I also want to ask a question, is there only one address on a sensor (Finger1 and Finger2 are the same address 0x48)? Is there a way to use two addresses on the same sensor for Finger1 (0x48) and Finger2 (0x49)?