Using an ADC + Teensy or a DPM with BCD output + Teensy

Status
Not open for further replies.

thefragger

New member
Using just a Teensy, an ADC + Teensy, or a DPM with BCD output + Teensy

Hi, all!

I've got a personal project where I want to replace an analogue meter with a 'smart' display--the idea is a bit of a feature creep in and of itself, when I was looking at swapping in an Analog Devices AD2010 (3.5 digit, +/-199.9mV DPM, 100MΩ, Datasheet) to an old piece of equipment.

The original meter has a 0~120 scale, with F.S. of 200uA.

My thought was to take one of these DPMs that I have, with its 100MΩ impedance, and putting it in parallel with a precision 600Ω resistor for the current division, would register '120.0' (mV) on the DPM (1.2nA through 100MΩ). Pretty straightforward and having 100µV resolution would be nice, too.

Now, here's where the gears started running--why use a fixed device with a fixed display? Why not employ some smart hardware and extend the usability of this device? Say I want to show the current reading and below it an average, or compare readings from one to the next, maybe shoving a 128x64 gLCD or a 12x4 cLCD screen in place with a button or two. I began looking into how Arduino users work with ADCs and my Teensys (Teensies? 3.0 and 3.1 on-hand), and quickly realized that I was a bit out of my depth. Queue idea #2;

The second thought I had was to rig up and simply bury this AD2010 in the device, as it has all the circuitry already in place; an internal 200mV ref, 60Hz rejection, and the target resolution of 100µV. Another fun feature is that it has BCD outputs for each of the digits (1's, 10's, 100's, and 1 000's) as well. So, I can bury this meter in the device and pipe the BCD signals to an Arduino for math and LCD output. Not elegant, but would work for what I need, and I already have 'em.

How might I be able to use my Teensy 3.0 for this project, or would an external ADC be required? (ADC should expect 0~200µA, and display 0~120.0 accordingly, with 1/10th resolution, works out to roughly 166.7nA per 1/10th on the display)


Thanks!
Philip.
 
Last edited:
Ok, the coil resistance on the original meter is 2365Ω, and at full scale reading of 200µA, 0.473V (473mV) would be across the coil. If I wanted 0.000 100 V (100µV) resolution, that would require a minimum of 4 730 'steps,' which is greater than a 12-bit ADC can provide (4096). The Teensy 3.0 has a built-in ADC with a 13-bits (hooray!), providing me (0.473 / 2^13) 0.000 0577 V (57.7µV) per 'step.'

Would this cause any issues with ability to read the voltage reliably?

ie. say 0.000 100 V (100µV) is present over the resistor, would the Teensy report this as 57.7µV or 115.4µV? I suppose it doesn't matter in this case. In the case of 200µV, would this report as 173.1µV or 230.8µV?

I haven't worked with DAC/ADC systems in a few years. Surprising how it slips away.
 
I started thinking more about an analogue solution: the original meter is a 2 365Ω load, and to make the numbers pretty I could take a differential measurement over a 1 024Ω 'resistor.' You might be thinking 'Ack! a 1.024kΩ resistor!? Where would you find such a thing?!' The trick here is to gang a bunch of resistors together, maybe a 10-or-20-turn potentiometer and have the bunch set to as-close to 1 024 as required. Do the same with the left over (2 365 - 1 024 = ) 1 341Ω resistance.

We can use IN3OTD's calculator for that: http://www.qsl.net/in3otd/parallr.html

1.024kΩ:

Code:
E12 series:
1000	+	22	=	1022		(-0.195 %)
1200	||	6800	=	1020		(-0.391 %)
560	+	470	=	1030		(0.586 %)

E24 series:
1000	+	24	=	1024		(0 %)

E96 series:
909	+	115	=	1024		(0 %)
887	+	137	=	1024		(0 %)
866	+	158	=	1024		(0 %)
787	+	237	=	1024		(0 %)
750	+	274	=	1024		(0 %)
715	+	309	=	1024		(0 %)
549	+	475	=	1024		(0 %)

1.341kΩ:

Code:
E12 series:
1500	||	12000	=	1333.333	(-0.572 %)

E24 series:
1100	+	240	=	1340		(-0.075 %)
910	+	430	=	1340		(-0.075 %)

E96 series:
1330	+	11	=	1341		(0 %)
1150	+	191	=	1341		(0 %)
976	+	365	=	1341		(0 %)
909	+	432	=	1341		(0 %)
866	+	475	=	1341		(0 %)

Lots of options!

Now, I wanted 100µV, or 0.000 1V, resolution.

Code:
V = IR = 1.024kΩ x 200µA = 204.8mV
12-bits: 204.8mV / 2^12 = 50µV !
11-bits: 204.8mV / 2^11 = 100µV !!

Those are nice, happy, simple numbers for our software to deal with, and hopefully would eliminate any issues with aliasing or rounding. The resistors can be fudged a bit I suppose.

OK! So, I suppose I can use this setup with two 'resistors' in series, taking a differential measurement over the 1.024kΩ 'resistor' using only 11 of the provided 12 bits in my Teensy 3.0!



Does anyone see any cracks in this plan? I've been drinking...
 
Status
Not open for further replies.
Back
Top