10MHz GPSDO into CL1 observation

1,059 views
Skip to first unread message

Mooneer Salem

unread,
Jun 23, 2021, 11:26:54 AM6/23/21
to Hermes-Lite
Hi all,

I got a chance to play with interfacing my 5V GPSDO with my HL2 last night. After getting the output from the GPSDO low enough to not fry the VersaClock chip, I updated the hermeslite.py script as follows based on what I saw in the VersaClock programming guide (page 21 of https://www.renesas.com/us/en/document/mau/versaclock-5-family-register-descriptions-and-programming-guide?language=en&r=122946):

  def enable_cl1_10mhz(self):
    """Use 10MHz CL1 as input to PLL1 and then to AD9866"""
    # Multiplying 10MHz by 261.12 will give us the desired 2611.2MHz VCO.
    # This requires a fractional portion that translates to 2^24 * 0.12 = 2013265.92 = ~2013265
    # per the VersaClock datasheet.
    self.write_versa5(0x17,0x10) ## Change top multiplier to 0x105
    self.write_versa5(0x18,0x50)
    self.write_versa5(0x19,0x1E) ## Change fractional multiplier to 0x1EB852
    self.write_versa5(0x1A,0xB8)
    self.write_versa5(0x1B,0x52)
    self.write_versa5(0x10,0xc0) ## Enable xtal and clock
    self.write_versa5(0x13,0x03) ## Switch to clock
    self.write_versa5(0x10,0x40) ## Enable clock input only, won't lock to master

In my testing, this does seem to work. However, WWV is off by exactly 4.6 KHz now (meaning it's on 10.004600 MHz instead of 10 MHz). The upside is that if I tune to that frequency in Quisk, I'm exactly in the middle of the carrier now vs. ~16Hz off like before. Any idea what I could be missing in the above? I already tried shifting the fractional multiplier a bit but it seems to have no effect for small shifts and causes the HL2 to stop receiving anything altogether for larger ones (on the order of 0x10 or so).

Thanks,

-Mooneer K6AQ

Mooneer Salem

unread,
Jun 23, 2021, 6:42:30 PM6/23/21
to Hermes-Lite
So, I power cycled my HL2 and the settings in my original email no longer work when applied. I guess I'll need to play with the script some more and see what's going on (or maybe try to get a copy of Timing Commander or something). Any ideas are definitely welcome in the meantime.

-Mooneer K6AQ

Steve Haynal

unread,
Jun 25, 2021, 1:45:30 AM6/25/21
to Hermes-Lite
Hi Mooneer,

Maybe you can try this combination. It has an integer multiplier and a simpler fractional divider.

## Multiply 10MHz by 288 for VCO at 2880MHz
self.write_versa5(0x17,0x12) 
self.write_versa5(0x18,0x20)

## Divide by 37.5 for 76.8 MHz
## But since there is a builtin divide by 2, divide by 37.5/2=18.75
## Set integer portion to 18
self.write_versa5(0x2d,0x01)
self.write_versa5(0x2e,0x20)

## Set fractional portion to 0.75, 30 bits, 2**24 * .75 = 0xc00000
self.write_versa5(0x22,0x03) ## [29:22]   ## Maybe 0x60 for 30 bit fraction with sign? Not sure, try both.
self.write_versa5(0x23,0x00) ## [21:14]
self.write_versa5(0x24,0x00) ## [13:6]
self.write_versa5(0x25,0x00) ## [5:0] 


I've found it very helpful to use the Timing Commander Software to configure for the target frequency and then copy the register values the software found. If you haven't already seen it, there is a clock wiki page:


73,

Steve
kf7o

Mooneer Salem

unread,
Jun 25, 2021, 3:19:20 AM6/25/21
to Hermes-Lite
Hi Steve,

Actually, I did download Timing Commander and ended up with similar settings. :) Unfortunately, both variants (0x03 and 0x60) didn't seem to work for me. Is it possible that the settings need to be set immediately on HL2 powerup? Or at least disabling clock output before changing the settings?

Thanks,

-Mooneer K6AQ

--
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/7bdd6a03-6e51-4004-af6e-2bef95c0a856n%40googlegroups.com.

Mooneer Salem

unread,
Jun 25, 2021, 1:15:59 PM6/25/21
to Hermes-Lite
(moving back to the list)

Hi Eric,

I'm mainly trying to have my HL2 use my existing 10MHz GPSDO to generate the 76.8MHz that it uses internally. My hope is that I can get a bit more frequency accuracy with this approach (it's currently off by ~10-15Hz when compared to WWV on 10 MHz). If you have two HL2s, my understanding is that you'll use the primary radio's clock output to synchronize the secondary one. The "Gateware RX Synchronization" section of https://github.com/softerhardware/Hermes-Lite2/wiki/External-Clocks might be useful for the connections you'll need to make.

Thanks,

-Mooneer K6AQ

On Fri, Jun 25, 2021 at 4:15 AM Jo Oak <bandbh...@gmail.com> wrote:
Hi Mooneer

Are you trying to drive hl2 by gps module frequency. I am after a similar test for multiple hl2 remote synchronisation. But struggling to understand how to sync the data from different hl2


Eric


--
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.

Steve Haynal

unread,
Jun 26, 2021, 1:50:28 PM6/26/21
to Hermes-Lite
Hi Mooner,

You can build custom gateware that startup expecting and using a 10MHz input. You can find the FSM that sets the clock in Hermes-Lite2/gateware/rtl/i2c.v.

It is an interesting problem to see if it is possible to switch to an external 10MHz input dynamically. I remember it was tricky to get everything to work when switching a secondary radio to use the primary radio clock. The key is to always supply a legitimate clock (80MHz or less) to the AD9866. The clock can't stop. Even so, sometimes the AD9866 PLL no longer locks and then no clock is sent to the FPGA. In the notes to switch to CL1 on this wiki page:

You see that I had to enable both the internal and external clocks for a short time so that neither clock was stopped during the switch. I think something like that is required here. Maybe something along these lines might work:

Register = Value

## Enable both the external clock and internal oscillator inputs
self.write_versa5(0x10,0xc0)

## Switch to the external clock. Note that this is done before adjusting any multipliers. This will keep the clock presented to the AD9866 at 20MHz. If we adjust the multipliers first, we may go out of range. Since both clock inputs are enabled, the switch should not result in any long period of time with no clock.
self.write_versa5(0x13,0x03)

## Switch to only external clock input, plus refmode (from Timing Commander). The VCO is 680MHz which is low out of range but still might work. The AD9866 clock is 20MHz.
self.write_versa5(0x10,0x44)

## Set the divider first to 18.75. The initial divider is 17. We don't want to adjust the VCO first as that would mean a time when the AD9866 clock is >80MHz.
## The VCO is still 680 MHz. The AD9866 clock is now 18.13MHz
self.write_versa5(0x2d,0x01)
self.write_versa5(0x2e,0x20)
## Set fractional portion to 0.75, 30 bits, 2**24 * .75 = 0xc00000
self.write_versa5(0x22,0x03) ## [29:22]   ## Maybe 0x60 for 30 bit fraction with sign? Not sure, try both.
self.write_versa5(0x23,0x00) ## [21:14]
self.write_versa5(0x24,0x00) ## [13:6]
self.write_versa5(0x25,0x00) ## [5:0] 

## Switch the multiplier to 288 for new VCO of 2880MHz. Note that the least significant setting is written first to prevent the VCO from going above 2900MHz.
self.write_versa5(0x18,0x20)
self.write_versa5(0x17,0x12) 


I really need to get a GPSDO and try this myself. Do you or anyone else on this list have a recommendation for an inexpensive GPSDO? Also, with a GPSDO, is the 10MHz clock from two GPSDO phase coherent? Should I be able to setup an array with two HL2s separated by some distance but both fed with GPSDO and expect that clock relation between the two will be coherent and stable?

73,

Steve
kf7o

Mike Lewis

unread,
Jun 26, 2021, 1:57:42 PM6/26/21
to Hermes-Lite, Steve Haynal
Check out the leo bodnar dual out programmable GPSDO. Pocket suze, affordable as these things go, and can run off usb or dc.

I use one for my DigiLO pll and the 2bd output set for 10M also is a ref for my 1296 SGLabs xvtr. Works great, very portable for microwave work.

The 2nd output frequency is limited to certain multiples of the first.  It can be a direct LO.

Mike
K7MDL

Sent from my T-Mobile 4G LTE Device


From: herme...@googlegroups.com <herme...@googlegroups.com> on behalf of Steve Haynal <softerh...@gmail.com>
Sent: Saturday, June 26, 2021 10:50:28 AM
To: Hermes-Lite <herme...@googlegroups.com>
Subject: Re: 10MHz GPSDO into CL1 observation
 

Mark Wild

unread,
Jun 26, 2021, 2:33:42 PM6/26/21
to Hermes-Lite
Also look at https://www.rfzero.net/ from Bo.  Multipurpose devices that includes GPSDO.

Mark, G6DDX

paul chancellor

unread,
Jun 27, 2021, 8:25:17 AM6/27/21
to Steve Haynal, Hermes-Lite, paul chancellor, Allison Chancellor

All,

 

I have connected the Hermes Lite to a new XPA125B amplifier.  ACC pins 2 (PTT) and 6 (Gnd) connected to the EXT phono jack on the back of the Hermes Lite.

 

