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.
You have hardware that is able to capture 1180 samples in that time. So I was thinking something like this:
Set waveout to output square wave @ 10Hz.
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.
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.
Since we have a lot to FPGA logic to spare, the FPGA could even catch the preset point in your project with something like this [code] – Start some counter somewhere
sig_preset_reached <= ‘1’ when ADC_sample > PRESET else ‘0’;
preset_capture: process(sig_preset_reached)
begin
if rising_edge(sig_preset_reached) then
– stop counter and output count
end process;
[/code]
The first part (combinatorial) can easily run in less than a ns, and the counter can be connected to the main sampling clock.
There are also R0 to R12 listings as well as Callers.
I have tried reloading older versions of everything and it still does it. I also loaded jpa’s flashtst.hex into app4 to see if it might have a problem in that slot but it worked fine. When I loaded pawn again it still does the hardfault.
Any help would be appreciated.
My gut tells me its because I loaded the logo file. I have not found a way to erase and start clean.
Let me back up and explain why I was asking about monitoring temp drift over time. I noticed drift when using the DSO with standard or alternative firmware when measuring RMS. This is about the same time I lost access to pawn. There is several volts drift after minutes.
I just checked the volt meter readout with pawn and it is rock steady. I also checked the Vref on the ADC.
Now I assume there is a bug in the RMS calculations.
I’m not sure if this has been covered before, but I am having some issues with compiling .p and .pawn programs using Quincy. I am using the latest version of Quincy, and I have PAWN_011.hex loaded onto the quad. I can run the pre-compiled examples (.amx files) but I am getting problems compiling my own.
The following code compiles fine:-
#include
main()
{
new a
new b
new c
a=22
b=7
c=a+b
printf("%d",c);
}
When loaded onto the DSO Quad and ‘Run’ I get:-
Loading of program SCRIPT1.AMX Failed:
Error 6: Invalid Instruction
If I try to compile some of the examples provided, like ‘weekday.p’ it compiles fine but when run on the DSO Quad I get the same Error 6 Failure.