Thursday 26 November 2020

Locking the Adalm Pluto to an external reference (Part 3; Software challenges)

 Having got the hardware finished it was time to convince th Pluto that it had a 50MHz NOT 40 MHz reference. This was easier said than done! 

It took 6 hours of internet research and trials before a working solution was finally found at  AND which would survive a pluto power down. 

The final solution was to execute the following on the pluto. No idea why it works or what it does, but it solved my problem

fw_setenvadi_loadvals fdt addr fit_load_address } && fdt get value fdt_choosen

/ fit_config }/ fdt && fdt get addr fdtaddr / fdt_choosen } data && fdt addr

fdtaddr }; if test ! n ${ad936x_skip_ext_refclk}; then if test n ${ad936x_custom_refclk}; then

fdt set /clocks/clock@0 clock frequency ${ad936x_custom_refclk}; elif test n

${ad936x_ext_refclk}; then fdt set /clocks/clock@0 clock frequency ${ad936x_ext_refclk}; fi; fi; if

test n ${model}; then fdt set / model ${model}; fi; if test n ${ attr_name } && test n ${ attr_val };

then fdt set /amba/spi@e0006000/ad9361 phy@0 ${ attr_name } attr_val };

fw_setenvad936x_custom_refclk "<50000000>"

To check if the changes were successful, we can read the device-tree:

cat /proc/device-tree/clocks/clock@0/clock-frequency | xxd

the response was

# 00000000: 02FA F080 .}x@

02faf080 is 50000000 in hex, Success

Having got the Pluto to work with the external reference I spent some time adjusting levels. It was suggested  on the internet that the pluto needed 0 to 10dbm to achieve lock but I found it needed much less than that, it would lock down to -22dbm input. I adjusted the output attenuator in the DFS50 to produce -10dBm output on mine

Sunday 22 November 2020

Locking the Adalm Pluto to an external reference (Part 2)

 Having worked out how to inject the external reference the next question was what frequency to inject. Should I use 40MHz like the original?  Looking in my junk box I found a G4HUP DFC30 unit which takes a 10MHz reference and provides a 30MHz output. I tried retuning the output filter to 40MHz but the multiplier was very ineficent at times 4. So i tried retuning the output filter to 50MHz which worked fine. The reference was to be 50MHz

In my parts collection I found a 10MHz oscillator which could be used to drive the multiplier when no external reference was available. It also had a relay to switch between internal and external reference.

The 10MHz oscillator and DFS30 as deployed in the Langstone:-

That is the hardware done, next to get the 50MHz reference in the software!

Friday 20 November 2020

Locking the Adalm Pluto to an external reference (Part 1)

 Having finished boxing up the Langstone Transceiver  which is based on an Adalm Pluto SDR, the next step was to improve frequency stability.

Some have tried changing the reference 40 MHz oscillator to a more stable device. The preferred device is very small and i can imagine the damage caused by taking out the old oscillator.

Others have tried feeding in an external 40MHz GPS locked signal. One discovery from here was that the existing oscillator has an enable/disable pin so it can be left in place when an external signal is injected. This is thr chosen route

Note that C123 and C124 form a potential divider to reduce the output level of the oscillator. However C124 is not fitted but it does provide solder pads to mount another 180pf 0603 capacitor (I am not brave enough to try an 0402 size!) through which to inject the external reference

This is how mine ended up:-

Note that the braid of the coax cable through which the reference is injected is soldered to the groundplane in two positions. This is to prevent the 0603 capacitor being ripped off the board if the cable moves.