Raspberry Pi Zero 2 W & ADS1115

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

Hello

I am relatively new to raspberry pi's and there accessories, and I am having issues getting my ADS1115 to read voltage properly. All the connections between my raspberry pi and adc seem correct and I am receiving signal to my raspberry pi when I run the simpletest.py code. The problem lies when I go to read voltage on the adc. I used a female-male jumper wire to connect the A0 port of the adc to the positive end of a AA battery, but yet I see no change in my adc reading even after adjusting the gain. I also tried grounding the negative side of the battery to the ground of the raspberry pi and still no luck. Oddly, when I touch my jumper wire attached to the A0 port to the 5V pin on the raspberry pi then I receive a voltage reading from the adc. I assume I am somehow not creating a circuit with the battery to read the voltage but I am confused how it is any different from the 5V source coming out of the raspberry pi. I plan on using the adc to measure the output power from a small dc generator so I need to be able to measure the voltage from a random source.

Any insight as to why I am unable to read the voltage of the battery would be awesome. I have watched videos online of others making voltmeter using the same adc and followed there process, but yet I don't see results.

Thanks

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by mikeysklar »

Can you post a description of your wiring and a photo? It is not clear to me which version you are using and how you have wired it.

Have you been following this guide for setup?

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

Yes, I have been using that guide to work through setting up the adc. The white wire is the jumper wire I have been using to try and check voltages. I have attached the photos outlining my wiring, let me know if anything else is unclear. The jpeg picture files were too large to fit directly into the message box so I copy pasted them into a shared google doc linked below. Let me know if you want a different way to view the photos.

Pi Zero 2 W to ADC Connections

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by mikeysklar »

Wiring looks good. Your using 3v3 and all the correct pins.

Do you have i2c enabled (raspi-config)?

Can you post the example code you are running and photos of the soldering for the Pi Zero and the ADS1115. You can use the google doc or 800x600 size images work fine for the forum.

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

I made sure I have I2C enabled and checked the connection to the ADC and everything is all good.

I have attached photos of the soldering of the ADC and Raspberry Pi in the google doc I shared before. I also included two of the tests codes I have been using to test the setup. I believe both of the codes were either derived or provided from the online instruction manuals.

User avatar
adafruit2
 
Posts: 22144
Joined: Fri Mar 11, 2005 7:36 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by adafruit2 »

that board isnt from adafruit, is it?

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

No, it is a basic ads1115 I purchased in a 3 pack off of Amazon. I am starting to become a bit suspect of if it is a quality issue with the ADC's. I would just be surprised that all three do not function properly, but may have been a bad batch.

User avatar
adafruit2
 
Posts: 22144
Joined: Fri Mar 11, 2005 7:36 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by adafruit2 »

yeah its hard to know :( please contact the amazon vendor for tech support :)

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

I bought one of Adafruit's ADS1115 converters, so we will see if I have better luck with it working for me.

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

Hello,

I purchased an Adafruit brand ADS1115 and connected everything but I am still seeing the exact same issues I saw before. For some reason it seems like every input is connected when I run the simpletest.py program. I have attached a sample of my outputs from the simpletest.py. Notice, the standard reading without any input voltage is 3095 bits, but once a 5V voltage from one of the raspberry pi pins is applied to the A0 input, all of the pins jump to 23,000 bits which converts to ~4.4 V. It seems 3100 + 23000 bits converts to the proper reading of 5 V. I am using 2/3 gain with the code so that 5V is within the range. I also get no voltage reading from the ADC when trying to measure the voltage of a AA battery which I was hoping to measure an external power source in my application. I would love an insight on how to get the converter to function properly and give me the proper reading, and also how I should go about measuring an external voltage because I have had no luck doing so up to this point.

simpletest.py @ 2/3 gain measuring 5V from raspberry pi GPIO pin
| 3095 | 3124 | 3118 | 3118 |
| 23045 | 23832 | 23832 | 23550 |
| 23267 | 23792 | 23792 | 23812 |
| 21390 | 23751 | 23711 | 23751 |
| 3173 | 3016 | 3017 | 3018 |
| 3007 | 3054 | 3056 | 3061 |

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by mikeysklar »

You need to be using the 3v3 pin with any Pi not 5v.

Can you post a photo of your wiring and any soldering you have done?
arduino_compatibles_piBreadboard_bb.png
arduino_compatibles_piBreadboard_bb.png (181.4 KiB) Viewed 64 times
https://learn.adafruit.com/adafruit-4-c ... ng-2997257

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

I have attached updated photos and a quick description of the GPIO pin connections on the Raspberry Pi Zero 2 W in the google document I shared earlier in the thread. Let me know if there is any uncertainty in the photos.

Thanks

User avatar
Wrhsc1310
 
Posts: 8
Joined: Wed Feb 22, 2023 12:51 pm

Re: Raspberry Pi Zero 2 W & ADS1115

Post by Wrhsc1310 »

After tinkering with the new ADC more, I am finally getting the voltages I need. I had to ground the power source in question to the ground of the ADC and Pi to complete the circuit.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”