Problems with Baofeng HTs and external PTT circuits.

300 views
Skip to first unread message

The Doctor

unread,
May 28, 2013, 11:09:23 PM5/28/13
to HacDC Public Discussion
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The Byzantium team is trying to build a cable for doing amateur
datacomm with a couple of Baofeng HT's, and we're having some trouble
with it. Haxwithaxe has been working on a PTT circuit for
soundcard-to-mic and phone jacks on the units and he's seeing some
weird problems that are hanging it up. Sometimes the PTT jams open
and doesn't let go, and sometimes it jams closed and nothing will
actuate it.

We've seen posts from some poeple about the Baofengs acting squirrely
with external PTT circuits. A few people reported that RF chokes
were enough to solve the problem. We're going to try that tomorrow
night. A few other people built alternative circuits with
opto-isolators, and Hax is looking at a few other possible
implementations.

Has anyone seen this before with HTs in general, or the Baofengs in
particular?

- --
The Doctor [412/724/301/703] [ZS]
Developer, Project Byzantium: http://project-byzantium.org/

PGP: 0x807B17C1 / 7960 1CDC 85C9 0B63 8D9F DD89 3BD8 FF2B 807B 17C1
WWW: https://drwho.virtadpt.net/

LOAD "*",8,1

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlGlcWMACgkQO9j/K4B7F8FuugCfSoddZ5FKOmoioki5xUUSNNZX
zs4AoIqxIaV4WJrjQKcK+uvAt+fdYzeA
=nXQv
-----END PGP SIGNATURE-----

Jarett DeAngelis

unread,
May 28, 2013, 11:17:01 PM5/28/13
to HacDC

I had a hell of a time building one of these for my Wouxun HT without an opto-isolator. I'd say do it.

--
--
--
Support HacDC by becoming a member. Learn more and join us here: http://hacdc.org/membership/
--
You received this message because you are subscribed to the HacDC "Blabber" group.
To post to this group, send email to Bla...@hacdc.org
To unsubscribe from this group, send email to
Blabber+u...@hacdc.org
For more options, visit this group at
http://groups.google.com/a/hacdc.org/group/Blabber



et...@757.org

unread,
May 28, 2013, 11:40:47 PM5/28/13
to HacDC Public Discussion


Back in the day at defcon me and a friend built a rig to allow us to
contorl a laptop via FRS freqs via DTMF.

We used an optoisolator off of the LPT1 port to trigger the ptt switch.
IIRC if it was wired backwards it would hold open.
> --
> --
> --
> Support HacDC by becoming a member. Learn more and join us here: http://hacdc.org/membership/
> --
> You received this message because you are subscribed to the HacDC "Blabber" group.
> To post to this group, send email to Bla...@hacdc.org
> To unsubscribe from this group, send email to
> Blabber+u...@hacdc.org
> For more options, visit this group at
> http://groups.google.com/a/hacdc.org/group/Blabber
>
>
>
>

--
Ethan O'Toole
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Flickr photos : http://www.flickr.com/photos/ethanotoole
757 Labs Hackerspace : www.757labs.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Philip Stewart

unread,
May 29, 2013, 9:52:26 AM5/29/13
to Bla...@hacdc.org

How does the circuit work? Is it a transistor switch of some kind? Does it just assert a voltage to something on the radio, as in a logic output? Have you looked at any of it on a scope?

haxwithaxe

unread,
May 29, 2013, 10:34:31 AM5/29/13
to Bla...@hacdc.org, Philip Stewart
there are two variants.
1) right channel 1kHz audio driven fet/npn based switch
2) serial RST or DST pin driven fet/npn based switch

the example available for type #1:
http://www.w1hkj.com/FldigiHelp-3.21/w5zit-interface.html

an example of type #2:
http://www.soundcardpacket.org/1cableptt.htm

the radio is a boafeng uv5r/uv3r+ and the interface is the same as a
kenwood with separate speaker and mic of the same configuration.

