Lifetester PCB

Below is a picture of the finished PCB after assembly. I was sensible here and minimised the number of surface mount components so the thing ended up quite big. But it worked exactly as the breadboard prototype. I was just looking to get something down in a more permanent form to share with the EPMM group in Sheffield. My thinking being that the sooner I  could share the better.

The first lifetester PCB. Two are shown side-by-side here. Note that the tape is covering up trimmer resistors that I’ve set and don’t want to change.

Unsurprisingly, as soon as I’d tested the board, I was aware of its deficiencies and I’m going to lay them bare for you here…

  1. Amplifier input offset voltage – Any offset at the input of the current sensing opamp is amplified by the large gain and needs and leads to a large offset voltage at the output. This means that all measurements (even 0V) are offset from zero. In this revision, I used an LM358 by TI which has a typical input offset voltage of 2mV which translates to 0.7V at the output. Solution: Use a low input offset (precision) OpAmp of course. This is an obvious strategy when you consider that we have lots of gain here and this is a DC circuit where offsets throw off our results.
  2. Reference voltage – Digital output from the (unipolar) ADC is calculated simply from the ratio of the input voltage to the reference voltage. Naturally, any fluctuation in the reference voltage will carry through to the ADC reading. Clearly, we only want to see changes in ADC digital readings that are caused by changes in the input voltage.  Solution: Use a voltage regulator. This one is used on the Arduino UNO board. You feed in 6.5 to 15V and get out 5V regulated to within 2%.
  3. ADC resolution – The resolution limits the smallest voltage that we can effectively “see”. Simply, with a 12-bit ADC, the digital reading will be 212 (Vin/Vref) whereas a 16-bit ADC scales its output as 216 (Vin/Vref) ie. on a reference voltage of 3.5V, a 12-bit and 16-bit ADC would read the voltage in steps of 0.85mV and 0.053mV respectively. This kind of accuracy is not essential right now but I noticed that a 2-channel 16-bit ADC with a programmable gain amplifier was not only smaller but cheaper than two separate 12-bit ICs.
  4. Gain accuracy – The gain of an inverting OpAmp is given by Vout = -Vin(Rin/Rf). The resistors used here have a tolerance of 10% and with two of them, the error in the gain is then 20%. To address this, I’ve included a trimmer resistor so that the gain can be calibrated after assembly but with lower tolerance resistors, say 1%, this might not be necessary.
  5. Charge pump – Op Amps here require dual supplies: plus and minus 5V. Which requires two power supplies to the board.  I discovered a device called a charge pump (eg. TL7660) which will take a 5V supply and output -5V. Very clever! Note that this doesn’t supply much current – output will drop to by 10% when supplying 10mA but this is more than enough for this application.
The inverting op amp (see point #4)

I’ve already started working on revision b which should address these issues. Watch this space! The design for this PCB can be found here.