Easy programming for the DSO Quad

New version 0.03 uploaded.



New features:

Thanks for this contribution, this is really impressing!

I am a bit away from programming the same, but will definitely use it!



BW


thx. i’ll check it as soon as I get home from vacation :wink:



Jaqb

There is now a proto version of custom FPGA image loading in a separate branch… but too bad that I’m running out of flash space.



It would be most useful to get this working:

https://github.com/neilstockbridge/dsoquad-BIOS



Or some other way to build the BIOS with GCC.

Discovered Pawn for quad a few days ago and I am enjoying it very much. Please continue development.

The calibration app, is this just for pawn apps or is it the same calibration that can be done in the dso firmware and its effect is system wide for the entire device and its apps?

Currently only for Pawn apps, as described in <LINK_TEXT text=“https://github.com/PetteriAimonen/QuadP … alibration”>https://github.com/PetteriAimonen/QuadPawn/wiki/Calibration</LINK_TEXT>

A quick weekend project: scrolling spectrogram application for QuadPawn.



<LINK_TEXT text=“https://github.com/PetteriAimonen/QuadP … pectrogram”>https://github.com/PetteriAimonen/QuadPawn/wiki/Spectrogram</LINK_TEXT>



First 500 Hz signal from waveout, then 50Hz noise from my finger:





Some music from youtube:

Would it be possible to add serial port access to pawn? The one used in the bluetooth hack.

Yeah I have been thinking about it for a while but haven’t had time to implement it.



Should be quite easy atleast to write to serial, because a simple printf() from the code is enough. Reading will require some IRQ routine so that it will store the characters as they arrive.

So I can send data with simple printf() but no read? Thats enough for data log but not control.



I took the sample voltmeter code and created a large number display to use like a DVM. The code is not pretty but I was amazed at how much more accurate readings are in pawn compared to the normal or alternative software.



I wonder what could be done with pawn if it was the main app. Use all the slots for pawn.


Kind of. Not yet Pawn bindings for the function. But maybe I’ll find time to add it soon :slight_smile:

Yeah after being calibrated it should be quite accurate. Maybe one day I’ll bother porting the calibration stuff to main firmware. It’s not complex, I don’t understand how the main firmware calibration manages to suck so bad.

Flash is no-longer restricting, but the RAM size is. Pawn as a language is not very powerful, if there will be a more powerful version of DSO Quad one day I’d like to run Lua or Squirrel on it.



And because Pawn is interpreted, it’ll always be limited to the simpler stuff. I couldn’t imagine writing a complete oscilloscope app in pawn; it would simply be too slow.


That would be great. Let me know if you need beta tester.


The one thing I noticed is that I must calibrate on battery power. If I calibrate while powered by USB it is off. Maybe gabonator1 could use the same method for calibration in the alternate firmware.


What else could pawn do on the DSO?

I have decided to use pawn on the DSO to make a capacitor checker. Simple RC circuit timer. Use waveout to power and wave-in to measure voltage drop over time. I think it may also be possible to measure the internal resistance of the cap too.

Good to know! I haven’t noticed that, but it makes sense as the 3.6V supply voltage is not regulated. It may be that the battery charge level also affects it a bit. But it shouldn’t be very large effect because it is only the opamp supply voltage and not any reference voltage.

Nice! Perhaps the 51 ohm internal resistor on the waveout is enough, so you don’t need separate resistor for the RC timer?

I wonder if it could be used to improve accuracy more. Compare current voltage against that of when it was calibrated. Would need to test at various voltages to check for linearity but I think it could be an improvement to your already good calibration system.

I doubt 51 ohms would work across a wide enough range but it will need to be considered in the calculations.

Indeed. Or maybe we are lucky and the behaviour is somehow predictable between units; then it could just be compensated without calibrating each device separately.

Based on rough calculations, it would have some chance of working for capacitances 100nF and higher.



Not sure if ESR measurement will be possible without external FET; theoretically one could pull the waveout low, but the difference in voltage will be very small. The AC mode at 50mV range could work here.

Entirely possible. Only way to know it to test.

I don’t see it. 51 ohm, and 100nf cap with a 2.5v source has a rise time of 0.0164ms to reach 2.4v. That will require a very fast counter.

I was thinking along the lines of something like this.

May not be possible but I thought it would be worth a look.

You have hardware that is able to capture 1180 samples in that time. So I was thinking something like this:


  1. Set waveout to output square wave @ 10Hz.


  2. Set wavein to capture @ 72MHz in free-running mode (DC 500mV) and start the capture synchronously. This means the capture will start when waveout starts a new period.



    The result will be a decaying waveform like this: <LINK_TEXT text=“http://en.wikipedia.org/wiki/File:Serie … oltage.svg”>http://en.wikipedia.org/wiki/File:Series_RC_capacitor_voltage.svg</LINK_TEXT>



    Then you could fit the exponential function to the captured data and compute the capacitance from that.



    You will have to adjust the sample rate for higher capacitances though. Because the usable sample buffer is only about 3500 samples, it will only store 50 microseconds @ 72MHz.

I was just going to do a simple RC circuit. Your method will work and not require external parts. I will switch gears and duplicate with my test equipment first and then reproduce in pawn.