KiwiSDR antenna switch extension [and BeagleBone Black/Green GPIOs]

edited March 21 in KiwiSDR Discussion
I have been working with KiwiSDR antenna switch extension. You can now choose different backends. Currently available backends are MS-S7-WEB controller and Beaglebone GPIO's. You can also write your own backend for controlling your own antenna switch box. If you are already running older version of KiwiSDR antenna switch extension, please uninstall it before installing a new version.

New version is available now on Github: https://github.com/OH1KK/KiwiSDR-antenna-switch-extension

G8JNJg1tvl

Comments

  • Hi All,

    Kari has performed some excellent work with his new extension.

    I've had the GPIO switching configured on my KiWi for the past week and it's working really well.

    Thanks again Kari :-)

    Regards,

    Martin - G8JNJ
  • HI All , as I am quite new in the Linux world, where can I read more about the GPIO switching board ?
    73
    Phil IC8POF

  • Hi Phil,

    There isn't a switching board as such.

    The software toggles some of the spare GPIO (70 -76) pins of the P8 connector on the Beagle. 

    When the switch software is used and an antenna is selected the appropriate GPIO pin goes from 0v to 3.3v.

    This can then be interfaced via a suitable value of resistor (typically 10K) to an NPN transistor driver that is in turn used to operate an external switching relay.

    Details of the software patch and WEB operated switch can be found here https://github.com/OH1KK/KiwiSDR-antenna-switch-extension

    Regards,

    Martin - G8JNJ


    Beagle GPIO.png
    1366 x 1025 - 193K
  • Kari, many thanks for this great piece of work!!

    I have a couple of Teledyne relays on my kiwi, driven from the GPIOs. One selects an inline attenuator, the other switches between 2 antennas (or one antenna and a dummy load at the moment). I had control from ssh, but I never got around to fiddling with the software end.

    Dave G1TVL
  • Many of you will know this, but be careful about the Beagle GPIOs. They are NOT 5V tolerant (3.3V only). Also, some of the pins on the Beagle headers which appear to be GPIOs are configured by the Beagle to drive on-board devices like the eMMC flash memory. Others have a weak pull-up/down interpretation at power-on time to select the processor boot mode. You don't want to conflict with those. See the Beagle system reference manual for details.

  • edited March 16
    Hi John,

    Thanks for this information.

    I have looked at the Beagle system reference manual but to be honest I couldn't find the relevant part.

    Kari's GPIO switcher uses P8 GPIO pins 70 -76 - do these conflict with anything else ?

    I have found that using 10K resistors from these pins to drive transistors does occasionally prevent the Beagle from booting up. To get around this I simply unplug the GPIO interface box (connected via 9 way D type socket mounted below the GPS antenna connector).

    However in my next version of interface I intend to use 1M ohm resistors and Darlington transistors to further reduce the loading on the GPIO pins.

    Which GIPO Pins are safe to use in order to avoid conflicts with other devices ?

    Regards,

    Martin - G8JNJ


  • edited March 16
    Hi All,

    OK looking through the document in more detail I think I have determined which pins are the ones to be avoided.

    Page 54 and page 74 of the Beagle system reference manual - assuming I'm looking at the correct one ? 


    The Antenna Switching GPIO extension currently uses spare pins on connector P8 (40 to 46) which as John has indicated are also associated with the Boot sequence.

    39 - GPIO 2_12 - SYS_BOOT6
    40 - GPIO 2_13 - SYS_BOOT7
    41 - GPIO 2_10 - SYS_BOOT4
    42 - GPIO 2_11 - SYS_BOOT5
    43 - GPIO 2_8   - SYS_BOOT2
    44 - GPIO 2_9  - SYS_BOOT3
    45 - GPIO 2_6 - SYS_BOOT0
    46 - GPIO 2_7 - SYS_BOOT1

    So all of these are possibly not the best choices for this use.

    The only other pins that are not used for Boot or by the KiWi are:-

    U8 27 - GPIO2_22
    U8 28 - GPIO2_24
    U8 29 - GPIO2_23
    U8 30 - GPIO2_25

    U9 27 - GPIO3_19
    P9 42 - GPIO0_7

    John, 

    Do you know which of the Boot pins are actually used on power up ?
    Can you say which pins are being used by the KiWi cape ?  
    Is it possible to use any of the GPIO ports that are within the range used by the KiWi ?

    Ideally I'd like to be able to switch up to ten ports as I wish to add something like a shared apex array which can cover eight of the compass points plus two other antennas.

    Maybe it would be necessary to use an external BDC decoder in conjunction with four GPIO lines (GPIO2_22 to GPIO2_25) in order to achieve this ?

    Regards,

    Martin - G8JNJ

  • This is a little table I made during development that summarizes the situation. Basically, it's safe to use the pins in the "kiwi" column marked "e" or "ok". Some of the others could be used but there are special considerations and you don't really need to worry about that unless you're looking for a lot of pins for some reason.


    image
    pdf
    pdf
    kiwi.GPIO.pdf
    47K
  • Hi John,

    Thanks for this it's very useful. Assuming I'm understanding the designations correctly and that any pins with an X against an orange background are not used.

    It looks like these are the best - listed in order of least conflict first.

    P8 27 - GPIO 2_22
    P8 28 - GPIO 2_24
    P8 29 - GPIO 2_23
    P8 30 - GPIO 2_25

    P9 25 - GPIO 3_21
    P9 28 - GPIO 3_17
    P9 29 - GPIO 3_15
    P9 31 - GPIO 3_14

    P9 30 - GPIO 3_16
    P9 27 - GPIO 3_19 (Okay as Beagle input or output)


    P9 26 - GPIO 0_14 (Also wired to FPGA input)

    P8 26 - GPIO 1_29 (Also wired to FPGA input)

    Does this seem sensible ?

    Regards,

    Martin - G8JNJ







  • jksjks
    edited March 17
    No, the first two groups you have listed are specifically not okay because of device conflicts with the Beagle.

    P8-27..30 are setup as outputs and driven by the LCD controller on the Beagle to the HDMI framer chip. The window system in not enabled on Debian, but you have no way of knowing how the pins are being treated by the device driver. So they are out.
    Similarly P9-25,28,29,31 are HDMI control outputs.

    P9-30 is okay and should have been marked as "ok" in my table.

    Only use the pins makes "e" or "ok" in my table for best results.


  • Hi John,

    OK - good job I checked as I'd misunderstood the meaning of the x.

    So just to double double check.

    In order of preference.

    P8 11 - GPIO 1_13
    P8 12 - GPIO 1_12
    P8 13 - GPIO 0_23
    P8 14 - GPIO 0_26
    P8 15 - GPIO 1_15
    P8 16 - GPIO 1_14
    P8 17 - GPIO 0_27
    P8 18 - GPIO 2_1
    P8 19 - GPIO 0_22
    P8 26 - GPIO 1_29

    On other connector (if ever required)

    P9 11 - GPIO 0_30
    P9 13 - GPIO 0_31
    P9 23 - GPIO 1_17
    P9 26 - GPIO 0_14
    P9 27 - GPIO 3_19

    Regards,

    Martin - G8JNJ
Sign In or Register to comment.