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

Thu Jun 15, 2017 11:03 pm

BTW. I posted a separate thread about that Hackaday article

viewtopic.php?f=3&t=2203

Fri Jun 16, 2017 10:02 am

rexnanet wrote:
Congratulation! :D

Edit: (if the credits are present on the hackaday post…)

Wed Aug 30, 2017 8:16 am

$28 vs $18 at Aliexpress :lol: might be the faster shipping capability :D

Wed Aug 30, 2017 9:30 am

Youtuber 12VoltVids did a build and review of that

He has some other good repair and test videos.

Wed Aug 30, 2017 12:45 pm

wrote: Wed Mar 08, 2017 12:06 pm

Wed Aug 30, 2017 9:12 pm

[rexnanet – Wed Aug 30, 2017 12:45 pm] –

Is there support for F303’duino?

Use STMs Core or STM32GENERIC

Thu Aug 31, 2017 1:44 pm

[RogerClark – Wed Aug 30, 2017 9:12 pm] –
[rexnanet – Wed Aug 30, 2017 12:45 pm] –

Is there support for F303’duino?

Use STMs Core or STM32GENERIC

Thanks!
I’ll give it a try when I solder the F303 on the BluePill board.

Thu Aug 31, 2017 2:24 pm

[rexnanet – Thu Aug 31, 2017 1:44 pm] –
[RogerClark – Wed Aug 30, 2017 9:12 pm] –
[rexnanet – Wed Aug 30, 2017 12:45 pm] –

Is there support for F303’duino?

Use STMs Core or STM32GENERIC

Thanks!
I’ll give it a try when I solder the F303 on the BluePill board.

My best wishes for such experiments. I have two BluePils “modded” with F303, one with separated digital and analog power pins, one left as it was, connected. Both free right now for tests of anything interesting.

Thu Aug 31, 2017 4:41 pm

Thanks ThunderOwl!

Do you have a video of the F303 oscilloscope version from that forum (“Murzik”)?

Thu Aug 31, 2017 8:21 pm

[rexnanet – Thu Aug 31, 2017 4:41 pm] –
Thanks ThunderOwl!

Do you have a video of the F303 oscilloscope version from that forum (“Murzik”)?

I don’t have a video of it right now, but I can make a video or some screenshots with certain frequencies displayed some next days.
Here are screens of my weird construction, but there are no pics that would show performance:
http://bildites.lv/a/sfkqpxdx#tjbrytfu

Fri Sep 01, 2017 8:59 am

[ThunderOwl – Thu Aug 31, 2017 8:21 pm] –
I don’t have a video of it right now, but I can make a video or some screenshots with certain frequencies displayed some next days.
Here are screens of my weird construction, but there are no pics that would show performance:
http://bildites.lv/a/sfkqpxdx#tjbrytfu

A video of it working would be great! It’s better to see the update rate and the overall graphical look and UI responsiveness.

From the photos it looks good. You went with a LQFP adapter instead of the BluePill board, why was that? Not to waste a board?
The TFT case looks great. It includes that 5V booster and the Battery from the other photos, right?

What is that 8 pin DIP chip? An input op-amp? Or is it that AC/DC switch?

Fri Sep 01, 2017 9:08 am

Chip is AC/DC switch. About OpAmps, this simple variant uses opamp that is built in F303.
Adapter board – I think I had it previous of any chinese boards that I acquired later.

Fri Sep 01, 2017 9:23 am

Did some quick shots at 3 frequencies, “Murzik-1” (by user named Fusion), F303:

Fri Sep 01, 2017 9:23 am

continued…

Fri Sep 01, 2017 9:29 am

P.S.: about 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 chip and adapterboard – there is low pin count chip used, 32 pin. “Normal” chips are 48 pins. But this one was enough for such version. There are mods now, with input gain selectors, etc too.

Fri Sep 01, 2017 10:18 am

Thanks :)
Maybe we should migrate this talk to the other post… :)

Mon Oct 02, 2017 9:10 pm

By the way, going way back to the original STM32F1STM32F1Микроконтроллеры и процессоры…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…Value Line Discovery Board scope, it’s worth noting that if one turns off interrupts during sampling, one can get the full maximum sampling rate (1.7msps) without DMA, just by reading the interleaved data in a tight loop in continuous mode:
void fetch() {

int channel = PIN_MAP[analogInPin].adc_channel;

adc_set_sample_rate(ADC1, ADC_SMPR_1_5);

adc_set_sample_rate(ADC2, ADC_SMPR_1_5);

adc_set_reg_seqlen(ADC1, 1);

adc_set_reg_seqlen(ADC2, 1);

ADC1->regs->SQR3 = channel;

ADC2->regs->SQR3 = channel;
ADC1->regs->CR1 |= 0x70000; // ADC_CR1_FASTINT;

ADC1->regs->CR2 |= ADC_CR2_CONT | ADC_CR2_SWSTART;

ADC2->regs->CR2 |= ADC_CR2_CONT | ADC_CR2_SWSTART;

ADC2->regs->CR1 |= 0x70000; // ADC_CR1_FASTINT;

nvic_globalirq_disable();

for (int j = 0; j < maxSamples ; j+=2 )

{

while (!(ADC1->regs->SR & ADC_SR_EOC))

;

dataPoints[j] = ADC1->regs->DR & ADC_DR_DATA;

while (!(ADC2->regs->SR & ADC_SR_EOC))

;

dataPoints[j+1] = ADC2->regs->DR & ADC_DR_DATA;

}

nvic_globalirq_enable();

}

Post a reply