Troubleshooting ADS1015? Wiring Problem?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
jantoth
 
Posts: 7
Joined: Wed Jun 15, 2016 6:00 am

Re: Troubleshooting ADS1015? Wiring Problem?

Post by jantoth »

Hello guys,

I have to apologize! I just unplugged all the wires as you asked for
images and rewired them again.

I run:

Code: Select all

pi@rpi3jantoth:/opt/ADS1115/examples$ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
and suddenly number 48 appeared :

then:

Reading ADS1x15 values, press Ctrl-C to quit...
| 0 | 1 | 2 | 3 |
-------------------------------------
| 5657 | 4280 | 4735 | 4874 |
| 4433 | 5106 | 3981 | 5389 |
| 3322 | 5230 | 3979 | 5248 |
| 3501 | 5095 | 4070 | 5013 |
| 3896 | 4765 | 4772 | 4153 |
| 5125 | 4105 | 5228 | 3785 |
| 6074 | 3883 | 5182 | 3923 |
| 5920 | 3982 | 5080 | 4128 |
| 5768 | 4056 | 5052 | 4055 |
| 5845 | 4002 | 5104 | 3973 |
...
...

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Troubleshooting ADS1015? Wiring Problem?

Post by adafruit_support_bill »

@ jantoth - please post photos showing the connections to the Pi also. A common problem is if the ribbon cable is reversed. The white stripe should be at the Pin-1 end of the header.

User avatar
jantoth
 
Posts: 7
Joined: Wed Jun 15, 2016 6:00 am

Re: Troubleshooting ADS1015? Wiring Problem?

Post by jantoth »

Hi @admin,

I have already posted that I solved my problem by re-wire-ing
all the wires on the breadboard.

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Troubleshooting ADS1015? Wiring Problem?

Post by adafruit_support_bill »

Good to hear. Thanks for the follow-up.

User avatar
alinoormohamed
 
Posts: 6
Joined: Thu Jul 27, 2017 2:52 pm

Re: Troubleshooting ADS1015? Wiring Problem?

Post by alinoormohamed »

I am having the same problem as this gentleman - however, when I run "i2cdetect -y 1", the device shows up under the address 0x48. However I am still getting the same error - "smbus.py, line 274, in write_i2c_block_data - IOError: [Errno 5] Input/output error". Any advice?

User avatar
world101
 
Posts: 4
Joined: Mon Nov 13, 2017 10:01 pm

Re: Troubleshooting ADS1015? Wiring Problem?

Post by world101 »

Silly question, but what are the four column values that are output on the CLI as the result of running simpletest.py? Millivolts, ohms (resistance), other? Thanks.

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Troubleshooting ADS1015? Wiring Problem?

Post by adafruit_support_bill »

They are the raw ADC readings. The conversion factor to calculate voltage will depend on the gain/range setting you choose.
https://cdn-shop.adafruit.com/datasheets/ads1015.pdf

User avatar
world101
 
Posts: 4
Joined: Mon Nov 13, 2017 10:01 pm

Re: Troubleshooting ADS1015? Wiring Problem?

Post by world101 »

Thanks for that info. From the data sheet and other sites I have researched, here is what I have come up with.

I'm using the ADS1115 chip. It is a 16-bit chip, but only 15 bits are usable, since one bit is a "signed bit" to designate a positive or negative value. I'm going to assume all voltages are positive, therefore use 15 bits. So 2^15 = 32768.

I'm using GAIN = 1 in the simpletest.py script, so FS = ±4.096V. If I ignore the negative voltages, each bit will be a value in the range of:
0V ----------> 4.096V
0 bit --------> 32767 bit

So 4.096V/32767 = 0.000125V per bit

I supplied 3.3V into the ADS1115 chip from my Raspberry Pi. I wired up a basic voltage divider circuit with two 1 kOhm resistors, and I connected the A0 pin to the center of the voltage divider.

I'm seeing ADC values at approximately 13165 from the python script. So 13165 * 0.000125 = 1.645V, which is just about half of 3.3V. Since the resister values are equal, the 3.3V supply should be cut almost exactly in half, which is precisely what I have calculated with the ADC. Very cool!

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Troubleshooting ADS1015? Wiring Problem?

Post by adafruit_support_bill »

Good to see that it is working for you. Thanks for the follow-up.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”