Wednesday 20 November 2013

Bias Compensation option added to the RPi Wobbulator software

The Raspberry Pi Wobbulator software has been revised in line with the changes made to the hardware. As a consequence of using the onboard ADC chip instead of the ADC Pi module, the number of user selectable input channels has been reduced from 8 to 4.

I've also introduced a user selectable "Bias" feature which allows the user to choose whether or not to compensate for any bias on the signal going into the ADC. In the initial version of the Raspberry Pi Wobbulator software, bias compensation was performed by default, and could not be disabled. However from my experience using the RPi Wobbulator I realized that compensating for bias is not always desirable, so decided to make it a user selectable option.

When a frequency sweep is performed with the "Bias" compensation option enabled, the "bias" is measured first by measuring output from the detector stage with the DDS turned off .Then the sweep is performed, and the previously measured "bias" is subtracted from each measurement taken. When the "Bias" compensation option is not enabled, the sweep is performed and each measurement is plotted without performing any subtraction.

The following screenshot shows the revised GUI and demonstrates the use of the "Bias" compensation feature. The two red plots are the result of running a sweep with PGA gain set to 1 and then again with it set to 2, without bias compensation selected. The two blue plots are the result of running the same sweeps but this time with the bias compensation selected.


You can see that without bias compensation (red plots) when the PGA gain is increased from 1 to 2 the central peak doubles in height but the whole plot also moves up the screen. When the same sweeps are repeated with the bias compensation option enabled, the central peak doubles in height, but the bottom of the plot stays in (more or less) the same position.

However, if there is a significant bias on the signal going into the ADC chip, using the "Bias" compensation option can lead to "clipping" of the frequency response plot as demonstrated in the following screenshot.



This time the two blue plots are the result of running a sweep with PGA set to 4 and then again with it set to 8, without the bias compensation selected. The two red plots are the result of running the same sweeps but this time with bias compensation selected. You can see clearly that the uppermost red plot has been "clipped" quite severely - this is due to the ADC input becoming "saturated" because of the large bias on the signal.

The revised source code (version 1.1) for the Raspberry Pi Wobbulator software is available on GitHub.



2 comments: