IO Board Firmware to support the Hardrock-50

1,249 views
Skip to first unread message

Jim Ancona N1ADJ

unread,
Nov 6, 2023, 4:20:07 PM11/6/23
to Hermes-Lite
Hi,

My main reason for getting the IO board was to get reliable band switching with my HL2 and Hardrock-50. (I had done my own Arduino solution that read the filter configuration from the I2C bus, but for various reasons it was never reliable.) When I got my board, I tried Jim N2ADR's basic firmware, which does FT817 band voltage switching. It worked, except on 60 meters. (I guess the 60 meter band is newer than the FT817!) It also wasn't possible to manually switch bands using the amplifier switches when FT817 switching was active.

I decided to do a version of the firmware that uses the Hardrock-50's serial protocol to do the band switching. Jim graciously agreed to merge my code into his repository, which keeps the firmware in one place.


The README explains how to use it. For now, the only thing it does is switch bands based on the TX frequency sent by the SDR software. The serial protocol can do other things like trigger tuning and set the ATU to bypass or active. (See section 6 of the HR-50 manual.) I'm happy to listen to requests for additional functionality.

If you run have questions or problems, please post them to this list and I'll do my best to help. Please don't bother Jim N2ADR with HR-50 issues!

Enjoy!

Jim 
N1ADJ

Ed Stroh

unread,
Nov 6, 2023, 4:29:01 PM11/6/23
to Hermes-Lite
Hey Jim,

This is very interesting. I currently use the HL2+ board for interfacing with the HR50+ but band switching has been inconsistent and the ability to control the tuner would be amazing. If you could get that working, I might actually have to consider switching to the IO board.

Thanks and 73,
Ed KS7ROH

Niels Jalling

unread,
Nov 7, 2023, 5:43:23 PM11/7/23
to Hermes-Lite

Hi Jim

Error in the description on:
https://github.com/jimahlstrom/HL2IOBoard/tree/main/n1adj_hr50

Error line: Solder a jumper from J13 pin 2 to J7 pin 5. There is no J13 on the io-board and the picture shows the right connection.

Correct line: Solder a jumper from J12 pin 2 to J7 pin 5.

I will test the setup during the next days.

Is it possible to connect the PTT-line in the same way via the DB9 connector? I would like to enable/disable the ptt-line from quisk.

73 de oz9ny, Niels

Mike Lewis

unread,
Nov 7, 2023, 7:11:36 PM11/7/23
to Niels Jalling, Hermes-Lite

I do not have a HR50 but looking at the user manual you could use EXTTR RCA style jack on the HL2 for your PTT signal to the HR50 PTT RCA style jack, or run it to pin 4 of the HR50 DB9.   

 

If you want the HL2 PTT signal (GND=TX) to travel though the IOBoard DB9 cable instead, then you can jumper EXTTR to the IOBoard DB9.  More exotic ways involve using a IOBoard GPIO_out pin with code added to follow EXTTR state.   The example code already has an interrupt function called when ever GPIO113_EXTTR changes state.

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/5554b66f-0ced-4faf-8f86-959cd48607adn%40googlegroups.com.

Jim Ancona

unread,
Nov 7, 2023, 7:26:32 PM11/7/23
to Hermes-Lite
Hi Ed,

Do you need full control of the tuner before IO board control of the amplifier would be useful to you? Or is just band switching enough to get you started? If not, what's the minimum set of functions you need?

(BTW, I really enjoy Zero Retries!)

Jim
N1ADJ


--
You received this message because you are subscribed to a topic in the Google Groups "Hermes-Lite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hermes-lite/vwYOZGPLUPE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/9980993c-490d-48fb-86c1-2867a49003a7n%40googlegroups.com.

Jim Ancona

unread,
Nov 7, 2023, 7:40:16 PM11/7/23
to Hermes-Lite
Hi Niels,

Thanks for the README correction. I'll fix it in the next release.

For PTT, I just use an RCA cable to connect the EXTTR jack on the HL2 to the PTT jack on the HR-50. Is there a reason you'd like to use the IO board DB-9 for that?

Jim
N1ADJ

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/5554b66f-0ced-4faf-8f86-959cd48607adn%40googlegroups.com.

Jim Ancona

unread,
Nov 29, 2023, 4:31:54 PM11/29/23
to Hermes-Lite
I've started to look at implementing antenna tuner support in my HR-50 firmware for the I/O Board. The I/O Board README documents a register that SDR software can populate in order to initiate a tune request or to bypass the tuner: https://github.com/jimahlstrom/HL2IOBoard#table-of-i2c-registers

