ZaidaScope - Arduino Oscilloscope, 8-Ch, max 100 kHz

ZaidaScope - Arduino Oscilloscope, 8-Ch, max 100 kHz © CC BY-ND

Standalone PC software to use your Arduino as an oscilloscope, supports up to eight channels, at rates up to 100 kHz.

  • 13,083 views
  • 16 comments
  • 18 respects

Components and supplies

About this project

Use your PC and Arduino as an oscilloscope!

Features

  • 1-100 kHz sampling rate (up to 75-80 kHz for 2+ channels)
  • Up to eight channels simultaneously
  • Basic trigger and cursor functions
  • Basic recording to .csv functions

Installation

  • Download the latest version
  • Extract to folder of your choice
  • Upload included at328p.ino file to your Arduino Uno/Nano or similar AT328P
  • Execute ZS.exe, choose your COM-Port, channel config and sampling rate, and click Connect

Requirements

  • Windows 7 or newer operating system (Tested on Windows 7 and Windows 10 systems)
  • Arduino Uno/Nano/other AT328P systems

Notes

  • If your Arduino uses an FTDI USB/Serial Chip, you need to adjust latency from the default 16 ms to 1 ms for best performance. To do this, go to Device Manager, open COM port, go to Port Settings, click Advanced and adjust latency to 1 ms. USB/Serial chip CH340 does not have this issue, but has many COM communication errors at higher sampling rates.
  • For higher sampling rates you may need to add a voltage follower to your signal, especially if your signal is high impedance, because the internal impedance of the Arduino will be very low at higher sampling rates. Otherwise, your signal can drop to zero volts. See Electrical Setup below for details on this.
  • Since v210419, the included configuration file instructs the program to use the OpenGL renderer. Should it not start because of this, simply delete ZS.cfg, as the program will then create a new one with the default settings, which uses Windows' built-in GDI system renderer instead.
  • Using the Export to PNG function requires zlib.dll and libpng.dll to be in the program's execution directory.
  • Recorded data/Exported diagrams are saved in program's execution directory.
  • Diagram colors may be altered by editing ZS.cfg, color values are saved in hex using RGBA format, e.g. red is ff0000ff, blue is ffff and yellow is ffff00ff. Deleting ZS.cfg will force the program to load default values, and write a new ZS.cfg upon program exit.
  • ZS.cfg uses a single LF, not Windows' CRLF line-feeding, so use an editor that respects this convention (such as e.g. Notepad++) for editing this file. An editor that uses CRLF for a new line will cause undefined behaviour.

Version History

v210419: Added configuration file, German language support, OpenGL rendering, CSV recording

v200706: Renamed to ZaidaScope

v200704: Initial release

Electrical Setup (Optional)

When using higher sampling rates, it may be necessary to add a voltage follower to the input signal, so as to not compromise the original measurement signal.

The screenshot above was created by reading my laptop's left channel audio output at a rate of 40 kHz while continously looping a generated 440 Hz sine wave using the program Audacity. This is how it the setup looks like:

The AT328P used on this board is an Arduino Pro Mini as well as a FTDI232 USB/Serial converter for communication, an SX1308 DC-DC step-up boost converter for powering the two LM324A op-amps, a number of diodes, resistors, capacitors and an LED.

The simplified electric schematic for the above is as follows:

C1, R1 and R2 are required in order to get the audio signal centered around 2.5V, instead of the normal 0V.

On the PCB, the input signal is protected from undervoltage/overvoltage with D2 and D1. These ensure that the signal does not go under -0.5V or over 5.5V. In the case that this does happen, R3 prevents the current flowing through D2/D1 from getting too high.

Protecting the input signal from UV/OV is important, because the op-amp can push currents into the AT328P analog input at voltages higher than it can handle and damage it!

The LM324A is configured as voltage follower/in unity gain and thus provides the measurement signal with a higher impedance than a raw connection to the AT328P's analog input. In order to correctly mirror an input signal up to 5V, the op-amp must be powered by a voltage higher than 5V (V_Boost). The exact voltage depends on the type of op-amp used and also individually varies from op-amp to op-amp. An SX1308 DC-DC step-up module was used for this purpose, and in this case provides the LM324A with just about 6.35V, which also ensures that the op-amp's output never exceeds 5.1V.

WARNING: A higher voltage should only be used if measurement signals are never disconnected (since op-amps tend to saturate floating signals towards the voltage of their positive power supply).

Be advised that if the circuit's integrity is compromised, as well as when a measurement signal is floating/disconnected, the op-amp may output up to V_Boost into the AT328P and damage it!

It is therefore very risky to use more than 6.5V for any op-amp in the above circuit.

If you are uncertain of any of the above, do not attempt any of it.

Background

ZaidaScope is an open-source software that was born out of the libraries created for a commercial client's request for a low-cost alternative to using traditional and expensive aftermarket DAQ hard- and software to monitor analog input channels on a PC.

The AT328P was chosen, as its low cost, abundance, bit-depth and sampling rate were all deemed to be sufficient for the task.

Visit our website for contact details if you require a similar custom solution.

License

Copyright (C) 2019-2020 ZaidaTek and Andreas Riebesehl

This work is licensed under: Creative Commons Attribution-NoDerivatives 4.0 International Public License

For full license text, please visit: https://creativecommons.org/licenses/by-nd/4.0/legalcode

Code

Github
https://github.com/ZaidaTek/ZaidaScope

Schematics

Voltage Follower Setup
Please see project's story for description.
Zs setup 21o05sra1x

Comments

Similar projects you might like

Arduino Oscilloscope (6-Channel)

by Meeker6751

  • 39,575 views
  • 14 comments
  • 112 respects

SmartGPU2 - Arduino Oscilloscope

Project showcase by Vizic Technologies

  • 18,645 views
  • 8 comments
  • 34 respects

DIY Arduino Oscilloscope

by Ameduino

  • 11,937 views
  • 3 comments
  • 26 respects

Android Oscilloscope

Project tutorial by moty

  • 5,454 views
  • 3 comments
  • 11 respects

How to Make a Mini Oscilloscope at Home Using Arduino Nano

Project tutorial by CiferTech

  • 13,569 views
  • 6 comments
  • 36 respects

Arduino - Web Oscilloscope (Support Trigger)

Project tutorial by phpoc_man

  • 10,379 views
  • 13 comments
  • 54 respects
Add projectSign up / Login