Open Tracker USB - Inconsistent switching of the Power Relay Output pin on the RADIO Connector

#1
First some background, I am using the Open Tracker USB to periodically send a position and telemetry packet from a remote station which uses solar power. I use the "power 5" command to turn the radio on, send the information and then turn the radio off. This is accomplished using the Power Relay Output (Pin 9 RADIO Connector) to switch power using a relay.
Using the command "beacon" performs this as expected, powering the radio, waiting 5 second to allow the transceiver to stabilize, sending the packets and then switching the power off.
I also want to transmit a 'Parameter Name Message' and a ' Unit/Label Message' and here's where my issues occur.
When I issue the cmd: BEACON :VE6BUZ-15:UNIT.Volts the power is turned on the beacon is transmitted but the power is not turned off consistently. If the Power Relay Output if left high (On) the next beacon will set the Power Relay Output to low (Off) and the beacon is not transmitted because the transceiver has been turned off.
Therefore I can't rely that the transceiver will be powered off after the beacons have been transmitted and the transceiver can remain powered on for long periods of time draining the batteries.
This issue only appear to exist when the cmd:BEACON [text] format is used. The cmd:BEACON by it's self with no [text] component works as expected setting the Power Relay Output to +5v, performing the BEACON and then setting the Power Relay Output to 0v.

Question: Is there a way to consistently force the Power relay output pin to be set to low (0v) after a cmd:BEACON [text] format is issued.
Attached is the script I have been using to perform some testing.
 

Attachments

Ian ZL1VFO

Moderator
Staff member
#2
This issue only appear to exist when the cmd:BEACON [text] format is used. The cmd:BEACON by it's self with no [text] component works as expected setting the Power Relay Output to +5v, performing the BEACON and then setting the Power Relay Output to 0v.

