Coder Social home page Coder Social logo

parezj / embo Goto Github PK

View Code? Open in Web Editor NEW
130.0 11.0 32.0 680.28 MB

EMBO - Scope for only $6. Embedded instruments: Oscilloscope, Logic Analyzer, Voltmeter, Counter, PWM and Signal Generator on STM32 MCUs (F1, F3, L4, G4 ....). PC app for Windows, Ubuntu and macOS. Firmware is in C, PC GUI app is in C++ Qt 5.

Home Page: https://embo.jakubparez.com

License: MIT License

Python 0.04% C 95.78% Assembly 0.28% C++ 3.86% GAP 0.01% QMake 0.02% CSS 0.01% Batchfile 0.01%
embedded oscilloscope stm32 voltmeter counter qt embo st stm32f103 bluepill-board

embo's Introduction

EMBO     

EMBO - EMBedded Oscilloscope

Download HERE

EMBO consists of 3 primary devices (oscilloscope, logic analyzer, voltmeter) and 3 secondary devices (counter, PWM and signal generator). The multiplatform PC application can be run on Windows, Linux and macOS operating systems. Stable firmware is available for STM32 series F1, F3 and L4 in HEX format, other series L0 and G0 are currently supported experimentally. The EMBO oscilloscope is intended to serve as a cheap and accessible tool for all electronics enthusiasts.

This work was created as part of my master thesis at FEE CTU in Prague (Department of Measurement) under the supervision of doc. Fischer and with the help of Ing. Hladík from STMicroelectronics. I would like to thank them for perfect support. Whole EMBO is published under the MIT license.

Supported MCUs:

  • STM32F103C8
  • STM32F103RE
  • STM32F303RE
  • STM32L412KB

More yet to come... (L0, G0, G4, F4)

  1. Parameters
  2. Connection
  3. Pinout
  4. PC App Description
  5. PC App Class Diagram
  6. FW Block Diagram
  7. Used IP

1. Parameters

EMBO params 1
EMBO params 2

* SCOPE - Oscilloscope, LA - Logic Analyzer, VM - Voltmeter, CNTR - Counter, PWM - PWM Generator, SGEN - Signal Generator, DAQ - total memory for SCOPE or LA

2. Connection

EMBO comm

3. Pinout

STM32F103C8 (Blue Pill)

EMBO pinout bluepill

STM32F303RE (Nucleo-64)

EMBO pinout F303

4. PC App Description

Main Window

