Arduino Oscilloscope

Various types of oscilloscopes range from several hundred thousand won to several million won, depending on the specifications. In the field of electricity and electronics, it is essential equipment for experimental practice and research. These days, technologies that use Arduino to make their oscilloscopes are open to the public. Of course, there are limitations in performance and functionality, but it is possible to do basic experiments. Luckily, there are open technologies.

You can download and use it from the following link. The original project’s Github address is here. Installation and usage instructions are explained in detail. The Arduino program is executed on the computer connected to the Arduino, the digital oscilloscope screen is configured on the computer using the processing tool, and the data received from the Arduino is displayed on the screen. The video of measuring the waveform of the sample circuit with this setup is as follows.

The measurement result is four channels, each showing the voltage of the connected node. The program was modified to show the relative voltage between channels. For example, it is often necessary to find the voltage between nodes A and B rather than checking the voltages of nodes A and B, respectively. A checkbox is attached to each channel to obtain the voltage and relative voltage of other channels. For example, if you want to find the relative voltage of channel 1 of channel 2, you can select checkbox 1 in Ch-2.

The following is the modified content of the code in the Processing part for this purpose. It is a convenient tool for integrating various data and IoT functions using Arduino based on Java. I will explain the parts that have been fixed.

The above are all processing classes utilized. It’s in Portuguese. Tela is the screen, Painel is the panel, Botao is the button, and Canal is the channel.

In the oscilloscope 4ch file, the key is “readString Until(10);”  In Arduino, the measured value is sent according to a predetermined protocol, and the role of processing is to draw the information received through readStringUntil.

It finds the selected checkbox, performs an operation to find its relative voltage as a difference, and passes it to the channel, or simply passes the voltage when it is not needed.

Here, the ch matrix means the value of the checkbox in each channel, and by using this, the difference between this channel and the relative voltage to be subtracted is calculated. This ch checkbox was added by Canal and appears on the screen when the display() command is invoked.

Processing seems to have a different drawing mechanism than the original Java. In Java, paint and setVisible are replaced by draw, display, etc. The event mechanism also seems to be flexible. In Canal>mouseClicado, I handled it by adding a mouse click event for ch.

You can check the waveform frequency of each channel in “detect freq”, but it conflicts with the area of the newly added ch. I tried to make the ch information slightly invisible when finding and selecting an event, but I omitted it because time was too short.

The circuit wiring is as follows. I checked the internal pulses and connected one of them to an RC circuit using a variable resistor. I am planning to make an experiment to create a sine wave using an RC circuit and measure the voltage of the RLC circuit.

Leave a Reply

Your email address will not be published. Required fields are marked *