ADC advice for Teensy 3.2 measuring multiple battery cell voltages

Status
Not open for further replies.

Fins

Member
I am designing a Teensy 3.2 board to measure up to 6 cells of a LiPo battery under DC load. I would like to measure the voltages of the 6 cells within 1 ms or less, as the battery will be under load and I want to capture the cell voltages at the "same" time during the discharge curve. Tentatively, I am looking at a hardware design using 6 difference amplifiers (one for each cell) followed by 6 precision voltage dividers (10k/10k with 0.1 uF). The output of the voltage dividers would be input to 6 of the ADC inputs. I plan to use a LM4040 external 2.5 V reference as I desire to achieve a measurement accuracy of a few mV for a 4.2 V cell (ok maybe it's a bit more given all the tolerances). My end goal is an accurate measurement of internal resistance of each cell. I have looked at the ADC library and tutorial references, which are quite helpful, but have a few questions as this is my first Teensy project:

1. Does the Teensy have a low-noise mode or low-power mode that would halt portions of the processor to reduce noise in ADC conversion?

2. Are all ADC inputs essentially identical or are some noted to be less noisy than others? (I only want to use the pins and not the pads on the backside of the Teensy 3.2.)

3. Should I use only one of the internal ADC modules? Is their accuracy driven by the external reference (so the accuracy of the two would be essentially identical) or would it be advantageous to use both to achieve a faster overall conversion time?

4. I plan to set the averaging number to 32 and ADC resolution to 12 bits (not 16 bits since I am averaging and to achieve a faster conversion time). I am familiar with dithering to improve accuracy in zero-bias random noise. Does this seem like the right tradeoff given the ADC has a ENOB of 12 bits? I may do additional measurements and averaging to further improve accuracy.

5. I am most unsure about sample and conversion times. Since I am looking at essentially a DC signal and desire fast overall conversion time, I believe I should set sample and conversion times to fast? What is the best tradeoff between accuracy and conversion time for measuring multiple DC signals?

6. Any other issues I should be concerned about?

Thanks for any inputs and suggestions ...
 
I think you are going to have to do some testing. Which will provide more accurate answers anyway. Share the results.
 
Lots of room for postulation - for those that might know more about what you are doing.

Your facts going in look reasonable AFAIK - @jonr's post seems the best : One experiment is worth some thousands of words based on what presents itself.

The T_3.2 will run and give results given constrained voltages and proper Analog Ref.

Only notes might be - guessing at removing sources of noise:
> Use the AGND pin with no other digital activity on it.
> Give a good stable VIN voltage
> Maybe compile with NO USB? And don't connect USB?
> Use a UART Serial for sending out results between tests - pass to another Teensy or adapter to see results on the PC/USB?
> Not using USB would allow taking the T_3.2 clock speed down all the way under 24 MHz and testing if that might reduce noise.
 
If you are building a PCB anyway, consider adding a better ADC to it. Preferably differential. If not, use some oversampling plus a trimmed mean for less noise.

Might be useful to have an extra calibration channel fed by another reference voltage (I had some offset and drift issues).
 
Thanks for the suggestions, jonr and defragster. I do plan to do a lot of experimentation, but given I am building a PCB I wanted to get as close as possible in the first iteration and get other's expertise as to what issues to consider and examine. I would prefer not adding an external ADC as I will have 8 or so analog inputs and would like to utilize the T_3.2 multiple analog inputs (it seems like such a good fit for what I am planning), although an external ADC will be a fallback option. Defragster, I had planned on the first two suggestions you offered, but had not thought of compiling without USB, an UART Serial, or reducing the clock below 24 MHz. Why would a UART be less noisy than USB? And why is the USB limited to a 24 MHz clock?
 
Just wondering aloud about the USB - it is a high speed active component and once enabled and connected it is active. Not sure it interferes - but p#1 mentioned "low-noise mode or low-power mode that would halt portions of the processor to reduce noise"

The UART could be quiet or off during data collection if you saw a difference in the sampling. The USB will connected to an outside source and if VIN powered would not need that may have messages passing even when idle?

The clock has a minimum speed to keep up with and process USB messages, going below that may even turn off another clock. It may also affect the sampling speed - but that may be fixed or adjusted for slower clock speed?

With some quick tests with 'some' setup those are things easy to arrange to test for effect to see if you are in the ball park.

Will be interesting to see your results - especially averaging number to 32 versus fewer like 2, 4 or 8 - as the averaging takes proportionately more time.
 
Status
Not open for further replies.
Back
Top