this interface is really convenient if one knows what one is doing
unfortunately we don't :P
AC speaker- and mic- are the DC ptt circuit leads as well :(
mic- is a 3VDC source and speaker- is DC GND sink.
when the 3V is applied to the ground pin it closes the ptt circuit and
the radio transmits.

type #1 is supposed to close the ptt circuit as long as there is a
signal applied to the right audio channel (left channel carries the
voice/data signal and right channel is just for ptt), and when the
signal is removed it opens the ptt circuit.
the issue i have experienced with the type #1 example is the signal hits
the fet and closes the circuit, but it never opens again until i reapply
the signal and then it opens with the end of the second signal.
i got some ferrite chokes last night and i will try applying those tonight.
i have a single optoisolator and a bunch of 1:1 isolation coils which i
have tried but not with the chokes so far.

On 05/29/2013 09:52 AM, Philip Stewart wrote:
>
> How does the circuit work? Is it a transistor switch of some kind? Does it just assert a voltage to something on the radio, as in a logic output? Have you looked at any of it on a scope?
>
>
>
>
> May 28, 2013 11:40:52 PM, Bla...@hacdc.org wrote:
>
>>
>> Back in the day at defcon me and a friend built a rig to allow us to
>> contorl a laptop via FRS freqs via DTMF.
>>
>> We used an optoisolator off of the LPT1 port to trigger the ptt switch.
>> IIRC if it was wired backwards it would hold open.
>>
>>
>> On Tue, 28 May 2013, The Doctor wrote:
>>
> The Byzantium team is trying to build a cable for doing amateur
> datacomm with a couple of Baofeng HT's, and we're having some trouble
> with it. Haxwithaxe has been working on a PTT circuit for
> soundcard-to-mic and phone jacks on the units and he's seeing some
> weird problems that are hanging it up. Sometimes the PTT jams open
> and doesn't let go, and sometimes it jams closed and nothing will
> actuate it.
>
> We've seen posts from some poeple about the Baofengs acting squirrely
> with external PTT circuits. A few people reported that RF chokes
> were enough to solve the problem. We're going to try that tomorrow
> night. A few other people built alternative circuits with
> opto-isolators, and Hax is looking at a few other possible
> implementations.
>
> Has anyone seen this before with HTs in general, or the Baofengs in
> particular?
>
>>>
--
do you accept PGP encrypted messages?
https://en.wikipedia.org/wiki/Pretty_Good_Privacy
i accept encrypted messages!
encrypt all the things! https://www.encrypteverything.ca/

signature.asc

Philip Stewart

unread,
May 29, 2013, 10:54:28 AM5/29/13
to m...@haxwithaxe.net, Bla...@hacdc.org
///////// AC speaker- and mic- are the DC ptt circuit leads as well :( /////////////

From the hip -- inadvisably, but I've got s*** to do before I read thoroughly -- it *sounds* like you are describing two channels of signal on a single wire: (1) AC for audio & (2) DC for PTT.

So the easy (and from-the-hip and therefore probably totally wrong) suggestion is to limit the rise-time of your PTT input so it is close to DC and isn't just read as audio input or something... I know that leaves out some of the behavior you have reported as pathological...

///////// this interface is really convenient if one knows what one is doing
>unfortunately we don't :P //////////

Hah! That of course is the normal position in life, honestly stated. ;)

Solved problems are boring. I am going to try to supply you with an approach to this form of boredom after I compel myself to get some things done here that are less fun than a funny little electronic problem, the kind of thing I am a complete sucker for. More in a bit, if someone doesn't get it figured in the intervening time...

Phil

Philip Stewart

unread,
May 29, 2013, 11:00:58 AM5/29/13
to m...@haxwithaxe.net, Bla...@hacdc.org

Further to the probably wrong answer I just gave -- I just realized I didn't express it in simple terms.
I.e. by "limit the rise time" I mean something like sticking a capacitor from the signal line to the return (ground) -- "in shunt" -- to impose an R-C time constant on the PTT voltage asserted.

& with that, it occurs to me that comparators (if that's what's on the other side of that thing) become sad when presented with slow-changing signals... and can oscillate... the above can't hurt, if I have read your thing accurately, however... I don't think...

Philip Stewart

unread,
May 29, 2013, 11:09:45 AM5/29/13
to Bla...@hacdc.org, m...@haxwithaxe.net, Bla...@hacdc.org
~!@#$%^&*()
Curses!
Um, I think if you actually have one signal wire on the Baofeng whatchamatcallit doing double duty as PTT & audio I/O, then you probably can't have the audio stuff "see" the capacitance imposing your time constant -- so, it would have to be stuck in some place between the rectification in that circuit diagram you posted a link to and the transistor's base or something to that effect... putting it behind the impedance buffer the transistor affords...

That's a real rough-sketch idea, again assuming my ~!@#$%^ interpretation of your description reflects a real-world situation.

So...

Phil

Philip Stewart

unread,
May 29, 2013, 11:21:23 AM5/29/13
to Bla...@hacdc.org, m...@haxwithaxe.net
Hmm. //////// when the 3V is applied to the ground pin it closes the ptt circuit and the radio transmits. /////////
.. "applied to the ground pin"
That changes things a little...

Martin

