Construction Details
* Note: Schematic and driver code revised 06-30-2005!

    This is a schematic for either a 10 bit or 12 bit analog to digital (A/D) converter, and is the same basic design I use for Arcadia's A/D converter. Cost of construction is not much, probably less than $15 in components, available at DigiKey, plus a little more depending on how you mount the circuit (I used a Radio Shack project box, with 1/8" stereo jacks for my 11 channel inputs). If you use the TLC1542 IC, then the converter will be 10 bit (1024 steps of resolution), or, if you use the TLC2543, the converter will boast 12 bit resolution (4096 steps of resolution). Either way, your circuit will be MUCH more accurate than the typical 8 bit, 8 channel systems you see people using for data gathering. The power source can be any DC source between 7 and 25 volts, most likely a 9 volt battery or DC power transformer. Where you see the quotes on each channel input, the same two resistor setup should be used as shown on channel 1. The converter interfaces through your computer through the parallel port, using only six pins. The converter will read 11 separate analog voltages between 0 and 5 volts, each channel with respect to the same ground as the A/D's power supply.

    The 1k resistor in series with the input is just an extra measure of current protection for the chip. If you are confident that you won't ever accidently pump more than 5 volts into the chip, then they aren't really necessary. The voltage is read across a 1 MEG resistor, and for this reason make sure that the output impedance of whatever voltage source you are reading is fairly low (10k output impedance will still show you 99% voltage across the 1 MEG resistor). If you have a high impedance at the input, a voltage divider will be formed between the output impedance and the 1 MEG resistor, which must be compensated for mathematically, or your readings will be inaccurate (up to 100k output impedance is measurable, but keep in mind that a resistor voltage divider will be formed). Originally the 1 MEG resistors were shown as 100k, but since this resistor sets the input impedance of system, I've increased it to 1 MEG for easier interfacing. If you still have 100k input impedance, it will still work fine, but a more significant voltage drop will be seen by the resistor divider. You may want to use a more precision 5 volt source than the UA78M05 (such as the TL780-05), but this is up to your discretion (use a DVM to measure the voltage output of the UA78M05, to see how far off it is from 5 volts, or correct the voltage conversion in the software). Any standard 7805 will work in place of the UA78M05, the only difference is the maximum current output. Use a DB25 jack to wire to the individual pins of the parallel port, and a standard DB25-DB25 cable to connect the A/D converter to the computer. This circuit could easily fit on a small Radio Shack PCB/IC board, mounted in a medium sized project box with BNC, phono, or 3.5mm jacks for the 11 analog inputs.

Driver Source Code

    The driver source code is offered in C++, but could be ported to any language in which parallel port read and write access is available. This driver is specifically made for Linux systems (I run it on Vector Linux 4.0), so depending on what OS you're running on, you may need to change the parallel port read/write function name. The function that takes samples is called "getSample(int Channel)", in which you would pass the integer of the channel you want to read (1 - 11), and then the voltage reading on that channel is then returned as a double after sampling. Both drivers include a main() test class, that will print a test sample for each channel. As of 06-30-2005, an updated driver has been posted, which corrects some timing issues the original driver had.

  -  10 Bit (TLC1542) C++ Driver Source Code
  - 12 Bit (TLC2543) C++ Driver Source Code

    The above drivers only include functions to take samples from the A/D converter - it's up to you to adapt that into a program that will log and analyze the data to suite your own needs.

Adapting/Building Meters To Use

    Once you get your A/D converter built and housed, then numerous options are available for channel input devices. If you are adapting an already built & calibrated meter to the A/D, basically the construction is as follows:

   1. Find a SMOOTH DC output that is proportional to what you are measuring (for example, the wires across an analog voltage gauge). If only a rough DC output can be found (ie, it has AC components), then you'll need to design some type of filtering system to smooth out the signal. When in doubt, add a basic RC lowpass filter with cutoff around 4-5 hertz, which should work fine for most low-speed sampling sessions.

   2. Measure the maximum voltage amount you'd expect to read from the DC analog output (Note: it must be single ended if you're using a common ground!).

   3. Use non-inverting op amps to amplify/divide this voltage reading until the max reading is about 5 volts (this is to optimize resolution). If the voltage is differential and you're using a common ground for the sensor and A/D box, you'll have to design an instrumentation amplifier to reference the signal from ground.

  - If the conversion from volts to whatever you are measuring is unknown, then do steps 4 and 5. If the conversion is known (from data sheets, etc.), then skip to step 6.

   4. Plug the device into the A/D, and then take several readings as follows: Take readings along the whole scale of what you are measuring, and then note the voltage reading and corresponding calibrated reading on the meter itself. In other words, if you are adapting an EMF meter, write down the voltage readings at several EMF strengths, such as .5 mG, 1 mG, 1.5 mG, 2 mG, etc. - all the way to up to full scale deflection.

   5. Graph these points (voltage vs. reading) on a "X-Y Scatter" plot in Microsoft Excel, then right click a data point and choose "Add Trendline...". Go to Options and select "Display equation on chart", and then go to Type and select your best guess as to what the graph is (linear, polynomial, etc.). If you're lucky then with a few tries you'll find an equation that matches your points pretty closely. Once you get the equation, test it with several readings (you may need to isolate the x variable, depending on how you enter your points). Write down the equation for future reference, or program the conversion directly into the your sampling program.

   6. Just take the equation you've found or calculated and use it to convert the volts reading into whatever you are measuring (mG, degrees, lux, etc.), and you're done! Use your own brew of program to log data from the A/D converter in a tab delimited text file, which can then be graphed on any spreadsheet program. Congratulations, you're well on your way to building your own Arcadia style monitoring system!

   <- Back to Main How-To Page

All materials Copyright 2002 - 2009 by JDF of GhostGadgets.com
All Rights Reserved   -   E-mail Webmaster