$10 O-Scope revisited

What are you developing?
mausi_mick
Posts: 129
Joined: Fri Aug 12, 2016 1:40 pm

Re: $10 O-Scope revisited

Postby mausi_mick » Fri Feb 24, 2017 1:22 pm

the noise, yes, by small signals.

but I think a Scope is more for the signal form etc, not for the accuracy ( if the amplitude is 2.5V or 2.516 V) .

User avatar
mrburnette
Posts: 1779
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: $10 O-Scope revisited

Postby mrburnette » Sat Feb 25, 2017 3:42 pm

mausi_mick wrote:the noise, yes, by small signals.

but I think a Scope is more for the signal form etc, not for the accuracy ( if the amplitude is 2.5V or 2.516 V) .



Yes, in the "old days", scopes were analog and had a 1V p-p internal reference so the user could calibrate/verify the probe and front-end with each use ... tubes drifted during warm-up and aging. Todays 'smart digital' scopes provide an ultimate high and do everything with on-screen markers. But, the value in just observing the waveform, the rise/fall times, and other physical properties is the greatest value of the instrument.

Ray

willfly1
Posts: 17
Joined: Wed Jan 04, 2017 5:13 pm
Location: GTA, Canada

Re: $10 O-Scope revisited

Postby willfly1 » Sun Feb 26, 2017 5:29 pm

I intended to replace the stock firmware on DSO-138 oscope which is based on STM32F103 with analog front end. Did some work over the holidays, but finally got the chance to clean it up and publish. Key areas for improvement were - get the waveform data from serial port and add a second channel (digital and analog)

My original development was on Bluepill, so the codebase can be adapted to work with generic F103 boards.

I will start another thread for that.

pic2.png
pic2.png (164.74 KiB) Viewed 340 times

User avatar
ThunderOwl
Posts: 128
Joined: Fri Oct 28, 2016 6:04 am
Location: Riga, Latvia
Contact:

Re: $10 O-Scope revisited

Postby ThunderOwl » Sun Feb 26, 2017 6:18 pm

Very interesting, willfly1 !
In every man's childhood, first 40 years are the hardest

User avatar
rexnanet
Posts: 189
Joined: Wed Mar 16, 2016 10:34 am

Re: $10 O-Scope revisited

Postby rexnanet » Mon Feb 27, 2017 9:16 am

willfly1 wrote:My original development was on Bluepill, so the codebase can be adapted to work with generic F103 boards.

I will start another thread for that.


Very interesting indeed willfly1 :)
It's very clean and looks great.
Please add the link here later.

But this version uses a parallel display right?

mausi_mick
Posts: 129
Joined: Fri Aug 12, 2016 1:40 pm

Re: $10 O-Scope revisited

Postby mausi_mick » Mon Feb 27, 2017 9:57 am

super !
and the SW is very good structured !

I tried to change it to maple mini and to the SPI-TFT-Display ILI9341:

STM32-O-Scope_DSO-138.JPG
STM32-O-Scope_DSO-138.JPG (51.33 KiB) Viewed 301 times


But I have only changed at this time the Display-Pins ( CS,RST,DC,CLK) and the pins from the encoder.

To move the ADC Inputs (PA0 , PA4) is for me difficult or impossible , because their is something written in assembler.

But I think I have to take an second STM32F103 ...

willfly1
Posts: 17
Joined: Wed Jan 04, 2017 5:13 pm
Location: GTA, Canada

Re: $10 O-Scope revisited

Postby willfly1 » Mon Feb 27, 2017 2:17 pm

rexnanet wrote:Please add the link here later.
But this version uses a parallel display right?


I started another topic for DLO138 at viewtopic.php?f=19&t=1847.
This version of software uses 8 bit parallel display.

willfly1
Posts: 17
Joined: Wed Jan 04, 2017 5:13 pm
Location: GTA, Canada

Re: $10 O-Scope revisited

Postby willfly1 » Mon Feb 27, 2017 2:20 pm

mausi_mick wrote:super !
and the SW is very good structured !

I tried to change it to maple mini and to the SPI-TFT-Display ILI9341:

STM32-O-Scope_DSO-138.JPG

But I have only changed at this time the Display-Pins ( CS,RST,DC,CLK) and the pins from the encoder.

To move the ADC Inputs (PA0 , PA4) is for me difficult or impossible , because their is something written in assembler.

But I think I have to take an second STM32F103 ...


Thanks. The ADC channels can be configured in global.h and not in assembly. Logic channels however are bound to GPIOA and bit mask has to be changed in code.

User avatar
rexnanet
Posts: 189
Joined: Wed Mar 16, 2016 10:34 am

Re: $10 O-Scope revisited

Postby rexnanet » Mon Feb 27, 2017 2:44 pm

mausi_mick wrote:super !
and the SW is very good structured !

I tried to change it to maple mini and to the SPI-TFT-Display ILI9341:

But I have only changed at this time the Display-Pins ( CS,RST,DC,CLK) and the pins from the encoder.

