I'm trying to get my ADS1115 to work properly. However, I just can't figure out what I'm doing wrong. Ultimately I want to connect multiple ADXl335 sensors to the ADS1115, but in getting there, I can't seem to find the ADS1115 using an I2c scan(without anything connect). As you can see in the picture
#include <Wire.h>
void setup()
{
Wire.begin();
Serial.begin(9600);
while (!Serial); // Leonardo: wait for serial monitor
Serial.println("\nI2C Scanner");
}
void loop()
{
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for(address = 8; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
else if (error==4)
{
Serial.print("Unknown error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for next scan
}
Buy a accelerometer with a I2C interface. Problem solved
There are a bunch of clone Uno boards which do not have the SDA and SCL pin connected. Can you try A4 (SDA) and A5 (SCL) instead ?
Sometimes the jumper wires are broken. Do you have a multimeter to test them.
Can you measure the voltages at the ADS1115 module ?
Did you solder the wires in the ADS1115 module ? You should solder them.
If you do not have a multimeter, you should buy one
Your potato is not good enough to see where the resistors go
It's just me, but could we please use the Manufacturer's pin names? For a minute, I thought you were connecting +5 to the analog input of the 1115, but I think you mean VDD in your diagram, not Vin, correct?
Also, why two breadboards? Surely, you could make all your connections in an organized fashion on one, and reduce the risks associated with rats-nest wiring?
The A4 and A5 pins also unfortunately give nothing. I just bought a multimeter! How would I test those pins? I tried to search it on the web but I couldn't find it.
I've measured the ADS1115 module with the multimeter and it gave 5v. So I guess that works?
Also I soldered all pins to the ADS module.
As for the picture the resistors both are connected to the 5V and one to the SDA and one to the SCL
How about the soldering ? How did you connect the wires to the module ? If you stick the jumper wires in the holes then they do not make good contact and it will not work.
What are the voltages of SDA and SCL at the module ?
You could disconnect everything from the Uno board, set the pinMode for A4 and A5 to OUTPUT and toggle those outputs one by one and try to measure that with the multimeter (or with a resistor plus led).
Solder the pins to the board, then I connect a female-to-male wire to the breadboard. That should work, right?
I'm not sure how to measure that. But if I hold the red and black stick of the multimeter touching the SDA or SCL pin, then I get 0 Volts. Am I measuring it correctly that way?
If you set the multimeter to measure voltage, and then the black stick to GND and the red to SDA or SCL, then SDA and SCL should be near 5V.
I'm suspecting that your Uno board is bad, perhaps SDA or SCL is not working. Can you get another Uno board ? Do not buy the same board and not from the same seller.
In the past, I could buy a Uno clone for 4 euros, but not anymore. Here is a clone of 7 euros, but because of the chip shortage, the prices go up. You could try something cheaper, such as the Raspberry Pi Pico for 4.50 euros.
Can you give us a broader view ? Please tell more about your project. A ADXL335 together with a ADS1115 and a Arduino Uno does not make sense. That is wrong combination of items. You might need something else for your project.
For both I get about 1.5V. Could it be that my pull up resistors are to strong? they are 10k.
I don't have a new uno board at hand. The board was board of a beginner starter set. So I hope it's not bad quality.....
As for the project. I want to connect 7 adxl335 sensors simultaneously to measure vibrations of a beam. I figured that the ads1115 would increase my accuracy(right?) and also to allow me to use those 7 sensors simultaneously.
The 1.5V is not good. But in the photos everything seems connected properly. So I don't know what is going on.
The ADS1115 does not increase the accuracy of the ADXL335. The analog inputs of the Uno board are good enough. The ADS1115 with the I2C bus will make it slow to read all the sensors.
Every ADXL335 has 3 analog outputs (x, y and z). With 7 sensors, you need 21 analog inputs. That is six ADS1115 modules. Are you going to use 6 ADS1115 modules ?
The Arduino Leonardo has 12 analog inputs. If one analog input is used with a multiplexer, then you get 11 + 16 is 26 analog inputs.
Now that I think of it, 5 + 16 is 21, so a Arduino Uno + multiplexer would also work.
Can you get help ?
Disconnect everything from the Uno board, and test the pins of the Uno board, especially A4 and A5.
Have you heard about the XY-problem ? There is a website for that: https://xyproblem.info/.
Please tell us about the beam, what is it, how large it is, how many sensors you want and what you want to measure.
I'll first explain what I want to do:
The idea is to assess the difference in the performance between high-end and cheaper Arduino sensors. I'll do this by dropping a ball on a 2m long concrete beam mounted with seven sensors. As vertical acceleration is of interest, I will only need the Z-axis. Maybe the Y-axis as I'll deflect the beam a bit, but I don't know how much that will be. It may even be negligible. Does this make it more clear?
If I will use both the x and y axis I'll need 14 inputs right? Then an arduino with that many inputs should do the trick?
Just out of curiosity. If the ads1115 doesn't make analog inputs more accurate why would you use it then?
Then start the I2C bus with "Wire.begin();" and A4 and A5 should be near 5V (because of the internal pullup). Then add the pullup resistors, then add the module.
About the accuracy. It starts with the ADXL335 sensor. That is a MEMS sensor. They are noisy and slow. It does not give 16-bit accuracy. The ADS1115 is accurate, but not needed for the ADXL335.
The ADXL335 has 1.6kHz bandwith for x and y according to the datasheet. However, it is hard to achieve that.
You want to measure a impact. That requires a special sensor. The I2C bus is also far too slow for a impact. That means that your test will not be suitable for any of the sensors that are often used with a Arduino.
Almost no one uses the ADXL335 anymore, because of its analog outputs.
Is this a project for school ? Can you choose an other project ?
You could measure the uncalibrated values by turning a sensor in all directions. To check which one works best when not calibrated. You could put the Arduino with a sensor on a plate and swing it around with a motor (or put it on the tip of a large ceiling fan), to create g-force.
I remember that someone on this forum wanted to measure the force of a punch-bag/plate. Those things are hard to measure.
As for the project. It is for my thesis, it's based on another researcher who has used an adxl335 and shown quite good results. So I can't choose something else to do I just have to find out if there is a method that acquires good results. Tough, a couple of days ago, the researcher told me he is using the MMA 8451 now for measurement. I'm still contemplating using those.
I don't want to measure an impact, particularly I want to measure the response of the beam. I'll place the seven sensors spaced equally over the beam, which should measure its vibrational modes. In this case would you think the ADXL335 might be sufficient?
But there is no way of bypassing the I2C bus, right? Because all sensors digital sensors use those.
As you might notice, all of my knowledge about Arduino has been acquired from the internet in the past couple of weeks and this field of research is also new for my professors. So I'm appreciating your help