First, ADC stands for 'Analog to Digital Convertor', there are a number of options available. You can try to make your own, or you can buy an ADC on a chip. Additionally there are ADCs in the 'game port' of your computer and the 'line-in' and 'audio-in' of most sound cards used on PC/Macs. While my code still needs work to use all these possible inputs, I plan to support as many as are possible in the future.

As an analog scope there are a number of ADC options available:

Parallel Port Inputs

8 LED or 10 LED Bar ADC

If you use the LM3914 chip as your ADC you can have 9 or 11 levels of voltage using these chips. This is very crude and rough but the LM391x acts like a flash convertor so you can sample very fast. I included this option because (1) it is cheap, (2) I have already used this chip to digitalize video signals on my Amiga's parallel port so I know it works, and (3) because I was able to get the chip at Radio Shack so I am sure it is available most places.

Four (4) Bit Flash ADCs

If you has access to one or two four(4) bit flash convertors you can attach them to pins D0-D3 and D4-D7 which lets you measure 16 levels of voltage resolution on each ADC. Since you can attach two of them at the same time to the parallel port and the program will read them both in at the same time you can easyily support a dual line display.

If you don't have access to any ADCs I will be including the design for a four bit voltage follower ADC or a four bit sweeping ADC that can be built from parts also found at Radio Shack. Note: the program also supports the use of only one four(4) flash convertor on pins D0-D3 incase that is all that is available to you at the time.

Eight (8) Bit Flash ADC

3) This program also includes support for single line eight(8) bit flash convertors. Again just attach to the parallel port data lines D0-D7 and the program will support 256 levels of voltage resolution and display it as a single line display. And like the four(4) bit flash convertors I will be including the design for 8 bit convertors you can build yourself.

Signal switching support

Another ability supported by the program is the capability to switch up to four diffirent signals to the above flash convertors one at a time to support up to a four line trace on the display. The first design below are for switching any of four signal inputs to any single flash design. The second design is only for people who have the dual convertors installed and want to display more than 2 signals.

Software Based ADCs

It is also possible to build a software driven ADC for which the code already exists in the program, below is a diagram of the circuit one can use. Also the Analog Scope program supports the use of 1, 2, and 4 lines op-amp comparor inputs for the software driven convertion so up to four (4) signal lines are supported. If you attach a resistor DAC network to the parallel port the program with generate a sweeping waveform and compare it to your analog comparor inputs. The results of the comparors are feeded into the parallel port status lines ACK(pin 10), PE(pin12), Select-In(pin 13) and Error(pin 15). The quad comparor chip LM324 is perfect for this job.

GamePort Joystick ADC Inputs

The gameport interface found on PC computers is a type of analog input device. Most gameports support four analog inputs X1, Y1, X2 and Y2 and this program can read/support signals from all four inputs at the same time.

However the inputs of the gameport of the PC are designed to measure the resistance of a device, not the voltage as we usually would like to measure. Using the knowledge of how this port works it becomes possible to use the same port to directly measure voltages. Basicly, the computer discharges the capacitor and counts while the capacitor charges up to it's trigger voltage. The time taken for this charging up is usually adjusted and seen as the joystick value. Most gameport software tries to adjust the values to cover an output range of 0-4095.

A big problem with this design is that I fed a variable voltage into my gameport to find out at what voltage triggers it. At about 2.1 volts the I/O port did trigger. Since the source voltage for charging is 5v the diffirence between the voltage across the charging resistor at the start of a cycle (0v) and the end of the cycle (+2v) right before it triggers results in a very non-flat charging curve (very non-linear). Because of this, displayed waveforms are not properly plotted at present from the joystick interface. I am working on a Gamma correction table to solve the problem in a future design.

Since we want the interface to get diffirent rates of charging with diffirent input voltage values, we could first look at just how to vary the charging rate of the capacitor based on the input voltage. If you attach a probe to a resistor then to the gameport input you can affect timing by changing the voltage between 2.5v to 5v. We can not probe more than 5 volts because this could damage your game card. As long as there is enough current flow we can measure voltages but since there must be atleast 2.1 volts on the input of the game card to trigger it, and no more than 5 volts as that will damage it, we are very limited in the range of measurable voltages.

What we need if we wish to measure the full range of voltage 0 volts to 5 volts is a current source into the gameport to charge up the capacitor even if the probe is attached to ground. A simple solution is a resistor between the 5 volt output of the gameport and the probe's input. As long as this resistor is equal or smaller in resistance of the probe's resistor the min. voltage of 2.5 voltage into the analog port will insure the trigger timing will work. Two additional possible changes, one: note I added a diode to prevent the voltage going into the gameport from going over five volts. The reason I did this is the other possible change. If you replace the probe's resistor with a far larger one the voltages ranges you can measure also increase. For example, a 1 MOhm resistor on the probe instead of the 100K would let you measure from about -50v to +50v and a 10 MOhm should be good for about -v500 to +500 volts. And yes, that is a negative voltage that you can now measure.

Assuming that you just want to measure analog voltages 0-5 volts in range the following circuit should get the job done.

Or if you need to handle 120 VAC circuits, and a better setup would be.

Additional work to be done.

Sound Card Audio ADC Inputs

A four bit voltage follower ADC

A eight bit voltage follower ADC

A four bit sweeping ADC

A eight bit sweeping ADC

Earl Colby Pottinger

Future improvements will probably be by user request. Options to look at are flash ADCs that come with multiplex inputs and/or more output bits. I am trying to understand how to access the Sound Blaster inputs also.