PC Based Oscilloscope Using Arduino
PC Based Oscilloscope Using Arduino
Th ni
eo
PC-Based Oscilloscope
Using Arduino
Ramalingam Balaji
O
scilloscopes are an essential
tool for electronics hobbyists
and professionals to verify
AREF
GND
13
12
11
10
9
8
7
6
5
4
3
2
TX 1
RX 0
that their designs would work as ex- ARDUINO DIGITAL
DRIVER
pected. PC-based oscilloscopes score
USB
ATMEGA328
POWER
ANALOG
INPUT
IOREF
their compact size, low cost and abil-
GND
GND
3.3V
RST
Vin
A0
A1
A2
A3
A4
A5
5V
ity to do offline analysis.
Here we describe how you can BOARD1
make your own oscilloscope at a LAPTOP
very low cost using your PC and an D2
D1
Arduino board as the hardware for 1N4148 R1 1N4148
10K
signal acquisition. You can use this
oscilloscope to capture frequency sig- CON1
nals up to 5kHz. The Arduino board, INPUT
the heart of the oscilloscope, reads Fig. 1: Circuit of the PC-based oscilloscope using Arduino
the values from its inbuilt analogue-
to-digital converter (ADC) and
pushes these to the PC via USB port.
We have provided here an Arduino
sketch, which you can compile and
load directly to the Arduino. You also
need to install an executable file or
application in your Windows PC. This
application works as the front-end to
plot input signals as waveforms on
your computer screen.
The Arduino board consists of
Atmel’s AVR microcontroller, which
can be 8-, 16- or 32-bit based on the
type of the board. For this project you
can use any variant of the Arduino as
hardware. The AVR microcontroller Fig. 2: Message on the screen when the PC-based scope is run for the first time
has an inbuilt ADC. In the project we
use pin A0 to capture the input signal. loscope is limited by the baud rate Fig. 1. The Arduino board connects
The captured input signal is fed to of the UART. The Arduino sketch is to your laptop or PC via the USB
UART via UART-USB converter in the coded to read the ADC using ISR, cable. Any external power supply
Arduino to the PC. A virtual COM and the UART baud rate is config- for the board is not required as the
port is created by Windows whenever ured at 115200, which sends data at board is powered by the USB only.
the Arduino connects to the PC. A 85µs intervals. This gives an effec- Connect switching diodes (D1 and
Windows-based application developed tive sampling rate of 12kSa/s. D2) as input protection circuit to
using NI LabWindows opens up the pin A0 of the Arduino’s ADC. You
virtual COM port and starts plotting Construction need Arduino sketch (pcscope.ino)
signals visually using Graph libraries. The PC scope set-up is quite simple and PC software or executable file
The sampling speed of the oscil- and straightforward as shown in (PCScope.exe) in order to use this