Building a hobbyist oscilloscope
At it's heart, a (digital) oscilloscope is just an ADC, along with some memory to hold the samples. The samples are then read out of the memory and displayed.
The practical implementation issues make commercial oscilloscopes complicated. The input signal needs to be scaled appropriately for the range of the ADC, which means that you need to have attenuators and/or amplifiers that have very precise gain values that are very flat across a huge range of frequencies (DC to 10s or 100s of MHz at a minimum) in order to measure waveforms with minimal distortion.
Also, depending on the application, the sample rate of the ADC needs to be adjusted (very precisely) over a wide dynamic range — 1 ns/sample to 1 s/sample (9 orders of magnitude) would be typical.
Then there's the question of knowing when to start — or more importantly, stop — sampling; this is known as triggering. Different applications have different needs for triggering, and commercial 'scopes have a wide selection to accomodate them.
I think you can get a few ideas from AVR 10MHz 50MS/s Digital Storage Oscilloscope.
It includes full schematics and source code.
It uses a small CPLD that reads the ADC results and fills a RAM, then it uses an AVR mcu to read the RAM data and send it to a PC
You may also find useful:
- The Bitscope schematics
- The dsonano including full schematics and source code
- Several DSO related projects using FPGA or mcu listed here
There is a block diagram in openDSO project page which should be useful to visualize the sections used in a DSO.
It's important to distinguish a hobby project from equipment that's ready to use, and to make the right choice for you. This doesn't have to be the right choice for others.
If what you want is equipment to use for another project THIS year, I'd buy one. Could be new or used based on your requirements and budget.
If what you want is to build an oscilloscope as a hobby or educational project then by all means go ahead! I wish you a fun and educational experience. You'll learn a lot. Likely you will encounter nay-sayers; tell them that they can save a lot of time and money on their next vacation by e.g. not going to Europe and buying a picture-book instead. They are missing the point!
A (basic) digital oscilloscope is indeed composed of a front-end (including an ADC and perhaps trigger circuitry), an embedded computer, a display and software.
I will suggest that the following issues are likely to come up:
- Time. This project will take you a while, depending on desired performance, your experience, etc.
- Cost. It'll cost more than buying one of equal performance.
- Performance. What kind of performance are you looking for? Including input ranges, time resolution, how much voltage must the front end withstand.
- Testing. How will you debug it? How will you check that it works correctly?
- Safety. What happens if you probe 120VAC or hit higher voltage?