{"id":2001,"date":"2024-04-30T14:10:22","date_gmt":"2024-04-30T12:10:22","guid":{"rendered":"https:\/\/pa3csg.nl\/?page_id=2001"},"modified":"2024-05-01T18:25:33","modified_gmt":"2024-05-01T16:25:33","slug":"another-readout-for-an-antenna-aka-a-g2700-substitute","status":"publish","type":"page","link":"https:\/\/pa3csg.nl\/?page_id=2001","title":{"rendered":"Another readout for an antenna aka a G2700 \/ G2800 \/ G1000 substitute"},"content":{"rendered":"\n<p>Sometimes spare parts are hard to find. So was the control clock for a  Yaesu G2700 rotator at ON6NL &#8216;s place. The decision to make one was made easy. There is a potmeter in the rotor, normally 500 Ohms. The rotor has  450 degrees turning angle allowing overlap on either side. of 45 degrees.. So starting northwest the rotor can rotate through north, east, south, west, north and northeast.<\/p>\n\n\n\n<p>The rotor driver consisted of a Chinese module PWM control and direction control found at Aliexpress for around \u20ac10-15 and a transformer, diodes and electrolytic capacitors  from the junkbox. This is only for DC motors!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"995\" src=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/Rotor-control-DC-motor-1024x995.jpg\" alt=\"\" class=\"wp-image-2002\" srcset=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/Rotor-control-DC-motor-1024x995.jpg 1024w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/Rotor-control-DC-motor-300x291.jpg 300w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/Rotor-control-DC-motor-600x583.jpg 600w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/Rotor-control-DC-motor-1536x1492.jpg 1536w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/Rotor-control-DC-motor-2048x1990.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>The complete unit<\/figcaption><\/figure>\n\n\n\n<p>The readout was kept as simple as possible. A 2x16LCD an arduino nano and  the software.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"545\" src=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display1-1024x545.jpg\" alt=\"\" class=\"wp-image-2003\" srcset=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display1-1024x545.jpg 1024w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display1-300x160.jpg 300w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display1-600x319.jpg 600w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display1-1536x817.jpg 1536w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display1-2048x1090.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Display showing the antenna direction NE and the degrees. It warns you to rotate CCW. This is showing only close to the mechanical end-stop. The number is the digital value (0-1023) . This is for alignment and calibration procedure.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"526\" src=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display2-1024x526.jpg\" alt=\"\" class=\"wp-image-2004\" srcset=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display2-1024x526.jpg 1024w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display2-300x154.jpg 300w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display2-600x308.jpg 600w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display2-1536x789.jpg 1536w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/04\/display2-2048x1052.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The display showing a 15 degrees overlap.<\/p>\n\n\n\n<p>Over the pot-meter output a capacitor of 470nF was placed to ground. This made the readout more stable.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Antenna direction display for rotors with potmeter\n\/\/            By PA3CSG and ON6NL - April 2024\n\/\/\n\/\/ Reads pot.meter and displays compass direction, degrees\n\/\/ and warnings for overlap and nearing end stops\n\/\/\n\/\/ Hardware: LCD i2c display 16 positions, 2 lines, Arbduino Nano and  potmeter in rotor\n\/\/ \n\/\/ First fill in \n\/\/ the maximum position you allow the rotor to turn to the left = CCW as DegMinus\n\/\/     with degrees left of North as minus ( 45 degrees CCW (NW) overlap is -45)  \n\/\/ the maximum position you allow the rotor to turn to the right = CW as DegMax\n\/\/     with degrees right of North added to 360 ( 45 degrees CW (NE) overlap is 405)  \n\/\/\n\/\/ To calibrate ; Turn rotor fully Counter Clock Wise position\n\/\/                Note the number in the lower right corner of the display.\n\/\/                This number must be entered as the valueCCW\n\/\/                Turn rotor fully Clock Wise position\n\/\/                Note the number in the lower right corner of the display.\n\/\/                This number must be entered as the valueCW\n\/\/                Compile and upload the sketch \n\n#include &lt;LiquidCrystal_I2C.h&gt;\n#include &lt;Wire.h&gt;\n\n\/\/+++++++++++++  Calibration settings +++++++++++++++++++++++++++++\n\nint valueCCW = 2;    \/\/ Digital value of the pot meter at full CCW\nint valueCW = 915;   \/\/ Digital value of the pot meter at full CW\n\nint DegMinus = -45;  \/\/ DEGREES of the maximum position the rotor turns CCW\nint DegMax   = 405;  \/\/ DEGREES of the maximum position the rotor turns CW\n\n\/\/+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\nint analogInputPin = 0;               \/\/ analog input on Pin 0 of Arduino\n\nLiquidCrystal_I2C lcd(0x27,  16, 2); \/\/ Address of the Display, 16 chars, 2 lines\n\nbyte N&#91;8] = {\n  B00100,\n  B01110,\n  B10101,\n  B00100,\n  B00100,\n  B00100,\n  B00100,\n  B00100,\n};\n\nbyte EW&#91;8] = {\n  B00000,\n  B00000,\n  B00000,\n  B00000,\n  B00000,\n  B00000,\n  B00000,\n  B11111,\n};\n\nbyte S&#91;8] = {\n  B00100,\n  B00100,\n  B00100,\n  B00100,\n  B00100,\n  B10101,\n  B01110,\n  B00100,\n};\n\nbyte BS&#91;8] = {\n  B00000,\n  B10000,\n  B01000,\n  B00100,\n  B00010,\n  B00001,\n  B00000,\n  B00000,\n };\n\nvoid setup() {\n\/\/initialize lcd screen\n  lcd.init();\n\/\/ turn on the backlight\n  lcd.backlight();\n\/\/ Welcome screen\n  lcd.setCursor ( 0 , 0);\n  lcd.print(F(\"Antenna readout\"));\n\n  lcd.setCursor ( 0 , 1);\n  lcd.print(valueCCW);\n  lcd.print(F(\"=\"));\n  lcd.print(DegMinus);lcd.print((char)223);  \/\/Degrees symbol\n  lcd.print(F(\" \"));\n  lcd.print(valueCW);\n  lcd.print(F(\"=\"));\n  lcd.print(DegMax);lcd.print((char)223);  \/\/Degrees symbol\n\n  lcd.createChar(0, N);\n  lcd.createChar(1, EW);\n  lcd.createChar(2, BS);\n  lcd.createChar(3, S);\n\n\n  delay (2000);\n  lcd.clear ();\n\n\/\/Serial print set up\nSerial.begin(115200);\n}\n\nvoid loop() {\n\n\/\/ Convert pot. meter value to digital value\n\nint Dvalue = analogRead(analogInputPin); \/\/ Read pot. meter value \n\nSerial.print(F(\" Dvalue \"));             \/\/ Debug in Serial Monitor\nSerial.println(Dvalue);\n\n\/\/ Digital readout Value on display\nlcd.setCursor(12,1); \/\/col 12 line 2\n                                                                \/\/ Fill with space to align\nif (Dvalue &lt; 1000)  { lcd.print(F(\" \")); }  \/\/ Below 1000 one fill space\nif (Dvalue &lt;  100)  { lcd.print(F(\" \")); }  \/\/ Below 100 one more fill space\nif (Dvalue &lt;   10)  { lcd.print(F(\" \")); }  \/\/ Below 10  one more fill space\nlcd.print(Dvalue);\n\n\/\/ Map digital value to degrees between full CCW and full CW\nint Degrees = map(Dvalue , valueCCW , valueCW , DegMinus , DegMax );\n\n\/\/ Direction in degrees on display with degrees symbol\nlcd.setCursor(6,0);  \n                                                                \/\/ Fill with space to align\nif ((Degrees &gt;  -10) &amp;&amp; (Degrees &lt;  0))   { lcd.print(F(\" \")); }   \/\/ -9 to -1\nif ((Degrees &gt;   -1) &amp;&amp; (Degrees &lt;  10))  { lcd.print(F(\"  \")); }  \/\/ 0 to 9\nif ((Degrees &gt;    9) &amp;&amp; (Degrees &lt;  100)) { lcd.print(F(\" \")); }   \/\/ 10 to 99\n\nlcd.print(Degrees); \nlcd.print((char)223);  \/\/Degrees symbol\n\n\/\/ Compass Direction  on display\nlcd.setCursor(11,0); \nif (Degrees &lt; -23 )                      { lcd.print(F(\"NW\")); }\nif ((Degrees &gt; -22) &amp;&amp; (Degrees &lt;  23 )) { lcd.print(F(\" N\")); }\nif ((Degrees &gt;  22) &amp;&amp; (Degrees &lt;  68))  { lcd.print(F(\"NE\")); }\nif ((Degrees &gt;  67) &amp;&amp; (Degrees &lt;  113)) { lcd.print(F(\" E\")); }\nif ((Degrees &gt;  112) &amp;&amp; (Degrees &lt; 158)) { lcd.print(F(\"SE\")); }\nif ((Degrees &gt;  157) &amp;&amp; (Degrees &lt; 203)) { lcd.print(F(\" S\")); }\nif ((Degrees &gt;  202) &amp;&amp; (Degrees &lt; 248)) { lcd.print(F(\"SW\")); }\nif ((Degrees &gt;  247) &amp;&amp; (Degrees &lt; 293)) { lcd.print(F(\" W\")); }\nif ((Degrees &gt;  292) &amp;&amp; (Degrees &lt; 338)) { lcd.print(F(\"NW\")); }\nif ((Degrees &gt;  337) &amp;&amp; (Degrees &lt; 381)) { lcd.print(F(\" N\")); }\nif (Degrees &gt;  382)  {lcd.print(F(\"NE\")); }\n\n\/\/ Compass rose on display\nif (Degrees &lt; -23 ) { lcd.setCursor(0,0);  lcd.write(byte(2));  lcd.print(F(\"  \")); } \/\/ NW \"\\\"\nif ((Degrees &gt; -22) &amp;&amp; (Degrees &lt;  23 )) { lcd.setCursor(0,0);  lcd.print(F(\" \")); lcd.write(byte(0));  lcd.print(F(\" \")); } \/\/N\nif ((Degrees &gt;  22) &amp;&amp; (Degrees &lt;  68))  { lcd.setCursor(0,0); lcd.print(F(\"  \/\")); } \/\/ NE \nif ((Degrees &gt;  67) &amp;&amp; (Degrees &lt;  113)) {  lcd.setCursor(0,0);  lcd.print(F(\"  \")); lcd.write(byte(1)); }  \/\/ E\n\nif ((Degrees &gt;  112) &amp;&amp; (Degrees &lt; 158)) { lcd.setCursor(0,1); lcd.print(F(\"  \")); lcd.write(byte(2)); }  \/\/ SE\nif ((Degrees &gt;  157) &amp;&amp; (Degrees &lt; 203)) { lcd.setCursor(0,1); lcd.print(F(\" \")); lcd.write(byte(3));  lcd.print(F(\" \"));  } \/\/S\nif ((Degrees &gt;  202) &amp;&amp; (Degrees &lt; 248)) { lcd.setCursor(0,1); lcd.print(F(\"\/  \")); } \/\/SW\n\nif ((Degrees &gt;  247) &amp;&amp; (Degrees &lt; 293)) { lcd.setCursor(0,0); lcd.write(byte(1)); lcd.print(F(\"  \")); } \/\/W\nif ((Degrees &gt;  292) &amp;&amp; (Degrees &lt; 338)) { lcd.setCursor(0,0); lcd.write(byte(2));  lcd.print(F(\"  \")); } \/\/ NW \"\\\"\nif ((Degrees &gt;  337) &amp;&amp; (Degrees &lt; 381)) { lcd.setCursor(0,0); lcd.print(F(\" \")); lcd.write(byte(0));  lcd.print(F(\" \")); } \/\/N\nif (Degrees &gt;  382)  { lcd.setCursor(0,0); lcd.print(F(\"  \/\")); } \/\/ NE \n\nif ((Degrees &gt;  112) &amp;&amp; (Degrees &lt; 248)) {lcd.setCursor(0,0); lcd.print(F(\"   \")); } \/\/ Clear unused top positions\n                                    else {lcd.setCursor(0,1); lcd.print(F(\"   \")); } \/\/ Clear unused bottom positions\n\n                                                     \/\/ Special positions\nlcd.setCursor(0,1); \nif ((Degrees &lt;  0 ) ||  (Degrees &gt;  360 )) \n     {\n      lcd.print(F(\"overlap     \"));     \/\/ Overlap areas\n      if (Dvalue &lt;= (valueCCW + 5) ) {          \/\/ Rotor close to end stop CCW        \n          lcd.setCursor(0,1); lcd.print(F(\" ROTATE CW  \")); \/\/col 1, line 2  \n                                     }                                      \n      if (Dvalue &gt;= (valueCW - 5) ) {          \/\/ Rotor close to end stop CW        \n          lcd.setCursor(0,1); lcd.print(F(\" ROTATE CCW \")); \/\/col 1, line 2                                         \n                                    }\n     }\nelse {\n   lcd.setCursor(3,1); lcd.print(F(\"         \"));    \/\/ No special position\n     }   \n\ndelay (200); \/\/ wait  between readings\n\n   }\n  <\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Sometimes spare parts are hard to find. So was the control clock for a Yaesu G2700 rotator at ON6NL &#8216;s place. The decision to make <a class=\"mh-excerpt-more\" href=\"https:\/\/pa3csg.nl\/?page_id=2001\" title=\"Another readout for an antenna aka a G2700 \/ G2800 \/ G1000 substitute\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":2003,"parent":0,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"categories":[29],"tags":[],"_links":{"self":[{"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages\/2001"}],"collection":[{"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2001"}],"version-history":[{"count":3,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages\/2001\/revisions"}],"predecessor-version":[{"id":2007,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages\/2001\/revisions\/2007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/media\/2003"}],"wp:attachment":[{"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}