unread,
May 29, 2013, 11:21:34 AM5/29/13
to HacDC Public Discussion, hax withaxe
Both circuits work. David was using the first type with his Fldigi demonstration.  I've built several variations of the second type of PTT circuit and ran into similar problems but got it to work.  

You do have to be careful with RF "feedback" activating the switch with either.  Keying up but not turning off is a definite symptom.  Ferrites, short twisted leads and shielding the circuit in a metal container could all help.  You could decrease the value of R1 in the first circuit to make it less sensitive.  You could also try lowering your transmit power when testing to see if it makes a difference.

Many programs don't generate an audio tone like Fldigi so sometimes the second circuit is the only option.  I used a USB-serial converter just for the single control line. 


Martin

Lee Ciereszko

unread,
May 29, 2013, 11:24:17 AM5/29/13
to Bla...@hacdc.org
There should be a circuit out there that uses a cap and a resistor to isolate the PTT from the audio circuit.  It has been a long time since I built one. 

Lee  N4TCW

Where's Lee?

Philip Stewart

unread,
May 29, 2013, 11:38:30 AM5/29/13
to Bla...@hacdc.org

ah... d'oh! Martin was just talking about exactly such a feeback of RF into the circuit at the last meeting...
so, the efficacy of chokes...


May 29, 2013 11:24:23 AM, Bla...@hacdc.org wrote:
There should be a circuit out there that uses a cap and a resistor to isolate the PTT from the audio circuit.  It has been a long time since I built one. ;
>
>Lee  N4TCW
>Where's Lee?http://map.findu.com/n4tcw
 ;
>
 ;
>
 ;
 ;
>
 ;
>
 ;
>

haxwithaxe

unread,
May 29, 2013, 7:14:09 PM5/29/13
to Bla...@hacdc.org
i don't doubt they work but they all have trouble with this particular
connection when the speaker- and mic- are shared without some kind of
isolation between them.

the same issues arise with the serial ptt circuits so it's kinda a moot
issue if we can't figure it out.

i will hopefully manage to figure this out tonight.

i was actually going to use a dummy load or stick the antenna in a
grounded can and point it into a corner to keep the RF away from the
radio until we determine the problem.
signature.asc

Malcolm Sperry

unread,
May 30, 2013, 12:18:45 AM5/30/13
to Bla...@hacdc.org
Yes, I've seen it before. RF was the culprit in every case. You might try bypassing it first (start with .01 mfd) then use a more expensive (and sometimes difficult to find) "choke"/mac


haxwithaxe

unread,
May 30, 2013, 1:14:06 AM5/30/13
to Bla...@hacdc.org, HARC List
0.01uf and 0.1uf caps on the radio side after the fet in this one
http://www.w1hkj.com/FldigiHelp-3.21/w5zit-interface.html
plus an extra 0.22uf next to the 820kohm resistor and a second 820kohm
resistor seem to have made it work.
soldering of borads will commence tomorrow.

On 05/30/2013 12:18 AM, Malcolm Sperry wrote:
> Yes, I've seen it before. RF was the culprit in every case. You might
> try bypassing it first (start with .01 mfd) then use a more expensive
> (and sometimes difficult to find) "choke"/mac
>
>
> On Wed, May 29, 2013 at 11:09 AM, The Doctor <dr...@virtadpt.net
> <mailto:dr...@virtadpt.net>> wrote:
>
> The Byzantium team is trying to build a cable for doing amateur
> datacomm with a couple of Baofeng HT's, and we're having some trouble
> with it. Haxwithaxe has been working on a PTT circuit for
> soundcard-to-mic and phone jacks on the units and he's seeing some
> weird problems that are hanging it up. Sometimes the PTT jams open
> and doesn't let go, and sometimes it jams closed and nothing will
> actuate it.
>
> We've seen posts from some poeple about the Baofengs acting squirrely
> with external PTT circuits. A few people reported that RF chokes
> were enough to solve the problem. We're going to try that tomorrow
> night. A few other people built alternative circuits with
> opto-isolators, and Hax is looking at a few other possible
> implementations.
>
> Has anyone seen this before with HTs in general, or the Baofengs in
> particular?
>
>
> --
> --
> --
> Support HacDC by becoming a member. Learn more and join us here:
> http://hacdc.org/membership/
> --
> You received this message because you are subscribed to the HacDC
> "Blabber" group.
> To post to this group, send email to Bla...@hacdc.org
> <mailto:Bla...@hacdc.org>
> To unsubscribe from this group, send email to
> Blabber+u...@hacdc.org <mailto:Blabber%2Bunsu...@hacdc.org>
> For more options, visit this group at
> http://groups.google.com/a/hacdc.org/group/Blabber
>
>
>
>
> --
> --
> --
> Support HacDC by becoming a member. Learn more and join us here:
> http://hacdc.org/membership/
> --
> You received this message because you are subscribed to the HacDC
> "Blabber" group.
> To post to this group, send email to Bla...@hacdc.org
> To unsubscribe from this group, send email to
> Blabber+u...@hacdc.org
> For more options, visit this group at
> http://groups.google.com/a/hacdc.org/group/Blabber
>
>
>

