Trouble with the ADS1015 Flex Sensor

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.

only one.PNG

I have no clue what is going on, so if someone could help, that would be awesome! Thanks, Akash.

Hi 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.

If you continue to have issues after adjusting that jumper and running the second example, please take a few photos of the top and bottom of your boards and attach them to your reply.](How to Work with Jumper Pads and PCB Traces - SparkFun Learn)](Qwiic Flex Glove Controller Hookup Guide - SparkFun Learn)](SparkFun Qwiic Flex Glove Controller - SEN-14666 - SparkFun Electronics)

Hey TS-Mark,

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.


Thanks,

Akash.

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

/mike

Thanks for helping out here, Mike!

Akash, try following Mike’s instructions. [This photo gives you a clear view of the default configuration for the address jumpers here and the table above it in the [Hardware Overview section of our guide lists the addresses of each position. I would highly recommend reading through our [How to Work with Jumper Pads and PCB Traces tutorial if you have never modified a solder jumper before. That will have step-by-step instructions for cutting a trace between jumper pads and adding a solder jumper.](How to Work with Jumper Pads and PCB Traces - SparkFun Learn)](https://learn.sparkfun.com/tutorials/qwiic-flex-glove-controller-hookup-guide#hardware-overview)](https://cdn.sparkfun.com/assets/learn_tutorials/7/8/5/ADR.png)

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,

Hi akb515.

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.

#include <SparkFun_ADS1015_Arduino_Library.h>

ADS1015 fingerSensor;

void setup() {

  Wire.begin();
  Serial.begin(115200);

  if (fingerSensor.begin(Wire, 100000, ADS1015_ADDRESS_VDD) == false) {
     Serial.println("Device not found. Check wiring.");
     while (1);
  }

}

void loop() {  
  uint16_t data;
  for (int finger = 0; finger < 2; finger++) {
    data = fingerSensor.getAnalogData(finger);
    Serial.print(finger);
    Serial.print(": ");
    Serial.print(data);
    Serial.print(",");
  }
  Serial.println();
}

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();

Sorry I included the wrong code there. This is the one I tried, modifying yours.

#include <SparkFun_ADS1015_Arduino_Library.h>

ADS1015 mainSensor;
ADS1015 fingerSensor;
uint16_t hand[4] = {0, 0, 0, 0};
void setup() {

  Wire.begin();
  Serial.begin(115200);
  if (mainSensor.begin(Wire, 100000, ADS1015_ADDRESS_SDA) == false) {
     Serial.println("Device not found. Check wiring.");
     while (1);
  } 
  if (fingerSensor.begin(Wire, 100000, ADS1015_ADDRESS_VDD) == false) {
     Serial.println("Device not found. Check wiring.");
     while (1);
  }

}

void loop() {  
  uint16_t data;
  for (int finger = 0;finger < 2; finger++){
    hand[finger] = mainSensor.getAnalogData(finger);
    hand[finger+2] = fingerSensor.getAnalogData(finger);
  }
  for (int finger = 0; finger < 4; finger++) {
    data = fingerSensor.getAnalogData(finger);
    Serial.print(finger);
    Serial.print(": ");
    Serial.print(data);
    Serial.print(",");
  }
  Serial.println();
}

Hi again Akash,

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)

That works!!! Thank you so much!

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?

Thanks, Akash.

Hi again Akash,

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)

Hello,everyone,I have some questions:

1.How can this sensor modify the address?

2.Need to disable the i2c pull-ups on all but one board when connecting them to the same bus/cabling, how to do this part?

Can someone tell me please? Thank you very much.

Hookup guide has the information you’re looking for.

https://learn.sparkfun.com/tutorials/qw … okup-guide

Hello,I have revised the address modification part, thank you.

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)?

I also already answered this for you via email…use the information previously sent.