HScope is an Android App that allow your compact Oscilloscopes to become portable .
News, Videos & Forum:
Bugs, questions, requests for enhancement:
· STM32 DIY Oscilloscopes
· Hantek 6022BE
· Owon VSD1022
· SainSmart DDS120
· Hantek 1008
Full Hardware list and features here.
Need adequate USB OTG Cable and it may require an USB HUB to power the device (see under First Connection).
USB OTG, API 16+ (Android 4.1). 2GB RAM or more suggested. Capability and performance depends on device.
Pay attention: most of Android 4.1 phones/tablets do not support USB OTG.
Setup used for the System testing (Oscilloscope not in the photo):
After installing the App, connect the USB Oscilloscope with the OTG cable. The App should detect automatically the Oscilloscope and ask the Authorization to use the USB Port. This Authorization may be asked twice and you can remember the choice if you don't want this window show again at the next connection.
If the everything works correctly you should see the signal on the App screen.
If the device is not supported then a message appear.
For WiFi devices (like Hantek iDSO1070) first connect the phone to the device WiFi network, then open the App. The App should connect to the Wifi oscilloscope automatically.
If the device is not recognized
1. Use short USB Cables like those used for external CD-ROM readers for laptops. In many case the USB cable provided with the device is not good to be used with phone.
2. Power it interdependently with a 5V source, some phone has not enough USB current to power the Scope. The original Hantek cable with a double USB Cable is good to use (1 Black USB for the Signal, 1 Red USB for the Power).
2. Use the App USB Device Info to check if your phone/tablet have the driver for the oscilloscope. If once connected the oscilloscope this software don't show the device in the "ANDROID" Tab, then the oscilloscope cannot work with the phone.
3. Check with another USB-OTG cable since in many cases it is not good or suitable. Avoid to use direct rigid adapters and try to use adapters with a short cable.
4. For phones with USB Type-C connector (Android Version >= 6), the USB power could not be enough for the oscilloscope, so you can use a powered USB Hub (sample in the picture: UNITEK 4-Ports USB3.0 Y-3089).
Setting the Rate
The Rate allow you to set how many points (or Samples) you want to use to scan the input signal. This value is also related to the maximum frequency you suppose to find for your signal. Assuming your signal is a Sine like shape you need theoretically 2 points inside its period to see it, but practically (since the software connect the dots with a line to show the shape), you need at least 10 points inside the period.
So with a rate of 100 KS/s (Kilo Samples / second) you can see well waves till 10KHz. If these waves have faster variations just rise the rate level. Square signals has faster variations than the nominal frequency, so they may requires higher sampling rates.
Supported Rates & Sampling (sample for Hantek 6022)
Normal Mode Rates
25KS/s, 50KS/s, 100KS/s, 200KS/s, 500KS/s, 1MS/s, 4MS/s, 8MS/s, 16MS/s, 48MS/s
Roll Mode Rates
500Sa/s, 1KSa/s, 2KSa/s, 8KSa/s
# Samples acquired
512 (Basic Version)
1024 (Full Version)
4096 (Low Rate - Roll Mode)
If the signal is not stable on the screen sometimes it is because its frequency is very low respect the Sampling Rate, so during one (very fast) scan the Scope cannot see and recognize one complete waveform. In this case just try to lower the Sampling Rate.
Roll Mode works for low sampling rates and allow to see the signal taking shape in real-time on the screen in continous and unlimited refreshes from left to right. It is still possible to use rulers and take measures while the signal update in real-time.
Setting the Channels
Each Channel can be switched on/off and can be set regarding the maximum input signal and the probe you use. The maximum voltage range for these digital Oscilloscope is usually around ±5V (from -5V to +5V) but it depend from the device. The may hardware have also an internal amplifier that allow to use lower voltage ranges (like from -0.5V to 0.5V).
Note: The second channel is available just in the Full Version.
Selecting the button
AUTO the software automatically set the input voltage selector according to the signal. This function is limited just to high voltage ranges. Lower voltage selection should still come manually.
DC the signal goes to screen AS-IS (with AC and DC components), selecting
AC the signal pass into a filter (that can be hardware or software according the device) so that on screen and in computation is considered just the AC component.
In case you need to measure stronger signals the Probe should have a switch that allow to attenuate the input signal. If you change the switch of your probe to the position x10, the input signal will be attenuated by a factor 10. This means that using the Oscilloscope range ±5V with a probe x10 you can see signals up to ±50V (50V / 10 = 5V). In visualization the App already calculate this scaling factor, so if you use a probe x10 just select in the Channel configurations the factor x10 and play with the voltage ranges (it will show you the possible range you can select).
On the market are available different kind of probes (also associated to different units like Ampere,...). You can add or download new probes in the Settings -> Probes panel. DIY probe are available in the list with link to instruction how to build it. Probes configuration is saved locally on the phone and is not lost in case of app reinstallation. You can find/backup or restore your probes configuration by accessing the file in the folder:
/Download/HScope/Probes.cfg. HScope will automatically read and save the probes configuration from this file.
Voltage Ranges (sample for Hantek 6022)
±0.5V, ±1V, ±2.5V, ±5V
±5V, ±10V, ±25V, ±50V
Signal out of scale
If the signal maximum value is higher than the selected Voltage Range and the Auto Voltage is not enabled, then the App detect this and write the message "Overscale!" on the top of the screen.
Sometime you may want to see the amplitude of a signals much lower than the maximum value, so you may want to use a shorter scale and let the maximum to go overscale. For this disable the AUTO voltage and select the voltage range manually.
Scale VS Resolution & Error
The Hantek has a resolution of 8-bit (256 possible values in the voltage range). Having the voltage range and the maximum possible values in this range (256), it is possible to calculate the maximum error in the measure (Quantization Error).
If we use a X1 Probe with a range +/-5V the minimum value of voltage we can detect with 1 bit is (10V / 256) = 39mV (Quantization Error = 39mV / 2 = ±18mV). This means for example that it could be possible not to see differences between a signal that is 100mV and another one which is 118mV.So for reduce the reading errors it is better to use the scale mostly near to the maximum of the signal.
For example for a 2Vpp signal use the scale ±2.5VThe Quantization Error is calculated according the used range and is showed in the statistics.
Setting the Trigger
The Trigger allow you to see the signal stable on the screen since the Trigger set what is the starting point for drawing the signal. Even if the input signal can be periodic in some way, on each scan its position can be found translated since the acquisition time is random and it cannot be synchronous with the period of the input signal.
The starting point for a signal can be identified with:
- a Voltage Level (Trigger Level);
- a tendency (or Slope) which means if the signal is passing the Voltage Level going up or down.
Once decided the channel to use for apply the Trigger - with the selector CH1 or CH2 - you can set the
At the bottom you can find the
Auto (AVG)button which simply set the Trigger Level as the middle level of the input voltage.
If you want to set the Trigger Level manually just disable the Auto button and move the Trigger Level that is showed on the screen using the left part of the screen.
Single Sweep function
The Single Sweep function allow you to freeze the image on the screen when the Trigger is found in the signal. This function is used to search when the signal present strange behaviors like spikes. For example you can just set a manual trigger on an high level that the signal usually doesn't reach. Then enable the
Sweep and when your signal reach the Trigger level the image on the screen will be friezed, allowing you to see the moment of the spike.
After the freezing you can continue the scanning pressing the
More about Triggers
There are many known ways to "Trigger a Signal" but currently the App allow to use just the most simple kind.
This trigger in most of the devices is implemented by the software since the hardwares doesn't implement it. In case of Software Trigger the Single Sweep function cannot work at high fequencies since it depends from the acquired data which is just a little part of the total signal data at high frequencies (not all samples can be transfered via USB to the software). Since we can acquire just few parts of the Signal, when a spike happen during a reading, it is detected from the software and the Single Sweep function can show it. If the spike happen when the device is not acquiring data, then nor the hardware nor the App can detect it.
Acquiring 1024 sample at 200KS/s means to read a total period of about 5ms. If we have 25 scans of the signal each second it means we can see a maximum of 125ms on a period 1s (we can see just the 12.5% of the signal). Increasing the Rate we can see even less since the acquired period is shorter.
Cypress FX-2 based devices allow a correct Single Sweep with HScope up to 100KSa/s.
Is it possible to activate one or two cursors just pressing with the finger at the bottom of the screen. Activating two cursors is it possible to read the frequency associated to the period selected. For removing the cursors just push them out of the screen (to the left or to the right).
More info on provided data
The rulers show also the signal amplitude at the selected point. This value is calculated with Sinc Interpolation and it is more exact than just a middle level between 2 samples. For more info refer to Interpolation section in this guide
Activating the button
STATS is possible to have some statistic for each channel. Available statistics:
· VMAX / VMIN / VRMS
· f / Δt for top frequency
FFT button is possible to see the rapresentation of the signal in the Frequency Domain only for the first Channel. The range of visible frequencies on screen can be selecting zooming-in or out with the fingers on the screen.
STATS button is possible to see the top 3 frequencies in the selected frequencies range. These values are corresponding to the computed FFT values and not to the real values that can be checked better with the ruler.
It is possible to select between standard windows and Flat Top windows for the FFT. Flat Top windows (HFT90D and HFT248D) are used when is required to determine the exact amplitude of a sinusoidal component in the input signal. They have bandwidths W3dB of about 3 . . . 5 bins, roughly twice as wide as non-flat-top windows with comparable sidelobe suppression, but very low maximum amplitude error emax.
W3dB = 1.2736 bins
emax = −1.8242 dB = −18.9430 %
W3dB = 1.4382 bins
emax = −1.4236 dB = −15.1174 %
W3dB = 3.8320 bins
emax = −0.0039 dB = 0.0450 %
W3dB = 5.5567 bins
emax = 0.0009 dB = 0.0104 %
When the Scope acquire a signal we receive just samples but we don't know what's the signal shape between the samples. We can just connect the dots (Linear Interpolation) or better we can reconstruct the original signal according the Whittaker–Shannon formula (Sinc Interpolation).
In the Setting you can choose the samples interpolation. Enabling the
DOTS button for each Channel you can see clearly the samples when zooming the signal.
The Sinc Interpolation is the perfect reconstruction of the original signal but due to software limitation it is valid under this condition:
This is the equivalent of (at least) 4 samples inside the wave period.
Example: with a sampling rate of 48MS/s the maximum frequency visible in Frequency Domain (with FFT) is 24MHz but the maximum frequency visible in Time Domain is 12MHz. If higher the shape will appear distorted.
FAQ / Myths
My signal is not a pure Sinusoid, can I use the Sinc Interpolation?All signals are sums of sinusoids of different frequencies (Fourier Series), the Sinc Interpolation is the perfect reconstruction of whatever signal within the limits above.
My signal is square but the Sinc Interpolator don't show me as a square!A square signal will never be square on rises and falls unless you have a Scope with infinite bandwidth (impossible). The real square signal with Bandwidth limited to (Sample Rate)/2 is that one showed by the Sinc Interpolator. Using the Linear Interpolator you can see a better square but it is only an artifact of the real one. Consider to zoom also near a rise or fall of the square to see if the hardware you are testing has a lower Bw than your Scope (in this case you will see samples following the Sinc reconstructed wave along the rise or fall.
Modules - Generalities
Additional software modules can be accessed clicking on the top icons on the right bar. They are:
Automotive Module, for fast rates long period recordings. Instructions here.
Voltmeter Module, for quick DC analisys and low rates long period data logging
Other Modules are available within the Oscilloscope part and they are:
XY Plot, for comparing signals
Audio Module, for listening the input signal with the phone speaker and compute Amplifiers Power. Instructions here.
Math Module, for performing channels mathematical operations
Additional modules can be purchased from Settings panel -> License.
When both channel are
ON is possible to use the
XY Plot. 5 periods of both channels are showed on the left with data about their amplitude and frequency.
The phase shift is also calculated with the Lissajous methodand it is valid just for Sinusoidal Waveforms with same frequency.
If you want to calculate the time delay for an arbitrary signal from 2 points of a circuit under analysis, just press
compute and in yellow you will see this value obtained from the Cross-Correlation of the signals from the 2 Channels.
This module is available by purchasing the Full Version if the device has 2 Channels.
Module - Voltmeter
The Voltmeter Module allow to simply access to the signal main values and to have a Data Logger for the desired value.
The Data Logger require a Device License to fully work. Data from both channels can be recorded at same time or it can be started/stopped at different times, and it can be exported as CSV file. The recorded data is that one selected from the main LCD. Data logger graph show minimum and maximum values of the current showed data and it can be zoomed and shifted with the fingers.
Calibration parameter are showed and can be adjusted just when the oscilloscope is connected on the phone. For entering in the Calibration panel go in the Settings->Calibration.
For each channel is possible to calibrate the
Zero Level (b) (so that when the probe is connected to the GND the result of the measure is 0 Volts) and the
Multiplier factor (m). Assuming the ADC measured values are on a straight line the Multiplier factor allow to adjust the inclination of the ADC line according the equation
First it is necessary to calibrate the Zero Level, then the Multiplier Factor.
By selecting the button
Factory Reset the calibration parameters are set according pre-tested parameters on the specific device. These values shall be prefered unless the measured values are very far from the real ones.
For some of the supported oscilloscope it has been found that calibration parameters can vary a lot according the selected voltage level.
Depending from the firmware implementation the calibration parameters could also depend form the sampling rate, however the developed firmwares for HScope allow the ADC output response do not depend from the sampling rate.
Unless the oscilloscope manufactures change components in successive productions, the
Factory Reset should provide accurate data.
In the Settings you can set also the Graphic quality for the lines that represent the signal. The Decay Phosphor effect allow to keep trace on the screen of the previous scans so that the wave line is composed from many superimposed waves as happen in the old oscilloscopes. This effect allow also to see better the Scope noise due to sampling since the result will be a sum of waves between a minimum and maximum value.
FPS stay for Frame Per Second. Enabling this option in the Settings is possible to know how many acquisitions are currently taken by the Scope (SPS: Scans Per Second) and how many time the screen is refreshed (FPS). This number may vary from device and rate settings. Free Version of the App has a limited FPS.
Export Data is possible to export the current acquired data in CSV format. The exported data include the Scope configuration, list of values acquired, and the raw data acquired. The CSV include these data also in direct array format to be imported in other sofware or to be used with Matlab.
You can use bluetooth keyboard and mouse to control the app for example on televisions or screens with Android TV Boxes. Here you can find the list of keys you can use to control HScope.
HScope is in continous development thanks to the suggestions from the users and the contributions of the supporters, and aim to become one of the best affortable high-tech diagnostic tool.
Consider to support this project with a donation!
HS102HS102 is an DIY Oscilloscope for Automotive porpuses. 2 Channels, 12-bit resolution, 0-24V Range, around 50KSa/s each channel, compact (around 80x40x40mm). Instructions will be provided for build it with parts easily finding in the market with components costs around 10-15 USD.
Started on: April 2018
PS-05PS-05 is an DIY Programmable DC power supply that can provide 2-24VDC with max 5A of current. Imagine to have a bluetooth box that can erogate what do you want and how you want just with an App, and in the meanwhile take statistics on the load applied.
This project is inspired by this product.
Started on: June 2018
10Bit ADCGet 10-bit ADC resolution out of your 8-bit device. This feature works for oscilloscopes based on Cypress FX2 chipset (like Hantek 6022). Rate up to 125KSa/s, design specifically for the Automotive Module.
Started on: May 2018
Terminated on: Sep 2018
Available on Settings (Experimental)
This App is an unofficial software, not related to the original Vendor software. Processing and analytical code, and firmware components has been specifically created for this software. The author of this App decline any responsibility regarding computational errors or any other error or device damages that may results from the usage of this software or the methods described in this guide.