3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LCS-1M - A Full-Featured, Low-Cost Hobby Oscilloscope

Step 9Circuit Description - Analog Frontend

Circuit Description - Analog Frontend
The ADC has a fixed input range of 0 to 5V. Signals smaller than that range will have reduced resolution, and larger signals will get clipped. Since the input signal that the scope is supposed to measure can span a wide range from quite small to quite large, we need an input stage that can attenuate and/or amplify the incoming signal to make it suitable for the ADC. The circuit shown here is for channel 1, but channel 2 looks identical.

First, the incoming signal is attenuated by a factor of 4. This increases the maximum voltage range to 20V. Since the subsequent circuits cannot deal with negative voltage (to keep the circuit simple, the scope has only a single +5V supply and no negative supply), the only way to measure negative signals is to shift them up with a programmable offset voltage provided by a digital-to-analog converter (see next page). This way the scope can display voltages between -12V and +20V max.

The two diodes act as input protection, clipping any signals to the preamplifier that exceed either +5V or 0V by more than one diode drop.

The preamplifier OP1, a Microchip MCP6022, produces two buffered copies of the input signal, one
with gain 1, one with gain 10, which can be selected by the subsequent stage. Apart from amplification (the gain=10 version), this buffering is also necessary because the following stage does not react kindly to an input circuit with too high an impedance (i.e. too little drive strength) - wild oscillations would be the result (of course I had to try this out experimentally, and indeed quite "interesting" but not really usable behavior was the result). The MCP6022 has a gain-bandwidth product of 10 MHz, so at a gain of 10 we can expect about 1 MHz of bandwidth - more than sufficient because our sample rate already limits us to less.

The input impedance of our oscilloscope - determined by the input attenuator - is 133 kOhm. I would have loved to make it 1 MOhm so one could use standard 1:10 probes which need this impedance to work, but the input capacitance of OP1 is too high - making the input attenuator resistance too large limits the bandwidth too much. In my experiments a 1 MOhm divider resulted in a measly 60 kHz of overall bandwidth, while the present design provides around 400 kHz (which nicely matches the sample rate limitation - see Nyquist theorem!). At least you can still use a standard 1:1 probe, and in any case I would not recommend applying voltages larger than 20V to this design. (Note: I recently designed a simple compensation circuit that enables 1 MOhm impedance as well as higher bandwidth (1 MHz) - see next step for more details).

The second stage in our signal chain is a programmable gain amplifier (PGA). I chose the Microchip MCP6S22, which offers a gain-bandwidth product of up to 12 MHz (again, more than enough) and has selectable gain settings of 1, 2, 4, 5, 8, 10, 16, and 32. The higher gain settings turned out quite prone to oscillations (the datasheet already warns about that, but I still had to try :-), so that's why my design only uses gains up to 10. Together with the pre-amplifier and the attenuator that gives a total gain range from 0.25 up to 25, sufficient for most applications. Best of all, there are no moving parts (like relays)! The PGA has two selectable inputs that I use to switch between the two copies of the pre-amplified signal, and it communicates with the microcontroller through the SPI bus.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
59
Followers
3
Author:womai