Git Product home page Git Product logo

dlo-138's Introduction

DLO-138

An open source firmware for DSO-138 Oscilloscope. Photo

DSO-138 is an excellent piece of hardware based on ARM Cortex M3 core STM32F103 processor and sufficient for most beginner users. The stock firmware, while quite responsive, can use a few improvements. The main shortcoming which prompted the development of DLO-138 firmware is the inability to get waveform data into a computer for further analysis and the lack of a second channel. Engineers troubleshooting hardware issues need to mark reference points on waveform so having another analog or digital channel can greatly improve analysis. This firmware hopes to improve on these issues.

Features

  • Two analog channels
  • Two digital logic channels (SWDIO and SWDIO pins (PA13 and PA14) on board)
  • Serial port interface for captured waveform data
  • Trigger source selectable from Analog Channel 1 or Digital Channel
  • Option to use rotary encoder instead of + - and SEL switches
  • 2K sample depth

This firmware can be used on stock DSO-138 hardware as well. Select one of the pre-compiled binaries to suit the board. Follow the firmware upgrade instructions for DSO-138. At any time, you can reflash DSO-138 with JYE Tech provided firmware.

Cost

Extra features come at an additional cost. In the case of DLO-138, it is the loss of lowest timebase. Maximum sampling rate in DLO-138 is 20 µs/div instead of 10 µs/div. In the 20 µs/div range, firmware under-samples ADC channels, often reading same data twice. To use the second analog channel, analog front end has to be duplicated on a daughter board. On a stock hardware, this firmware can be used to provide two digital logic channels.

Build

The build environment uses Arduino. For help with setting up IDE visit http://www.stm32duino.com

For graphics output, this project depends on the Adafruit GFX Library v1.1.4. Install it via the Library Manager of your Arduino IDE. Other/newer versions of this library are likely to not compile or will give you a black screen.

Hardware

Following changes can be applied selectively, to get maximum functionality from board. The firmware can be run on unmodified hardware as well. Mod Schematic

Usage:

Push button in encoder (SEL if using switches) moves focus to next parameter
Left/Right turn in encoder (+/- if using switches) changes the parameter which is in focus
Short press OK to HOLD the waveform and output it on serial port
Long press OK button:

	Focus				Action
	Trigger Level		Zero the trigger level to Analog channel 1
	Wave X scrollbar	Center waveform on screen (at trigger point)
	Wave Y cursor		Zero the cursor. If Analog CH1 coupling is GND, waveform reference base is set 
	Other				Toggle on screen Analog CH1 statistics display

Press and hold OK button at power up to reset settings to default

Flash binaries directly via serial interface

When using Windows you can follow the guide from jyetech: https://jyetech.com/wp-content/uploads/2018/07/dso138-firmware-upgrade.pdf

The guide uses the graphical programming tool provided by ST: https://www.st.com/en/development-tools/flasher-stm32.html


When using Linux, you can use the open source command line tool stm32flash:

Install stm32flash:

sudo apt-get install stm32flash

Connect your TTL-UART-to-USB converter to the DSO138 and bridge jumpers J1 and J2 on the back of the PCB just like in the above manual.

Unlock the flash of the STM32:

sudo stm32flash /dev/ttyUSB0 -k -b 115200

sudo stm32flash /dev/ttyUSB0 -u -b 115200

Flash new firmware:

sudo stm32flash /dev/ttyUSB0 -w binaries/DLO-138_switches_1.0.bin -b 115200

Remove the solder bridges on J1 and J2 and enjoy the alternative firmware on your DSO138.

References

DSO-138 - http://www.jyetech.com/Products/LcdScope/e138.php

STM32Duino - http://www.stm32duino.com

STM32F103 - http://www.st.com/en/microcontrollers/stm32f103.html

Adafruint Graphics Library - https://github.com/adafruit/Adafruit-GFX-Library

Parallel 8 bit ILI9341 library - https://github.com/stevstrong/Adafruit_TFTLCD_8bit_STM32

dlo-138's People

Contributors

acidbourbon avatar ardyesp avatar avixk 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  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

dlo-138's Issues

Serial Logger freezes?

Hi and thank you for this beautiful piece of software :).

I've got a question: When I connect the DSO via UART with my computer and reading the measurements (by pressing SW4 / OK), some data is transmitted and then it stops. until I re-press the button.

Is this a bug or a feature 😛 ? Or is this caused by limitations by the CPU?

Trigger (NORM, SINGLE) doesn't work

