Compatibility with RP3A+ and why are some channels held 0.53V from ground?
The ADC Differential Pi is an Analogue to Digital converter for the Raspberry Pi
20/03/2020
Posted by:
h1vac
When I rebuilt the circuit on a bit of veroboard and reconnected, there was a puff of smoke and the ADC is now dead. I had very carefully checked that all the voltages were in the expected range so this was very surprising.
Having bought a new board and done some more checks, I find that all is still ok with my voltage dividers, but that some of the channels on the ADC are held about 0.53V above RPi ground. I'm almost certain that it is not the same channels all the time or when connected to a different RPi (model 4B) running the same python.
So my questions are:
a/ Is this because (as I just noticed) the RPi 3A+ is not listed as compatible? or
b/ Have I done something odd in the code or in the address selection which means that the ADC is not floating but for some reason holds some of the channels at a fixed voltage? I'm using the standard jumper settings 0x68,0x69, 18. or
c/ Now I've revisited the documentation and noticed that unused channels should be pinned to ground, should I do that? I have to admit that I'm afraid to do that because of this strange 0.53V offset. or
d/ Something else?
Thanks in anticipation for any insights.
20/03/2020
Posted by:
andrew
The ADC Differential Pi is compatible with the RPi 3A+ and all other Raspberry Pi models that use the 40-pin GPIO header.
The first thing I would suggest is to check your ground connections to make sure you have a common ground between the Raspberry Pi, the 12V battery and the base of the voltage dividers.
According to the datasheet for the MCP3424 ADC, the maximum voltage on the inputs is Vdd +0.4V where Vdd would be the Raspberry Pi 5V pin. If you had a bad ground connection between the voltage divider on the battery and the ADC input you could have accidentally put 12V into the ADC which would explain the smoke escaping.
Do you get the 0.53V offset on the channels that are connected to the voltage dividers or only on the channels that are not connected? Unconnected channels will have a small capacitive charge on the inputs which can cause them to give voltage readings above 0V. Grounding the unused channels should bring their voltage readings down to 0V without causing any problems for the other channels.
20/03/2020
Posted by:
h1vac
The common ground is certainly consistently there except that, as I mentioned there is an offset of about 20mV because essentially the battery measurement is made using conductors carrying negligible current (milli amps at most), whereas the supply to the Pi probably carries a good fraction of half an amp, leading to the measured voltage difference.
The offset of 0.53V is not on the measurement of the ADC. Both +ve and -ve inputs of some channels of the ADC are elevated. They are happy to be connected together and the ADC correctly reads a differential of zero but when I measure the pair's voltage to ground with a DVM (~10Mohm input impedance) I find this figure. It is not there for all channels and I think it changes after a Pi reboot. e.g. yesterday, channels 3 and 5 were 0.53V above ground and the others all within 1mV of ground. Today it is channels 1 and 5 in that state, with the others at ground. None are currently connected to the dividers because I don't want to risk blowing up another board until I have understood why it happened last time.
Whilst out walking, it came to me that I could put a moderate rating resistor, say 25kohm, in the connections between the divider and the input on both +ve and negative legs to limit current flow with only a 1 or 2% effect on the voltage reading which I can calibrate out. I know this wouldn't protect against an accidental application of 12V, but I'm quite confident that that isn't what happened.
I should also have mentioned that I have two ADCDifferentials again now, and that both of them exhibit this, both on a Pi4B as well as on the 3A+. Currently the one on the 4B has the 0.53V on channels 1 to 3. Bonding the -ve to earth might solve it if the capacitive explanation is true but until I just thought of bonding via a 25kohm reistor I haven't dared.
20/03/2020
Posted by:
andrew
As long as the voltage between +ve or -ve and ground is less than 2.048V then it should not cause any damage to the ADC. Adding a current limiting resistor on each input will certainly help to reduce the risk of damage and bond any unused inputs to ground.
20/03/2020
Posted by:
h1vac
21/03/2020
Posted by:
andrew
The ADC Differential Pi uses the 5V supply from the Raspberry Pi so if there is a problem with the power supply it may have damaged the ADC Differential Pi and the 3.3V regulator on your Raspberry Pi.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.