{"id":2201,"date":"2023-06-04T09:55:44","date_gmt":"2023-06-04T08:55:44","guid":{"rendered":"https:\/\/m0aws.co.uk\/?p=2201"},"modified":"2023-06-07T07:40:24","modified_gmt":"2023-06-07T06:40:24","slug":"using-a-griffin-powermate-vfo-with-funcube-dongle-pro","status":"publish","type":"post","link":"https:\/\/m0aws.co.uk\/?p=2201","title":{"rendered":"Use a Griffin Powermate with SDR via Node Red"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I&#8217;ve been gradually building my QO-100 ground station over the last few months and have had the receive path working for some time now. One of the things I really miss with the <a href=\"http:\/\/www.funcubedongle.com\" target=\"_blank\" rel=\"noreferrer noopener\">Funcube Dongle Pro+<\/a> (FCD) SDR is a real VFO knob for changing frequency. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My QO-100 <a href=\"https:\/\/nodered.org\" target=\"_blank\" rel=\"noreferrer noopener\">Node Red<\/a> dashboard is configured so that I can have the FCD track the uplink frequency from the <a href=\"https:\/\/icomuk.co.uk\/IC-705\/Mobile_Amateur_Radio_Ham\" target=\"_blank\" rel=\"noreferrer noopener\">IC-705<\/a> but, sometimes I use the FCD without the IC-705 in the shack and so a physical <a href=\"https:\/\/en.wikipedia.org\/wiki\/Variable-frequency_oscillator\" target=\"_blank\" rel=\"noreferrer noopener\">VFO<\/a> would be handy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many years ago when I lived in France (<a rel=\"noreferrer noopener\" href=\"https:\/\/www.qrz.com\/db\/F5VKM\" target=\"_blank\">F5VKM<\/a>) I had a <a rel=\"noreferrer noopener\" href=\"https:\/\/rigreference.com\/rigs\/4487-flexradio-flex-3000\" target=\"_blank\">Flexradio Flex-3000 SDR<\/a>, a great radio in it&#8217;s time and one that gave me many hours of enjoyment. One addition I bought for that station was a Griffin Technology Powermate VFO knob. It worked extremely well with the PowerSDR software for the Flex-3000 and I used it for many years.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many years later I&#8217;m back in the UK and much of my equipment is packed away in the attic, including the Griffin Technology Powermate VFO.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I decided to dig it out and see if I could get it working with <a rel=\"noreferrer noopener\" href=\"https:\/\/gqrx.dk\" target=\"_blank\">GQRX SDR software<\/a>. Sadly I couldn&#8217;t get it working with GQRX however, I did find a way of getting it working with Node Red and thus could add it to my QO-100 Node Red Dashboard and then control GQRX with it via a simple Node Red flow.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2025\" height=\"2700\" src=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-2025x2700.jpeg\" alt=\"Griffin Technology Powermate VFO\" class=\"wp-image-2203\" srcset=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-2025x2700.jpeg 2025w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-225x300.jpeg 225w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-768x1024.jpeg 768w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-1152x1536.jpeg 1152w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-1536x2048.jpeg 1536w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Griffin-Technology-Powermate-VFO-scaled.jpeg 1920w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">Griffin Technology Powermate VFO<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Plugging the Powermate VFO into my <a rel=\"noreferrer noopener\" href=\"https:\/\/kubuntu.org\" target=\"_blank\">Kubuntu<\/a> PC it wasn&#8217;t immediately recognised by the <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Linux\" target=\"_blank\">Linux O\/S.<\/a> After a little searching I found the driver on <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/stefansundin\/powermate-linux\" target=\"_blank\">Github<\/a>. I added the PPA to my aptitude sources and installed the driver using apt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><sub><strong>https:\/\/launchpad.net\/~stefansundin\/+archive\/ubuntu\/powermate<\/strong><\/sub><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once installed the default config for the Powermate device is to control the default audio device volume. To make the device available for use as a VFO knob you need to change the configuration so that the default setting is disabled. To do this is relatively easy, just edit the  config file using your favourite command line editor (Vi\/Vim in my case) and add the following entry.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/powermate.toml\n\n# Entry to control HDMI volume with Powermate\n#sink_name = \"alsa_output.pci-0000_01_00.1.hdmi-stereo\"\n\n<strong># Set powermate not to work with volume control\nsink_name = \"\"<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As shown above, comment out the default &#8220;sink_name&#8221; entry (Yours may be different depending on audio device in your PC) and add in the Powermate &#8220;sink_name&#8221; entry that effectively assigns it to nothing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once this is done, save the file and exit your editor and then reboot the PC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next you&#8217;ll need to install a small program called <em><strong>evtest<\/strong><\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install evtest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To check the <em>evtest<\/em> program has installed correctly, plugin your Powermate VFO to any available USB port and run the following command in a terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>evtest \/dev\/input\/powermate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Turning the Powermate knob you should see output on the screen showing the input from the device. You should also see BTN events for each press of the Powermate device.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><sub>Input driver version is 1.0.1\nInput device ID: bus 0x3 vendor 0x77d product 0x410 version 0x400\nInput device name: \"Griffin PowerMate\"\nSupported events:\n  Event type 0 (EV_SYN)\n  Event type 1 (EV_KEY)\n    Event code 256 (BTN_0)\n  Event type 2 (EV_REL)\n    Event code 7 (REL_DIAL)\n  Event type 4 (EV_MSC)\n    Event code 1 (MSC_PULSELED)\nProperties:\nTesting ... (interrupt to exit)\nEvent: time 1685816662.086666, type 2 (EV_REL), code 7 (REL_DIAL), value -1\nEvent: time 1685816662.086666, -------------- SYN_REPORT ------------\nEvent: time 1685816662.318638, type 2 (EV_REL), code 7 (REL_DIAL), value -1\nEvent: time 1685816662.318638, -------------- SYN_REPORT ------------\nEvent: time 1685816662.574615, type 2 (EV_REL), code 7 (REL_DIAL), value -1\nEvent: time 1685816662.574615, -------------- SYN_REPORT ------------\nEvent: time 1685816663.670461, type 2 (EV_REL), code 7 (REL_DIAL), value 1\nEvent: time 1685816663.670461, -------------- SYN_REPORT ------------\nEvent: time 1685816664.030421, type 2 (EV_REL), code 7 (REL_DIAL), value 1\nEvent: time 1685816664.030421, -------------- SYN_REPORT ------------\nEvent: time 1685816664.334389, type 2 (EV_REL), code 7 (REL_DIAL), value 1\nEvent: time 1685816664.334389, -------------- SYN_REPORT ------------\nEvent: time 1685816665.334255, type 1 (EV_KEY), code 256 (BTN_0), value 1\nEvent: time 1685816665.334255, -------------- SYN_REPORT ------------\nEvent: time 1685816665.558230, type 1 (EV_KEY), code 256 (BTN_0), value 0\nEvent: time 1685816665.558230, -------------- SYN_REPORT ------------\nEvent: time 1685816666.030161, type 1 (EV_KEY), code 256 (BTN_0), value 1\nEvent: time 1685816666.030161, -------------- SYN_REPORT ------------\nEvent: time 1685816666.182151, type 1 (EV_KEY), code 256 (BTN_0), value 0\nEvent: time 1685816666.182151, -------------- SYN_REPORT ------------\n<\/sub><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this point you&#8217;re ready to stop <em>evtest<\/em> (CTRL-C) and then create the following little <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bash_(Unix_shell)\" target=\"_blank\" rel=\"noreferrer noopener\">BASH<\/a> shell script that Node Red will run to collect the O\/P from the Powermate USB device.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\n###############################################\n# Griffin Technology Powermate control script #\n# for Node Red.                               #\n#                                             #\n# 04\/06\/23 - M0AWS - v0.1                     #\n#                                             #\n###############################################\n\nVAL=\"1\"\necho \"STEP-1Hz\"\n\n\/usr\/bin\/evtest \/dev\/input\/powermate | while read LINE \ndo\n   case $LINE in\n\n      *\"(REL_DIAL), value 1\") echo \"$VAL\"\n           ;;\n\n      *\"(REL_DIAL), value -1\") echo \"-$VAL\"\n           ;;\n\n      *\"(BTN_0), value 1\") case $VAL in\n\n                              \"1\") VAL=\"10\"\n                                   echo \"STEP-10Hz\"\n                                      ;;\n\n                             \"10\") VAL=\"100\"\n                                   echo \"STEP-100Hz\"\n                                      ;;\n\n                             \"100\") VAL=\"1000\"\n                                    echo \"STEP-1Khz\"\n                                       ;;\n\n                             \"1000\") VAL=\"10000\"\n                                     echo \"STEP-10Khz\"\n                                         ;;\n\n                             \"10000\") VAL=\"1\"\n                                       echo \"STEP-1Hz\"\n                                          ;;\n                              esac\n                                 ;;\n        esac\ndone<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the BASH script is copied and pasted into a file called <em>powermate.sh<\/em> you need to make it executable by using the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod 700 .\/powermate.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you now run the shell script in a terminal you&#8217;ll see a similar output to that shown below from the device when used.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/powermate.sh \nSTEP-1Hz\n-1\n-1\n-1\n1\n1\n1\nSTEP-10Hz\n10\n10\n10\n-10\n-10\n-10\nSTEP-100Hz\n100\n-100\n-100\nSTEP-1Khz\n1000\nSTEP-10Khz\nSTEP-1Hz\n1\n1\nSTEP-10Hz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see above the shell script outputs a positive or negative number for VFO tuning and changes the VFO step size each time the Powermate is depressed. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Getting this output from the BASH shell script into Node Red is really simple to achieve using just 3 or 4 nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Node Red development UI create the following nodes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1393\" height=\"242\" src=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-Node-Red.png\" alt=\"Griffin Powermate Node Red Nodes\" class=\"wp-image-2211\" srcset=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-Node-Red.png 1393w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-Node-Red-300x52.png 300w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-Node-Red-768x133.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">Griffin Powermate Node Red Nodes<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The first node in the flow is a simple inject node, here I called it trigger. This sends a timestamp into the next node in the flow at startup to set the flow running.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>Griffin Powermate<\/em> node is a simple exec node that runs the script we created above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1009\" height=\"1001\" src=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Node-Red-Powermate-node.png\" alt=\"M0AWS Powermate exec node\" class=\"wp-image-2213\" srcset=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Node-Red-Powermate-node.png 1009w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Node-Red-Powermate-node-300x298.png 300w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Node-Red-Powermate-node-150x150.png 150w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Node-Red-Powermate-node-768x762.png 768w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Node-Red-Powermate-node-100x100.png 100w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">M0AWS Powermate exec node<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Configure the node as shown above and connect it to the inject node that&#8217;s used as a trigger. <strong>Note<\/strong>: Change &#8220;user&#8221; in the Command  field shown above to that of <em>your<\/em> username on your Linux PC)<br><br>Once done create the third node in the flow, a simple switch node and configure as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"1566\" src=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-switch-node.png\" alt=\"Switch Node for Powermate\" class=\"wp-image-2216\" srcset=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-switch-node.png 1005w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-switch-node-193x300.png 193w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-switch-node-768x1197.png 768w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-Powermate-switch-node-986x1536.png 986w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">Switch Node for Powermate<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The switch node has two outputs, the top one is a text output that is fed into a text field to show the current step size of the Powermate device and the lower output is the numeric output that must be fed into your VFO control flow so that the VFO value is incremented\/decremented by the amount output by the Powermate device.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve found the Griffin Technology Powermate USB device works extremely well with Node Red and GQRX that I use for controlling the FCD SDR radio and it&#8217;s now part of my QO-100 ground station build.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1079\" height=\"1393\" src=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-QO-100-Dashboard-with-PWRMate.png\" alt=\"M0AWS QO-100 Dashboard with Powermate Step Display at bottom\" class=\"wp-image-2220\" srcset=\"https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-QO-100-Dashboard-with-PWRMate.png 1079w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-QO-100-Dashboard-with-PWRMate-232x300.png 232w, https:\/\/m0aws.co.uk\/wp-content\/uploads\/2023\/06\/M0AWS-QO-100-Dashboard-with-PWRMate-768x991.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">M0AWS QO-100 Dashboard with Powermate Step Display at bottom<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As shown above you can see the Powermate Step size at the bottom of the  dashboard, this text changes each time the Powermate device is depressed and will set a step size of 1Hz, 10Hz, 100Hz, 1Khz, 10Khz in a round-robin fashion.<br><br>The next stage of the build is the 2.4Ghz transmit path. I now have all the necessary hardware and so this part of the build can finally commence.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More soon &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been gradually building my QO-100 ground station over the last few months and have had the receive path working for some time now. One of the things I really miss with the Funcube Dongle Pro+ (FCD) SDR is a real VFO knob for changing frequency. My QO-100 Node Red dashboard is configured so that &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/m0aws.co.uk\/?p=2201\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Use a Griffin Powermate with SDR via Node Red&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[216,173,174,39,180,163,125,208,209,166,212,211,189,165,169,205,4,65,83,82,8,171,38,179,186,135,206,210,213,214,37,167,123,168,5,110,215,53,207],"tags":[],"class_list":["post-2201","post","type-post","status-publish","format-standard","hentry","category-etc-powermate-toml","category-10ghz","category-2-4ghz","category-bash","category-dashboard","category-devices","category-diy","category-evtest","category-f5vkm","category-fcd","category-flex-3000","category-flexradio","category-floweditor","category-funcube-dongle","category-gqrx-sdr","category-griffin-technology","category-ham-radio","category-home-brew","category-ic-705","category-icom","category-icom-ic705","category-kubuntu","category-linux","category-nodered","category-nodes","category-opensource","category-powermate","category-powermate-sh","category-powersdr","category-ppa","category-programming","category-qo-100","category-radio-shack","category-satellite","category-sdr","category-station","category-ubuntu","category-usb","category-vfo"],"_links":{"self":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2201"}],"version-history":[{"count":49,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2201\/revisions"}],"predecessor-version":[{"id":2257,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2201\/revisions\/2257"}],"wp:attachment":[{"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/m0aws.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}