Spark Logic

$10 O-Scope revisited

Over the last few days I’ve been playing with Ray’s STM32STM32Микроконтроллеры и процессоры…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…[STM32GENERIC] F429i Discovery Oscilloscope idea.

Image

Some preliminary results are available here..

https://github.com/pingumacpenguin/STM3 … ontruction

My take on the Scope Sketch is here..

https://github.com/pingumacpenguin/STM32-O-Scope

Its a fun little project and well worth building just for the entertainment value. Currently bandwidth is a little limited, but with a little extra effort it would be possible to make a fully functional 2MHz Scope for next to nothing. Ideal for probing i2c, audio and other low speed signals.

EDIT: We managed to squeeze the maximum speed out of the ADC, read further through the thread for details. The github code includes all of the enhancements made of the course of this thread.

Replies20

Mon Feb 06, 2017 4:56 pm

I am searching for more-or-less direct replacement for MPC6S92, 91, 62, 61 – but from “Analog Devices”. And, I am not sure about my search results… Anyone competent maybe can tell me for sure, is there substitutes, produced by “Analog Devices”? If you ask – why? Well… there might be a thing about samples… (wink.. ;)

Tue Feb 07, 2017 8:55 am

rexnanet wrote:
It doesn’t have the 32 gain step ….

Tue Feb 07, 2017 9:56 am

Yes, I thought it was I2C but I checked and it’s a parallel bus with CS and CLK.
Not a big problem I think.

Have you tried the Microchip $ample program and it failed or didn’t tried it yet?
All you have to have is a “non generic” mail address.

Tue Feb 07, 2017 10:22 am

Right now they (Microchip) are not sending to Latvia at all. I have gotten samples from them in past, but right now Latvia is off the list (it may change time to time). But I have successfully ordered samples from AD and STM last year. That is why I was wondering about AD substitute. In case of MCP6S61MCP6S61Аналоговые, логические и силовые компоненты…om AD and STM last year. That is why I was wondering about AD substitute. In case of MCP6S61 it is not a tragedy anyway, it costs under 2 euros on local official chain here, alrea…$10 O-Scope revisited it is not a tragedy anyway, it costs under 2 euros on local official chain here, already got one for tests.

Wed Feb 08, 2017 4:10 pm

rexnanet wrote:Soooooo,
As announced before… here is a preliminary version of my approach of the STM32STM32Микроконтроллеры и процессоры…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…[STM32GENERIC] F429i Discovery -O-scope.

Wed Feb 08, 2017 4:44 pm

Hummm, so the onboard led is flashing? Means that trigger is OK.

Are you sure that SPI pins are the same?
I’ve changed those from the original ones, not sure if mausi_mick also uses this configuration… my guess is no.
They are all the same but the order is changed… :)

Wed Feb 08, 2017 4:50 pm

I really not seeing differences…. Unless you used SPI 2 ? OR… now SPI1 is actually 2 ?
———————-Original:—————————-
// Additional display specific signals (i.e. non SPI) for STM32F103C8T6STM32F103C8T6Микроконтроллеры и процессоры…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…Cannot make OLED display to work with hardware I2C in Adafruit_SSD1306 library (Wire colour)

#define TFT_DC      PA0      //   (Green) 
#define TFT_CS      PA1      //   (Orange) 
#define TFT_RST     PA2      //   (Yellow)

// Hardware SPI1 on the STM32F103C8T6STM32F103C8T6Микроконтроллеры и процессоры…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…Cannot make OLED display to work with hardware I2C in Adafruit_SSD1306 library *ALSO* needs to be connected and pins are as follows.
// SPI1_NSS (PA4) (LQFP48 pin 14) (n.c.)
// SPI1_SCK (PA5) (LQFP48 pin 15) (Brown)
// SPI1_MOSO (PA6) (LQFP48 pin 16) (White)
// SPI1_MOSI (PA7) (LQFP48 pin 17) (Grey)
//

———————-Your INO:————————
// Hardware SPI1 on the STM32F103C8T6STM32F103C8T6Микроконтроллеры и процессоры…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…Cannot make OLED display to work with hardware I2C in Adafruit_SSD1306 library *ALSO* needs to be connected and pins are as follows.
variants/generic_STM32F103CSTM32F103CМикроконтроллеры и процессоры…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…Board loses program after boot /board/board.h:#define
BOARD_NR_SPI 2
BOARD_SPI1_NSS_PIN PA4
BOARD_SPI1_MOSI_PIN PA7
BOARD_SPI1_MISO_PIN PA6
BOARD_SPI1_SCK_PIN PA5

BOARD_SPI2_NSS_PIN PB12
BOARD_SPI2_MOSI_PIN PB15
BOARD_SPI2_MISO_PIN PB14
BOARD_SPI2_SCK_PIN PB13
*/

