DSO203 GCC APP - Community Edition (2.51+SmTech1.8+Fixes)

Moderators: lily.li, violet, jeremy882, crail.lyu969

chip
Pre-kindergarten
Pre-kindergarten
Posts: 46
Joined: Sun Jun 12, 2011 2:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by chip » Wed Mar 07, 2012 5:36 pm

pmos69 wrote:
chip wrote:
pmos69 wrote:Hi chip,

...that means you can/will contribute to the project?

All the best,
Pedro
I'm sorry, but I have my own project.
Picture order was to compare. In 220 no loud noise.
No problem.
Do you have your source code available to the public?

no

horse
Pre-kindergarten
Pre-kindergarten
Posts: 26
Joined: Wed Nov 23, 2011 3:27 am
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: DSO 203

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by horse » Wed Mar 07, 2012 6:03 pm

chip wrote:
horse wrote: 220 ac from wall it very very dirt source ))
because of many consumers like flyback power source, gas discharge lamp, etc

sine wave of 220 with transformer

220 ac spectrogram without second 100 Hz harmonic?
Very strange ))) just do not know what to suggest
How about your spectroscope dynamic range?

horse
Pre-kindergarten
Pre-kindergarten
Posts: 26
Joined: Wed Nov 23, 2011 3:27 am
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: DSO 203

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by horse » Wed Mar 07, 2012 6:21 pm

About the internal generator
It is far from perfect. At first - the signal from the DAC is not filtered. Second - the output buffer amplifier goes to a limiting on the signal levels close to GND and Vss, it is noticeable even visually, and produce harmonic components.

pmos69
Elementary-1
Elementary-1
Posts: 134
Joined: Fri Feb 17, 2012 10:51 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso203

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by pmos69 » Wed Mar 07, 2012 6:38 pm

There are other cases were the FFT seems to behave badly
(my guess, I'm really not an expert. This FFT stuff is out of my league)
, but under those same settings, the results seem similar:

dso203_gcc:
Image

chip firmware:
Image

Now, chip is probably using a higher FFT sample count (1024 perhaps), so the results in his firware will be more accurate.
Besides the bugs I'm sure my code has :/
Image

pmos69
Elementary-1
Elementary-1
Posts: 134
Joined: Fri Feb 17, 2012 10:51 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso203

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by pmos69 » Wed Mar 07, 2012 6:51 pm

chip wrote:
pmos69 wrote:
No problem.
Do you have your source code available to the public?
no
I don't understand.
Did you acquire a licence to use the original firmware source code?

I see only 2 options for the original source code licencing:
- Either it's "(C) COPYRIGHT 2009 e-Design Co.,Ltd." as included in all the source files
- Or it's "GPL/LGPL", as stated in the seeedstudio wiki (http://www.seeedstudio.com/wiki/DSO_Quad)

If the code is not GPL and you didn't acquire a licence, that would be stealing.
If the code is GPL you are in breach of the GPL licence, and that would be stealing also.

Note: I'm not implying you are stealing anything.
From what I know, you can be just making a personal use of the source code and your customized firmware.
It's not an issue.
Last edited by pmos69 on Wed Mar 07, 2012 6:57 pm, edited 2 times in total.
Image

chip
Pre-kindergarten
Pre-kindergarten
Posts: 46
Joined: Sun Jun 12, 2011 2:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by chip » Wed Mar 07, 2012 6:56 pm

pmos69 wrote:Now, chip is probably using a higher FFT sample count (1024 perhaps), so the results in his firware will be more accurate.
Yes, I use 1024 values ​​of the signal and get the 256 points of the spectrum

chip
Pre-kindergarten
Pre-kindergarten
Posts: 46
Joined: Sun Jun 12, 2011 2:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by chip » Wed Mar 07, 2012 7:28 pm

pmos69 wrote:
chip wrote:
pmos69 wrote:
No problem.
Do you have your source code available to the public?
no
I don't understand.
Did you acquire a licence to use the original firmware source code?

I see only 2 options for the original source code licencing:
- Either it's "(C) COPYRIGHT 2009 e-Design Co.,Ltd." as included in all the source files
- Or it's "GPL/LGPL", as stated in the seeedstudio wiki (http://www.seeedstudio.com/wiki/DSO_Quad)



If the code is not GPL and you didn't acquire a licence, that would be stealing.
If the code is GPL you are in breach of the GPL licence, and that would be stealing also.

Note: I'm not implying you are stealing anything.
From what I know, you can be just making a personal use of the source code and your customized firmware.
It's not an issue.
I do not know what kind of license is needed to open source, but I know that with this code is a bad oscilloscope

pmos69
Elementary-1
Elementary-1
Posts: 134
Joined: Fri Feb 17, 2012 10:51 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso203

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by pmos69 » Wed Mar 07, 2012 8:56 pm

chip wrote: I do not know what kind of license is needed to open source, but I know that with this code is a bad oscilloscope
[/quote][/quote]

Well, not just the code: The hardware also has some big flaws.
:/
Image

paf
Pre-kindergarten
Pre-kindergarten
Posts: 40
Joined: Tue Jan 03, 2012 4:12 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: DSO Quad

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by paf » Thu Mar 08, 2012 4:01 am

Hello

I don't understand the behaviour of Pedro's FFT.

I use a 10kHz "sine" from the internal DAC, channel A with 0.5V/div, 100uS/div as an example.
  • when I vary the amplitude of the sine, the spectrum changes completely. For example, at amplitudes of about 1.7V, the highest peak is at 20kHz, not 10kHz (and it is more then 2 div higher than the 10kHz)
  • with an amplitude of 2.1V, the picture changes: now the highest peak is at 10kHz and 2 div higher than the 20kHz
Maybe this has to do with the fact that only 256 samples are used, i.e. only about 10 periods and this is not enough - does the FFT only give good results when there is an integer number of periods in the 256 samples? Could this explain why the sines have so many harmonics?

I had another problem, which looks like a bug: when moving the "navigator B", changing between the "trigger" and the "auto/norm..." menus - but not changing anything at the settings - sometimes the FFT result change completely!!!

Two more questions:
  • if the number of samples is the problem, why not make an FFT with 4096 sample? Why is it more complicated than with 256?
  • what is the vertical scale?
Patrick

pmos69
Elementary-1
Elementary-1
Posts: 134
Joined: Fri Feb 17, 2012 10:51 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: dso203

Re: DSO Quad GCC port (2.51+SmTech1.8+Fixes)

Post by pmos69 » Thu Mar 08, 2012 6:18 am

paf wrote: if the number of samples is the problem, why not make an FFT with 4096 sample? Why is it more complicated than with 256?
The number of samples influences the resolution (frequency / x scale) of the FFT.
Can't increase the number of samples at the moment because of the increase in program size/storage needs:
- TTF coef_table - about 4KB more
- the input and output arrays - about 6KB more

I've replaced the Hanning window lookup table with a function to generate the relevant indexed values at request, but that still isn't enough.

Program size is already somewhat large because GCC does not optimize the code as well as IAR - by far.

Anyway, the functions are in place for using either 256 or 1024 samples, and I can get the 1024 samples FFT running under some circunstances, but don't think it's relevant enough to spend more of my time with it.
Anybody can compile it with 1024 samples FFT support by changing 2 lines of code and uncommenting the needed coef_table values. The code is all there.

If someone wants a better FFT program, a dedicated FFT build can easily be made without issues, that can use 4096 samples.
Image

Post Reply