Tag Archives: Oscilloscope

An Oscilloscope with the Raspberry Pi

An Oscilloscope with the Raspberry Pi
Making a full-fledged oscilloscope with a Raspberry Pi or RBPi, the unique low cost SBC, may be beyond the scope of many enthusiasts, but here is a proof-of-concept that RBPi can handle such a project. Although not a very practical oscilloscope, it does provide several oscilloscope-like capabilities. Additionally, all this comes at a very low cost and not much of soldering is involved – impressive incentives for any DIY enthusiast to start on the project.

The oscilloscope project has additional incentives for those seeking to advance their learning curve. Information available in the project and experience gathered during the execution may be reusable for applications involving analog sensing and plotting data onto a screen. It is perfectly possible to project the output onto a larger screen as the output of the oscilloscope is available to view in a web browser. Therefore, this project could also be used to display low-frequency waveforms in an environment that does not have a real oscilloscope. The RBPi oscilloscope is quite responsive and refreshes the display several times a second.

To make the oscilloscope all you need is an RBPi, an XMOS startKIT board and a few wires. The XMOS startKIT is another credit card sized board containing the XMOS multi-cored processor. When compared to other similar processors in the market, the XMOS processor comes with a host of advantages for projects that require real-time operations. This is especially true for data-logging purposes, as the chip also contains a 12-bit ADC or Analog to Digital Converter built into it. Having all this on a single low-cost board makes the whole arrangement very attractive for connecting to the RBPi.

Although a multimeter is a very useful instrument, it cannot show electrical signals varying over time beyond a certain rate. With the RBPi oscilloscope, you can do that see more than what the multimeter tells you. Of course, it is not the intention here to make an oscilloscope with all the features that a professional scope has. However, the project does offer some oscilloscope-like features such as sweep modes, trigger capability and on-screen cursors for trace measurements.

Unlike a regular oscilloscope, the RBPi scope lacks the entire front-end. Therefore, it does not possess a good sample rate, has no front-end filters, is without any AC/DC input capabilities and there are no gain adjustments. In fact, the XMOS Analog Examiner is good enough only to examine simple circuits at low speeds. The XMOS board actually collects analog data and transfers it to the RBPi over the Serial Peripheral Interface or SPI. The RBPi runs a web server and the XAE application using JavaScript and Node.js. Anyone connecting to the XAE application via a web browser can see the data plotted as a graphical curve.

The XMOS processor can run multiple tasks in parallel, thanks to its multiple cores that can execute different codes. The XMOS cores communicate with each other using the concept of channels. Additionally, the XMOS chip also has a 4-channel ADC built in. This ADC can resolve at 12-bits or 4096 points at 1 MSps or a million samples per second. For further details on this oscilloscope, refer to this site.

What is an oscilloscope and how does it work?

An oscilloscope enables the visual display of a voltage that varies with time. One of the two input points is generally connected to the chassis and grounded, but this is not always the case.

A probe, attached to the input port of the oscilloscope, is connected to the voltage source. Some oscilloscopes have two or more input ports. Oscilloscopes with multiple ports can enable simultaneous viewing of waveforms, say, at the input and output of a circuit, for comparison and measurement, etc.

Analog and Digital Oscilloscopes

The analog oscilloscope uses a Cathode Ray Tube, and is also called a Cathode Ray Oscilloscope. In an analog oscilloscope, a thermally heated electron gun emits electrons, and an applied DC voltage causes the electron beam to impinge upon a fluorescent screen as a bright spot. A control grid results in axial movement of the electron beam and controls the number and speed of electrons in the beam. The momentum of electrons impinging on the screen decides the brightness of the spot. Applying a more negative voltage causes fewer electrons to impinge and is used for intensity control. A variable positive voltage on the second anode adjusts the trace sharpness. On applying an input voltage, the electron beam deflects proportionately, creating an instantaneous trace on the screen.

If a voltage input is applied to the vertical deflection plates and the horizontal deflection plates are grounded, the spot on the screen moves only up and down. On interchanging the signal to vertical and horizontal plates, the spot moves from left to right. If two signals of same frequency and in synchronization are applied to the two pairs of deflection plates, a trace results. The bright spot must repeat the same trace at least 30 times a second for the human eye to see it as a continuous trace.
By contrast, a digital oscilloscope first samples the waveform, and converts it into a digitally coded signal by an analog-to-digital converter. The oscilloscope processes this digital signal to reconstruct the waveform on the screen. Storage in a digital format enables data processing even by connected PC’s. In this oscilloscope, stored data including transients can be visualized or processed at any time, a feature not available in analogue oscilloscopes.

Displaying a Waveform

Whereas in analog oscilloscopes, continually varying voltages are used, in digital oscilloscopes, binary numbers are employed and these correspond to the input voltage samples. An ADC or analog to digital converter changes the measured voltage into its digital information. A series of samples of the waveform are taken and stored, until there is enough to describe a waveform. The information is then reassembled to be shown on the Liquid Crystal Display.

Unlike an analog oscilloscope, which uses a time-base and a linear saw-tooth waveform to display the waveforms repeatedly on the screen, a digital oscilloscope uses a very high stability clock to collect the information from the waveform.

Types of Digital Oscilloscopes

There are three types of digital oscilloscopes and they are classified as digital sampling oscilloscopes, digital phosphor oscilloscopes and the digital storage oscilloscopes.

In conclusion
Oscilloscopes, both analogue and digital, are among invaluable measuring and diagnostic tools in the electronics industry with newer applications continuously evolving with innovations in technology.