Spark Logic

$10 O-Scope revisited

Over the last few days I’ve been playing with Ray’s STM32 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

Sat Dec 03, 2016 10:03 pm

That first display of yours… I bought a couple of those a while back (no common sense either :D ). As I recall it worked quite well – the one in that listing is 7781 based, but there are other variants as far as I remember, and mine might have had a different controller. As far as I recall I used the Swift libraries (or perhaps the uTFT ones) with it rather than the Adafruit ones.

The second one you mentioned is an ILI9341 based display, so in theory it will work fine with the ‘scope too. If you look through the forum I think you will find pages about both of those controllers. The 3.5″ display should let you drive it with either 16 GPIO pons or 8 by the look of the connector, some research on the controller to figure how to do use 16 bit may be needed, unless anyone else here has used this display.

Sat Dec 03, 2016 10:11 pm

Thanks, Andy. And, sure enough, I also ordered that 2-inch LCD. Just to have the same toys that You do. :D :D

Sun Dec 04, 2016 8:19 am

Hi,

I have tested a little bit with the URTouch lib,

only realized for timeBase and yPosition.

But it is not so comfortable in comparison with the rotary-encoders.
Partly because of it function with polling in the loop().

Here a picture from the menu:

P1020590.JPG
P1020590.JPG (134.68 KiB) Viewed 1403 times

Sun Dec 04, 2016 8:36 am

Partly because of it function with polling in the loop().

One option would be to do timer interrupt driven polling. That might be more responsive.

Mon Dec 05, 2016 3:59 pm

I have changed the menu a little bit, but without interrupt. Now it’s quicker (you can see in in the Video) :

https://youtu.be/OUh_JC8Ks1k

on the bottom right corner I have an invisible touch-field for start and stop the touch-menu.
Now are realized these functions : timeBase (step-width 100), y_position (step-width 10) and y-ZoomFactor (100…500=1-5).

If you use bigger touch-fields with more distance to the edge, you can manipulate it with your fingers.

Mon Dec 05, 2016 5:21 pm

now I have published a longer video . You can see how easy and quick you can change the parameters with the touch-function, if you hit the right field.

https://youtu.be/AgewBoWofY4

Mon Dec 05, 2016 9:03 pm

Thank You, mausi_mick, for your ongoing efforts!

Tue Dec 06, 2016 5:43 am

ahull wrote:I was playing with one of those tiny 1.44″ TFT ebay displays, and wondered if it would be possible to get the pig-o-scope working with it. This display is ILI9163C based, but the original code calls for a ILI9341 display. After a bit of head scratching and much pointless code refactoring… I present…

The Pointlessly Small Pig-O-Scope… complete with 128×128 pixels and 1.44″ of almost illegible 1kHz square wave for your amusement.

Image

Small but (almost) perfectly formed. The photo doesn’t do it justice.. that little display should come with a pair of binoculars just to read it. :D

Tue Dec 06, 2016 8:22 am

ag123 wrote:
oh wow ‘smart watch’ ‘wearable’ O-scope, add accelerometer & 1 could graph that 100m sprint or walk in the park :lol:

Tue Dec 06, 2016 9:20 am

ThunderOwl wrote:ag123 wrote:
oh wow ‘smart watch’ ‘wearable’ O-scope, add accelerometer & 1 could graph that 100m sprint or walk in the park :lol:

Tue Dec 06, 2016 9:26 am

mausi_mick wrote:Hi,

I have tested a little bit with the URTouch lib,

only realized for timeBase and yPosition.

But it is not so comfortable in comparison with the rotary-encoders.
Partly because of it function with polling in the loop().

Here a picture from the menu:

P1020590.JPG

Tue Dec 06, 2016 12:29 pm

Hi rexnanet,

baut it’s only for the front-side.
I had problems with the maple-mini on a bread-board (i think to much capacity between the pins. Therefore I have to make
my own layout (but simple, copper cut with a box cutter).

I have changed the touch menu for handle with small ? fingers:

P1020596.JPG
P1020596.JPG (125.47 KiB) Viewed 1433 times

Wed Dec 07, 2016 11:56 am

mausi_mick wrote:I have activated some other functions in the menu:

Wed Dec 07, 2016 6:45 pm

hi bianchifan,

It’s a 2.8″ SPI TFT-display with ILI9341 with No. TCJTM24028-SPI.

I have other diplays With ILI9327 and ILI9841, but I have problems with the displays on STM32F103 / Maple Mini Clone

If I change the Triggerposition/Value or the x-ZoomFactor, the program crashes…

Other manpulations are stable.

Sun Dec 18, 2016 9:53 am

Hi,

I am trying to get the Pig-O-Scope running on the Blue Pill.

while the scope itself seems to work ok, I am having
trouble with serial I/O.

// Create USB serial port

USBSerial serial_debug;
void setup()
{

....

serial_debug.begin();
serial_debug.println("Hello from serial_debug");

Sun Dec 18, 2016 9:59 am

I could add, that I still have no clear idea how to use serial communication for this scope under Windows too. But that is probably just me being not educated :)

Sun Dec 18, 2016 10:10 am

I have had bother with some serial terminal emulators.

The serial output should come out of the USB serial device.

The issue seems to be with line endings (<cr><lf>), and/or serial handshaking (DTR/DSR, X-ON/X-OFF).

You may need to experiment with the line ending settings and possibly also handshake (DTR/DSR etc) on your particular terminal emulator to get reliable output. This is not unique to the o-scope, I have had similar trouble with other code using Arduino serial output.

Sun Dec 18, 2016 10:37 am

Thank You, ahull, for hints. Will try at some point. I have several DIY scopes experimenting-building going in parallel, so no definite timeline for any of them in particular :) If anyone interested about other projects I find interesting – write me message, I guess. Or, if topic starter would want that, I can post all here (some of them are not STM32, for example, clone of cheap USB scopes Hantek/Instrustar – they are Cypress-based).

Sun Dec 18, 2016 12:41 pm

ThunderOwl wrote:Thank You, ahull, for hints. Will try at some point. I have several DIY scopes experimenting-building going in parallel, so no definite timeline for any of them in particular :) If anyone interested about other projects I find interesting – write me message, I guess. Or, if topic starter would want that, I can post all here (some of them are not STM32, for example, clone of cheap USB scopes Hantek/Instrustar – they are Cypress-based).

Post a reply