HW: brand new DSO138 (most probably not original, but clone. based on assembly manual, it's a Rev.05, 13803k-13804k version). Without "trigger switch" modification, with encoder mod.
SW: DLO-138_encoder_1.0.bin, DLO-138_switches_1.0.bin, also compiled latest from sources.

Problem:
Neither trigger-LED, nor trigger event don't work.
When switching to NORM or SING mode, the "sampling..." message appears on screen, but never gets triggered.

When flashed stock firmware back, everything works as expected (LED flashes and trigger events happen).

Blank screen (lii9325)

Hi. I have a white screen issue. "afio_cfg_debug_ports(AFIO_DEBUG_NONE)" and "disableDebugPorts()" don't help. But the factory firmware works fine.
Also, the serial port works fine, so the problem is definitely with the display.
I tried to build the firmware from the sources, as well as precompiled binaries from the repository.
Perhaps some hardware modification is needed?

"Warning: register range not in ascending order" during compilation

Hi, is it assembler code problem in "capture.ino" file or should I ignore these warnings?
Arduino 1.8.5 and Arduino SAM Boards (32-bits ARM Cortex-M3) 1.6.11.

C:\Users\mr-x\AppData\Local\Temp\ccEP3Imt.s: Assembler messages:

C:\Users\mr-x\AppData\Local\Temp\ccEP3Imt.s:464: Warning: register range not in ascending order

C:\Users\mr-x\AppData\Local\Temp\ccEP3Imt.s:464: Warning: register range not in ascending order

C:\Users\mr-x\AppData\Local\Temp\ccEP3Imt.s:464: Warning: register range not in ascending order
....
....

Please create some installation manual

First time flashing it's hard to guess what to do, and how to wire programmer.
Can you please reference official PDF https://jyetech.com/Products/LcdScope/DSO138_oscilloscope_upgrade.pdf

and mention that you can use firmware from your binaries folder instead of ofiicial firmware using official uploader.

Thank you!

Short usage guide

Hi, the software flashing is flawless, thank you :)
Can you provide a guide for the dual analog probing and reading data from usb?
Thank you

Blank screen after flashing code compiled in IDE

Using Arduino IDE 1.8.5 with the necessary libraries installed: and having git-cloned your code, I tried to flash the board (I had the Generic STM32F10C Series board selected in tools menu) from the IDE but it kept complaining that it couldn't find the DFU and despite playing with some settings I couldn't get this to work (it would have been very helpful if you had detailed in the readme, which board / CPU speed etc to select to get this working).

To get around this issue, I used the sketch menu to export the compiled code and then flashed it the usual way with the ST flash loader. This appeared to work ok to the point that the file transferred and verified ok, but when powering on after the flash (with the JP1+2 jumpers removed) I just get a blank screen and nothing else. The only code I have altered is to comment out the encoder part in Global.h as per the instruction.

If I flash your pre-compiled binary, that works fine, but I was hoping that once I confirmed that the uncompiled code worked, I could make a couple of minor changes (mainly to add a bit of text to the boot screen) and flash my modified version. I noticed that your binaries are 34k in size but for some reason my compiled binary is 45k - two forward slashes don't use 11k so I have no idea what's going on here??

Some help and clarification on these issues would be greatly appreciated.

[Arduino 1.8.5|1.8.19] Which Arduino SAM version to install?

Frustratingly, I tried flashing both the precompiled binary and also compiled variants based on #6 (comment) ; I tried with Arduino 1.8.19, and also 1.8.5, following instructions from:
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation
https://jyetech.com/wp-content/uploads/2018/07/dso138-firmware-upgrade.pdf

All compile fine, only get warning about low memory. All give me white screen. I can flash stock firmwares from Jyetech just fine. I have installed SAM 1.6.12 which seems circa same time as release of the project. I can't think what else it might be causing it.

terrible button navigation

after hold to get back to run require at least 5 press to have a chance to exit idk if its hardware or software issue
next one i know is software issue
long pressing the plus and minus button cant scroll through the waveform automaticly so i have to click click click like 30 times to scroll from right to left
i know the firmware is intended for encoders but that would require another case which i dont have time to design now

Add two channel XY function

I can't tell that this has any XY 2 channel function is it possible to add an XY function to use this as a vectorscope?

DSO-150 not supported

Well, not so much an issue, more like a fact ;-)

Just got myself a DSO-150 which seems to be the successor to the DSO-138 and though "Wouldn't it be nice if it would be open source so I could add some features..." and found your project.

