03 aprilie 2021

Arduino PTT Sequencer for Xiegu G90

ATTENTION!!!

This was made and tested on my Xiegu G90 and it is working very smooth and nice. However, your mileage can vary from similar experience to magic smoke release! Bla bla bla, you know the text...

This PTT sequencer is designed for Voice operation and will not work on CW!


While other solutions can be take into account, using a small Arduino Nano to take care for timings on a PTT Sequencer is the most elegant solution.

If it were for me, the device would stand in my mind only but I made a promise to help a fellow ham and this is how this was born.

First step was to find a small and cheap RJ45 Ethernet adapter like the one in the picture;


This is very easy to open and inside there are wires from side to side.
Carefully identify the wires for GND, PTT and  + 8V

Cut them then, on the GND and +8V solder another piece of wire. These two will be still linked but you must take out the GND and +8V to power the Arduino.
The PTT will be electrically split. one wire will go from the radio to the sequencer and the other one will go from the Microphone PTT to the sequencer.
I forget to take pictures in the process, this is how it looks finished. You can see a split wire soldered then to a third one, I think this is the GND one.

And here is the schematic, for the brave ones! You can click on it to make it bigger.



A few words about the schematic:

I choose to provide two delayed outputs ACC_A and ACC_B because I thought someone will use not only a QRO after the radio but also an antenna switch or, why not, some sort of "OnAir" light!
The outputs are isolated with the help of two optocouplers which keeps the current draw at a minimum.
There are two important things to consider when using optocouplers. The first is that they are polarised so you must pay attention when you connect accessories. The second one is to keep an eye to the maximum current draw by the accessories. With PC817, the maximum current is around 50mA@6V; if this is not enough, a relay has to be used.

I also used optocouplers on the PTT switch and on the PTT output to the radio but, because those I/O are not isolated, common transistors can be used.

Last but not least, the circuit draw it's power from the +8V line which came from the radio. In the radio 8V is produced with a 7809 therefore the approximative 70mA drawn by the sequencer will not be a big issue.

Just after i finished drawing the schematic for the device I added, for further implementation, some circuit parts for a Courtesy Beep which can be launched at the beginning or/and the end of transmission just by a few lines of code.

How is the device  working?


Well, the magic is in the code; because some accessories are electronically switched (with PIN diodes) and other are "classy" (old fashion relays) I thought some sort of variable delay can be usefull.Therefore, with the help of two SPSD DIP Switches we can choose from 4 values. Because 4 is too much, we will have 3 timings and one "test" position with a very long delay, to test the proper setup. 



Because the sequencer is code-defined, I will refer to my version of the code:

With the radio in OFF position, a small Ethernet cable will connect the sequencer to the radio and the original curled cable from the sequencer to the microphone.

With the device not connected, you can choose the timing according to the table above. 

Power on the radio; the RED LED will briefly flash and right after, the GREEN LED will stay lit. This is to know the boot procedure was finished and everything is OK.
NOTE: the timings can be changed BEFORE powering the unit. 
Any change in the switches must be followed by a RESET (or POWER DOWN/POWER UP).

So, let's assume we choosed 50mSec delay:

At POWER ON on the radio, all ACC are OFF and radio is in RX.

When the PTT is pressed, ACC_A switch ON,  wait 50mSec, ACC_B switch ON, wait50mSec, radio goes TX, operator start to speak.
When the PTT is released, radio immediately go RX, wait 25mSec, ACC_B switch OFF, wait 25mSec, ACC_A switch OFF.

So, if we have Antenna switch on ACC_A and QRO on ACC_B, the antenna switch goes ON first and OFF last, radio switch TX last and RX first and ACC_B is between.

On the other hand, if you use just QRO with the radio, with 50mSec timing set, if you use ACC_B you will have a 50mSec delay in consideration to the radio Tx but if you connect it to the ACC_A you will have the double, 100mSec. 

You will notice a difference in PTT press and PTT release timings, this is because when PTT is released, the radio goes immediatly in Rx and there will be no RF present on the switching circuits therefore we can cut some delays there. The Tx to Rx delay was implemented as interval/2 in this case to speed things, especially for pileups or contests when is important to be fast on receiving.

The RED LED will light when the radio is keyed into TX and it is also "code driven" so can be associated to other functions.

Thus, the table can be redraw like this:


Testing the LEDs





This is how it is at the end:








And a small video with the sequencer connected in TEST mode





GL and please let me know if you did this project!

73 de Adrian YO3HJV

2 comentarii:

Unknown spunea...

You might want to proofread your schematic. These may not be correct:
- some pin numbers between the two RJ-45 match, others don't
- the GND at the bottom of the schematic is connected to 8V on the RJ-45
- should there be a connection point (dot) between Arduino pins 4 and 5 ?
- suggest some sort of current limit on 8V to protect your radio, maybe just a resistor, or a PTC
Nice project, have fun.

YO3HJV, Adrian spunea...

Thanks! I do have a protection with a 2 Ohm resistor. I also made the corrections. 73!

Most viewed posts in last 30 days