When I key a mike connected to the Hermes Lite PPT/CW 3.5 mm connector, the input SWR shows 9.9, a “low efficiency” message flashes, and the amplifier does not operate.

 

After checking the ACC pins, I find no problem here.  The amplifier antenna connector (ANT) is connected to an inverted dipole from MFJ, MFJ-1778 G5RV.  The amplifier transmitter connector (TRX) is connected to the Hermes Lite antenna connector.  Power to the Hermes Lite and amplifier is supplied by a Kilowatt 30 amp switching supply.

 

Note that the Hermes Lite seems to be working normally as reception is fine.

 

Any thoughts on this ?

 

Paul

 

 

 

Paul D. Chancellor

KN6IXX

694 Longpine

Eclectic, AL   36024

Tel:  805.368.4586

Fax: 805.299.4919

Email:  p...@oceanlawgroup.com

 

 

 

From: herme...@googlegroups.com <herme...@googlegroups.com> On Behalf Of Steve Haynal
Sent: Saturday, June 26, 2021 12:50 PM
To: Hermes-Lite <herme...@googlegroups.com>
Subject: Re: 10MHz GPSDO into CL1 observation

 

Hi Mooner,

Reid Campbell

unread,
Jun 27, 2021, 8:40:22 AM6/27/21
to herme...@googlegroups.com
HI Paul,

I suspect that you are putting to much power in the 125B. It need minimum power, less that 1 watt. What software are you using with the HL2 and why have you a mic plugged into the PTT/CW port?

Cheers

Reid
Gi8TME/Mi0BOT

PS, I have changed the subject to the correct thread but I'm not sure if Google understands this.

paul chancellor

unread,
Jun 27, 2021, 8:53:11 AM6/27/21
to Reid Campbell, Hermes-Lite, paul chancellor, Allison Chancellor

Reid,

 

I am using Thetis.  In the Thetis menus, under the Transmit tab is a Tune box.  In the tune box I have tried Powers of 20, 30, and 40.  Note the Use Drive Power entry is not checked.

 

The Hermes Lite and XPA125B are in the garage… my computer is in my home office.  I use a mike at the Hermes Lite to observe the XPA125 reaction.

 

Paul

--

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.

Reid Campbell

unread,
Jun 27, 2021, 9:02:09 AM6/27/21
to paul chancellor, Hermes-Lite, Allison Chancellor
OK, what version of Thetis, is it one of the Beta's?

I would try a power level of zero but first bring your equipment all together and connect a dummy load. There are to many variables and I'm not sure of the impact of keying from the HL2 front panel.

Cheers

Reid
Gi8TME/Mi0BOT

Mooneer Salem

unread,
Jun 27, 2021, 2:33:09 PM6/27/21
to Hermes-Lite
Hi Steve,

Just got back from doing Field Day, so apologies for the delay in responding. I updated my hermeslite.py to the following based on your previous email:

  def enable_cl1_10mhz(self):
    """Use 10MHz CL1 as input to PLL1 and then to AD9866"""
    # Multiplying 10MHz by 288 will give us the desired 2880.0MHz VCO.
    # We then need to use the output divider (18.75 * 2) to get us down
    # to the required 76.8 MHz.


    self.write_versa5(0x10,0xc0) ## Enable xtal and clock
    self.write_versa5(0x13,0x03) ## Switch to clock
    self.write_versa5(0x10,0x40) ## Enable clock input only, won't lock to master

    # Output Divider 1
    self.write_versa5(0x2d,0x01) ## Change top divider to 0x012
    self.write_versa5(0x2e,0x20)
    self.write_versa5(0x22,0x03) ## Change fractional divider to 0x3000000
    self.write_versa5(0x23,0x00)
    self.write_versa5(0x24,0x00)
    self.write_versa5(0x25,0x00)

    # PLL multiplier
    self.write_versa5(0x19,0x00) ## Change fractional multiplier to 0x000000
    self.write_versa5(0x1A,0x00)
    self.write_versa5(0x1B,0x00)
    self.write_versa5(0x18,0x00) ## Change top multiplier to 0x120. LSB first to prevent VCO > 2900MHz
    self.write_versa5(0x17,0x12)

The good news is that the HL2 continues to work properly after running that function, so it was likely VCO going over 2900MHz and/or not switching clocks first that was causing the issues. I also confirmed that it is in fact using the GPSDO (unplugging it from the HL2 causes Quisk to see nothing but noise). However, the GPSDO seems to have no impact on frequency accuracy so far, which is probably a testament to the built-in crystal in the HL2 more than anything else. :) I still need to add ~15Hz to the VFO in Quisk to have the vertical line be right in the middle of WWV's carrier, for instance, but that could very well be expected behavior:

Screen Shot 2021-06-27 at 11.30.00 AM.png

Anyway, I'll have to play around some more to be sure.

Thanks,

-Mooneer K6AQ

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/v6EqUb4QGns/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/5f5d90cc-01e2-4206-9d12-bb1c30b2c79cn%40googlegroups.com.

Steve Haynal

unread,
Jun 27, 2021, 5:05:05 PM6/27/21
to Hermes-Lite
Hi Mooner,

Thanks for the update and glad to hear the external 10MHz is working. Do you see the same offset with other software? I am wondering if Quisk has a correction factor set somewhere.

The weather in Portland Oregon this weekend has been very hot, 108-113F (42-45C), so I skipped field day. We've broken the historical (since the late 1800s) all time high by several degrees.

73,

Steve
kf7o

Mooneer Salem

unread,
Jun 27, 2021, 5:51:52 PM6/27/21
to Hermes-Lite
Hi Steve,

piHPSDR doesn't seem to zoom in far enough to tell for sure. SparkSDR has the following, though (with GPSDO enabled and "Transceiver Offset" in the settings confirmed to be 0 Hz):

Screen Shot 2021-06-27 at 2.44.14 PM.png
PowerSDR doesn't seem to zoom in all that far either but it looks like it's right in the middle of the carrier, or close to it anyway:

Screen Shot 2021-06-27 at 2.47.29 PM.png

I should probably install Thetis in the latter's VM too and see what it does but in short, the exact behavior apparently depends on the SDR application being used.

Thanks,

-Mooneer K6AQ


Mooneer Salem

unread,
Jun 27, 2021, 6:42:07 PM6/27/21
to Hermes-Lite
Update: just installed Thetis and it seems to be 1 Hz off from what I could tell from the waterfall at max zoom. The current VFO is what's needed to get the vertical line approximately in the middle of the carrier on the waterfall as shown below:

Screen Shot 2021-06-27 at 3.39.16 PM.png

-Mooneer K6AQ

James Ahlstrom

unread,
Jun 28, 2021, 7:14:51 AM6/28/21
to Hermes-Lite
Hello Mooneer,

Try measuring the frequency of WWV by clicking the menu button next to the S-meter and selecting the average time. Quisk has a frequency meter built in.

Jim
N2ADR

Mooneer Salem

unread,
Jun 28, 2021, 1:59:44 PM6/28/21
to Hermes-Lite
Hi James,

With the HL2 using its internal crystal, "Frequency 2" results in 10,000,001.78 Hz, with the 8 occasionally going up to 9 before going back. With the GPSDO, it's locked right on 10,000,000.00 Hz and doesn't deviate. 1.78 Hz error at 10 MHz (~0.18ppm) with the internal crystal isn't bad at all, IMO, and probably not worth getting a GPSDO just for HF use. I'll probably keep mine connected to the HL2 though since it'd just sit being unused otherwise :)

Thanks,

-Mooneer K6AQ

--
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/v6EqUb4QGns/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hermes-lite...@googlegroups.com.

Steve Haynal

unread,
Jun 28, 2021, 10:48:45 PM6/28/21
to Hermes-Lite
Hi Mooneer,

Thanks for the update. 0.18 ppm error is very good. I think we can see up to 4 to 5 ppm on some HL2s. Just for general clarification, there is accuracy over long periods of time (years) which may drift to 4 to 5ppm, and drift during short periods of time (minutes) which should be minimal (<1ppm) on the HL2.

73,

Steve
kf7o

Sebastien F4GRX

unread,
Jun 29, 2021, 4:42:11 AM6/29/21
to Mooneer Salem, Hermes-Lite

Hello,

Extreme frequency accuracy is always good to have.

This means the hl2 can be used as a calibrated measurement instrument, with known accuracy. Could be helpful to characterize RF beacons, peer transmitter accuracy, or in vna mode. Dont forget the HL2 is not just a ham rig but a SDR hacking tool, with wide and unexpected applications!

Kudos for having that 10 MHz reference mode working! It should become official instructions!

Sebastien

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/CAAzDfxN4e%2BUida7Ev%2BeMungRqmOhQzjJbQ3n-wLiphCi%2B_OrJg%40mail.gmail.com.

Roger David Powers

unread,
Jun 29, 2021, 10:56:45 AM6/29/21
to Hermes-Lite
> Kudos for having that 10 MHz reference mode working! It should become official instructions!

I agree with both of these statements.  It is a commendable achievement and it is definitely worth documenting. 

Therefore, I added a new section to the end of https://github.com/softerhardware/Hermes-Lite2/wiki/External-Clocks 

Please review and feel free to modify what I wrote.

Some things I feel might be improved:

1) I mentioned the CL1 input is 3.3V yet many GPSDOs provide 5V -- should I/we say anything more about how to provide the signal in a way that will not damage the HL2?

2) I provided the Python code from above -- should I/we say or do more about integrating this into hermeslite.py?

