Setting "pga"
The ADC Differential Pi is an Analogue to Digital converter for the Raspberry Pi
30/11/2016
Posted by:
paul42
30/11/2016
Posted by:
andrew
The ADC Diff library takes into account the PGA setting when it calculates the voltage so the output will stay the same when you change the PGA value.
When you change the PGA to 2 the ADC will have a maximum input of 1.024V instead of 2.048V. If you put 0.5V into the input the library will still show 0.5V even though the raw values coming from the ADC have doubled.
30/11/2016
Posted by:
paul42
30/11/2016
Posted by:
andrew
30/11/2016
Posted by:
paul42
30/11/2016
Posted by:
andrew
When the PGA is used the maximum input voltage will be reduced:
1x PGA = 2.048V
2x PGA = 1.024V
4x PGA = 0.512V
8x PGA = 0.256V
If you put a 1.6V input on the pin and set the PGA to 2 the voltage will be higher than the ADC can read so it will clip the top 0.6V and just show the maximum value it can store which is 1.024V. That is why it is showing 0.5 and 0.25V for 4 and 8 PGA values as well.
When using the PGA settings it may be worth keeping the voltages below the maximum value for the selected gain. It shouldn't damage the ADC as long as the voltage stays below 2.1V but just to be sure it is probably best not to overdrive the inputs.
30/11/2016
Posted by:
paul42
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.