To move the ADC Inputs (PA0 , PA4) is for me difficult or impossible , because their is something written in assembler.

But I think I have to take an second STM32F103 ...


Do you have a video or can you make one of this working with the ILI9341?
Thanks :)

mausi_mick
Posts: 129
Joined: Fri Aug 12, 2016 1:40 pm

Re: $10 O-Scope revisited

Postby mausi_mick » Tue Feb 28, 2017 12:35 pm

hi rexnanet,

I had a some problems to make the program stable, I have to change a lot of pins, and some pins must be pwm-Pins.

Now I have PA4 free for SPI and the analog Inputs are on PA0 and PB0.

It's not much work,
- delete complete src lib in the download DLO-138
- change the libs in Adafruit... in DLO-138.ino and insert <SPI.h>
- change in display.ino :
Adafruit_ILI9341_STM tft = Adafruit_ILI9341_STM(TFT_CS, TFT_DC, TFT_RST); // Using hardware SPI
//Adafruit_TFTLCD_8bit_STM32 tft;
- delete their tft.reset() and change tft.begin(0x9341) to tft.begin
- change the global.h (different maple/blue-pill)

here my maple-global h:

Code: Select all

// comment out following line to use DSO push buttons instead of encoder
#define USE_ENCODER

// serial print macros
#define DBG_INIT(...)       { Serial.begin(__VA_ARGS__);    }
#define DBG_PRINT(...)       { Serial.print(__VA_ARGS__);    }
#define DBG_PRINTLN(...)    { Serial.println(__VA_ARGS__); }

#define SERIAL_BAUD_RATE   115200

// analog and digital samples storage depth
#define NUM_SAMPLES    2048   

  //    TFT_SCK       PA5   // D6  #####     
  //    TFT_MOSI      PA7   // D4  #####     
#define TFT_CS        PA4   // D7  ##### PA14  // PA14 D21
#define TFT_DC        PA15  // D20 #####
#define TFT_RST       112   // 112 ##### //PA13    // 3.3V
// display colours
#define AN_SIGNAL1       ILI9341_YELLOW
#define AN_SIGNAL2       ILI9341_MAGENTA
#define DG_SIGNAL1       ILI9341_RED
#define DG_SIGNAL2       ILI9341_BLUE

// pin definitions (DSO138)
#define BOARD_LED       PC13  // D14 ##### PA15
#define TEST_WAVE_PIN PA9   // D26 ##### PA7 D4  // PWM 1KHz square wave output
#define TRIGGER_IN      PA8
#define TRIGGER_LEVEL   PB8
#define VGEN             PA10  // D25 ###### PB9      // used to generate negative voltage in DSO138

// captured inputs
#define AN_CH1          PA0      // D11 analog channel 1
#define AN_CH2          PB0   // D3 ###### //PA4=D7      // analog channel 2
#define DG_CH1          PA13   // digital channel 1 - 5V tolerant pin. Pin mask throughout code has to match digital pin
#define DG_CH2          PA14   // digital channel 2 - 5V tolerant pin. Pin mask throughout code has to match digital pin

// misc analog inputs
#define VSENSSEL1    PA2
#define VSENSSEL2      PA1
#define CPLSEL         PA3

// switches
#define ENCODER_A     PB3   // D19 ##### // PB13  //##################################
#define ENCODER_B     PB4   // D18 ##### // PB14  //##################################
#define ENCODER_SW    PB5   // D17 ##### // PB12   //##################################
#define BTN4          PB6   // D16 ##### // PB15
/*
// switches
#define ENCODER_SW      PB12
#define ENCODER_A      PB13
#define ENCODER_B      PB14
#define BTN4          PB15
*/
// TFT pins are hard coded in Adafruit_TFTLCD_8bit_STM32.h file
// TFT_RD         PB10
// TFT_WR         PC15
// TFT_RS         PC14
// TFT_CS         PC13
// TFT_RST        PB11

// FLASH memory address defines
#define PARAM_PREAMBLE   0
#define PARAM_TIMEBASE   1
#define PARAM_TRIGTYPE   2
#define PARAM_TRIGDIR   3
#define PARAM_XCURSOR   4
#define PARAM_YCURSOR   5   // 5,6,7,8 - 4 params
#define PARAM_WAVES      9   // 9,10,11,12 - 4 params
#define PARAM_TLEVEL   13
#define PARAM_STATS      14
#define PARAM_ZERO1      15
#define PARAM_ZERO2      16

#define LED_ON   digitalWrite(BOARD_LED, LOW)
#define LED_OFF   digitalWrite(BOARD_LED, HIGH)

// number of pixels waveform moves left/right or up/down
#define XCURSOR_STEP   25
#define YCURSOR_STEP   5


#define BTN_DEBOUNCE_TIME   350



and a picture from square-wave on A2:

STM32-O-Scope_DSO-138_02.JPG
STM32-O-Scope_DSO-138_02.JPG (55.72 KiB) Viewed 244 times



the video on youtube is coming soon ...


Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest