ADC Sampling Breakthrough

Comments

It occurred to me yesterday that if we had a second-order modulator, instead of a simple first-order modulator, our scope mode would not work. Does anyone suppose otherwise?

I starting drawing up a schematic last night for a simple external modulator for the P1; which I may build and test on a protoboard after the holiday. Although I actually have two designs in mind. One would be a simple RIAA phono playback filter; which has a particular low pass response. So what if I inject the P1 generated comparator output into the differential amplifier in two places; one that has the full bandwidth of whatever the pin is giving us; and the other which is being subjected to the same processing as the audio. That's it - for design candidate one. Design number two is a secret; for now - although I am a sure that there are some people here who know about chopper modulation, etc., and that's all I am going to say about that one.

What that implies of course is that unless you do something like what some of the original op amps did; and what some video op amp do; which is to let you choose your own external capacitors for the various time constants; then an audio rate modulator what also performs some useful function like RIAA compensation; or loudspeaker crossover with a real 4th order filter will destroy the scope modes and the video modes; that is unless you are planning on releasing a propeller which has 6 extra pins per ADC for the application specific requirements. So I think the right track is to keep all options open - except for the must haves in hardware or ROM as the case may be; i.e., streaming, sinc2/3, raw bits.

The above windows have the same first three taps and all 12 taps could be the same with shift register skipping and this is how my BASIC program works. However, the way to deal with different taps in hardware is to mux the particular shift reg bits. The muxing logic would be less with triple-integration as it has fewer taps.

I wish I had time to do some SPICE work. I really want to see if adding many parallel first-order modulators with different current offsets would get around the problems of the first order, but provide both a higher number of bits per clock, while still affording something like a simple scope mode that looks at a small range of samples.

That's what this does; or will do. I'll let you know when it compiles on the P1 under simple IDE.

I know a guy named Nelson Pass. His company makes excellent Hi-Fi amps. He is kind of the living grandfather of solid-state Hi-Fi, I think. He once told me that the very fastest amplifier is a common-gate configuration. Picture the gate pinned at a certain voltage. The source is modulated to create change on the drain. This might be key to making a faster ADC front-end.

That same principle works for speeding up optotransistors, which tend to be rather slow. By attaching a common base amplifier to the emitter of the opto, the voltage on the emitter does not change, eliminating delays due to the opto's Miller capacitance. The downside is a requirement for multiple voltage supply levels.

That same principle works for speeding up optotransistors, which tend to be rather slow. By attaching a common base amplifier to the emitter of the opto, the voltage on the emitter does not change, eliminating delays due to the opto's Miller capacitance. The downside is a requirement for multiple voltage supply levels.

-Phil

So, it's a current amplifier. That's what we have coming into the ADC front end, really. Maybe a quick second order treatment, along with a higher bandwidth front end can be accomplished before the respin.

The above windows have the same first three taps and all 12 taps could be the same with shift register skipping and this is how my BASIC program works. However, the way to deal with different taps in hardware is to mux the particular shift reg bits. The muxing logic would be less with triple -integration as it has fewer taps.

Although the window values determine the exact number of taps, triple iterated can be significantly smaller at the 'expense' of a few more adders which will be there anyway for Sinc3 mode. The other point to note is that triple iterated length is one longer than double.

This circuit does not seem to work. I tried to simulate it in my code with different values and either it performs like a first order modulator or it doesn't work at all.

Such circuits with no buffers and multiple RC nodes, always struggle because they interact and load so much.

You could try making the second stage with R/C impedances over 10x the first stage, and see if that helps, but I think the 'correct' approach is to use a dual opamp as a proper integrator.
Then, you do get proper charge totals over many samples.

Saucy, it will saturate in the cases of the magnified modes, even if the diodes clamp the 1x modes before saturation. We need to handle saturation by returning $FF, or not getting there, in the first place. The new ADC modes have the same issue. They want to saturate to 2^n on all 1's coming in, whereas we need to limit them to (2^n)-1.

Saucy, I have a question for you... You know that by adding log values of numbers, you are really multiplying them, while subtraction divides, left shift by one squares, and right shift by one square-roots. So, logs are useful for achieving higher-order functions from lower-order ones. I am wondering... What can be done with log values of log values? Some of you may have an idea.

What if you want an arbitrary power instead of a square or square root? You could take the log and multiply. Or you could stack another log on and do the multiplication as an addition.

This circuit does not seem to work. I tried to simulate it in my code with different values and either it performs like a first order modulator or it doesn't work at all.

Such circuits with no buffers and multiple RC nodes, always struggle because they interact and load so much.

You could try making the second stage with R/C impedances over 10x the first stage, and see if that helps, but I think the 'correct' approach is to use a dual opamp as a proper integrator.
Then, you do get proper charge totals over many samples.

A true integrator has gain below its cutoff, and 2nd order sigma-delta modulation relies on gain
in the second integrator - without voltage gain (cascaded RC's), you have to use different gains in the feedback
paths to compensate I think.

We don't need the Goertzel hardware to do a rectangular window. I'm using it so it's easy to change to an arbitrary window later.

I configured it to sample as fast as possible and output to the DAC. It passes decent quality NTSC video. Note that you DON'T need to sample it above 7.16MHz for the color to work. The color seems to alias back up to the proper frequency in the DAC after aliasing down during the sampling. Of course it degrades the quality, but "it works!"

There might be an issue with Goertzel mode. If I wait for it to finish sampling, it doesn't clear the accumulators upon read. The difference between consecutive readings is fine. Either this is not the intended behavior or it's not documented.

Saucy, Goertzel does not use the RDFAST/WRFAST mechanism, but it could. This would allow streaming to/from hub memory. What kinds of operations might be useful?

Obviously streaming the accumulated x and y to hub would be good for software defined radio. But when? It would be inconvenient to have the sample rate locked to a multiple of the carrier frequency. If we had a pre-windowed sine/cosine in the LUT then we could stream windowed samples to the hub. It would be inconvenient to change frequencies as that would mean generating a new LUT. And for best performance we would want one window ramping up while another is ramping down.

If we could stream from HUB instead of LUT then we could retune instantly by changing the address. Or have a window longer than 512.

My concern with the above code is that if I enable the "waitx ##samples+2" between xzero and getxacc then I also have to enable "sub y,ydiff ' add ydiff,y" to get sensible output data. That code computes the difference between consecutive y readings. So it appears that adding the delay causes the Goertzel accumulators to not be reset.

I'm not sure whether the 1st or 2nd derivative method will be used to generate scope mode window filters. The latter is superior in my view as fewer taps required. The 2nd derivative is only 2-bit in range -2..+1 and it is very simple to specify the taps of a cascaded moving average filter cma(x,y,z) in terms of x, y and z:

Will there be any changes to the Goertzel? I have never used one and I can't help until I learn more about it.

The only thing I plan to change in the Goertzel is to have all four LUT bytes signed internally, then invert their MSBs whenever they are output to DACs. This will make it possible to use three phases for output, 0, 120, and 240 degrees, while leaving one for 90 degrees, so that we have the requisite 0 and 90 for input, but get 3-phase concurrent output.

An off-topic question for all you digital filter experts.
At Hackaday, they ask if drone noise can be detected through background airport noise;
" I always hear a multirotor and look up to see it, so I’d take the approach of listening for the distinctive sound of multirotor propellers. Could the auditory signature of high-RPM brushless motors be detected amidst the roar of sound near airports?"