Has any software implemented that part of the protocol? If so, how does one use it? I'm probably missing something, but I don't see a way in Quisk. SparkSDR has a Trigger ATU checkbox, but I don't see the register value changing when I trigger tune or transmit after checking it. I haven't tried any other software yet, but if someone points me to an option that should work, I'll give it a try.

Thanks,

Jim
N1ADJ

Reid Campbell

unread,
Nov 30, 2023, 4:37:20 AM11/30/23
to herme...@googlegroups.com
Hi Jim,

The latest Thetis (2.10.3.4-beta1) supports the protocol. Just hold the Ctrl key while clicking on the TUN button. It will write 0x01 to the I/O Board register and wait for 0xEE being returned. It will then apply RF power.

The next version will handle error returns and allow the power to be different from a normal TUN operation.

Cheers

Reid
Gi8TME/Mi0BOT

Jim Ancona

unread,
Nov 30, 2023, 1:30:59 PM11/30/23
to herme...@googlegroups.com
Thanks Reid,

Right after I sent the email, I looked at the latest Thetis release notes and saw that you had implemented it. My dev environment is running Linux, but Thetis works for me in a Windows VM, so I'm using it for my testing.

Jim
N1ADJ

Jim Ancona

unread,
Dec 6, 2023, 10:33:29 AM12/6/23
to Hermes-Lite
I've updated the HR-50 IO board firmware to support the amp's built-in ATU. With this new release, the IO Board can trigger an ATU tune cycle when the SDR software calls for it and report back success or failure. The source and a compiled binary are here:


Please see the README for information on how to set it up and use it. Note that if you are already using the previous version, you have to do some more soldering to take advantage of the new functionality.

Right now, the only software I know of that supports the IO Board ATU protocol is Reid's Thetis fork, starting with 2.10.3.4-beta1. I used beta2 for my testing. Jim N2ADR has confirmed that it's on the Quisk roadmap. I'm happy to help test any other software that implements this.

Thanks to Jim N2ADR for suggestions on how to monitor transmitter power, his work on the IO Board and for hosting the firmware in his Github repo, to Reid Gi8TME/Mi0BOT for supporting the ATU protocol in Thetis, to Patrick AC1KM and Jim WA2EUJ for help with the HR-50 protocol and to Niels oz9ny for a correction to the README. Apologies to anyone I forgot to mention.

Jim
N1ADJ

James Ahlstrom

unread,
Dec 6, 2023, 3:29:53 PM12/6/23
to Hermes-Lite
The latest Quisk 4.2.26 now supports the ATU. The control is on the bottom row to the left. You can choose Tune or Bypass, and it displays the register codes from the IO board. It is untested, so please test.

Jim
N2ADR

Tech Minds

unread,
Dec 7, 2023, 6:47:06 PM12/7/23
to Hermes-Lite
Hey Jim,

Thank you so much for your hard work with this HR50 firmware. I can confirm that the ATU tuning from Thetis works great with the HR50, IO Board with your firmware.

I am hoping that Simon will add ATU support to SDR Console too as I know he already added the HR50 band control using your firmware.

Thanks again!
Matt
M0DQW

James Ahlstrom

unread,
Dec 9, 2023, 11:39:51 AM12/9/23
to Hermes-Lite
I modified the firmware n2adr_test/build/main.uf2 to include a test pattern for the ATU protocol. Just write a "1" to register REG_ANTENNA_TUNER. This may be useful to SDR authors who want to support the ATU protocol.

Jim
N2ADR

Hari Hurtig

unread,
Jan 6, 2024, 7:49:12 AMJan 6
to Hermes-Lite
Hi Jim,

great work! I do see in the code that you did attempt to set the frequency but apparently had issues according to the comments? Setting the frequency would be needed to benefit from the non-volatile storage of up to 343 tuning solutions in the HR50 ATU (every 10kHz up to 12m, 25kHz up to 10m, and 100kHz up to 6m).

73 de Hari

James Ahlstrom

unread,
Jan 6, 2024, 2:07:10 PMJan 6
to Hermes-Lite
The code in n2adr_test/main.c only outputs a test pattern, it doesn't do anything. What file are you looking at?

Jim
N2ADR

Jim Ancona

unread,
Jan 6, 2024, 2:58:02 PMJan 6
to Hermes-Lite
Hi Jim,

I think Hari's message was directed to the other Jim (me) about my Hardrock-50 code.

Hari, I can't recall what the exact issue was, just that, as the comment says, it was unreliable. Since you've pointed out an advantage to switching by frequency rather than band, I may give it another try at some point.

Jim
N1ADJ

KP4RX - Ramon

unread,
Jan 6, 2024, 3:17:43 PMJan 6
to Hermes-Lite
Hari/Jim Ancona, I was able to generate the FAxxxxx; with this piece of code:

if (new_tx_freq != curr_tx_freq) {
sprintf(freqstr, "%f", new_tx_freq * 1E-6);
int k=0;
printf("FA");
if (strlen(freqstr) == 8){
printf("0000");}
else
printf("000");
while (freqstr[k]!=0) {
if ( freqstr[k] != '.' ) {
printf("%c", freqstr[k]);
}
k++;
}
printf(";\n");
curr_tx_freq = new_tx_freq;
}

I've uploaded a firmware to the board that generates Xiegu band voltage and outputs the Frequency to the serial in such format https://groups.google.com/g/hermes-lite/c/yD7bFNAgULw/m/DyHda1gQCAAJ, I haven't published the code as I had to modify the SDK Files for it to respect the Baud rate, when I figure how to compile without touching the SDK i will publish to github, in the meantime you can look at one similar on my website: https://kp4rx.com/hl2-io-board-xiegu-and-hr50 this code also has PTT Bypass on Ctrl+Tune from Thetis.

Hope this helps!

73 de KP4RX

Ed Stroh

unread,
Jan 22, 2024, 2:53:25 AMJan 22
to Hermes-Lite
Jim N1ADJ,

I just received and installed my I/O board and made the jumper connections as illustrated on the github page but I'm having issues controlling my HR50+. Band switching is working but PTT and auto tuning are not. I'm running Reid's 2.10.3.4 beta 3. When I attempt auto tuning I get an error in red text at the bottom of the panafall that says "I/O Board: Auto Tune Fault Code 0xF0". Can you please provide some guidance on how to troubleshoot this?

73,
Ed KS7ROH

Jim Ancona

unread,
Jan 22, 2024, 10:34:04 AMJan 22
to Hermes-Lite
Hi Ed,

I don't have a Hardrock-50+ and I don't know whether anyone has tried my firmware with it. It looks like the old HR-50 Google Group has been locked for spam, so I can't ask there. I've applied to join the new group. Once I get in, I'll ask if there's a difference in the tuning protocol and try to figure out what I can do without having one available to test with.

Just to be sure, have you double-checked the jumpers and DB-9 cable connections are correct?

Jim
N1ADJ

You received this message because you are subscribed to a topic in the Google Groups "Hermes-Lite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hermes-lite/vwYOZGPLUPE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/b5042d65-c7df-4cd7-a69c-287a065922c3n%40googlegroups.com.

Ed Stroh

unread,
Jan 22, 2024, 1:05:16 PMJan 22
to Hermes-Lite
Jim,

I'm confident in the wiring and DB9 cable. A picture of the wiring is attached. I confirmed the DB9 cable is a straight-through cable (no crossovers). I would think that if serial communication is working at all (band switching) I would have success with the other functions but perhaps not. I believe the serial protocol for the HR50 and HR50+ are the same but I'll check with Jim WA2EUJ. 

Thanks for the support!

73,
Ed KS7ROH

PXL_20240122_175254792.jpg

Ed Stroh

unread,
Jan 22, 2024, 3:06:59 PMJan 22
to Hermes-Lite
Jim,

I looked a little more closely at the image on the github and what Jim WA2EUJ sent me for documentation on the HR50+ (attached) and I think there's a jumper missing. According to Jim's documentation, pins 2 and 3 are used for serial, pin 4 is for PTT, and pin 5 is for ground. Looking at the image on the github, it looks as though 2, 3, and 5 are jumpered but pin 4 is unterminated. Could this be the problem? If so, please provide some guidance on how to resolve if you can. 

Thanks!

73,
Ed KS7ROH

Hardrock-50 Operating Instructions 09-03-20 (1).pdf

Ed Stroh

unread,
Jan 22, 2024, 3:46:50 PMJan 22
to Hermes-Lite
Another quick follow up - Looking at the source file for the HR50 firmware, it looks as though GPIO10/Out5 should be the pin controlling PTT. When I probe GPIO10/Out5 with a meter, I measure 30ohms of resistance between it and ground. There is no voltage present nor path to ground regardless of whether PTT is triggered or not. 

Jim Ancona

unread,
Jan 22, 2024, 4:11:47 PMJan 22
to Hermes-Lite
Hi Ed,

I've always controlled PTT by an RCA connection between the EXTTR plug on the HL2 and the PTT plug on the HR-50. Could you give that a try?

Thanks,

Jim 
N1ADJ

Ed Stroh

unread,
Jan 22, 2024, 4:15:30 PMJan 22
to Hermes-Lite
Jim,

I have confirmed the RCA PTT connection does work but I need this function to be facilitated by the I/O board. I'll be receiving a new 600W amplifier tomorrow (HR50+ will be the exciter) that will need its own PTT RCA input and I was planning to use the one on the HL2 for that. 

Any chance you can assist with a modification to the HR50 pico firmware to include PTT operation via the DB9?

73,
Ed KS7ROH

Jim Ancona

unread,
Jan 22, 2024, 8:06:53 PMJan 22
to Hermes-Lite
I'm not in a position to take that on right now. Since it's not Hardrock-50 specific, perhaps you could do a new post asking for it and see if anyone steps up.

Jim
N1ADJ

Ed Stroh

unread,
Jan 22, 2024, 9:31:14 PMJan 22
to Hermes-Lite
Jim, 

Do you happen to have any good reference material I can review as a primer for attempting to accomplish this myself? I'm only a little familiar with writing for arduino. Can I use arduino IDE or should I migrate to something like VS? Any guidance you can offer would be deeply appreciated. 

Thanks!

73,
Ed KS7ROH

Ed Stroh

unread,
Jan 23, 2024, 1:10:16 AMJan 23
to Hermes-Lite
Just to clarify, the auto tuning function still doesn't work with the RCA PTT connected. Again, please let me know if you have any guidance.

73,
Ed KS7ROH

Jim Ancona

unread,
Jan 23, 2024, 7:42:16 AMJan 23
to Hermes-Lite
Oh, I thought you meant everything had started to work. Could you confirm the following values in the HR-50 Setup menu:

2. ACC Baud Rate: 19200
3. USB Baud Rate: 19200
4. Transceiver: Other
9. ATU Mode: Active

Also confirm that KEY:PTT shows on the main display.

Assuming all that is correct:

Does Thetis go into transmit when you hit CTRL-TUN?
Is the fault code still 0xF0?

Jim
N1ADJ

Jim Ancona

unread,
Jan 23, 2024, 7:57:43 AMJan 23
to Hermes-Lite
Hi Ed,

The IO Board uses a Raspberry Pi Pico, not an Arduino. I use Visual Studio Code for my IDE. There are a lot of Getting Started guides out there. Make sure you use one focused on C programming, not Python. Here are a couple I found helpful:


The second link assumes you're developing on a Pi, although the instructions work pretty well on any Debian- or Ubuntu-based Linux. (I do my development on Linux Mint.) The first link is probably better if you're on Windows.

One other thought: Could you just set the HR-50+ to COR mode and use EXTTR to trigger the second amp?

Jim
N1ADJ 

Ed Stroh

unread,
Jan 23, 2024, 12:47:42 PMJan 23
to Hermes-Lite
Hey Jim, 

I can confirm all the settings on the HR50+ are correct but it does not go into transmit when hitting CTRL-TUN. It does go into transmit when hitting MOX, TUN, or 2TON but only if I have the EXTTR connected or the HR50+ is in COR mode. 

I probably could use COR on the HR50+ and EXTTR on the big amp but I'm very keen to get PTT working via DB9 as that's how the HL2+ addon board works which is what I was using prior to the IO board. 

Thank you very much for the links! I'll be sure to review those. I've also reached out to N2ADR via email to see if he can provide some additional guidance. 

Please let me know if you have any other thoughts on why CTRL-TUN might not be working. 

Thanks and 73,
Ed KS7ROH

Jim Ancona

unread,
Jan 23, 2024, 10:50:58 PMJan 23
to Hermes-Lite
I can't reproduce this behavior. 

Could you confirm the error code is still 0xF0? 
What is the exact version of Thetis you're running?
Could you try tuning with the latest version of Quisk?

Thanks,

Jim
N1ADJ


Kristofer Danner

unread,
Jan 24, 2024, 12:52:30 AMJan 24
to Hermes-Lite
FWIW, I built a HR50+ upgrade right when it was released. I had posted in the google group at that time that the serial commands were not documented, but that I had figured some out based on the HR500 documentation. Of course that thread is long gone now. I just looked and I still see no operating documentation for the HR50+. At any rate it is not all the same commands as a HR50 and if I remember correctly using the ATU was one thing not working for me. It has just been sitting ever since as I've only been working VHF anyway.

As for PTT it appears that you should be able to ground pin4 of the amp's DB9 and see if the amp keys. I don't recall having any problems with this, it just worked same as the HR50 did.

KD

James Ahlstrom

