Calibration data isn’t really “a preference” so my thinking is that mixing the two is not such a good idea. There is now a separate “Save Cal” (see also readme) option undet OT that will store your active calibration data in a dedicated area of internal FLASH.
I do not know if I have the official/final v1 schematics (got mine from an e-design chinese forum) but another change is that PA1 is floating on v1 while connected to PA0 (Ain) on v2. This would anyway be fragile heuristics, especially if there are intermediate versions around, or clones or changes in future versions, so I think it would be better to have a selection stored in flash of “v1” or “v2” or a more fine-grained setting like “invert Fout y/n”.
Hi tormod,
you’re right. It’s also in my V1.3 schematic. We could ask Seeed about PA0/PA1 conection related to hardware versioning.
But i think it’s a “feature” of V2.0 as it allows interleaved sampling with the two integrated ADCs which would yield 2 Msps.
Right. And if we get the 2 Msps implemented in the firmware (though I do not know if the analog signal conditioning can keep up), many v1 owners will solder the two pins together and then we can not use this for version detection any longer
An update is available (V3.32) with “experimental” HW detection based on PA10. So let’s see then if we can get duty cycle right also for V2 owners.
Just tested: your version recognizes my v2, and the duty cycle is adjusted accordingly.
Thanks a lot, again!
Antonio
Sorry BenF. Ignore my query from yesterday about saving the cal points.
This evening I found the ‘Save Cal’ option in the OT menu!
Thanks BenF,
I haven’t checked for a couple of days and just realized that Christmas has come early!
I’ve upgraded to V3.32 on my Nano V2. It correctly detects the type and the duty cycle % is correct.
The selectable output frequency is just the shot for what I need. I like the user interface too. I won’t get a chance to check until Monday but I think I’ll be able to sweep up and down around 125kHz looking for resonance. I’m actually annoyed that I have tomorrow off work and can’t play with it! I don’t have the gear I need here at home.
It’s much better than I was brave enough to ask for.
I tried loading the 3.32 release and the loading claims to have worked but the display still says that I am version 3.1 . Guess it is back to debugging the loading chain.
BenF,
your code works great and it makes me very very very happy. Thanks a lot!!! It fixed (almost) all problems I had with previous DSO Nano.
In case you or somebody else is working on FFT, I’m attaching my FFT code I made long time ago used for some my PC DOS Sound card oscilloscope program (worked at real time). It is written based on Digital signal processing course on Electrotechnical Facultity at Begrade (prof. Miodrag Popovic), Serbia. I think it is pretty optimized. Use 2^N buffer (I suggest N=256 for this screen). Unfortunately I forgot theory details. You can use it completely as it is, modify it or find some ideas. Looking at it now, “(x != 0.0)” tests need to be replaced with “(fabs(x) < 1e-N)”.
Also, I suggest to write your FFT code on some test desktop app, to test it and figure out what is going on before move it to DSO (don’t forget to use window “functions”). FFT theory is very interesting. I guess you can use input/output txt files and Excel or similar program for visualization if you don’t have GUI routines.
If anyone isplanning to start with FFT, the additional memory need to be considered (probably there no big free memory on DSO), and/or used some alternative algorithm. For example, input sequence can be real part, and some another additional array could contain im complex part, instead to have additional array with complex structure {re, im}. Also, maybe real/doube is not availabe or too slow on this CPU so integers need to be used, which requires much more care.
By the way, I don’t think that FFT is realy needed for this osiloscope. The osciloscope mode is what the most of people really need (including me). But it is fancy to have it. So, making the FFT is for someone who just have enough time and enjoy to make it.
Regards,
Dejan
my_fft_code.zip (7.44 KB)
I finally got around this morning to doing a full cal on each range. I select the range, then do an offset cal, then apply a voltage and do a gain cal, then a long press on ‘Save Cal’ gets me a ‘Save Ok’ message each time.
But after a power cycle all the gain cals are set back to zero, while all the offset cals are as I calibrated them.
Am I missing something again? Does the gain cal need to be saved in a different way?
There was indeed an issue with gain not being restored. This is most likely from me intentionally wanting to reset gain for all ranges and accidentally leaving it in the code.
This is now fixed in APP 3.33 available for download. Gain calibration data will be restored after upgrading to 3.33 unless you’ve used Save Cal again with zeroes only. Offset calibration is not affected by this upgrade. Sorry for the troubles.
Thanks, that works much better!