After starting the PC application, the user gets to the main window with the selection of individual devices. On the left is a list of available ports (in the case of Windows OS these are COM ports, in the case of a UNIX-like system these are tty ports. The user selects the port and connects to the oscilloscope. The three panels on the right are displayed. about the microcontroller and firmware, in the middle panel there are primary devices and their parameters and in the bottom panel secondary devices are available.

EMBO main2

The bottom bar (status bar) contains information about the current session, which is ideally updated with a period of 10 ms. Latency indicates the response time of the oscilloscope and Uptime indicates the time since power-up. If the communication is busy (the oscilloscope sends a lot of data), the latency can increase up to hundreds of ms when using UART (ST-LINK).

Description of device parameters:

  • Fs — sampling frequency in samples per second
  • Mem — memory depth in samples
  • Bits — resolution in bits
  • Mode — device mode (4ch 4ADC = 4 channels per 4 ADC)
  • Port — assignment of microcontroller ports to device channels (C0 = PC0)
  • Max freq — maximum frequency of input or output signal

Oscilloscope

The oscilloscope is a key device of the whole system. The oscilloscope window is divided into two main blocks. In the left block there is an interactive graph, under which lie measuring elements and cursor controls. The most important controls are concentrated in the right blocks. Auxiliary and additional functions are controlled from the top menu. The lower part of the screen is set aside for the status bar.

EMBO scope

Description of control panels:

  • Main panel — located at the top right, basic modes (Run, Stop, Single)
  • Trigger — trigger settings
  • Horizontal — time base setting, resp. sampling frequency and memory
  • Vertical — channel settings and their gain and shift
  • Utils — additional functions (averaging, resolution, FFT)
  • Cursors — control of cursors
  • Measure — indicators of measured parameters

Main panel

As with most oscilloscopes, EMBO has 3 main modes: Run, Stop and Single. The implementation of these modes is inspired by desktop digital oscilloscopes (Agilent, Tektronix). Run mode is the primary mode with continuous data acquisition. Stop mode is used to stop acquisition and signal analysis. The special Single mode is used to capture a single event. Furthermore, in this panel, the user has the option to reset the zoom or the entire device.

Trigger

The trigger setting is also inspired by desktop devices. The default is always Auto mode, which combines the functionality of Normal mode with a timeout that allows you to see the signal in all cases. There is also an adjustable Slope, Channel, Level and pre-trigger. In Normal and Single mode, the user has the option to force a trigger, which serves as a quick preview. The indicator LED named Trig´d lights up green if the trigger was successful (flashes with each new message).

Horizontal

Horizontal parameters can be set in 2 modes. In manual mode, the user sets the sampling frequency (Fs) and memory depth per channel (Mem). In automatic mode, these 2 parameters are optimized based on the total length of the displayed signal (Width). This approach was chosen because the classic grid and settings (second / division) do not make sense here, because the graph is interactive and the user can freely zoom and move with it. Below are 2 important pieces of information. Real sampling frequency (Real Fs) with an accuracy of 6 orders of magnitude is required for sampling at the equivalent time and subsequent frequency recalculation. The maximum permissible impedance of the source signal is described in detail in the chapter.

Vertical

Vertical adjustment allows you to turn on individual channels, adjust their gain and offset.

Utils, Cursors and Measure

Averaging is suitable for smoothing the interfered signal. Optional 8-bit mode speeds up data transfer at the expense of reduced resolution, and FFT turns on spectral analysis mode. Cursors are used to measure the signal in both axes and the measured parameters (Measure) represent the basic information about the signal.

Description of the top menu:

  • Export — export data in CSV, TXT format or as a screenshot
  • Plot — graph display and interpolation settings
  • Measure — setting of measured parameters
  • FFT — melting of FFT spectral analysis
  • Math — control of special modes (difference, XY)

Logic Analyzer

The logic analyzer provides additional oscilloscope functionality for fast digital signals. Like the oscilloscope, the instrument is divided into two main blocks. In the left block there is an interactive graph that dynamically displays the appropriate number of channels, unlike the oscilloscope but below it. In the right blocks are the main controls coming from the oscilloscope. Additional functions are controlled again from the top menu. The lower part of the screen is set aside for the status bar.

EMBO la

Most controls share the same functionality and design with the oscilloscope. The difference is with the trigger, where the trigger level is missing, on the contrary, the possibility to trigger on both edges (Both) has been added. Furthermore, the vertical gain and offset are missing because they do not make sense for the logic analyzer. Similarly, averaging mode, bit resolution, and FFT are also missing.

Description of control panels:

  • Main panel — located at the top right, basic modes (Run, Stop, Single)
  • Trigger — trigger settings
  • Horizontal — time base setting, resp. sampling frequency and memory
  • Vertical — selection of displayed channels
  • Utils — cursor control, data analysis (to be added later)

Voltmeter

The voltmeter is the last primary instrument of the EMBO oscilloscope. Its window is again divided into two main blocks. In the left block there is an interactive graph, under which the measured parameters and the cursor driver are displayed. In the right block there are 4 channel panels below them and below them is the main control panel (Settings).

EMBO vm

Description of adjustable parameters:

  • Scale — a constant by which the channel voltage is multiplied
  • Average — number of averaged values (1 means off)
  • Plot Points — the number of displayed points in the graph

The sampling frequency is fixed at 100 Sps. This is twice the frequency of the mains voltage. When averaging mode is off, the NPLC (Number of Power Line Cycles) value is 0.5. If we increase this value (by increasing the Average value), we will significantly suppress the induced 50 Hz noise. The higher the value of Average, resp. NPLC, the slower the voltmeter measures and the more noise is suppressed. The Average mode therefore increases the accuracy of constant signal measurements.

In addition to the main settings, you can use additional options from the top menu, which is similar to the oscilloscope. In addition to standard settings, such as interpolation or setting of measured parameters, for example, continuous recording to a file (CSV or TXT) can be switched on. The recorded signal will have a sampling frequency of 100 Sps.

Counter

The counter is a simple secondary device that can be operated in parallel with other devices. Slow mode (for signals up to approx. 1 MHz) and Fast mode (for signals from approx. 1 MHz) can be set. For slow signals, the measurement takes longer. If no signal is detected within 2 seconds, a timeout occurs. When used with an oscilloscope or logic analyzer at the maximum sampling frequency, DMA overload and sample dropping may occur.

EMBO cntr

PWM Generator

The PWM signal generator exists with either 1 or 2 channels. In the case of 2 channels, it is a synchronous generator that can be used to control motors or to simulate signals from a quadrature encoder. The frequency is set the same for both channels. You can also set the shift separately for the channel and the offset of the second channel. Again, it should be emphasized that at high values of the sampling frequency of the oscilloscope, the measured signal may be adversely affected.

EMBO pwm

Signal Generator

The signal generator is a secondary optional device that uses a 12-bit DAC. It is only available for those microcontrollers that have a DAC, such as the F303RE. The user can set the frequency, amplitude and offset. At high frequencies, the size of the output buffer is dynamically reduced, ie the samples per period (Size), so that the DAC manages to generate. The real frequency of the generated signal and the magnitude of the amplitude in millivolts are also shown. In Constant mode, the generator acts as a voltage source.

EMBO sgen

Operation modes:

  • Constant
  • Sine
  • Triangle
  • Sawtooth
  • Square
  • Noise

5. PC App Class Diagram

EMBO PC class diagram

6. FW Block Diagram

EMBO fw block diagram

7. Used IP

embo's People

Contributors

parezj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

embo's Issues

Still making updates and tweaking?

Thanks so much for making it available.

I am assembling and improving the hardware for my use.

I have a very basic understanding of microcontroller programming and windows software but it might need some minor changes.

Perhaps the possibility of using STM32F411.

make this to be a product

hi,
your project is elegant, would you like to make this to be a product for education, if you want, maybe I can help, I am a hardware enginner for many years ^_^

Great project - thank you

Hi Jakub, I have no issue but just wanted to congratulate you on this great project.

I flashed the .bin file in a "BluePill", downloaded the zip file and extracted the Windows EMBO front end, clicked on Scan, selected the COM port, clicked Connect and everything works fine. So easy.
The available instruments are very useful and the GUI looks very professional.

I do have a question, will the the F303RE bin file work on a F303RC ?
I am thinking of buying this Olimex board:
https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32F3/open-source-hardware

And also a remark, maybe you could use the built-in green LED to like flash every x time, instead of just ON when connected.
I am thinking something really basic like in the main loop if(!ledflash--) toggle_led(); ledflash = x;
This way it could tell the user that it is connected and active/doing something.
Only ON can also mean the STM32 pin is pulled to GND (in the BluePill).
This is surely not a must, as I said everything works fine just like it is and this is a great project.
I wish you all the best.
Janjos

EMBO build on Linux

Hi,

I am having some troubles with building EMBO on Linux Ubuntu 22. My steps are following:

git clone https://github.com/parezj/EMBO.git embo-git
then I create an empty directory embo-build and execute following command:
qmake ../embo-git/src/software/EMBO/EMBO.pro
this creates a Makefile and after executing make I get following error:

/usr/bin/ld: cannot find /home/michal/Michal/apps/embo/embo-git/src/software/EMBO/lib/ubuntu_18/libfftw3.a: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:276: ../embo-git/src/software/EMBO/build/linux/release/EMBO] Error 1

The required file libfftw3.a is indeed not present in any EMBO directory.

This confuses me a bit since I do not even use Ubuntu 18 but Ubuntu 22.4. I know there are some binaries available to download however I would like to compile the app from source mysefl. Any advices?

Thanks.

Wrong Trigger level when channel scale is in use

I dont wnow if this is a active project, but anyway
Im using channel scale on the oscilloscope, but trigger level is not scalled, if I use a scale = 10 and want to trigger at 2v, I have to set the trigger to 0.2v to work properly.

Saludos

Sigrok support?

Ahoj,
i've noticed your upcoming talk on Installfest conference in Prague.
Projects like these are always interresting to me, but there is one thing i miss.
I think you should really add support for your devices into sigrok opensource project https://sigrok.org/

There seem to be quite some overlap with your efforts, but sigrok supports lot of different hardware, Oscilloscope, Logic Analyzer, Voltmeter, Counter, Power supplies and much more:

https://sigrok.org/wiki/Supported_hardware

It might be interresting if you join the efforts, create sigrok plugin which will enable libsigrok to work with EMBO and perhaps on the other hand you can use libsigrok as hardware abstraction layer in your GUI applications. That way you will be able to use nice sigrok features, protocol decoders and GUIs (like pulseview analyzer/scope UI https://sigrok.org/wiki/PulseView ) and also this will enable to use different scope/analyzer devices with your own GUI...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.