Hardware looks very similar with some advancements like:

  • Integrated Rotary Encoder (And still 4 switches)
  • Analog board separated from digital board
  • more range selectors on the analog frontend
  • Separate analog frontons for different input ranges
  • External eprom (Not sure why they needed that...)
  • Spare Header with 6 digital I/O's
  • Dual amplitude test signal (0.1/3.3V used for dual fronted calibration...)
  • No USB connector :-(

Your project already covers 80% so I'll see if I can get the code working on the DSO-150 and add config options to global.h...
Unfortunately the pinout used for the STM32 seems to differ in some areas so I'll try to document that first...

If I can sort out Github and get the STM programmer going I should be able to make some progress. (Oh, and I need to crack open the DSO-150 again...Bummer...)

Michael

(Sorry for filing this as an issue, there improbably a clever way to send a message... somewhere...)

Timebase seems wrong

On DLO-138_switches_1.0.bin from 26 Feb 2017:
When the indication is 10 ms/div it is actually 5 ms/div.
So a pulse with duration 10 ms shall be displayed in a single section.
When I supply 50 Hz to the input of the oscilloscope at 10 ms I shall see 6 periods (12 section* 10 ms = 120 ms= 6 periods).
Instead, I see 3 periods only.

For example: https://github.com/ardyesp/DLO-138/raw/master/pics/pic4.png (probably made on another version of the software) shows 2 ms per division chosen, and about 1 period of 60 Hz visualized, but with the aforementioned version I see about half a period at 50 Hz.

Also, when a waveform is sent over UART, the value of „Per Sample (us):“ and „Timebase: 10 mS/div“ seem wrong, the Time column- too.
dlo138 bug timebase

Download compiled binary

Can someone give me a compiled download? I compiled mine with no errors, flashed it but there is only a white screen. I've downgraded the library like it is mentioned in the manual.

Flashing the stock firmware install without problems 🤷🏻‍♂️

Compatibility to STM32F303

Hi,

I am really interested in the DSO138, but i would like to be able to sample at higher frequencies.
AFAIK the DSO138 can be used up to a frequency of 200KHZ. However The DS212 uses an STM32F303 instead of an STM32F103 and it can be used up to 1MHZ.

Since both MCUs are pin compatible, i thought about getting an DSO138 and replacing the STM32F103 MCU with an STM32F303. So my question is, whether you know anything about firmware compatibility.

Also i would like to use both ADCs interleaved for the same channel, to improve the sampling rate.

I approeciate any hints or further information.

UART settings when transmitting

Hi, I have not found in the documentation the setting which the board uses when transmitting the samples over UART (baudrate, parity and so on), are they written anywhere?

After firmware flash the voltage is not correct anymore

Hi,

I flashed the firmware on my DSO-138 and now the voltage shown is not correct anymore. On the onboard testsignal it shows Vmax 1.50 and Vmin 0.5. I would expect 3.3 and 0 there. Frequency shown is correct. Any ideas? The firmware looks much better than the original one.

DSO-138 main board PN: 109-13800-00C

Thanks, Nils

Id 0x9595

Hello ! Sorry for my bad English. Please, help. I have a display with a HX8347-l chip, and I want to use it on a DSO-138 board. Could you add it to the project DLO-138?

DSO138mini compatibility?

It is not an issue, but a question: is the firmware compatible with DSO138mini ?

If not, do you have an idea, what differs DSO138mini from DSO138? (from firmware development perspective)

compiling with arduino IDE 1.8

I tried to compile your really great very educational project but I get the following errors

Global variables use 19304 bytes of dynamic memory.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Generic STM32F103C series.

c:/users/goodness/appdata/local/arduino15/packages/stm32/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 13056 bytes

collect2.exe: error: ld returned 1 exit status

please advise
regards

Lower than ~8V supply voltage causes malfunction (like a noise as a small sine wave)

Hi ardyesp. first of all Thanks a lot for this firmware
As I said, I confronted this issue, I assumed it should be a problem with negative voltage rail because that's the only part of voltage regulation which is controlled by STM32.
By reading the DSO138 manual. I saw VGEN should be around 0.8V . I measured mine it was ~0.64V ( On official firmware it was 0.83V and there was no problem).
So in "io.ino " line 48: pwmWrite(VGEN, 700); I changed PWM value To 900. problem solved and VGEN is now 0.83V.

Sampling over time

First, great work!

How hard would it be to have a function that will save samples over a time period of minutes/seconds
Today, the sample has to be executed by the two button press.

Not really an issue but more of a feature request.

STFM board selection for DSO-138

Can you give instructions how to set the uploading parameters for the DSO-138 default bootloader?

Should I solder the jumpers 1 and 2 or not?

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.