An old cathode ray oscilloscope (CRO)
The first time I learned to use an oscilloscope in 2010, I was amazed. At about the same time I had my first official learning of programming and microcontrollers. These two factors make up the reason why one of my major projects is the data acquisition, also known as DAQ.
An oscilloscope is a device that measure the voltage level of an input and plot into a nice graph with respect to time. There are functions that can change the range of time from few seconds per segment to microseconds, seemingly "slowing down" the time to view what is happening in that transient state. An example would be the charging of a capacitor, which last only a few micro-, maybe nano-seconds.
CRO displaying pulse width modulation (PWM)
Now, the CRO may not be considered a DAQ device, but the concept is the same. Data acquisition, strictly speaking, is a process of sampling signals measured by sensors or probes into a digital stream of data that a computer can read. A CRO, being an analog device, is not meant to feed the data into a computer, but instead display it on a screen with a cathode ray, similar to how an old CRT monitor or television works. Newer digital oscilloscopes are able to capture and save the graphs into a USB device.
Digital oscilloscope displaying sine wave
DAQ devices are not cheap. Higher grade devices may cost up to hundreds or thousands, but a simple DAQ can be made with the use of commercial grade microcontrollers (MCU). An MCU can be programmed and reprogrammed as pleased to serve many purposes and has been integrated into many appliances around us, like washing machines, calculators, mobile phones, and more. There is a popular open-source single-board microcontroller on the market called Arduino with a huge support and code library on the internet. It will make this project much simpler to build.
(From Wikipedia: A single-board microcontroller is a microcontroller built onto a single printed circuit board. This board provides all of the circuitry necessary for a useful control task: microprocessor, I/O circuits, clock generator, RAM, stored program memory and any support ICs necessary)
But where is the challenge if it is too easy? That is why in this project, my aim is to program a Microchip's PIC18F4550 microcontroller to measure an analog signal, convert it into digital signal with analog-to-digital converter (ADC), and feed it to the computer with serial communication (USB or the old serial port).
However, this is only half part of the project. In order for a DAQ to work, a software needs to be written for the computer so that it knows how to listen and talk to the MCU. That will be the second part of this project.
No comments:
Post a Comment