Author Topic: 10 meg sample home made scope project.  (Read 2039 times)

0 Members and 2 Guests are viewing this topic.

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
10 meg sample home made scope project.
« on: July 26, 2019, 06:51:11 pm »
Got my prototype pcb through today for my 10 mega sample USB PC scope.
Had a few problems getting it going.
Crystal not close enough to PIC so was struggling to start.
Insufficient decoupling on USB power supply stopped USB running.
I changed my mind about the clock for the A2D and clocked it from the PIC microcontroller instead.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline TheHolyHorse

  • Regular Contributor
  • *
  • Posts: 172
  • Country: se
  • You don't need to be confused, just understand it.
Re: 10 meg sample home made scope project.
« Reply #1 on: July 28, 2019, 02:36:15 am »
What exactly is your question?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5642
  • Country: fr
Re: 10 meg sample home made scope project.
« Reply #2 on: July 28, 2019, 02:04:12 pm »
Funky layout job. ;D
 

Online thinkfat

  • Supporter
  • ****
  • Posts: 1348
  • Country: de
    • Matthias' Hackerstübchen
Re: 10 meg sample home made scope project.
« Reply #3 on: July 28, 2019, 08:00:20 pm »
Funky layout job. ;D
Funky soldering job, too..

Gesendet von meinem Nokia 6.1 mit Tapatalk

Everybody likes gadgets. Until they try to make them.
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #4 on: July 28, 2019, 09:19:48 pm »
No question, just sharing my latest project.
Its just a prototype pcb so has been hacked around a bit.
Strange mix if SMD and through hole.
I got the SMD soldered on by my pcb manufacturer.
Its a pain to do by hand. Not cheap though.

The fun part has been the software which was basically taken form a previous similar much slower 2MHZ sampling project.
I managed to get 10MHZ sampling with an external A2D.
With a bit of help from the Microchip forum I managed to get the speed up to 14MHZ sampling rate.
To clock data out of the A2D I used the PIC PWM generator. That made my code much simpler and much faster.
Next step is to speed up the analogue front end. The op amps are a bit slow so buying in some faster ones about 12MHZ bandwidth.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Online thinkfat

  • Supporter
  • ****
  • Posts: 1348
  • Country: de
    • Matthias' Hackerstübchen
Re: 10 meg sample home made scope project.
« Reply #5 on: July 28, 2019, 09:39:01 pm »
For a 10 Ms/s sampling rate, your analog bandwidth needs to be limited to 5 MHz anyway.

Gesendet von meinem Nokia 6.1 mit Tapatalk

Everybody likes gadgets. Until they try to make them.
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #6 on: July 28, 2019, 09:48:39 pm »
For a 10 Ms/s sampling rate, your analog bandwidth needs to be limited to 5 MHz anyway.

Gesendet von meinem Nokia 6.1 mit Tapatalk

The problem with digital scopes is while the sampling rate can be high you need many samples to make a waveform.
So something like 100 megs sampling would only be good for 1MHz sine or square wave.
A good analogue scope will blow the digital storage scopes out of the water.
However, you can pick up low sampling rate USB scopes for peanuts.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Online thinkfat

  • Supporter
  • ****
  • Posts: 1348
  • Country: de
    • Matthias' Hackerstübchen
Re: 10 meg sample home made scope project.
« Reply #7 on: July 28, 2019, 09:56:58 pm »
I was more referring to the sampling theorem.

Gesendet von meinem Nokia 6.1 mit Tapatalk

Everybody likes gadgets. Until they try to make them.
 

Online james_s

  • Super Contributor
  • ***
  • Posts: 13016
  • Country: us
Re: 10 meg sample home made scope project.
« Reply #8 on: July 28, 2019, 10:34:37 pm »
Funky layout job. ;D

Traces running around at weird angles is a classic rookie mistake. Set up the PCB program to only let you use 45 and 90 degree angles and the result ends up much cleaner.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10179
  • Country: my
  • reassessing directives...
Re: 10 meg sample home made scope project.
« Reply #9 on: July 28, 2019, 11:11:30 pm »
do not underestimate the bug free software, its the least to moderately neat path algorithm...
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #10 on: July 28, 2019, 11:42:43 pm »
Pro's usually suggest 90 degree bends is not good.
The shortest distance between two points is a straight line.
However, that makes layouts messy.
I tend to use 90 and prefer 45 degrees.
Going around components often forces 90 degree bends.

I should have added that pcb was pre new track functions in my software.
I now have two control keys.
1/ Snaps back to previous pin in a straight line with pin
2/ Snaps forward to next  pin in a straight line with pin.
See picture of new better pcb.
« Last Edit: July 28, 2019, 11:46:16 pm by nigelwright7557 »
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Online james_s

  • Super Contributor
  • ***
  • Posts: 13016
  • Country: us
Re: 10 meg sample home made scope project.
« Reply #11 on: July 28, 2019, 11:58:04 pm »
When I need a 90 degree bend I always use two 45 degree bends unless circumstances absolutely mandate a single 90 degree. Regardless of bends, you want to keep the trace angles to multiples of 45 degrees.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 2150
  • Country: ca