My feeling is it is OK as-is, people playing with this stuff should be able to handle conditioning the signal and integrating the function, but I can be convinced otherwise, more info is better than less, up to a point... 

Regards,
RDP 

Mooneer Salem

unread,
Jun 29, 2021, 1:27:50 PM6/29/21
to Roger David Powers, Hermes-Lite
Hi Roger,

Thanks for updating the wiki page! I made a few changes to it:

1. Moved the new section up to be with the other CL1-related sections.
2. Added info on the SMA attenuator that I needed to get the 5V down to a usable level.
3. Clarified that the HL2 needs a square wave input (there are at least a few GPSDOs that only generate 10MHz sine waves, including the newest revision of the one that I have).

Speaking of square vs. sine, some info on generating the former from the latter for use with the HL2 might be nice to include as well. I'm not too familiar with how one could go about doing so without producing worse performance so someone else can update the wiki page accordingly.

Thanks,

-Mooneer K6AQ

--
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.

Mike Lewis

unread,
Jul 1, 2021, 5:46:05 AM7/1/21
to Mooneer Salem, Roger David Powers, Hermes-Lite

I have applied the CL1 10Mhz changes successfully and see the Quisk frequency measurement change from about 1.7Hz off to around 0.02 when using my GPSDO.    I also created a new function enable_cl2_10mhz() to make CL2 output 10.000Mhz to feed my 1296MHz transverter LO source’s 10Mhz ref input.  This new function divides the 2880Mhz PLL by 288*2 (=144 or 0x90) for a stable and reasonably clean looking 10.000Mhz output square wave.

 

def enable_cl2_10mhz(self):

    """Enable CL2 output at 10MHz"""

    # Multiplying 10MHz by 288 will give us the desired 2880.0MHz VCO.

    # We then need to use the output divider (288 * 2) to get us down

    # to the required 10.000 MHz.

    self.write_versa5(0x62,0x3b## Clock2 CMOS1 output, 3.3V

    self.write_versa5(0x2c,0x00## Disable aux output on clock 1

    self.write_versa5(0x31,0x81## Use divider for clock2

 

    # Output Divider 1

    self.write_versa5(0x3d,0x09## Change top divider to 0x090

    self.write_versa5(0x3e,0x00)

    self.write_versa5(0x32,0x00## Change fractional divider to 0x0000000

    self.write_versa5(0x33,0x00)

    self.write_versa5(0x34,0x00)

    self.write_versa5(0x35,0x00)

 

The GPSDO is a Leo Bodnar dual output programmable pocket sized unit.  It has 4 selectable output levels and I had is set to the lowest at 8ma for around 7dBm measured output.  I added a 3dB attenuator and measured with an o’scope and got 2.36Vp-p and was surprised to see it was roughly a square wave, not sine wave as I thought it was to be. The corners are quite rounded.  The HL2 seems to work fine at that level so I left it there.

 

The 2nd GPSDO output is also set to 10Mhz and is the ref input for my DigiLO based multiband LO box which has a CPU with programmable attenuator, amp and RF switch.  It feeds the programmed LO at the right frequency and level to a stack of transverters, in this case, a 2M transverter.

 

I am using the HL2 to drive a 2M xvtr which for the last few weeks was a 2M WSPR beacon. I am now reconfiguring that setup to be the IF for a 1296 SG Labs xvtr and 25W PA/LNA into a 3ft long 14element loop yagi to scatter the signal all over Puget Sound. Everything will be locked 10 the GPSDO.

 

I found the hermeslite.py and added the new CL1 and CL2 10Mhz functions into it.  I have never used Jupyter notebooks so after playing around I figured out how to add the new 10Mhz functions in, also some existing functions to experiment with.  I can now switch between the crystal and CL1 input and observe the changes real time in Quisk frequency measurement.

 

The enable_cl2_10mhz() function programs CL2 output to provide the ref input for the 1296 transverter. I can use the existing functions to change the CL2 output to 76.8Mhz at 2.96V, turn it off and on, or set it to 10Mhz.  Using CL2 at 10Mhz saves the cost and space of a dist box, at least until I need a 4th output.

 

 

Mike Lewis

K7MDL

CN88sf and EL87sm

 

 

 

From: herme...@googlegroups.com <herme...@googlegroups.com> On Behalf Of Mooneer Salem
Sent: Tuesday, June 29, 2021 10:28
To: Roger David Powers <pro...@yahoo.com>
Cc: Hermes-Lite <herme...@googlegroups.com>
Subject: Re: 10MHz GPSDO into CL1 observation

 

Hi Roger,

Mike Lewis

unread,
Jul 1, 2021, 6:23:11 AM7/1/21
to Mike Lewis, Mooneer Salem, Roger David Powers, Hermes-Lite

Typo in the code sample comment and my text - Should say 288/2 not 288*2.

Roger David Powers

unread,
Jul 1, 2021, 1:03:04 PM7/1/21
to Hermes-Lite
Hi, Mike.

That sounds excellent!  I'm all in favor of scattering signals all around Puget Sound (even though I'm on the East Coast) especially high precision ones!  One of these days soon I hope to be more involved in WSPR beacons.

So, just to make sure I understand what is going on, the Python code to get CL2 output of 10 MHz is the same if the clock input is the internal crystal or the CL1 signal, right?  Only difference would be that CL1 signal may result in more accuracy of the CL2 output compared to using the internal crystal, depending on how good you CL1 input is.

If the code is the same, I think I'll add it to a new section to the External Clocks page on the wiki (after fixing the typo), then the page will have ways for the radio to accept 10 MHz or 76.8 MHz clock input, and generate 10 MHz or 76.8 MHz output.  I think that would cover the most common use cases, and give enough insight to people wanting to make further variants.

Regards,
RDP

Mike Lewis

unread,
Jul 1, 2021, 3:09:12 PM7/1/21
to Hermes-Lite

Failed to hit reply to the list.

 

From: Mike Lewis
Sent: Thursday, July 1, 2021 12:06
To: 'Roger David Powers' <pro...@yahoo.com>
Subject: RE: 10MHz GPSDO into CL1 observation

 

It is worth noting that if you lose the external 10Mhz (cable connection disturbance, cable swap. GPSDO reset) the PLL unlocks,  you likely need to run the enable+CL1_10mhz script again to recover.   A good feature in the SDR apps would be to detect PLL unlock and rerun the external CLK function to recover.

 

From: Mike Lewis
Sent: Thursday, July 1, 2021 11:12
To: Roger David Powers <pro...@yahoo.com>
Subject: RE: 10MHz GPSDO into CL1 observation

 

The best solution is to distribute the 10Mhz source to each consumer device and not pass though a VCO/divider stage.  But I needed 3 total 10Mhz sources and my GPSDO only has 2 without adding a distribution amp.  So I am using CL2 for the 3rd output (since I am using 2 transverters in series.

 

The CL2 code is standalone except the current divider values assume the VCO is 2880MHz, which is what was set for the CL1 10Mhz configuration. Switching to the internal crystal will change the VCO so the CL2 divider will need changing also, possibly to a fractional value.  With the 10Mhz CL1 source, the CL2 divider is integer only now.

 

A short example of adding it to the Jupyter file (hermeslite.ipynb) might be helpful for those that have never been down that path.

 

Was pretty simple.

  1. Add the new functions to hermeslite.py
  2. Cut and paste your new function name into a new block.  Add hl. In front, and () at the end.

Example:      hl.enable_cl2_10mhz()

  1. Run the import hermeslite module block at the top, followed by the discover and then test with the response step.
  2. This is a screen shot of hermeslite.ipynb file from my Visual Studio Code with the Jupyter add-in.  

 

 

  1. Then run your new functions

 

 

Or just write a new script to run. 

 

Run your normal SDR.  You can also change these while the SDR is running to observe the changes impact real time.

 

I started looking at how to add it to the Quisk hardware config script but I do not know how to call them.

 

Looking at the response I see the eeprom_ip could use an update to match my install, or at least something on my own network.   So I ran the related module blocks to set and use the new ip in eeprom.  Power cycled the radio and the response block results shows the new ip.

 

 

From: 'Roger David Powers' via Hermes-Lite <herme...@googlegroups.com>
Sent: Thursday, July 1, 2021 10:03
To: Hermes-Lite <herme...@googlegroups.com>
Subject: Re: 10MHz GPSDO into CL1 observation

 

Hi, Mike.

--

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.

Mike Lewis

unread,
Jul 1, 2021, 6:50:34 PM7/1/21
to Hermes-Lite

For Quisk, I am trying to find the right place to call the enable_CL1_10mhz(0 function on startup. 

 

I cannot find the right place yet.  I can call my custom clock function from any button event, like OnAntenna(), but I have yet to find the right place to call it on startup. It needs to be after communication is established and not require user intervention. 

 

I copied quisk_hardware.py to quisk_hardweare_K7MDL.py, , added my clock functions and configured it in the config hardware file screen.  But I do not see how to invoke any of those functions at startup.

 

  • Mike

Roger David Powers

unread,
Jul 1, 2021, 10:48:56 PM7/1/21
to Hermes-Lite
Hi, Mike.

Sorry, I've been taken away by other tasks so I haven't had the time to dig into the wiki update, and I don't have the equipment to test the changes you would need to make to get this to work automatically from quisk.   Hopefully someone else will.

Regards,
RDP



James Ahlstrom

unread,
Jul 2, 2021, 7:29:51 AM7/2/21
to Hermes-Lite
Hello Mike,

Quisk calls preopen() and then open() in the hardware file hermes/quisk_hardware.py when it starts. It looks like your code should go into open(). If you change DEBUG from 0 to 1 you will see some useful log information. You can also add print() statements to see what is happening.

Jim
N2ADR

Mike Lewis

unread,
Jul 2, 2021, 8:31:35 AM7/2/21
to James Ahlstrom, Hermes-Lite

When called in open(), something seems not ready yet, getting timeout errors.  Get this error for any clock related code including the existing functions such as EnableCL2_sync76p8()

 

ERROR: Hermes-Lite write queue timeout, queue 0x7c 0x6 0xea 0x62 0x3b

ERROR: Hermes-Lite write queue timeout, queue 0x7c 0x6 0xea 0x2c 0x1

ERROR: Hermes-Lite write queue timeout, queue 0x7c 0x6 0xea 0x31 0xc

ERROR: Hermes-Lite write queue timeout, queue 0x7c 0x6 0xea 0x63 0x1

ERROR: Hermes-Lite write queue timeout, queue 0x7c 0x6 0xea 0x63 0x1

 

These functions call WriteVersa5()

 

These functions work OK when called after program startup such as when I add them to OnButtonAntenna(), then hit the Antenna button.

 

 

From: herme...@googlegroups.com <herme...@googlegroups.com> On Behalf Of James Ahlstrom
Sent: Friday, July 2, 2021 04:30
To: Hermes-Lite <herme...@googlegroups.com>
Subject: Re: 10MHz GPSDO into CL1 observation

 

Hello Mike,

--

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.

James Ahlstrom

unread,
Jul 2, 2021, 11:35:20 AM7/2/21
to Hermes-Lite
Hello Mike,

It looks like you need to call your code after a startup delay. The watchdog and reset_on_disconnect require this too. Add your code as follows:

  def HeartBeat(self):
    self.hermes_temperature, self.hermes_fwd_power, self.hermes_rev_power, self.hermes_pa_current = QS.get_hermes_TFRC()
    if self.application.bottom_widgets:
      self.application.bottom_widgets.UpdateText()
    if self.delay_config > 0:
      self.delay_config -= 1
      if self.delay_config == 0: # Delay sending these config parameters
        for name in ('hermes_disable_watchdog', 'hermes_reset_on_disconnect'):
          self.ImmediateChange(name)
        call_my_special_code_here()          #####    <<<-----       added this line to call when self.delay_config expires

Jim
N2ADR

Mike Lewis

unread,
Jul 2, 2021, 11:48:34 AM7/2/21
to James Ahlstrom, Hermes-Lite

That worked, thank you Jim!

 

In quisk_hardware_K7MDL.py now setting both input and output to 10Mhz on startup, no errors.

 

  def HeartBeat(self):

    self.hermes_temperatureself.hermes_fwd_powerself.hermes_rev_powerself.hermes_pa_current = QS.get_hermes_TFRC()

    if self.application.bottom_widgets:

      self.application.bottom_widgets.UpdateText()

    if self.delay_config > 0:

      self.delay_config -= 1

      if self.delay_config == 0:  # Delay sending these config parameters

        for name in ('hermes_disable_watchdog''hermes_reset_on_disconnect'):

          self.ImmediateChange(name)

        self.enable_cl1_10mhz()

        self.enable_cl2_10mhz()

 

 

 

From: herme...@googlegroups.com <herme...@googlegroups.com> On Behalf Of James Ahlstrom
Sent: Friday, July 2, 2021 08:35
To: Hermes-Lite <herme...@googlegroups.com>
Subject: Re: 10MHz GPSDO into CL1 observation

 

Hello Mike,

--

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.

Steve Haynal

unread,
Jul 5, 2021, 1:19:41 AM7/5/21
to Hermes-Lite
Hi All,

Thanks for the interesting thread on using a 10MHz GPSDO. Can anyone tell if phase noise is better/worse/the same with the 10MHz GPSDO? I'm trying to think of good ways to easily measure phase noise. Are there any changes to the noise floor with 10MHz versus the onboard oscillator? When observing a pure signal on the spectrum, does the signal "spread out" more or less with the 10MHz oscillator? Any suggestions on how to measure phase noise with just a HL2?

Mike, feel free to issue a pull request for your hermeslite.py and Jupyter notebook changes. Another option to switch clocks when starting Quisk is to leave Quisk as is, but create a small hermeslite.py script. Then from another script you can first call the hermeslite.py script and then Quisk.

73,

Steve
kf7o

Mike Lewis

unread,
Jul 5, 2021, 5:35:05 PM7/5/21
to Hermes-Lite

I will work on a pull request. 

 

I added the 10mhz scripts to Quisk with success but I do not know how to add it to the other SDR programs I use with the HL2 such as Thetis (multiple versions), PowerSDRxxx, SparkSDR, and SDRConsole. 

 

Not being a Python pro, I pondered how to set up a script to load the new functions inside hemerslite.py module instead of loading a Jupyter notebook all the time.  I created a batch file for each SDR program with a desktop shortcut to it.   It is simple, calls a new script I named “set_10mhz_clock.py” then starts the SDR program of interest and then exits the cmd shell.   A better solution would be to take the SDR program path and name as arguments.

 

Here is my batch file example for Thetis.  Modify to point to your app names and paths, proper username.  I put a copy of my modified hermeslite.py and the new SDR_10mhz_clock.py file in the python scripts folder.   Replace xxxxx folder name with your pathname.

 

Filename = SDR_10mhz_clock.bat

___________________

 

python C:\Users\k7mdl\AppData\Local\Programs\Python\Python38\Scripts\set_10mhz_clock.py

cd C:\xxxxxx\Thetis\Release\

start C:\xxxxxx\Thetis\Release\Thetis.exe

___________________

 

 

Filename =  set_10mhz_clock.py

____________________________

 

import hermeslite

 

if __name__ == "__main__":

 

  print("Configuring Clk1 and Clk2 for 10Mhz")

  hl = hermeslite.discover_first()

  r = hl.response()

  y = hl.enable_cl1_10mhz()

  y = hl.enable_cl2_10mhz()

  print("Configuration of clocks completed")

 

 

 

Mike Lewis

K7MDL

CN88sf and EL87sm

 

 

 

Mooneer Salem

unread,
Jul 5, 2021, 7:24:23 PM7/5/21
to Hermes-Lite
Out of curiosity, what's the use case for having the HL2 only use the GPSDO when a SDR program is active? Being able to use the GPSDO for something else when not using the radio or some other reason?

As for hermeslite.py, I have the following at the bottom of mine:

if __name__ == "__main__":
  hl = discover_first()
  #hl.disable_cl1()
  hl.enable_cl1_10mhz()

With the above, I can simply run "python hermeslite.py" from a terminal window and either enable or disable CL1,  no Jupyter required. YMMV, however.

-Mooneer K6AQ

Mike Lewis

unread,
Jul 5, 2021, 7:46:24 PM7/5/21
to Hermes-Lite

 

Adding those lines to hermeslite.py is a good option as well.   I want to have the 10Mhz active all the time, but I have found that after resets/power events the config is lost and the clocking is off when the program starts up.   Sometimes just switching to a different program the config is lost, no idea why.  I went further and watched the output of Clk2 on a scope while I was trying to get to 5Mhz working on CLk1 with 10Mhz on Clk2.  My big GPSDO has 1 and 5M square wave outputs and 3 10M sine at about 0dBm.  Turns out the HL2 is happy with that 10M sinewave.  I never got the 5Mhz working quite right though the CLK2 at 10 worked.

 

I found I had to run this to get things back on track.  The only time it matters is when there is an active SDR program running.  I suspect one can change the gateware to make 10 the default on power up.  Out of my wheelhouse.

Matthew

unread,
Jul 10, 2021, 2:40:54 PM7/10/21
to Hermes-Lite
I have just downloaded Timing Commander, but I can't seem to figure out where to find the personality file for the 5P49V5923 on the website. Am I missing something?

73 Matthew M5EVT.

--
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.

Mooneer Salem

unread,
Jul 10, 2021, 3:16:52 PM7/10/21
to Hermes-Lite
Hi Matthew,

It's called "VersaClock 5 Timing Commander Personality File" on the Renesas website. Searching using their search box gives me https://www.renesas.com/us/en/document/swr/versaclock-5-timing-commander-personality-file, which requires an account to download. (Fortunately, registering is straightforward and doesn't require manual approval, etc.)

Thanks,

-Mooneer K6AQ

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/v6EqUb4QGns/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/12244028-0443-40e4-85c4-78827f4bc568n%40googlegroups.com.

Matthew

unread,
Jul 11, 2021, 2:59:22 PM7/11/21
to Hermes-Lite
Hi Mooneer,

Thanks for this. The mistake I was making was looking on the product page. This tool made it so much easier to get going with doing things with the clock inputs/outputs.

73 Matthew M5EVT.

Roger David Powers

unread,
Nov 28, 2021, 11:36:01 AM11/28/21
to Hermes-Lite
Daniel Estévez has done a blog post about using the 10MHz external reference with HL2 that ends up referring to our wiki which in turn refers to this email thread:

Of interest is he finds the VersaClock chip works fine with a sine wave input, and the multiplication used to scale clock frequency is pretty much exact.  

Much more in the article, but no time for me to read it right now..

Regards,
RDP
Reply all
Reply to author
Forward
0 new messages