This post started mostly as asking for help, but I’ve figured most of it out. I’m posting it anyway as it might help others looking to do the same thing, as info appears to be scarce. There are a couple of questions I’ve placed at the end, though.
I’ve got one of these ADS1115 based ADC modules and have connected it to a Raspberry Pi 4 Model B. I’m writing a program in C, so the documentation for Python isn’t helpful. After some poking around I found this thread on the topic. The author of wiringPi gave a quick response without much detail, but it was useful.
I’ve made the following program using ads1115Setup and analogRead, and tested it with a 9V battery and voltage divider in several configurations. The ADC is connected to a 5V pin on the Pi.
I don’t profess know anything about what you are trying to do but I do have an interest in measuring techniques.
You mentioned a voltage divider. What sort of resistance values are you using. You can get to a stage where your DMM with a resistance of 10MΩ has an influence. I once had occasion where measuring (or trying to) the input voltage to a PLC type device (Mitsubishi Alpha series controller) while monitoring the ADC numerical output lowered the ADC reading by 3 or 4 digits. This with a low resolution ADC (0 - 512).
Having said that, what you read as ??V on your meter IS actually what is present on the ADC input WITH THE METER CONNECTED. The problems can arise if the voltage changes (so the ADC number changes) when the meter is removed so there is a difficulty sometimes actually measuring what is happening accurately. Keeping voltage divider resistances as low as practical will minimise this problem I think this is why recommended potentiometer value is max is usually10k. Of course if the measured voltage source resistance is low this problem will not exist. If the source resistance gets too high the 10MΩ of the meter becomes part of the lower leg of a voltage divider and can influence measurement of the true voltage values. This can be demonstrated. Measure a power supply, say 5V. insert a 10MΩ resistor in series with the meter, you will now read 2.5V. This is extreme but does demonstrate how the input resistance of a DMM (or any other meter in fact) can influence the measurement. This does not have to be a huge problem as long as he user is aware if what is happening and can interpret any measurements accordingly.
Thanks - I had not thought about the influence of the multi-meter’s resistance. Luckily I was using quite low values for the resistors in the voltage divider. The one I was measuring across was about 220Ω, adding others to the top to lower the measured voltage. At one point I ran it a few times rapidly and the returned value was ticking down. I guess it was draining the battery?
The project itself is an adaptation of the rainwater tank monitoring system in issues 51 and 52 of DIYODE magazine. I need the ADC to measure the voltage over a ~100Ω shunt resistor which is in series with the 4-20 mA current loop pressure sensor. I’m more of a software engineer with a little background knowledge on electronics, so I’m learning a lot as I go.
The 10MΩ meter is not going to worry that. But it is well worth keeping these affects in mind, particularly if you are ever getting strange unexpected results. The measurement techniques could well be causing them. Not only with DMMs, for instance an oscilloscope probe with an earth clip which is too long often will put ringing or other funny effects on a display which in the real world (without the oscilloscope) are not really there and only serve to worry and confuse the user.
But like I said. It does not have to be a problem as long as the user is aware of what can happen.
And you can get our latest projects and tips straight away by following us on: