{"id":268,"date":"2024-09-22T22:48:15","date_gmt":"2024-09-22T22:48:15","guid":{"rendered":"https:\/\/lance.conryclan.com\/home\/?p=268"},"modified":"2024-09-22T23:14:27","modified_gmt":"2024-09-22T23:14:27","slug":"building-a-usb-ptt-interface","status":"publish","type":"post","link":"https:\/\/lance.conryclan.com\/home\/building-a-usb-ptt-interface\/","title":{"rendered":"Building a USB PTT Interface"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Many software packages deigned for encoding and decoding RF protocols have the capability of keying a transceiver via serial RTS or DTR lines.  Here is a simple design to achieve this with a common USB to Serial TTL adapter.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">The Components<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CP2102 USB to TTL UART Module.  Really any module will do, but these are as common as chips, and only cost a couple of dollars each.<\/li>\n\n\n\n<li>4n25 optocoupler.  Again, pretty much any optocoupler will do.<\/li>\n\n\n\n<li>3.5 mm headphone socket.  You will of course use whichever connector matches your radio interface cable.<\/li>\n\n\n\n<li>120 \u03a9 resistor<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"750\" data-id=\"272\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-2.png\" alt=\"\" class=\"wp-image-272\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-2.png 750w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-2-300x300.png 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-2-150x150.png 150w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"612\" data-id=\"273\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-3.png\" alt=\"\" class=\"wp-image-273\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-3.png 500w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-3-245x300.png 245w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" data-id=\"274\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-4.png\" alt=\"\" class=\"wp-image-274\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-4.png 800w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-4-300x300.png 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-4-150x150.png 150w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-4-768x768.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">The Circuit<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DTR and RTS lines are supported by most software packages.  In my circuit I&#8217;m using DTR as my signal line.  If preferred, RTS could be used instead.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"283\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image.png\" alt=\"\" class=\"wp-image-269\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image.png 890w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-300x95.png 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-768x244.png 768w\" sizes=\"auto, (max-width: 890px) 100vw, 890px\" \/><\/a><figcaption class=\"wp-element-caption\">Inverting DTR input<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A <em>gotcha<\/em> if you&#8217;re new to Serial TTL flow control; most Serial TTL converters; DTR and RTS are <strong>Active LOW<\/strong>.  This means when software sets the pin Active, it will have 0 V, and when Inactive, it will have 3.3 v.  For our purpose, we want the optocoupler to energise when Active.  We can invert the state by using the 3.3 v line for our positive, and the DTR pin to vary our negative voltage.  To clarify, consider the truth table below:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong> DTR State<\/strong><\/td><td><strong> 3.3 V<\/strong><\/td><td><strong> DTR V<\/strong><\/td><td><strong> Voltage between <br> 3.3 and DTR<\/strong><\/td><\/tr><tr><td> Active<\/td><td> 3.3<\/td><td> 0 V<\/td><td> 3.3 V<\/td><\/tr><tr><td> Inactive<\/td><td> 3.3<\/td><td> 3.3 V<\/td><td> 0 V<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you somehow ended up with a USB to TTL which exhibits <strong>Active HIGH<\/strong>, there is no need to invert, and you can wire it up with GND and DTR.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"285\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-1.png\" alt=\"\" class=\"wp-image-271\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-1.png 885w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-1-300x97.png 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/image-1-768x247.png 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/a><figcaption class=\"wp-element-caption\">Non-inverting DTR input<\/figcaption><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">Construction<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When working with ICs I like to build small components like this dead-bug style; glueing the ICs upside down and soldering directly to their feet.  There are no heat dissipation issues, and it creates a nice compact package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mine may look a little different as my last 4n25 optocoupler had issues, so replaced it with a 6n138s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finishing it off with shrink-wrap offers sufficient protection, as it won&#8217;t be handled much at all.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"278\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-1024x768.jpg\" alt=\"\" class=\"wp-image-278\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-1024x768.jpg 1024w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-300x225.jpg 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-768x576.jpg 768w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-1536x1152.jpg 1536w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145836-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"276\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-1024x768.jpg\" alt=\"\" class=\"wp-image-276\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-1024x768.jpg 1024w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-300x225.jpg 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-768x576.jpg 768w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-1536x1152.jpg 1536w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_145807-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"277\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-1024x768.jpg\" alt=\"\" class=\"wp-image-277\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-1024x768.jpg 1024w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-300x225.jpg 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-768x576.jpg 768w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-1536x1152.jpg 1536w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150438-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With it all done, the final step was to label it with which signal to tell the software to use, otherwise I would be sure to forget which I used in a couple of weeks.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-1024x768.jpg\" alt=\"\" class=\"wp-image-279\" srcset=\"https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-1024x768.jpg 1024w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-300x225.jpg 300w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-768x576.jpg 768w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-1536x1152.jpg 1536w, https:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/20240922_150603-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Lance<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">September 2024<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Resources:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-3dac4f49-1aaa-446c-9d58-d0298e676c79\" href=\"http:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/USB-PTT-Interface_kicad.zip\">USB PTT Interface Schematic<\/a><a href=\"http:\/\/lance.conryclan.com\/home\/wp-content\/uploads\/2024\/09\/USB-PTT-Interface_kicad.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-3dac4f49-1aaa-446c-9d58-d0298e676c79\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Many software packages deigned for encoding and decoding RF protocols have the capability of keying a transceiver via serial RTS or DTR lines. Here is a simple design to achieve this with a common USB to Serial TTL adapter.<\/p>\n","protected":false},"author":1,"featured_media":279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[4,5],"class_list":["post-268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amateur-radio","tag-amateur_radio","tag-electronics"],"_links":{"self":[{"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":4,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":286,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/posts\/268\/revisions\/286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/media\/279"}],"wp:attachment":[{"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lance.conryclan.com\/home\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}