unread,
Jan 24, 2024, 11:02:24 AMJan 24
to Hermes-Lite
The single HL2 EXTTR can be shared among several devices if each has a diode in series. If this doesn't work, you can use any of the low side switches in the IO board as additional independent EXTTR. Just set the state according to the HL2 EXTTR.

Jim
N2ADR

Ed Stroh

unread,
Jan 28, 2024, 11:25:37 PMJan 28
to Hermes-Lite
Jim N1ADJ,

I can confirm the error code is still 0xF0.
I'm running the latest version of Reid's build as of this writing. 
Just updated quisk and I'm getting the same result. It also reports an error of 0xF0. 

I'd appreciate additional support on this one if you can provide it. 

For anyone who's interested, I was able to successfully implement the PTT function on pin 4 of the DB9. Files attached. Just jumper J6 pin 5 to pin 4 of the DB9. 

73,
Ed KS7ROH

main.uf2
main.c

Ed Stroh

unread,
Jan 29, 2024, 1:54:46 AMJan 29
to Hermes-Lite
Jim,

After some further testing by sending serial commands to the HR50+ via USB, it seems there are several commands that aren't fully implemented. I've sent an email to Jim WA2EUJ asking about this. Hopefully, he can help. I'll report back when I hear from him.

73,
Ed KS7ROH

Jim Ancona

unread,
Jan 29, 2024, 7:47:39 AMJan 29
to Hermes-Lite
Hi Ed,

May I suggest that you ask your question on the HR-50 Google group, so that I and others can see it and answers are archived? I've gotten good answers there from people other than WA2EUJ in the past.

If we can get the USB command documentation I will give it a try, but there are enough quirks with the behavior that without an amp to work with it may be slow to work out.

Jim
N1ADJ

Ed Stroh

unread,
Jan 29, 2024, 2:10:28 PMJan 29
to Hermes-Lite
Hey Jim,

Good suggestion. I'll probably make a post on the HR50 forum once we get this figured out. 

Jim WA2EUJ got back to me this morning with a new FW file for the HR50+ which successfully implements the HRTU function but it seems HRAT is still not working. I'm now getting a different error now when I attempt the auto tuning function via Thetis: "I/O Board: Auto Tuning Fault Code 0xF2". Probing the HR50+ with commands via USB 

I suspect there's nothing wrong with your programming, Jim. It's just the control protocol as implemented in the HR50+ firmware. I'm sure WA2EUJ can get this sorted out. I appreciate the support you've provided thus far. 

I'll be sure to wrap this up with a final update once it's working. 

73,
Ed KS7ROH

Ed Stroh

unread,
Feb 4, 2024, 12:49:04 AMFeb 4
to Hermes-Lite
Hey all,

It was the program after all. There's nothing wrong with the HR50+ (now that the firmware has been updated) and the I/O board as well as the connections I made on it were all fine. 

After some trials and tribulations, I've been able to produce a version of Jim's firmware that, for me at least, successfully works to control the HR50+ including the auto tuning feature (CTRL+Click TUN) in Reid's fork of Thetis. If you have an HL2 and HR50+, please test this and let me know if it works for you. I hope this benefits others.

73,
Ed KS7ROH

main.c
main.uf2

Kerstan Moran

unread,
Jun 6, 2024, 8:48:54 AMJun 6
to Hermes-Lite
Hi Ed,

I am trying to help a friend who has a Hermes with the IO board by N2ADR and he is looking for the firmware/code that he can load onto the IO board that will control the Hardrock 50, automatic band switching/ect. I see you posted some code and I wanted to confirm that this is would all the IO board to control the Hardrock 50.

Regards,
Kerstan
KB5SJ

Jim Ancona

unread,
Jun 6, 2024, 9:06:38 AMJun 6
to Kerstan Moran, Hermes-Lite
If your friend has a Hardrock-50 (not the Plus) he probably wants my firmware, available at https://github.com/jimahlstrom/HL2IOBoard/tree/main/n1adj_hr50 That page explains how to use it.

On the other hand, if he has the HR50+, Ed's version is what he needs.

Jim
N1ADJ


Ed Stroh

unread,
Jun 6, 2024, 11:34:28 AMJun 6
to Hermes-Lite
Hey Kerstan,

I can confirm that Jim's Firmware is the one you'll want to use for the HR50. Mine is specific to the HR50+ and the HR500. I hope that helps!

73s,
Ed KS7ROH
Message has been deleted

Harald Klein

unread,
Jun 21, 2024, 5:07:27 PM (12 days ago) Jun 21
to Hermes-Lite
Working great with my HR50, just found time to finally fit the board. Thanks for your effort Jim!
Reply all
Reply to author
Forward
0 new messages