signature.asc

The Doctor

unread,
Jun 6, 2013, 11:36:04 AM6/6/13
to Bla...@hacdc.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Crossposted to HARC - apologies in advance.

Last night out of curiosity I decided to try building a simpler PTT
circuit for my Radio Shack HTX-200, on the hypothesis that its pinout
is a little more sane and I have more experience with it, so I know
how it acts under various conditions. I built two of these:

http://www.soundcardpacket.org/1cableptt.htm#isolation

tl;dr on the HTX-200: The PTT circuit is behind the external mic jack.
Plug a mic in, key it, and the transmitter keys up. Here's the
manual for that unit:

http://www.repeater-builder.com/radio-shack/htx-200/htx-200-owners-manual.pdf

Here's what I saw while testing the circuits:

I was able to plug each of the cables into a USB-to-serial adapter on
my laptop and use soundmodem's diagnostic utility to frob PT, where it
showed up as blips on a multimeter. I plugged the circuit into the
mic jack of my HTX and was able to hear it keying the transmitter
while the diagnostic utility's PTT was on, and I was able to hear it
click off when I un-PTT'd the utility. Off, on, off, on, off, on,
pretty reliably.

I then spliced a second cable onto the mic plug which connects back to
my laptop's headphone jack, so that packets played through the sound
card would go into the HTX's mic jack and then onto the air. I then
noticed something: The PTT circuit wouldn't un-key when I turned the
PTT function off. This happened both when the
plug-to-the-headphone-jack was connected to my laptop and when it
wasn't plugged in. I suspect that it's RFI keeping the PTT circuit
keyed but I'm not sure. This seems to be the same phenomenon that
Haxwithaxe is seeing with the PTT circuits he's been constructing.

When I plugged the sound source cable into the headphone jack of my
laptop I was able to successfully broadcast pings to a non-existent
AMPRnet IP address (44.1.2.3, from my 44.5.17.23) and hear them as
bursts of sound in the other HT.

Sitwon and I played arond a little bit with some RF chokes we
scrounged up, and they didn't seem to do any good. We put them on
both the sound source cable and both sides of the PTT circuit's
wiring. We moved the HTX as far away as we could from the laptop but
that didn't help because the wires are too short (I was trying to keep
them short to prevent this from happening in the first place).

Here's where I deviated from the original design:

I spliced my audio source cable onto the mic plug to get sound
(packets) into the unit. I did not put a 22k resistor across the
terminals of the sound source (see page 15 of the HTX docs I linked to
above) because I'm not entirely certain where it would need to go in
my particular implementation (across radio PTT and radio ground?
across the wires in the sound source cable?). Shielded cables are in
short supply, but the one that I did find takes longer to exhibit this
problem but still does so after a few minutes. I accept that these
may be culprits, or are at least contributing to the problem.

I plan on trying a few ways of shielding the circuits this evening to
see if that helps, such as wrapping the wires in sheets of foil inside
of plastic baggies (to prevent shorts). I'm also going to see if I
can scrounge up some shielded cable.

Here are the photographs I took of the PTT circuits after testing them:

https://drwho.virtadpt.net/pictures/PTT_circuit-20130605/

Does anyone have any suggestions?

- --
The Doctor [412/724/301/703] [ZS]
Developer, Project Byzantium: http://project-byzantium.org/

PGP: 0x807B17C1 / 7960 1CDC 85C9 0B63 8D9F DD89 3BD8 FF2B 807B 17C1
WWW: https://drwho.virtadpt.net/

Availability, performance and cost - pick any two.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlGwrGMACgkQO9j/K4B7F8HAqwCeJhGtQq5GgYQ5qBb4P0242jSb
9G8An1xfASOirYrC2y74J38yHaXh65vr
=Uxf2
-----END PGP SIGNATURE-----

Martin

unread,
Jun 7, 2013, 11:13:13 AM6/7/13
to HacDC Public Discussion
Try a 0.1 - 0.01 uF capacitor across D1.

Martin


Philip Stewart

unread,
Jun 7, 2013, 11:18:36 AM6/7/13
to Bla...@hacdc.org

Simple and good: as close to the point of irritation as possible.
 ;
>
 ;
>
 ;
>
Reply all
Reply to author
Forward
0 new messages