// Additional display specific signals (i.e. non SPI) for STM32F103C8T6STM32F103C8T6Микроконтроллеры и процессоры…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…Cannot make OLED display to work with hardware I2C in Adafruit_SSD1306 library (Wire colour)

#define TFT_DC      PA2//  PA0
#define TFT_CS      PA0 // PA1
#define TFT_RST     PA1//  PA2

Wed Feb 08, 2017 5:42 pm

#define TFT_DC PA0 
#define TFT_CS PA1 
#define TFT_RST PA2 

vs.

#define TFT_DC PA2
#define TFT_CS PA0
#define TFT_RST PA1

Look closely :)

Wed Feb 08, 2017 6:20 pm

rexnanet wrote:

Look closely :)

Wed Feb 08, 2017 6:28 pm

ThunderOwl wrote: (besides hypnotizing me, that is)?

Wed Feb 08, 2017 8:33 pm

… aaaand, sure enough, now it is working (Rexnanet 0.9). Tomorrow some pictures. Now too tired (I fought sight-stealing demons, after all.. )..
THANK YOU, Rexnanet.

Thu Feb 09, 2017 9:45 am

ThunderOwl wrote:… aaaand, sure enough, now it is working (Rexnanet 0.9). Tomorrow some pictures. Now too tired (I fought sight-stealing demons, after all.. )..
THANK YOU, Rexnanet.

Thu Feb 09, 2017 10:07 am

rexnanet wrote:
Yesterday I’ve been assembling the MCP6S92MCP6S92Аналоговые, логические и силовые компоненты…It would be great to replace the manual gain switches (and gain pins) with menus and MCP6S92 ’s Smile Might have a go on this Smile P.S. BTW is there a video with this setup/code?…DLO-138 OScope ’s on a tiny breadboard….

Thu Feb 09, 2017 10:26 am

Yes, usually doesn’t take longer than a week, if I recall.
But if you have one to test it’s great.

MCP6S61MCP6S61Аналоговые, логические и силовые компоненты…om AD and STM last year. That is why I was wondering about AD substitute. In case of MCP6S61 it is not a tragedy anyway, it costs under 2 euros on local official chain here, alrea…$10 O-Scope revisited doesn’t seem to exist :) Either MCP6S91MCP6S91Аналоговые, логические и силовые компоненты…0 or MAX??? to generate the -5V, so I can spare VGEN-Pin . But perhaps also with the MCP6S91 / 92. I have to test it separate with the SPI, if I can change the clock-divider tempo…DLO-138 OScope or MCP6S21MCP6S21Аналоговые, логические и силовые компоненты…pists) could adapt from that device: input stage with cheap programmable gain OpApm ( MCP6S21 ). Other opamp (any Rail-to-Rail) in that schematics is for moving displayed graphic…$10 O-Scope revisited :)

Thu Feb 09, 2017 11:05 am

Sorry, of course “21”. Still demons around, I guess. An, I am also guessing, that might be side effect of not drinking anything stronger than coffee for two years… :D Brain still needs to be messed up… :D

Thu Feb 09, 2017 4:11 pm

Here my GenericBlackBox-O-Scope progress, with “Rex” code loaded:
http://bildites.lv/a/684af4cb#4wns5ujq
(and some other show-offs – http://bildites.lv/users/ThunderJuris/albums , if bored, check Sharp TV re-make)
About this firmware of O-Scope – in my case, encoder manipulations are not very stable. I have resistors 10K from both encoder side-pins and switch pin – to +3V3. Btw, I initially had no resistor on switch pin, and that resulted encoder shaft being a sensor, and switching on touch (without that knob in pictures). Now switch is okay, but left-right is slightly with its own mind. Is that just my setup, or common problem?

Thu Feb 09, 2017 5:24 pm

WOW nice box :D

Yes, the encoder is not very responsive. Has a bit of a mind of it’s own.

My encoder has 10k resistors to +VCC and I added 100nF capacitors to GND. (tried 1uF but was even worse)

The problem is that on the falling edge there’s no noticeable noise but on the rising edge there’s lots of it.
I tried to jump that noise by ignoring the pulses during some 4ms. But even so there’s an erratic behavior.

Might have to make a test code and debug using some pins and the logic analyser…
Or try another approach…

Thu Feb 09, 2017 5:32 pm

i would say – steal some encoder parts from INOs left unguarded somewhere :)

Fri Feb 10, 2017 10:48 am

Yep, but the code I see around is for arduino and I think that they get good performance because of the slow processing speed, jumps the glitches…

I’ll try a code that shows how many interrupts occurred and the time of each one to help diagnose the problem.

Is the encoder response from mausi_mick’s code ok?
But the refresh rate from his code is not so fast… that could influence this also.

Post a reply