v1.623 [also, RF attenuator control discussion]

From the CHANGE_LOG file:

v1.623 September 4, 2023

  Added "RF" tab to user control panel. KiwiSDR 2 RF attenuator control is here.

    In the future other functions will move here like the antenna switch.


  Admin control tab: "daily restart" now a menu allowing restart or reboot (thanks Glenn, N6GN).


  Other changes to support KiwiSDR 2.


Comments

  • Are you saying that the attenuator will be controlled by the user?!!

  • jksjks
    edited September 2023

    Yes, but TBD are options to limit this for the case of public Kiwis. We could have different modes that match different expected situations:

    You could imagine adjustment being purely manual or set to a schedule. Like adding 15 dB of attenuation in the evening for a Kiwi in the EU where the SWBC signal levels are very high during that time.

    For public Kiwis there could be options for no user control, control only for password-protected channels, or open where users could fight over it (the antenna switch allows for these kind of access options). In the latter case all connections would get a notification when the attenuation changed (as is done with the antenna switch now) so they understand why the signal levels are varying.

    All kinds of possibilities here..

  • jks, thank you for your work! Adding a controlled attenuator gives a lot of interesting things! Schedule management is brilliant! And of course the admin has to decide whether the user can control the attenuator.

  • The v1.623 release was mostly for the change requested by Glenn. But I added the "RF" tab and RF attn slider to get some feedback.

    I'm working on putting the antenna switch in there too, so you can use it while other extensions are open. But this requires a bunch of changes not ready yet.

  • Hi John,

    Just some random thoughts for further discussion.

    My opinion is still that in many cases, it is strong local medium wave broadcast stations that cause the majority of problems, especially when the antenna is a broadband active loop, and that this can usually be fixed by means of a simple external passive amplitude / slope equaliser.

    However, getting back to the main topic. To be honest I hadn't really envisaged the attenuator being under 'public' control, as I think it could lead to a lot of problems.

    My thoughts were that it would be pretty much automatic, in that if ADC overloads occurred, the attenuation would be slowly (perhaps a minute per 1dB) increased step by step until the ADC overloads stopped. Then gradually the operation would be reversed until the ADC overloads appeared again and the attenuation would once again be increased.

    This is a bit like 'riding' the master gain on an audio mixing desk. It is quite subtle and just helps to maintain sufficient headroom and preserve the overall dynamic range during louder sections of the recording.

    Some broadcast transmission limiters use a similar technique of having two time constants, one fast time constant limits short duration peaks (like AGC) and the other, much longer time constant (like the attenuator), maintains the average modulation level.

    Maybe a further test would be to see if the noise floor at a quiet HF frequency around 30MHz was greater than 6dB above the KiWi noise floor. In which case attenuation could safely be added.

    The scheduling is a good idea, and maybe a manual, or perhaps even automated hit list of problematic frequencies and levels could be generated, so that it could be used to predict the times at which attenuation may need to be added.

    As attenuation is added, could the dB value of attenuation be shown on the GUI, and also the S Meter, Waterfall and spectrum display be corrected to compensate for any additional attenuation that is applied.

    As I said just my thoughts, and I'm sure I'd be happy with whatever is finally implemented.

    Regards,

    Martin

  • edited September 2023

    >I'm working on putting the antenna switch in there too,


    Oh, this will be really good! Thank you. Is there a particular hardware switch I should be putting on order?

  • @G8JNJ Automatic control is an interesting idea. No reason why we couldn't experiment with an idea like that. Also, good idea about compensating the WF/spec for gain changes. Like we compensate now for zoom level changes.

    @k5mo The Github page for the antenna switch extension has a list of currently supported switches. There is also a backend to drive the Beagle GPIO pins on the P8 connector. Although you have to be extremely careful doing so.



  • I just ordered a SV1AFN 4 port switch which looks handy for a SDR antenna switch (and quite affordable). This might be an interesting antenna switch hardware option since it's receive-only and tiny (and quite affordable :-) )


    Thanks for all you do.


    John K5MO

  • Re: SV1AFN switch. It says 3.3V compatible. Just make sure it's configured that way and has no chance of back-feeding 5V into the Beagle/Kiwi P8 header pins. That would take out both the Beagle and the Kiwi.

  • This old thread my be of interest if you are planning to use the GPIO port for antenna switching.

    https://forum.kiwisdr.com/index.php?p=/discussion/comment/7539

    If you wish to better protect your KiWi and also reduce radiated noise, then adding some series resistors and decoupling capacitors is a worthwhile precaution.

    Regards,

    Martin

  • Thank you both for the inputs. I will be very careful (and keep an eye on the Kiwi2 availability just in case. :-).

    Might be a good idea to optically isolate the two.

  • Hello, friends! It has been a long time since the discussion of the attenuator began. I would like to know if there are any results on the automatic control of the attenuator? Temporarily I implemented such a scheme. The gain of my antenna is about 40 dB. In the evening and at night it causes overvoltage so I reduce the gain by 15~20 dB at this time. In the morning and afternoon I reduce the gain by 3~5 dB. It seems to work quite well.

  • I think it can become too easy to concentrate on just the overall signal levels.

    Many of the SDR's I've looked at on line seem to have far to high signal levels on the LF bands and not really enough on the HF bands.

    It is best to either tailor the antenna or incorporate a suitable amplitude / frequency slope equaliser and / or Broadcast Band notches.

    Tune to a quiet bit of spectrum, and observe the difference in noise floor between a 50 ohm resistive load and the antenna in use.

    If it is less than 6dB the antenna needs some improvement.

    6dB to 10dB is ideal

    Greater than 10dB means that you are wasting valuable dynamic range with no further improvement in the Signal to Noise ratio.

    Measure it at a few different frequencies during daytime, at say 100kHz, 500kHz and 1, 5, 10, 20 & 30MHz.

    Do this again at night time, and draw a graph of frequency vs. change in noise levels.

    Once you have the curves then you can try and find a compromise, and build a circuit that is the inverse shape and adds progressively more attenuation on the lower frequencies, something like this, which adds about 10dB of attenuation at frequencies below 1MHz, 6dB at around 10MHz and 0.5dB at 30MHz.



    This simple circuit has provided a good repeatable solution against ADC overload, especally with low cost RTL dongles.

    Regards,

    Martin

  • Martin, thanks for the answer! You are absolutely right, using an attenuator in this case is very simple, but not an ideal solution. In my area there is no overload at low and medium frequencies. There are also no overloads in the upper shortwave range. A good option would be to use bandstop filters. But their design is a little more complicated. Maybe I should think about it!

  • Bandstops for the Shortwave broadcast bands are easy, as you only really require 10 to 20dB at a specific frequency.

    There have been plenty of discussions regarding suitable designs on this forum in the past.

    Here are some values to get you started. The LC/Ratios have been chosen to provide the best compromise between notch depth, band coverage and out of band attenuation for the various short wave broadcast allocations.


    Depending on the depth of the notches you require, and the Q of the tuned circuits you are using, you can change the resistor values to suit. With typical small inductor values having a Q of 50, then the resistors can probably be omitted to give a mid band notch depth of up to 20dB.

    You may have to tune the notches on the higher frequency bands, and using a trimmer capacitor makes this a lot easier.

    A few years ago I made up a batch of filter boards that looked something like this. They also incorporated additional ESD protection, band pass filtering and an amplitude / frequency equaliser.



    I hope this helps to provide some ideas.

    Regards,

    Martin

  • Martin, thank you. Your schematic from rfsim is very simple. I should repeat it and analyze it. I have several frequency sections where I definitely need to lower the gain. It is about 16 MHz and about 4 MHz. You have a link to my private KiwiSDR. You can see the situation.

Sign In or Register to comment.