DLO-138 OScope

What are you developing?
User avatar
rexnanet
Posts: 189
Joined: Wed Mar 16, 2016 10:34 am

Re: DLO-138 OScope

Postby rexnanet » Mon Mar 06, 2017 5:52 pm

Ok.
How many pins do you have free? MCP6S only needs CLK,MOSI,CS(1 for each MCP...) 4 total for 2 MCP's.
But you can use "shiftOut" and save SPI troubles :)

Otherwise, I think you can do this:
_SPI->beginTransaction(SPISettings(9000000, MSBFIRST, SPI_MODE0)); //before MCP access 9Mhz to be safe
...
_SPI->beginTransaction(SPISettings(36000000, MSBFIRST, SPI_MODE0)); //after MCP access 36Mhz for the display. (if _SPI = SPI1)

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

Re: DLO-138 OScope

Postby mausi_mick » Mon Mar 06, 2017 6:04 pm

a new video at Youtube:


https://youtu.be/VkH50oe3FvA

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

Re: DLO-138 OScope

Postby mausi_mick » Tue Mar 07, 2017 2:36 am

rexnanet,

thanks for your example for changing frequency.
I hope that I need only one pin for each MCP, only for CS(n),
I take the same SCK (PA5), MOSI(PA7) Pins like the SPI-TFT (spi1).

There is a nice project:

http://www.rotwang.co.uk/projects/energy_monitor.html

with two spi-devices (ADC-MCP3002 and PGA MCP6S91) with Arduino-Code.

But I think at first I try this:

https://jasmedia2011.wordpress.com/2011/08/23/pc-based-oscilloscope/

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

Re: DLO-138 OScope

Postby mausi_mick » Tue Mar 07, 2017 8:11 am

test of the PGA MCP6S91 on SPI-TFT successful , although the Input( ADC)-Voltage is not exactly multiplied.
Perhaps was the voltage-divider on the input (51k / 1k) not low resistance enough or the Voltage Vcc not stable or ...?

But with Vin (of the Maple Mini on USB) its nearly exact.



https://youtu.be/ttBVXR3ykcE

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

Re: DLO-138 OScope

Postby mausi_mick » Wed Mar 08, 2017 3:35 am

I had problems with the MCP6S91 lib, because it was not really HW-SPI.

Therefore I modified it to MCP6S92.h / cpp
I made on the left corner of the display for testing a small touch-area for activating the PGA MCP6S91.


A video from the first test is here ( only for switching between 16 and 32, because I have problems with the offset):

https://youtu.be/fHq3KtxJ0Yk

the modified lib is here:

MCP6S92.h
(608 Bytes) Downloaded 8 times


MCP6S92.cpp
(1.52 KiB) Downloaded 7 times

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

Re: DLO-138 OScope

Postby rexnanet » Thu Mar 09, 2017 9:37 am

mausi_mick wrote:I had problems with the MCP6S91 lib, because it was not really HW-SPI.

Therefore I modified it to MCP6S92.h / cpp
I made on the left corner of the display for testing a small touch-area for activating the PGA MCP6S91.


A video from the first test is here ( only for switching between 16 and 32, because I have problems with the offset):

https://youtu.be/fHq3KtxJ0Yk

the modified lib is here:

MCP6S92.h

MCP6S92.cpp


Have you look at the code I shared?
I had it modified to support HW-SPI :) all you needed to do is #define MPC_USE_HW_SPI (or something similar :) )
I've also added the support to change the channel (on X2 series)...

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

Re: DLO-138 OScope

Postby mausi_mick » Fri Mar 10, 2017 5:41 am

Hi rexnanet,

I have now no problems with the MCP6S91, the gain switching with SPI is ok. I have only to make something with the trigger and offset (like DSO138).


But I said in the Blog touch is more intuitive for changing labels, but to activate TOUCH with a real button is a little bit antique.

Therefore I tried it with SPI , but no success.

Back to URTOUCH I activated the touch with an ISR on TOUCH_IRQ-Pin and don't need the loop:

while (touch.available() ...

Now I can use the touch-function without pressing the button (the button on the encoder is now free ) :lol: :D

That's quick and real intuitive ! :D

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

Re: DLO-138 OScope

Postby mausi_mick » Fri Mar 10, 2017 6:08 am

ThunderOwl,

I think with the DSO150 you can make only a 1 channel o-scope, because you need 4 pins for gain selection.

I think it's better with the MCP6S91/92 (1 Pin) or a combination from DSO150 ( only inputstage with HC4053 (1Pin))
and MCP6S91/92.

The input of the DSO150 is a little bit better and easier to realize as the of the DSO138 and you can build in an overvoltage-protection with 2 diodes or two antiparallel white/blue leds (not tested, but very small leakage currents, but perhaps problems with capacity).

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

Re: DLO-138 OScope

Postby mausi_mick » Fri Mar 10, 2017 9:03 am

the video with isr activated touch on Youtube:



https://youtu.be/Kkf7qgRC96E


it's not ever easy to hit the small touch-fields with thick finger's ! :lol:

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

Re: DLO-138 OScope

Postby rexnanet » Fri Mar 10, 2017 10:05 am

Good work mausi_mick!!!

Yep, the small areas are a bit difficult do get using fingers...that is why I started to use the encoder. But it's not perfect too...
Maybe a 15" touchscreen could help us :lol:

Touch IRQ is a great feature as it doesn't affect the refresh rate :)

The HC input stage approach can lead to a better bandwidth by using better op-amps. But that could be used for the F303 option :)


Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest