{"id":1859,"date":"2023-11-13T14:43:50","date_gmt":"2023-11-13T13:43:50","guid":{"rendered":"https:\/\/pa3csg.nl\/?page_id=1859"},"modified":"2024-08-08T15:08:32","modified_gmt":"2024-08-08T13:08:32","slug":"arduino-sequencer-version-ii","status":"publish","type":"page","link":"https:\/\/pa3csg.nl\/?page_id=1859","title":{"rendered":"Arduino Sequencer Version II"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"765\" src=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-1024x765.jpg\" alt=\"\" class=\"wp-image-2059\" srcset=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-1024x765.jpg 1024w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-300x224.jpg 300w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-600x448.jpg 600w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-1536x1148.jpg 1536w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-2048x1531.jpg 2048w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-326x245.jpg 326w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/bovenk-printv2C-80x60.jpg 80w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The old sequencer has been build by a large number of people. This went well with no problems, were heard about this  design. It is fairly easy and straightforward. But sometimes there were feature requests. Basically these requests were all about the same problem:<\/p>\n\n\n\n<p>When you touch your cw keyer the whole systems went into transmit. The same happens when your rig is in VOX mode and the there is some noise in the shack. For this problem several solutions were suggested. I incorporated these in the version II of the sequencer.<\/p>\n\n\n\n<p><strong>Solution one:<\/strong><\/p>\n\n\n\n<p>Make 4 instead of 3 outputs, the 4th output switches the key. No solution for the VOX problem. Unless you use the 4th output to enable key and microphone PTT<\/p>\n\n\n\n<p><strong>Solution two:<\/strong><\/p>\n\n\n\n<p>Yaesu transceivers have something they call a TX inhibit, as long as there is 12V on this TX-INHIBIT pin, the transceiver refuses to go to transmit. This is easily controlled by the Arduino. After all the 4 ports have switched you disable your TX-INHIBIT signal and it all will work. This could be done by the 4th sequencer output pin as well. But now it is on the sequencer board.<\/p>\n\n\n\n<p><strong>Solution three<\/strong><\/p>\n\n\n\n<p>The above solutions are no good for Icom or Kenwood users. They lack the TX-INHIBIT pin, but someone suggested to use the ALC-pin for that. Generating a low current  negative voltage is easy with the 7660 series of IC&#8217; s. Now the uncertain part&#8230;how negative this voltage should be. Icom seems to be around -3V, Kenwood 2000 should be around -8V. You can change the value of the variable resistor in output to adapt your voltage. Frank PA2M came to the conclusion the his Icom 9700 needed about 1mA on the ALC. I cannot test all these transceivers so you are on your own! This board will go up to about -9V .<\/p>\n\n\n\n<p><strong>Please be aware this ALC version is NOT tested with every transceiver. The voltage may vary also the current draw of your ALC circuit may affect the potmeter settings<\/strong>. <\/p>\n\n\n\n<p>Can you use the Version II sequencer in the old Version I way? Yes: Just don&#8217; t put the components for the TX-INHIBIT and ALC on the board. If you don&#8217;t want to use the number 4 output, just set the switching delay between port 3 &amp; 4 to 0 (zero milliseconds). On the PCB the TX-INHIBIT &amp; ALC component blocks are in a white square.<\/p>\n\n\n\n<p>The rest of the functionality is the same. The Alarm port, when it turns to High (+5V) it will turn all the 4 outputs to Low without delay. The red led will light. A reset button to ground to reset the sequencer in case of an alarm.<\/p>\n\n\n\n<p>A lot of people used the sequencer without the open collector on the board and used a (Chinese) relay board instead. For that reason an extra connector was put on the board. This connector can be used for the relay board or for leds or not at all.<\/p>\n\n\n\n<p>A PCB for this sequencer will be available. You can sent an email to geert.pa3csg@ leavethisout gmail.com<\/p>\n\n\n\n<p>The circuit of the Sequencer V II<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"715\" src=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/Schema2.1C-seq-1024x715.png\" alt=\"\" class=\"wp-image-2061\" srcset=\"https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/Schema2.1C-seq-1024x715.png 1024w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/Schema2.1C-seq-300x210.png 300w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/Schema2.1C-seq-600x419.png 600w, https:\/\/pa3csg.nl\/wp-content\/uploads\/2024\/08\/Schema2.1C-seq.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The code for the new Sequencer V II<\/p>\n\n\n\n<p>Make sure to set your own switching delays!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n \/*\n\nSEQUENCER Version 2.1C 8-8-2024\n\nSequencer adapted with 4 switching moments compared to 3 moments in the original sequencer\nIf you do not need 4 switching moments just change the int relaytime_3_4 = 0; \/\/ There will be no delay and relay 4 doesnot exist\nIF ALC &amp; TXinhibit are not needed, there is no need to change the software, You can omit the components on the PCB.  See printed text on PCB\n\nGood luck!\n\n73 Geert PA3CSG\n\n*\/\n\n  \/\/variables for the sequencer\n  int txgnd=2; \/\/ on pin Digital 2 \n  int relay1=3; \/\/ on pin Digital 3\n  int relay2=4; \/\/ on pin Digital 4\n  int relay3=5; \/\/ on pin Digital 5\n  int relay4=6; \/\/ on pin Digital 6\n  int alarminput = 7; \/\/on pin Digital 7\n  int alarmled = 8; \/\/ alarmled on pin 8\n  int TXinhibit = 9; \/\/ TXinhibit on pin 9 for Yaesu transceivers\n  int TXalc = 10; \/\/ ALC switching on pin 10  for Icom &amp; Kenwood transceivers\n  int txgndstate = 0;\n  int alarminputstate = 0;\n \/\/**********************************************************************************************************\n \/\/ Set relay switching times below\n \n  int relaytime_1_2 = 50; \/\/time in ms\n  int relaytime_2_3 = 50; \/\/time in ms\n  int relaytime_3_4 = 50; \/\/time in ms\n  int relayALC_TXinhibit = 50; \/\/time in ms\n\n  \/\/**********************************************************************************************************\n  \n  void setup()  {\n  \/\/setup sequencer\n  \n  pinMode(relay1, OUTPUT); \/\/relay 1\n  pinMode(relay2, OUTPUT); \/\/relay 2\n  pinMode(relay3, OUTPUT);  \/\/relay 3\n  pinMode(relay4, OUTPUT);   \/\/relay 4\n  pinMode(txgnd, INPUT_PULLUP);\n  pinMode (alarminput, INPUT); \/\/ initialize alarminput as input\n  pinMode(alarmled, OUTPUT); \/\/alarmled will light in case of alarm\n  pinMode (TXinhibit, OUTPUT); \/\/output pin for TXinhibit switching\n  pinMode (TXalc, OUTPUT); \/\/output pin for ALC switching\n  \n  digitalWrite(relay1, LOW);\n  digitalWrite(relay2, LOW);\n  digitalWrite(relay3, LOW);\n  digitalWrite(relay4, LOW);\n  digitalWrite(alarmled, LOW);\n  digitalWrite(alarminput, LOW);\n  digitalWrite(TXinhibit, LOW);\n  digitalWrite(TXalc, HIGH);\n  \n  }\n  \n  \n  void loop() {\nSerial.begin (9600);\n\n \/\/ code for sequencer\n \ntxgndstate = digitalRead (txgnd);\n \n    if (txgndstate == LOW) { \/\/ go to transmit\n      digitalWrite(relay1, HIGH); \/\/relay 1\n      delay(relaytime_1_2); \/\/ Time between relay 1 &amp; 2 \n      digitalWrite(relay2, HIGH); \/\/relay 2\n      delay(relaytime_2_3); \/\/ Time between relay 2 &amp; 3\n      digitalWrite(relay3, HIGH); \/\/relay 3\n      delay(relaytime_3_4); \/\/ Time between relay 3 &amp; 4\n      digitalWrite(relay4, HIGH); \/\/Time between relay 3 &amp; 4\n      delay(relayALC_TXinhibit); \/\/ Time between relay 4 &amp; ALC and TXinhibit switching\n      digitalWrite(TXinhibit, HIGH); \n      digitalWrite(TXalc, LOW); \n      \/\/Serial.println\n      \n    }\n  \n    if (txgndstate == HIGH) { \/\/ go to receive\n      digitalWrite(TXinhibit, LOW); \n      digitalWrite(TXalc, (HIGH)); \n      delay(relayALC_TXinhibit); \/\/ Time between relay 4 &amp; ALC and TXinhibit switching\n      digitalWrite(relay4, LOW);\n      delay(relaytime_3_4); \/\/ Time between relay 4 &amp; 4\n      digitalWrite(relay3, LOW); \/\/\n      delay(relaytime_2_3); \/\/ Time between relay 2 &amp; 3\n      digitalWrite(relay2, LOW); \/\/\n      delay(relaytime_1_2); \/\/ Time between relay 1 &amp; 2 \n      digitalWrite(relay1, LOW); \/\/\n     \n    }\n    \n    \n \n   alarminputstate = digitalRead (alarminput); \/\/EMERGENCY NO DELAY TIMES!\n   \n    if (alarminputstate == HIGH) {\n      digitalWrite(TXinhibit, LOW); \n      digitalWrite(TXalc, HIGH); \n      digitalWrite(relay4, LOW); \n      digitalWrite(relay3, LOW); \n      digitalWrite(relay2, LOW); \n      digitalWrite(relay1, LOW); \n      digitalWrite(alarmled, HIGH); \n      delay(10);\n      while(1) { } \/\/endless loop to stop\n      \n    }\n     \n    \n  } <\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>The old sequencer has been build by a large number of people. This went well with no problems, were heard about this design. It is <a class=\"mh-excerpt-more\" href=\"https:\/\/pa3csg.nl\/?page_id=1859\" title=\"Arduino Sequencer Version II\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":1860,"parent":0,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"categories":[29],"tags":[],"_links":{"self":[{"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages\/1859"}],"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=1859"}],"version-history":[{"count":10,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages\/1859\/revisions"}],"predecessor-version":[{"id":2062,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/pages\/1859\/revisions\/2062"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=\/wp\/v2\/media\/1860"}],"wp:attachment":[{"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa3csg.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}