The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz

External Attenuator for Kiwi's during high MUF conditions [ADC level interface in v1.594]

edited April 2023 in Problems Now Fixed

It seems that as conditions and MUF have been peaking that the 14 bit limitations of the Kiwi ADCare becoming more obvious. Many of the better Kiwi receive sites are having to work to keep large SW broadcast signals from over-running the ADC which in a fixed gain environment means filtering and careful system gain setting.

While filtering can be a way out of this predicament, it would seem to me to not be difficult or expensive to build a [32] dB step attenuator with a USB interface that could plug into the Kiwi/BB and potentially allow dynamic adjustment of the overall gain to allow a system to get nearer the propagated noise floor during times when SW BC isn't limiting while also accomodating that situation.

This perhaps isn't the ideal solution but it would be more general than filtering which has requirements unique to each Kiwi system.

How difficult would it be to provide a measure of maximum ADC level so that a $5 Psemi attenuator and inexpensive one board controller might dynamically adjust to suit conditions while controlled and powered by the Kiwi, or even by a remote host, if that is too difficult? It's easy to turn the attenuation up when the present OV indication fires but I see no way to know when system gain might be restored when conditions permit. Is there any way to read ADC maxima so that a Kiwi extension might do it all?

If this is viable, I'm willing to look at designing and fab'ing some suitable HW.

Glenn n6gn

Comments

  • Many of the wsprdaemon sites are starting to suffer from overloads, so I will definitely add support for an attenuator if the Kiwi status page would report the max ADC values since the last read of the status page

  • Hi Glenn,

    The way it is being done at the Weston KiWi site is to have a number of bandpass filters feeding separate AD8307 RF detectors. The individual broadcast band information is then used to drive an MQTT controlled stepped attenuator and individual band notch filters.

    The diagram shown below is a bit out of date as the 5/8th vertical and active loop also have separate stepped attenuators, so that we can optimise the contribution from each antenna.

    Most of the time we have the MW & LW notches and a 10MHz slope equaliser in circuit. At night the 7, 9, 11 & 13MHz notches tend to be switched in for an hour or two from dusk until approx 23:00 local.

    This has all been implemented by the site admin, but at my own site I have taken a different approach.

    At Wessex I use notches all of the time, and these have been specifically targeted on just a few problematic broadcast stations. This works better for me, as it allows maximum sensitivity at all times on all other frequencies.

    It also scores better than Weston on the http://rx.linkfanel.net/snr.html list

    Horses for courses.

    Regards,

    Martin

  • I have used the notch method on various HF sites I manage, not just Kiwi. Takes very few parts.

  • edited March 2023

    wsprdaemon users may not be aware that WD logs a count of new overload events which occur in each 2 minute WSPR cycle. Execute the command "wd-overloads" from the terminal command line to get a dump of those log lines and then filter the results to look through those days of log lines to see if/when overloading occurs

  • Notches or, even better, multiple tracking BPFs that follow the selected rx frequencies would be even better but are more complicated and expensive solutions. Each site needs to tailor the HW to the individual problem it experiences and this problablly puts this sort of solution out of range for many Kiwi operators.

    On the assumption that the OV conditions only exist part time, a dynamic attenuator might offer an inexpensive and readily available compromise to these more tailored solutions.

    I think it could be pretty inexpensive.

  • Just curious -- has anyone ever characterized the IM3 performance of these solid state attenuators at 0-30 MHz? It's great that the Psemi parts spec for insertion loss, return loss and attenuation error goes down to zero. But input IP3 starts at 3 GHz and goes up.

    I realize their market is all cell infrastructure. So they're not not going to spend the time/expense of sampling batches for low frequency IM performance. Still, it would be nice to know.

  • The newer version of the PE4302 31.5 dB step attenuator I've used, the PE4312, is spec'd


    I presume things change at LF but they also say:

    "Covering a 31.5 dB attenuation range in 0.5 dB steps, it maintains high linearity and low power consumption from 1 MHz through 4 GHz."


    Glenn n6gn

  • Thanks for that. Any insight into silicon switches? I guess there are certainly enough commutating (Tayloe) mixers out there that seem to work. I'm thinking more about relay replacements in the front end.

  • I'm not current on all the possibilities but FET switches aren't saddled with the junction potential of bipolars and can exhibit very low on resistance. For low cost components, I tend to look at current wireless products, especially mobile phones, since the production volumes tend to be extremely high and the costs very low. This has me using rather nice T/R switches from phones, some of which can handle watts of power, switch rapidly with low current requirements and cost only pennies.

    In the Kiwi 0-2 GHz frequency extender and its bigger sibling the 0-2 GHz transverter that I now have working, I use Psemi PE42421 which has a 1 dB compression point over 2W and which JLCPCB will assemble for USD$0.25 in single quantitites. I think this is pretty much the same "ultraCMOS" technology used in the step attenuators, though I haven't looked closely. It seems hard to beat this price/performance.

    I would think that this technology might make for pretty high level mixers with watts of LO power, at least at LW. Probably not too much demand for that sort of product down there though. I don't knolw it could be produced with shorter carrier lifetimes and faster switching times to increase the maximum frequency.

  • jksjks
    edited April 2023

    Okay, so v1.594 has a first cut of an ADC level/headroom measurement interface.

    The interface is somewhat primitive because the FPGA is severely constrained these days (and I'm getting ready to make an addition which makes the situation much worse). So you're going to have to do a little work to make this useful.

    After updating, on the BB* take a look at the adc alias (al adc). You'll see that is runs a curl every half second on: <local_kiwi_ip>:8073/adc?level=<dec_or_hex_level_value> So when you type adc 0x1000 what you get back is JSON output looking something like this:

    { "adc_level_dec":4096, "adc_level_hex":"0x1000", "adc_count":2449234660 } // first is junk

    { "adc_level_dec":4096, "adc_level_hex":"0x1000", "adc_count":0 } // for sig gen set -25 dBm

    { "adc_level_dec":4096, "adc_level_hex":"0x1000", "adc_count":0 }

    ...

    { "adc_level_dec":4096, "adc_level_hex":"0x1000", "adc_count":1 } // for sig gen set -24 dBm

    { "adc_level_dec":4096, "adc_level_hex":"0x1000", "adc_count":4 } // i.e. slightly stronger

    ...

    What this means is that ADC values equal or above 4096 (0x1000) just begin to occur at -24 dBm, but not with a signal weaker than that. This is for a single-tone setup using a signal generator directly feeding the antenna input and the admin page, config tab, S-meter calibration set (typically about -16 dB) so a signal gen attn of -73 dBm produces S9 on the S-meter (mode=am, pb=10k).

    adc_count is a 32-bit counter that is incremented every time the ADC value is more than adc_level. This occurs every single tick of the 66 MHz ADC clock. And zeroed each time a new adc_level is set. If every single ADC value was over the level then adc_count would, worst case, overflow in ~64 seconds (2^32 / 66M). So keep that in mind. Only the absolute value of the ADC values are considered. So 8191 (0x1fff) is the maximum value of the adc_level you can specify.

    To find the current adc_level breakpoint you're obviously going to have to do some bisection to find it. Including deciding what criteria for your sampling interval and count are. During testing I found it easier to set a fixed adc_level using the adc alias and then stepping the signal gen attn in 1 dB steps to find the breakpoint. Some results using the setup described above:

    adc_level sig_gen_dBm

    0x1800 -21

    0x1000 -25

    0x0a00 -32

    0x0900 -33

    0x0800 -35

    0x0700 -38

    0x0600 -43

    0x0500 -52

    0x0400 (noise limited due to heavy SMPS RFI)

    Currently, this interface is only available from the Kiwi's local network. But that could be changed.

  • I noticed something very interesting while testing on another Kiwi with terrible SMPS RFI (cable to signal gen connected, but gen output disabled). It's the usual SMPS behavior we see where the fundamental carrier (~40 kHz) is unstable but has many harmonics up into HF (-80 dBm @ 5 MHz).

    The breakpoint measured by adc was a very high 0x1400 Implying peak ADC samples stronger than an equivalent -24 dBm for a single-tone measurement on the other Kiwi. But the highest peak of the RFI as measured by the Kiwi spectrum display was only -42 dBm. And only one other exceeded -50 dBm. So what's going on here? How can a bunch of noisy carriers, each under -42 dBm, cause peak ADC samples matching a single-tone response 20 dB higher?

    Are all these noisy SMPS harmonics correlated such that the time domain ADC sample peaks are adding up that much?

  • edited April 2023

    Hi John,

    Yes I believe they are correlated as you have observed.

    I have a wideband RF 'sniffer' that I use for interference tracing, and I find that for some types of noise sources, especially those such as Switch Mode power supplies, the total noise power is much easier to identify relative to other signals when the detector is not bandwidth limited by filters or similar.

    Lightning is another wideband noise source that often seems to be correlated.

    If you listen to my home KiWi I also have interference from domestic data over mains adaptors and this also seems to be correlated, as it is very loud on my wideband detector, but pretty weak when I try to locate its source with a hand held spectrum analyser with only a relatively narrow bandwidth.

    http://g8jnj.zapto.org:8073

    Regards,

    Martin

  • jksjks
    edited April 2023

    If this is true then having any sort of SMPS RFI present (even if confined to below HF) might steal significant dynamic range away from the ADC (more than you might otherwise think).

    I also suppose this means we should be relieved all the MW/SW broadcasters are not carrier-locked with GPSDOs, for similar reasons..

  • Yes I think it is likely to limit the overall dynamic range.

    Regards,

    Martin

  • "I also suppose this means we should be relieved all the MW/SW broadcasters are not carrier-locked with GPSDOs, for similar reasons.."

    That's true but their audio peaks are all perfectly aligned and 6 dB bigger than the vector sum of all the carriers Here in Fort Collins where I hear all of them full strength all of the time it means that the current gain setting in the preamp puts the strongest of them at only -27 dBm. I'd turn things up a little more to help the 30 MHz end if I could.

    Another use for a variable gain attenuator since it's really hard to predict what that vector some will be with a given installation.

    Glenn

  • Hi Glenn,

    At Weston I'm using an amplitude slope equaliser. About 10dB starting at around 5MHz up to 30MHz, plus the usual Broadcast Band notches, all placed before the distribution amplifier, as shown in the diagram earlier in this thread.

    Signals from three antennas are diplexed together, and each antenna has a remote controlled step attenuator prior to the diplexer, so that we can match the signal levels.

    We normally only need to automatically select additional Broadcast Band notches in the 1.6 to 22.5 MHz path, which is fed from a 1.8MHz 1/2 wave dipole, and this is from the early evening until about midnight, when the European broadcasters are at their strongest levels. The dipole uses a 600 ohm to 50 ohm balun, in order to help flatten the frequency response, but it's really far too big for it's purpose. However the site owner prefers using this antenna for various reasons, so we have had to automatically control the signal levels as discussed.

    At Wessex I've chosen to use a smaller antenna, a Vertical Terminated Delta Loop with 20m sides, which naturally has less gain below about 4MHz, and this helps to provide the required amplitude / frequency slope.

    Although some notches are still required ahead of the distribution amplifier, it does provide some additional gain on the upper HF bands. This helps maintain a minimum of 4 to 6dB increase in KiWi receive noise floor when the antenna is connected vs. a 50 ohm load, valid on frequencies up to 60MHz, which is about optimum for the quiet rural site.

    In order to achieve a much better noise figure on the higher frequencies, I've had to build a special diplexed distribution amplifier with a crossover at about 22MHz. The lower bands use a DX Engineering RPA-1 type push pull amplifier with a 6dB noise figure, and the upper bands use a push pull pair of PGA-103, with a noise figure of under 1dB at 60MHz and slightly higher gain.

    This is my best performing KiWi site, and I'm pretty pleased with how it turned out.

    Regards,

    Martin

  • edited April 2023

    Could one use the existing antenna switch extension for user control of a step attenuator or the switching in and out of notch filters via the GPIO pins on the beagle?

    I thought about doing this so I or users could toggle between a preset higher and lower attenuation, and to toggle a notch filter in and out for a close 50kW local on 1500, and perhaps to switch an AM BCB filter in and out too for HF use.


    The idea presented by the OP sounds interesting, and something I'll be watching closer.

  • @nitroengine Yes, should be possible if the extension is configured for "antenna mixing". So an antenna plus attenuation/filter setting could be selected together.

    The extension could even be enhanced so that antenna mixing could be disabled but entries in the admin configuration marked as "attn/filter" so they could be simultaneously selected.

  • I think the suggestion of bringing the ADC overload indication out via a gpio pin was suggested a long time ago, as a means of controlling an external attenuator or other AGC system.

    Maybe this could be investigated as a possibility too ?

    Regards,

    Martin

  • I got part way down this rabbit hole. Now that John has kindly provided a CAT string on the USB port which contains the vfo frequency, I have an arduino sketch which reads the CAT string and outputs a voltage on a DAC pin that can tune my varactor resonated shielded loop (N6RK design from the NC journal paper). There is no way at present to make this work for more than a single user but it does provide a great degree of overload protection as the antenna acts as a pre-selector. I could see how several of these antennas could be fed to a hybrid combiner and perhaps an extension in the firmware could be used to send multiple strings that would be parsed by separate hardware associated with each loop antenna. Not as elegant as the single antenna case but perhaps doable?

    Joe ve7vxo

  • Hi Joe,

    It could possibly be done, but why not simply use a decent broadband active loop ?

    In most locations the performance is likely to be limited by the level of the local noise floor, and any slight difference in received signal to noise ratio between a tuned and active broadband loop is likely to be very small.

    The LZ1AQ and Wellbrook (or now that production is ending a decent clone) are both capable of good performance, others less so.

    Regards,

    Martin

Sign In or Register to comment.