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

Tue Jan 03, 2017 3:20 am

I have now modified the program with 2 encoders (and no buttons) and only 10nF for debouncing.
The delay I have reduced to 0.

The montage is yet provisional . :lol:

P1020612.JPG
P1020612.JPG (64.96 KiB) Viewed 1312 times

Tue Jan 03, 2017 8:17 am

I have mounted the second encoder on the place of the function-down button( perhaps the other button I can use for reset ( problems with triggerValue, if signal outside)).

Here the video :

https://youtu.be/LqIV3IArMCY

the newest source:

(31.75 KiB) Downloaded 102 times

Tue Jan 03, 2017 8:51 am

Thank you, mausi_mick. As soon as my next chineese STM board(s) arrives, I will make some semi-permament construction, with encoders, buttons. I think second encoder for mode change is good (one encoder chooses what to change, another – does changes), as long there is info on screen, on which option i am right now.

Tue Jan 03, 2017 8:58 am

Guys

The encoders I used (on various projects) have a push button function as well.

I depending on what functionality you want, you could probably use the same encoder for sensitivity and also for vertical position, depending on whether the button was pushed in as it was rotated, and then just use the other encoder for timebase, and possibly for function selection if it was pressed in while rotating.

Tue Jan 03, 2017 9:31 am

RogerClark,

I tested it also with one Encoder and the integrated push-button,
but I think for the service it’s easier with two encoders, one for the “functiuon” : 1=timeBase, 2=yPosition, …6)
and the other for the “parameters” inside the function (different positions, for example triggerType only 3 (0,1,2) , for timeBase 15 … 30, how you like).
In program version 11 I don’t need any push button.

Tue Jan 03, 2017 10:11 am

RogerClark wrote:Guys

The encoders I used (on various projects) have a push button function as well.

I depending on what functionality you want, you could probably use the same encoder for sensitivity and also for vertical position, depending on whether the button was pushed in as it was rotated, and then just use the other encoder for timebase, and possibly for function selection if it was pressed in while rotating.

Wed Jan 04, 2017 8:07 am

RogerClark wrote:@brainwashed

Would this be a sort of Bluetooth scope with the display via iOS or Android ?
Or would it still retain the display ?

Wed Jan 04, 2017 9:09 am

hi rexnanet,

I have tested it with one encoder in pgm-version 6, but I had made it their in three steps, that was really not comfortable.
Now I have changed it like your version, it’s easy use .
But I think the push-button (in the encoder) is not so good like the encoder-switches, he needs more time for debounce (about factor 10).

Wed Jan 04, 2017 9:19 am

mausi_mick wrote:hi rexnanet,

I have tested it with one encoder in pgm-version 6, but I had made it their in three steps, that was really not comfortable.
Now I have changed it like your version, it’s easy use .
But I think the push-button (in the encoder) is not so good like the encoder-switches, he needs more time for debounce (about factor 10).

Wed Jan 04, 2017 10:20 am

I think it’s a problem with the initializing the variable last_time, you have to set it to micros() in setup() or behind loop() ?

I have solved it a little bit other because I show the new functions/parameters on the display direct behind loop()

void loop()

{

// last_time = micros();

if ((s_encp == 1) || (s_encf == 1) || s_sw >= 1) {

showEncVal();  // display encoder values

}

Wed Jan 04, 2017 11:11 am

mausi_mick wrote:
and in showEncVal() I insert a delay(150) if the button is touched:

Wed Jan 04, 2017 1:36 pm

When I first conceived of the $10 Arduino O’scope it was simply as an educational tool, something a teacher or at home hobbyist could throw-together for under $10 from commonly available eBay parts – and very few parts!

As Andy has shown, brilliant software can turn a demonstration device into a really useful tool. His Pig Scope software advances the useful characteristics far beyond a classroom demonstration.

But I find little value in discussing morphing the scope beyond the $10 range since cheap Chinese hardware is designed in a dedicated manner. I think taking Andy’s code and replacing the firmware of the Chinese scope is interesting, but I am not certain that any real value is going to be gained … an interesting rainy-day project, perhaps: use ArduinoIDE and the STM32duino F1 core files to reprogram the Chinese scope.

Anyway, perhaps such discussions are best moved to their own home topic since they are not in the spirit of the $10 Scope.

Ray

Wed Jan 04, 2017 1:58 pm

My point of view here is, that, it is all about doing things. Not necessary reaching some sensible goals. For people like me, it is hobby to solder things together, criss-cross several devices, “hack” here and there. And, for me it is definitely not about a “cost per device”. Hobbies are about money spending like there is no tomorrow, not about saving! :D Anyways, about costs – I have bought so many displays, dev boards, etc, etc, that sure for that money I would have already some both not expensive chinese USB-scope and something scope-ish with display. I don’t really need a scope that much actually :) And I have some at work, that I can take home too. It is a Joy of Creation. Being Creator, not just a consumer (strong words, eh? 8) )
Oh, and I still need to make some off-topic post about list of DIY scopes besides O-Scope,that I have my eyes on. But here is short insight:
http://bildites.lv/users/ThunderJuris/albums

Wed Jan 04, 2017 4:27 pm

Oscilloscopes and multi-meters, you can never have too many of either. :D

Thu Jan 05, 2017 7:45 pm

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.

Andy are you still maintaining the GIT on this?

UTouch has changed the name of the Library and

#include <URTouch.h>

URTouch  myTouch( PB12, PB13, PB14, PB15, PA8);

#endif

Thu Jan 05, 2017 9:02 pm

zhanx wrote:
UTouch has changed the name of the Library …

Thu Jan 05, 2017 11:36 pm

zhanx wrote: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.

Andy are you still maintaining the GIT on this?

UTouch has changed the name of the Library and

#include <URTouch.h>

URTouch  myTouch( PB12, PB13, PB14, PB15, PA8);

#endif

Post a reply