My voltage divider quit working - this is weird?

MrAl

Joined Jun 17, 2014
7,196
Hi,

Just a guess but one of the input protection diodes could have shorted out if the input went too high or too low for a moment. That would cause any input to be changed by the ADC itself.
Try a different channel or change the ADC unit altogether and try again.
Be sure the input can never go higher than +Vcc of the ADC or lower than 0v of the ADC.
Connect a 1k resistor in series with the ADC input if you suspect the divider is allowing a voltage too high or too low from noise or other source.
Once the diode shorts it's impossible to use that channel, and it may mess up the entire ADC chip.
 

Thread Starter

zirconx

Joined Mar 10, 2010
97
I checked the voltage on channel 0 with my DVM, it was 0v.

At this point, I think we need to see a wiring diagram showing the interconnections of all the units.
Oh that would be nice wouldn't it... I have not investigated any tools for doing this (circuit drawing). It would take me a while to draw out. I "winged it" as I built it.

I'm ok with where things are at right now. I'm down a channel on the ADC, but two of the other three seem to be working. There is a problem with the current sensor on channel 2, but that might be the sensor. I will test it in isolation and see what it does.
 
Last edited:
Is there any way that the AI pin gets powered with the port unpowered. When that happens Vcc is 0 V and then the inputs 2.5V is bigger than 0V and bad things happen. The spect of inputs not exceeding Vcc+-0.3.

Probably you blew up the port. You can use a fault tolerent op-amp like AD's Over the top series or you have to cuurent limit the input with a resistor. What you need is in the datasheet.

Remember that this can happen at power-up too.
 

MisterBill2

Joined Jan 23, 2018
5,261
Aha - maybe I should ground channel 3 then? Currently it's reading .6v, the same thing I get when I disconnect my sensor from channel 2.



Good point - it seems it's the voltage divider output that is the error, not the ADC reading. Since my DVM shows the same reading.

So grounding channel 3 is probably not necessary.

Unless it's the ADC itself that is causing the voltage change in the voltage divider circuit. I'd have to disconnect it to see.
If the common mode voltage into an analog input falls outside the range then the readings will be wrong. If the common mode voltage is noisy then the readings will be affected. So the variations may not be between the points that you are probing. That is a classic form of noise entry into measurement systems.
 

MisterBill2

Joined Jan 23, 2018
5,261
http://www.ti.com/lit/ds/symlink/ads1115.pdf ? table 5 fig 33 pg.26
if the pi won't interpret FSR= ±4.096 as negative then 0xFFFF is 8191

...


The photo looks like it was copied from the "cabling fails" section of "Cabling" magazine. What they never explain is how cables tightly bundled with hundreds of cable ties are easier to follow.
Also, I am not sure how this relates to analog input problems.
 

ci139

Joined Jul 11, 2016
1,200
how this relates to analog input
in many ways • if you don't have a reference to check your cabling/wiring against you must rely only on your well rested and sharp mind
/// usually when you start debugging it makes you tired fast and then the "fixes" may set up new error conditions - and you may be not be able to collate which modifications worked and which did not ... etc. -- it's not that it is always the rule but with complex , little known or new circuits it's better to keep tight track on the effects of any modifications to the grid ...

. . . there likely is a service engineer who knows the most of that yellow bundle by heart (the relevant switch here is most of)


otherwise -- there might be a possibility.. (if the ground track is too long or too narrow) ..that I²C puts additional noise into MUX∆∑ module especially from voltage dividers from Vdd (about the currents on the GND/Vss line)
 
Last edited:

MrSoftware

Joined Oct 29, 2013
1,678
When the answer is not obvious, try to simplify as much as you can. Maybe disable all of your code except the code that reads the ADC, and check if it works properly. If yes, then starting adding parts back in one piece at a time until the problem returns. If no, then at least you have removed a lot of variables. That should at least help you narrow your focus.
 
No, just to the GND on the voltage divider - as shown in the above schematic. The only way for this to NOT work is : Wrong value resistors in voltage divider, Voltage divider not connected properly, or not reading from the junction of the voltage dividers resistors.
 

djsfantasi

Joined Apr 11, 2010
6,200
Oh that would be nice wouldn't it... I have not investigated any tools for doing this (circuit drawing). It would take me a while to draw out. I "winged it" as I built it.

I'm ok with where things are at right now.
With respect to the tools needed to create a wiring diagram, you need just two common tools (maybe three). A pencil and paper! The third tool is a camera to take a picture.
 

Thread Starter

zirconx

Joined Mar 10, 2010
97
Well I replaced the ADS1115 board and I still get 8.19v on channel 0. I verified with my meter that it is at ground potential.

I'm stumped. Maybe I start disconnecting the other 3 inputs and see if that changes anything? Maybe my sensor on channel 2 is making noise that affects it (but not channels 1 and 3???).

Edit - I disconnected the sensor from channel 2 - it made no difference. Next I could try removing the voltage diver input?

I have an oscilloscope (I'm still learning how to use it), should I check anything with that?
 

MisterBill2

Joined Jan 23, 2018
5,261
Well I replaced the ADS1115 board and I still get 8.19v on channel 0. I verified with my meter that it is at ground potential.

I'm stumped. Maybe I start disconnecting the other 3 inputs and see if that changes anything? Maybe my sensor on channel 2 is making noise that affects it (but not channels 1 and 3???).

Edit - I disconnected the sensor from channel 2 - it made no difference. Next I could try removing the voltage diver input?

I have an oscilloscope (I'm still learning how to use it), should I check anything with that?
At this point I suggest checking the connection points of the ends of that voltage divider. The numbers are wrong for a correct connection.
 

Thread Starter

zirconx

Joined Mar 10, 2010
97
At this point I suggest checking the connection points of the ends of that voltage divider. The numbers are wrong for a correct connection.
When I test the output of the voltage divider with my DVM, it matches what I'm getting on the ADC (2.5v). That is on channel 3.

I've tested the other connections on the voltage divider also - ground appears as ground, and the input appears as 5v.

Maybe it's a software /configuration error. This is the code I am using: https://github.com/giobauermeister/ads1115-linux-rpi

Although, it was working at first. Back when I had the voltage divider output on this channel, it was working (2.5v). Then began to creep up, bouncing around 2.8-3.2. Then stayed on 3.3. I think it stayed that way until I grounded the pin, which is when I started getting 8.19.

Tomorrow night I can disconnect the other sensor (pressure transducer on channel 2) and see if that makes a difference.
 
Last edited:

Thread Starter

zirconx

Joined Mar 10, 2010
97
I found this thread talking about noise and the ADS1115 when using it with a raspberry pi. Maybe I need to better filter either the 3.3v that is powering it, or the signal from the 5v voltage divider? I did try adding a (10uf I think) capacitor between 5v and ground and that didn't do anything.
https://www.raspberrypi.org/forums/viewtopic.php?t=158532

Or could the noise be on the ground wire? The odd channel 0 that reads 8.21v is connected to ground. The 5v voltage divider signal is working fine.

I could try changing the sampling rate on the ADS1115 board too.
 

ci139

Joined Jul 11, 2016
1,200
replaced the ADS1115 board and I still get 8
dude (i think i am slow . . . but you can beat me) if your Pi interprets signed integer input as unsigned then and your digital resolution of the ADC is signed(-4096 to +4095) / un-signed (0 to 8191) ::
data signed un-signed
0001 +1 . . . . . +1
0000 ±0 . . . . . +0
FFFF . -1 . . . . . 8191// -- the calibration of the Zero has a negative offset (or the neglible negative offset is due ADC internal biasing)
 

MrSoftware

Joined Oct 29, 2013
1,678
Put your oscilloscope on the voltage input pin and see if the scope is saying the same thing that the ADC is saying. This will tell you if your problem really is noise at the input pin, or a different problem. You can try the Auto button, but that rarely gets the best results. If the noise isn't strong and consistent then it will probably show you 60Hz noise from the power wires in the walls. For manual mode, try these settings; DC coupled, rising edge, 0.5V/div, auto trigger mode. Depending on how bad the noise is, you will see a DC line or a bunch of squiggles. Scroll your trigger point to be just a tad above the DC line, or about the middle of the squiggles. Now switch the trigger mode to Normal and you should start getting a picture if what your noise looks like. You might have to play with the time base until you find the frequency of your noise, but try starting around 200usec/div and go up/down from there.

Edit --> If your pin that is connected directly to ground is reading 8v, then you have a bigger problem.
 
Top