Re: 10 meg sample home made scope project.
« Reply #12 on: July 29, 2019, 12:48:11 pm »
Crystal not close enough to PIC so was struggling to start.

You should have capacitors to the ground from both legs of the crystal. I cannot see them on your PCB. Also, 1M or so resistor might be needed parallel to the crystal.

Modern designs usually use MEMS oscillators instead of crystals.
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #13 on: July 29, 2019, 03:58:42 pm »
Crystal not close enough to PIC so was struggling to start.

You should have capacitors to the ground from both legs of the crystal. I cannot see them on your PCB. Also, 1M or so resistor might be needed parallel to the crystal.

Modern designs usually use MEMS oscillators instead of crystals.

My picture got clipped a bit, the crystal capacitors are directly above it.
The crystal circuit is directly from Microchip datasheet.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5642
  • Country: fr
Re: 10 meg sample home made scope project.
« Reply #14 on: July 29, 2019, 04:23:55 pm »
Yeah nothing wrong with using a crystal... especially for this kind of designs. You're not using an external oscillator anyway, just the one integrated in the MCU.

Getting back to the PCB: I hadn't figured you had used your own software, which was a work in progress. So yes that explains things.
Free-angle traces look weird (or "funky") but are not necessarily bad signal-wise. That's mainly a cosmetic issue (and would just raise questions about how you proceed, especially when no visible density issue would justify them ;D )

Now just a note: you still seem to be using a lot of 90° bends. Even if the corners are rounded on the outside, those are still 90° bends with a sharp angle inside the bend. That's not very good (for both manufacturability and EMC reasons...)

When you need a trace to bend 90°, insert a corner - a small piece of trace - so you have two successive 45° bends instead. That's what you will see on most (I'd say all) modern PCB layouts.
« Last Edit: July 29, 2019, 04:27:53 pm by SiliconWizard »
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #15 on: July 30, 2019, 12:08:16 am »
When you need a trace to bend 90°, insert a corner - a small piece of trace - so you have two successive 45° bends instead. That's what you will see on most (I'd say all) modern PCB layouts.

My software has a corner function where you can replace 90 degree bends with rounded off corners to any radius you like.
I don't use it until the pcb is finished or it gets messy to edit.


PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10179
  • Country: my
  • reassessing directives...
Re: 10 meg sample home made scope project.
« Reply #16 on: July 30, 2019, 02:37:02 am »
...until the pcb is finished or it gets messy to edit.
exactly! imagine you are designing 100 components and you have to redo when prototype confirmed working.
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #17 on: July 30, 2019, 03:29:14 am »
...until the pcb is finished or it gets messy to edit.
exactly! imagine you are designing 100 components and you have to redo when prototype confirmed working.

One simple command does the whole pcb. Its not difficult.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10179
  • Country: my
  • reassessing directives...
Re: 10 meg sample home made scope project.
« Reply #18 on: July 30, 2019, 04:24:03 am »
demo on a densed board will be helpfull. Nobody bother to read on youtube age now esp if they already have a tool to do the job. An entertaining demo video will give courage to learn more.
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #19 on: July 30, 2019, 05:57:14 am »
demo on a densed board will be helpfull. Nobody bother to read on youtube age now esp if they already have a tool to do the job. An entertaining demo video will give courage to learn more.

I did have a demo video on my website.
There is a demo video in the demo version and the retail version of the software to get people started.

I keep a track of website hits over a period and hits dropped off dramatically when I had the video up.
So  I removed it. If you want to have a look its here: 
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10179
  • Country: my
  • reassessing directives...
Re: 10 meg sample home made scope project.
« Reply #20 on: July 30, 2019, 06:40:59 am »
I keep a track of website hits over a period and hits dropped off dramatically when I had the video up.
your statements doesnt make sense to me (pray i will not speculate). why every time you put advertisement materials such as manual/guide, videos, screenshots/examples the hit dropped is a 8th wonder of the world to me. and time spent to keep track hit counter better spent on improving the SW further. just publish the materials and forget about it, let the audiences decide to hit buy now button or not. or are you saying those introductory materials will jeopardize your sale? by removing them you will increase hit and sale? ::) anyway kudos for your effort in making the video but 2 resistors circuit is hardly practical.

talking about competitors... few years back, i've attempted to make an eda designer, i called it Chromeera Project. took half a year to code just few data structures/gui etc, that was really heavy and difficult task, and i may say, wasteful as it occupied and took me away from other ee hobby /part time stuffs. thinking i only moved very little in half a year, and my VB6 IDE is rotting so not worth the effort, i decided to stop until i have better modern IDE proficiency (Qt was choosen) and time allocation for it. attached is what have completed so far (still on half breed GUI development, zero functionality) if only i can clone myself into 2 or 5 other persons, i'll command one of them to spend entire life on this task. but joke aside, no i dont want to compete with you, i only hope some day some people will come up with better and modern EDA yet affordable, this EDA will include EM solver, RF, integrated SPICE simulator, differential/length match/impedance control interactive bus routing, MCU/FPGA embedded C/C++/VHDL built in and simulator/debugger everything that a modern electronics design will require, fwiw...
« Last Edit: July 30, 2019, 06:47:15 am by Mechatrommer »
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: gb
    • Murton-Pike Systems
