Low Cost Analog to Digital circuit

Not rated 7,453

Circuit Image

Collecting and storing experimental data presents a common challenge for hobbyists. A widely used method involves utilizing a device that converts analog data into digital format and stores the information on a computer. These devices are known as A/D converters, which stands for analog to digital converters. A/D converters vary significantly in price, and many options tend to be more expensive. Given that hobbyists often operate on a limited budget, a straightforward and cost-effective method for constructing a basic A/D converter using a single off-the-shelf integrated circuit (IC) is described here. This A/D converter can be accessed through a computer's serial port. For those eager to begin, it is possible to purchase the A/D chip pre-programmed and ready for use. The circuit utilizes a PICAXE-08M chip, a microcontroller that features a 10-bit analog to digital converter and serial communication capabilities, enabling direct data transmission to a PC's serial port. With just four lines of simple code, the microcontroller can be programmed to perform continuous analog to digital conversions, transmitting numerical results every second. The non-volatile memory of the PICAXE chip allows for indefinite program storage, automatically restarting whenever 5V DC power is applied. This circuit is designed for direct connection to the serial port of a standard PC, as depicted in the circuit diagram showing the connector's configuration. The only additional components required are two resistors and a 5V DC power supply, which powers the IC and serves as the reference for the analog to digital conversion. Modern computers typically provide 5V DC from power connectors intended for additional storage drives. This setup is particularly effective with older PCs, allowing for the creation of a dedicated, low-cost data collection system. Most computers feature standard serial ports, and data from the PICAXE can be read using any program capable of monitoring serial ports. HyperTerminal, included free with the Windows operating system, is an effective option for this purpose, enabling users to save data files that can subsequently be opened with Excel for graphing. Older DOS computers can also monitor serial ports using shareware applications like ProComm. Correct communication settings are crucial: 2400 baud, no parity, 8 data bits, and 1 stop bit. Each data sample appears as a new line in the output. A custom program has been developed for logging data from the serial port and graphing it in real-time for drift scan radio astronomy, capturing data from the PICAXE-08M chip every second, averaging 60 data points, and displaying results once a minute for 24 hours. This program was created using the Free Basic Programming Language. Additional resources, including a zip file containing the source code, executable code, and instructions, are available. The PICAXE chips can be obtained from hobbyist Phil Anderson's website, which also offers extensive information on using the chips, including links to free programming software. The PICAXE chips are programmed via a PC serial port using the same circuit described for the A/D converter. By downloading and running the free software, users can program a blank chip with the necessary code for this project. The programming software also includes a simple serial port monitor for data reception.

The A/D converter circuit described utilizes the PICAXE-08M microcontroller, which integrates a 10-bit A/D converter capable of converting analog signals into digital values. The circuit requires a minimal number of external components, specifically two resistors, which can be used for voltage division or signal conditioning as needed. The 5V DC power supply not only powers the PICAXE chip but also serves as the reference voltage for the A/D conversion process, ensuring accurate readings.

The serial communication feature of the PICAXE-08M allows for straightforward integration with a PC, enabling real-time data acquisition through the serial port. The microcontroller's programming allows it to sample analog inputs continuously, processing and transmitting data at a defined interval—once every second in this case. The data format is simple, with each sample output as a new line, making it easy for any serial terminal program to capture and log the information.

The application of this A/D converter circuit extends to various hobbyist projects, including environmental monitoring, data logging for scientific experiments, and even basic audio signal processing. The flexibility of the PICAXE microcontroller allows for modifications to the program, enabling users to customize the sampling rate, data format, and other parameters according to their specific needs.

Overall, this A/D converter project represents an accessible entry point for hobbyists interested in digital data collection and processing, combining low-cost components with straightforward programming to achieve effective results in a variety of applications.Collecting and storing experimental data is a common challenge for hobbyists. A popular approach is to use a device for converting analog data into digital data and storing the information on a computer. These devices are called A/D converters: an abbreviation for analog to digital. There is a wide variation in prices for A/D converters and most a re expensive. Since hobbyists are usually on a limited budget, we describe here a simple and low cost method to build a basic A/D converter using a single off-the-shelf IC that can be read using a computer`s serial port. (In a hurry to get started You can purchase the A/D chip for this project already programmed and ready to use.

see below. ) This simple circuit for building an A/D converter uses a PICAXE-08M chip. The PICAXE chip is a microcontroller with numerous useful features, including a 10 bit analog to digital converter. The PICAXE chip also has a serial communication feature which can transmit data directly into a PC`s serial port.

With only 4 lines of simple computer code (shown below) the microcontroller can be programmed to perform continuous analog to digital conversions and transmit the numerical result once per second. The nonvolatile memory of the PICAXE chip allows the program to be stored indefinitely, and it will recommence whenever 5VDC power is applied.

Note that this circuit is intended for connection directly to the serial port of a standard PC computer. The circuit diagram shows the serial port connections as you view the connector on the computer. The only additional items required are two resistors and a 5VDC power supply. The 5V supply is for the IC power and it also forms the reference for the analog to digital conversion.

As you probably know, 5 VDC is available inside a modern computer. for example at any power connector for adding additional storage drives. This circuit works great with an older PC, in which case you can put together a dedicated data collection system which is also low cost. Serial ports are standard on most computers. The data from the PICAXE can be read by any program capable of monitoring a serial port. The HyperTerminal application works well, and it is included free as an accessory in the Windows operating system.

HyperTerminal also allows the data file to be saved. By opening the saved file with Excel spreadsheet software it can plotted to create a graph. Older computers running DOS can monitor the serial port by using a shareware version of the old application ProComm ( Such as version 2. 4. 3. ) Whatever serial communication program you use, it is important to have the communication settings correct: 2400 baud, no parity, 8 data bits and 1 stop bit.

Each data sample appears as a new line in the scrolling output. Here is a view of HyperTerminal collecting the data. We have written a small program for logging data from the serial port and graphing it on the screen in real time for drift scan radio astronomy. The program logs data from the PICAXE-08M chip every second, averages 60 data points, and plots to the screen once a minute for 24 hours.

The program was written and compiled using the Free Basic Programming Language. Here is a screen shot of the program acquiring data, and a link to a zip file which contains the source code, executable code and text file instructions: datalog. zip The PICAXE chips are available from fellow hobbyist Phil Anderson at his website. He also provides a wealth of additional information for using the chips, including a link to the free software for programming them.

The PICAXE chips are programmed using a PC serial port and the same circuit we show here for the A/D converter. By downloading, installing and running the free software you can program a blank chip with the code for this project.

The programming software also includes a simple serial port monitor for reading the data as it is received. If you prefer, a chip which has already b 🔗 External reference