Question: Is there a way to consistently force the Power relay output pin to be set to low (0v) after a cmd:BEACON [text] format is issued.
Attached is the script I have been using to perform some testing.
You might be able to do something with the Peek and Poke commands available in scripting. There is a short description of them on
http://wiki.argentdata.com/index.php?title=Scripting#Peek_C.26X.3DY.3F
Considering this is something I've never tried - the Power Relay output looks to be available on pin 9 of the radio DB9 connector.
(Owner's manual - https://www.argentdata.com/support/OpenTrackerUSB_manual.pdf page 3 )
From the schematic ( http://wiki.argentdata.com/images/Otusb-schematic.png ) it looks to be labelled AUX_IO and comes from pin 30 of the microprocessor which is port D, bit1 (Top right of microprocessor in the schematic)
So to work out which memory location and bit one needs to alter, perhaps Peek 0 and print out the contents, then power the relay output indirectly with the beacon command and Peek 0 & print the output again, to see which bit changes. Then reiterate for Peek 1, Peek 2 etc
Assuming memory locations 0-6 match Ports A-G on the micro, it should be possible to work out which memory location and bit controls the Power Relay output.
Or you could go for broke and try Poke 3, 2&2 or Poke 3, 0&2 and see if by good luck we hit the right output (Note I haven't the hardware handy to try this right now - it might crash things if that memory location is for something else.

Alternatively you could drop Scott N1VG at Argent a note via email and ask him. I presume the email address support@argentdata.com still works - I haven't tried it in a while.

73s,
Ian ZL1VFO
 
#3
Ian [ZL1VFO],

Using your suggestion on the PEEK option, I create a few scripts that checked the status of the various locations. It turn out that location 6 bit 2 (PEEK 6, 2&2) reflects the current/changing state of the AUX_IO (Power Relay) pin. Creating the scripts was tedious as there doesn't appear to be a way to edit a script and that there is a very limited amount of memory for scripts on the OTUSB.
Next step is to test the POKE 6, 0&2 to verify if this shuts off the power. I think I'll drop an email to support@argentdata.comfirst to ask if this is dangerous to perform on the OTUSB.

Attached is the output of the script showing the changing state of PEEK 6, 2&2

73s,
Alan [VE6BUZ]
 

Attachments

Ian ZL1VFO

Moderator
Staff member
#4
Good to hear that you're making some progress. Admittedly having full memory <--> Port mapping would have made this a lot easier, and could be useful for other things in a script.
-Ian ZL1VFO
 
#5
With further testing, now that I have the PEEK 6, 2&2 uncovered, reveals some interesting conditions for the AUX_IO power switching inconsistency.
The transceiver I'm using is a YAESU FT-7800. Here's the interesting part, with the transceiver powered off (disconnected from the power supply) the testing script shows the AUX_IO pin switching form hi to low at the end of each BEACON [text] issued, with the transceiver powered on (connected to the power supply) the switching of the AUX_IO pin fails to switch from hi to low after the BEACON [text] has been sent, but always switching from hi to low after a simple BEACON is issued. This is leading me to think this may be some form of electrical (voltage, current draw) issue with the OpenTracker USB.
 

Ian ZL1VFO

Moderator
Staff member
#6
Do you have pin 9 connected to your relay coil via a driving transistor inbetween? The microprocessor output won't have much current drive ability, not enough to drive a relay coil directly anyway. I would have thought that the OT USB wouldn't know if the radio was on or not, so that shouldn't affect the operation of DB9 pin 9 Radio connector.

If one takes (most of) the OT software out of the loop and just use POKE 6, 2&2, I would expect that should take the DB9 pin 9 Radio connector high and so turn on your relay. If so, then POKE 6, 0&2 should turn the relay off. Perhaps repeat this with the radio attached as you would have it normally attached and see if anything changes - I've always been wary of loose ground connections which can cause all sorts of weirdness.

If all the above works, then the hardware side is probably ok, and it then comes back to a quirk in the firmware, which is something Scott would have to investigate. I would have thought that the 2 different types of beacon (with and without text) that you tried would work in much the same way as far as Pin 9 is concerned, but perhaps I'm missing something.

Ian ZL1VFO
 
#7
I'm using a Relay Module with Optocoupler which only requires 2-4mA as a trigger current. The main coil requires 190mA which is supplied by a LM2596S DC to DC Buck Converter (12v -> 5v step-down), so the coil draws no power directly from the OT USB. Without the radio being connected to power (powered off) I can hear (an see the relay led) clicking on an off as the OT USB performs the BEACON function.
I'm testing the POKE 6, 0&2 but this doesn't appear to tun off the relay, but POKE 6, 2&2 does turn it on. I'm not 100% sure I understand the POKE command especially when clearing a bit. More investigation needed.
 

Ian ZL1VFO

Moderator
Staff member
#8
It might be down to the mask used - the '&2' part. This affects which bits get altered
&0 won't affect any bits
&1 should affect the least significant bit (bit 0)
&2 should affect the next bit (bit 1) (The one we're after)
&3 should affect both bits 0, 1)
&4 should affect the next bit on (bit 2) (unused port PTD2 on pin 33 of the microprocessor in this case)
&128 should affect the largest bit (bit 7) (Don't think there's a pin for this on Port D)
all the way up to &255 which should affect all the bits in the memory location
All other bits should be left untouched
So POKEing a 0 into location should turn off all the bits that we have selected using the mask.
In this case the POKE6, 0&2 should turn off the relay.
Presumably if you PEEK into location 6 before you turn it on or off, it should show what state the relay is
Example

If Peek 6 and 2 = 2
PrintA "Relay output is high"
End Block

If Peek 6 and 2 = 0
PrintA "Relay output is low"
End Block

I /think/ that should work...
 
#9
The following script was executed on the OT USB. The two MACROs allow for executing the POKE commands from the cmd:. The results are interesting, the BITON macro turns the bit to hi and the relay is activated, unfortunately the BITOFF macro appears to do nothing. Using the POWER cmd: the relay can be turned off and the MACRO's tried again, always with the same results.

Macro BITON
Poke 6, 2&2
End Block
Macro BITOFF
Poke 6, 0&2
End Block
On Second
If Peek 6 and 2 = 2
PrintA "\r\nPower Relay Output is On.\r\n"
End Block
If Peek 6 and 2 = 0
PrintA "\r\nPower Relay Output is Off.\r\n"
End Block
End Block

I have forwared this information to Argent Data Systems Support and an awaiting a response.