Re: 10 meg sample home made scope project.
« Reply #21 on: July 30, 2019, 06:49:47 am »
The problem with PCBCAD software now is the number of free packages and also the number of paid for packages.
Its pretty much given away on ebay.
So now for me its now just a hobby.
Before December 2017 I was doing ok selling it on ebay for about £20 a go, sold thousands of copies.
Then suddenly from nowhere came about 100 listings on ebay selling for peanuts.
It killed the job really.
For me its just a waste of time now but I continue to sell cheaper than the rest just to spite them and a sale I get is one they don't get.

There really are much better ways of making money than scraping around on ebay for pennies.
PCBCAD51/PCBCAD360/PCBCAD720 PCB design software https://www.murtonpikesystems.co.uk
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 2688
  • Country: it
Re: 10 meg sample home made scope project.
« Reply #22 on: July 30, 2019, 07:18:21 am »
Pro's usually suggest 90 degree bends is not good.

very old farts maybe  :-DD
so this is the famous project i see mentioning over the microchip forums :)?
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1103
  • Country: nl
Re: 10 meg sample home made scope project.
« Reply #23 on: July 30, 2019, 07:39:27 am »
For a 10 Ms/s sampling rate, your analog bandwidth needs to be limited to 5 MHz anyway.

Gesendet von meinem Nokia 6.1 mit Tapatalk

The problem with digital scopes is while the sampling rate can be high you need many samples to make a waveform.
So something like 100 megs sampling would only be good for 1MHz sine or square wave.
A good analogue scope will blow the digital storage scopes out of the water.
However, you can pick up low sampling rate USB scopes for peanuts.

Not really, with sin(x)/x interpolation you only need a factor of 5-10 times to properly reconstruct sine waves from digital samples. For square waves, you obviously need more because of the harmonics.

If you want the analog design part to be reasonable, you also need a reasonable oversampling ratio between analog bandwidth and digital sample rate. This introduces a much lower order anti-aliasing filter. The Nyquist theorem is in that purely theoretical, almost nobody is crazy enough to build a 10+ order filter (with preferably a constant phase) so you can save a factor of 2x sampling rate of the digital domain. With a little bit of oversampling, you can get 2nd to 4th order anti-alias filters requirement.

Although an analog scope doesn't suffer from this sampling drama, they also have cons. For example, being able to single-shot waveforms, which depending on your work is the single most used feature of a digital oscilloscope considering today's bursty nature of communication systems. This is a big hurdle with older digital scopes, which in fairness were horrid to use. I recommended that if you want to build an usable scope, to take care your sample buffer is as large as possible.
« Last Edit: July 30, 2019, 07:42:11 am by hans »
 
The following users thanked this post: nctnico

Online thinkfat

  • Supporter
  • ****
  • Posts: 1348
  • Country: de
    • Matthias' Hackerstübchen
Re: 10 meg sample home made scope project.
« Reply #24 on: July 30, 2019, 10:01:44 am »
For a 10 Ms/s sampling rate, your analog bandwidth needs to be limited to 5 MHz anyway.

Gesendet von meinem Nokia 6.1 mit Tapatalk

The problem with digital scopes is while the sampling rate can be high you need many samples to make a waveform.
So something like 100 megs sampling would only be good for 1MHz sine or square wave.
A good analogue scope will blow the digital storage scopes out of the water.
However, you can pick up low sampling rate USB scopes for peanuts.

Not really, with sin(x)/x interpolation you only need a factor of 5-10 times to properly reconstruct sine waves from digital samples. For square waves, you obviously need more because of the harmonics.

If you want the analog design part to be reasonable, you also need a reasonable oversampling ratio between analog bandwidth and digital sample rate. This introduces a much lower order anti-aliasing filter. The Nyquist theorem is in that purely theoretical, almost nobody is crazy enough to build a 10+ order filter (with preferably a constant phase) so you can save a factor of 2x sampling rate of the digital domain. With a little bit of oversampling, you can get 2nd to 4th order anti-alias filters requirement.


I think 5 times oversampling is somewhat the minimum for sin(x)/x for a somewhat reasonable waveform reconstruction. In the case of the OP, at 10 Ms/s it doesn't really make sense to have an analog frontend with a crazy-high (in relative terms) bandwidth. We're looking at 1-2 MHz analog bandwidth maybe.

Of course the sampling theorem states that "perfect reconstruction" of the signal is only possible if the total power (energy?) of all signal components beyond fs/2 is zero, but in practice this is hardly achievable and you only need to keep it below the noise introduced by quantization anyway. That reduces your requirements quite a bit.

Nevertheless, the sampling theorem does not impose just some theoretical limit. The effect is quite real and if you goof up enough, it will be clearly visible on the screen of your scope.
Everybody likes gadgets. Until they try to make them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf