Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Compatibility with RP3A+ and why are some channels held 0.53V from ground?

1118 Views - Created 20/03/2020

20/03/2020

Posted by:
h1vac

h1vac Avatar

I have been fairly successfully using an ADC Differential Pi on a model 3A+ to monitor a 12V battery via three voltage dividers built on a breadboard, each providing nominal 1.4V max input to three of the input channels of the ADC. The remaining channels are unused The same battery powers the Pi via a 12V to 5.1V converter, so the 0V of the Pi is about 20mV from the separate 0V of the voltage divider (due to the voltage drop from the current supplying the Pi). This was why I chose the Differential Pi for the job. I have been very impressed with this addition to the Pi, but ...

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

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hello

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

h1vac Avatar

Thanks for the swift response. I'm pleased to hear about the compatibility as the 3A+ is so economical to buy and runs at quite low power.

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

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

I am not sure where the 0.53V would be coming from but it could be something internal on the ADC.

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

h1vac Avatar

Thank you. I'll try that. As it happens, this Pi3A+ just seems to have died with no 3V3 on the GPIO. I hadn't noticed that it had gone down this afternoon. I have a new one on order and will try again when it arrives.

21/03/2020

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

If your Raspberry Pi has died as well then I would suggest checking your 5V power supply to make sure it is outputting a stable 5V.

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.

Sign in to post your reply

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.