In this update I will consider the analog and digital aspects of the analog front-end discussed in the previous log entry.
We need to resolve currents on order of 10 nA to 60 mA. The front-end design did this by converting this to a voltage via an effective resistance of nominally 50 ohms.
This results in voltages from 500 nV to 3 V. The instrumentation amplifier chosen has settable gain in powers of 2 from 1 to 4096. Thus for the minimum voltage with the maximum gain, will become just over 2 mV.
If the reference for the analog to digital converter (ADC) is 3 V and we had a perfect 16-bit then we would be able to resolve voltages in nominally 45 uV steps.
ADCs are not perfect though. They have properties like integral non-linearity, differential non-linearity, the voltage reference will have a percentage error, and more. Nevertheless to resolve 2 mV should only require a perfect 12-bit ADC.
Getting an effective number of bits of 12 out of 16 should not be an impossible task. For our initial design we will choose LTC2451 for this purpose. We will use an external 0.2% accurate 3V voltage reference.
With the ADC taken care of the signal is now digital and any solution that gets the digits to a computer is basically equivalent. So the choices here are far more arbitrary.
I am currently using a lot of ATSAM parts for projects and have some code already worked up for simple virtual serial sensor applications. As a result I will select ATSAMD21 for the microcontroller. We will start with the G15B flavor as 32 KB should fit everything easily, but if we need more space there are larger one available.
The virtual serial port will allow reading the current power and storing calibration data on the particular module via simple ASCII based commands. I will write a python library to encapsulate the functions.
The simplest command set would be:
r - read the current current level
c - read the calibration table
w - write the calibration table
Everything else could be taken care of in the python library.
A final note is that the ATSAM series all contain ADCs. The SAMD21 contains a 12-bit ADC, but its accuracy is not great and its effective number of bits is around 9.5. Given the cost of the mechanical parts of this system an external higher performance ADC probably makes more sense.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.