Top
/Home


Homemade Oscilloscope with Arduino

 

Introduction:

Cathode Ray Oscilloscope or CRO is a  very important tool for any electronics project. But this CRO is an analog system, but now a digital version also comes into the market. The new digital product is very good in quality and performance. In this product the concept of Cathode Ray is not used, that's why it is good to call the product as Oscilloscope, not Cathode Ray Oscilloscope.

But the cost of the CRO, as well as Digital Oscilloscope, is higher than the ability of a beginner electronics lover. So this project is for that beginner electronics lover guys.

Components Need:

  1. Arduino Nano
  2. USB Cable for Arduino Nano
  3. 8 pieces 5.1 Volt 1 Watt Zener Diodes
  4. 8 pieces 1 Kilo-Ohms 1 Watt Resistors
  5. 4 pieces 500 Kilo-Ohms Variable Resistors
  6. Some flexible wire for internal connection
  7. 4 pieces probes (I used simple USB port)
  8. 4 pieces probe bases (I used simple 2 wire USB cable)
  9. some female header pin for the connection of Arduino to the circuit board

 

** I also include OP-AMP base signal generator circuit in this project. To do this you need

  1. LM324 Quad Differential Comparator DIP14 type IC
  2. 2 pieces 10 Kilo-Ohms 1/4 watt resistors
  3. 4 pieces 100 Kilo-Ohms 1/4 watt resistors
  4. 1 pieces 22 Kilo-Ohms 1/4 watt resistor
  5. 1 piece 220 Kilo-Ohms 1/4 watt resistor
  6. 1 piece 1 uF 50-volt ceramic capacitor
  7. 1 piece 33 nF 50-volt ceramic capacitor
  8. 1 piece 10 nF 50-volt ceramic capacitor
  9. 1 piece 100 Kilo-Ohms Variable Resistors

 

Theory Behind the Project:

Basically, the concept of the oscilloscope is nothing but grabbing the analog signal and convert into a digital signal and with that digital signal make a graph of that analog signal. So the main part of the project is an efficient Analog to Digital Converter (ADC).

In every version of Arduino board, there are some number of pre-build ADC is available in the Atmega microcontroller. For this project, I used Arduino Nano. In this variant, the Atmenga328P microcontroller is used.

According to the working principle of the Arduino GPIO pins, the pins measures the voltage difference with respect to ground. So it's impossible to measure +ve and -ve with the same pin. so we use two GPIO pin. One is for +ve half and another one is for -ve part of a given signal. 

After collecting the analog value the ADC of the Arduino converts it into a digital value and send the values to the host computer. The computer receives the value and with the help of a piece of software, it converts into a graph of the signal.

Setup The Hardware:

The main hardware of the system is the Zener-Resistor circuit combination. So I made the circuit like the schematic shown below.

we need this piece of circuit 4 times to make 4 channel oscilloscope. I used 4 USB base to connect the probes with the main circuit board. For the Arduino pin connection, I used some flexible wires and the female header pins into the circuit board. The Arduino nano board and this circuit are enough for the oscilloscope.

Here is a photo of the 4 times hardware of the above circuit diagram.

 

** For Signal generator I made this circuit shown below.

this part is not included in the oscilloscope. But if you want to include the signal generator in your project then you can add.

After completing the circuit the full system looks likes this

 

Setup the Software:

There the two part of the software.

  • Setup the Arduino and code
  • Setup the software to obtain the graph

So the onetime setup of the Arduino board. To do that we need the Arduino IDE. If you don't have the Arduino IDE then go to https://www.arghyabiswas.com/arduino-ide-setup-and-programming link and download and setup your IDE. After Successfully install the IDE download the Arduino code for the oscilloscope from here.

Download the code and unzip the file then connect the Arduino nano board with your computer and upload the code to the Arduino Nano board. then plug the board into your circuit board.

 

Now we have to do the second part of the software setup. Download the software from here and unzip on your computer. No need to install the software. This software is designed in such a way that simple lunch and play. 

After unzipping the folder direct open the Serial Oscilloscope.exe file. Then select the COM port of the Arduino from the 'Serial port' tab. In my case the COM port is COM8. If the COM port option is not available then click on 'refresh list' then it will show the available COM port.

After selecting the COM port you have to select the mode of the system. This oscilloscope is working in 4 mode

  1. Clear Mode
  2. Single Mode
  3. Double Mode
  4. Multiple Mode

Clear Mode: In this mode, the oscilloscope will be an ideal state. In this mode, the system clears all previous commend and output and wait for the fresh commend. The shortcut key for the clear mode is 'C' or 'c'. After selecting the COM port just press 'C' or 'c' it will enter into an ideal state.

Single Mode: In this mode, the oscilloscope will support only one channel among 4 available channels. The shortcut key for the single mode is 'S' or 's'. After selecting the mode you have to select the channel number by pressing '1' or '2' or '3' or '4';

Double Mode: In this mode, the oscilloscope will support any two channels among 4 available channels. The shortcut key for the double mode is 'D' or 'd'. After selecting the mode you have to select the channels number by pressing '1' or '2' or '3' or '4';

Multiple Mode: In this mode, the oscilloscope will support all 4 available channels. The shortcut key for the multiple mode is 'M' or 'm'.  Here no need to select the channel, because by default all 4 channels are selected.

 

After selecting the mode and channel you have to open the ultimate graph viewer oscilloscope window form 'oscilloscope' tab.

after opening the tab its looks like a black graph window.

Now it's time to connect the probes with the testing signal. In my case, I used a 25 Volt AC signal. Just after connecting the probes to the signal the graph of the AC signal is generated. So the Sine curve of the signal looks like this. 

After that, I test the Software with some other kind of signal also like a square wave or some non-geometrical signal also. For all cases, the software is working perfectly.   

 

Now I should inform you that the software also supports some more modulation on the signal. The control switches of the software are present in the bottom-left corner.

Use this switches to get a more perfect graph of the signal. 

 

Conclusion:

This is a tool building project. The oscilloscope made in this project is not totally perfect, but as a project and for a beginner or DIY electronics lover this is a very good project and tool at a very low cost. 

So in this point of view, my conclusion is that the project is a very good and efficient product for a beginner. But if you are not agreed with my view please put a comment below and help me to improve the project as well as my skill.

 If this small effort can help in your any project then my effort will be successful. Please put feedback On our contact page.

If you faced any problem please send an email to admin@arghyabiswas.com. Thanks for being with us.




Thank You

Leave a Comment







View Previous Comment

SUBHANKAR BISWAS 22nd Aug, 2019

justtt Osama... veryyy helpfull.. 😍😍

Show 1 Reply