Tuesday, December 18, 2018

Packet Radio - BBS generate Automatic Bulletin

Packet radio is fun and all but if you want to be serious about generating useful bulletins it is rather a chore to type them up.  What is required is a way to post an automatically generated bulletin from a text file source.  Sounds easy right?  It actually is.  This is designed around a Linux operating system, and some pre-requisite software is required.
BPQ32, expect, and telnet
Install these packages on your Linux computer like you normally would.  In this example I will show how to use any text file that you might generate, and post it as a BBS Bulletin.

Let's start with a text file.  It can be any text file, the internet of things and a home automation system allow us to capture data around us and put it in a text file reporting values for a day.

The Telnet access to BPQ32 (or linbpq) in this case must be set up correctly.  This will give us command line access to the packet BBS, and therefore the world if we want.  The expect command in Linux is clever.  It expects some output from stdout and replies with a response on stdin.  It will just be like typing the information into the command line yourself, only the .exp script will do it for you.  The text file is read in and translated into binary, this is key otherwise the file will not maintain the formatting it originally had.  No one likes long lines on a BBS system.  Keep it to less than 80 characters across when you generate your text file.  Then the expect command can spawn a telnet connection and step through logging into your BBS to send a bulletin.  You might want to just verify your login prompts on your own BBS.  They may differ, change any text in quotes after the expect command to match your system.  Finally the bulletin text can be inserted and the expect script can just log itself out of the telnet connection.

You will notice a \r at the end of some of the commands.  This is a carriage return, just like hitting enter on the keyboard.  Without it the command won't hit enter and won't go to the next step, so don't forget them.

In your home directory (in this case I'm running this on a Raspberry Pi), so the /home/pi directory I've made a folder called BBSScript.  My telnet host actually runs on a non-standard port 8010, so you'll have to change that and any other text in bold to suit your needs.  My standard outgoing message file is msgout.txt, and in the example it is being sent to SUBJECT@WW.  You can categorize your bulletin however you like.  Save the file as sendbulletin.exp and make it executable with a chmod u+x command.
#!/usr/bin/expect
set timeout 20
set msgfile [open "/home/pi/BBSScript/msgout.txt" r]
fconfigure $msgfile -translation binary
set msgout [read $msgfile]
close $msgfile
spawn telnet localhost 8010
expect "user:" { send "MYCALLSIGN\r" }
expect "password:" { send "MYPASSWORD\r" }
expect "MYALIAS:MYCALLSIGN} Nodes" { send "bbs\r" }
expect "BBS>" { send "sb SUBJECT@WW\r" }
expect "Enter Title (only):" { send "BULLETIN SUBJECT\r" }
expect "Enter Message Text (end with /ex or ctrl/z)" { send "$msgout\r" }
expect "EOF" { send "/ex\r" }
expect "BBS (Expert)>" { send "b\r" }
That's the extent of it.  It is really that easy.  Have another shell script overwrite your msgout.txt file daily, weekly, or any time via a crontab job.  Then call this exp script for automatic bulletin generation.  You can even call this script from inside your other script.

The last post I made about the weather report on AllStarLink can be modified to gather your weather from the internet and generate the msgout.txt file.  Think up your own clever bulletin topic.



73 and good DX
de N3FIX

Sunday, December 16, 2018

HamVOIP AllStarLink node weather script

I wrote this script early in the year, and it works rather well.
The script uses the national weather service to get a text transcription of the weather forecast.
It re-formats the text taking out the header and footer.
It then uses a text to speech translator to create a .ul file which can be read over the air by Asterisk.
(the Linux computer must have tts_audio installed)
Another crontab deletes the .ul file at midnight.

This is implemented on a hamvoip node on a Raspberry Pi.
It can be triggered by DTMF tones or on a time schedule.

The script is written below

73

N3FIX

----------------------------------------------
# script written by N3FIX
# date 2018-JAN-13
# this script downloads the weather forecast
# strips the header and footer
# converts it from a txt file to a .ul file
# and plays the .ul file on the air.
# play the forecast at 8:00 am and edit the crontab
# crontab -e
# 00 8 * * * /etc/asterisk/local/Forecast.sh

# use the lynx dump command to get the current weather forecast
# determine zone from alerts.weather.gov
# zone is PAZ065
lynx --dump "http://forecast.weather.gov/MapClick.php?zoneid=PAZ065&FcstType=text&TextType=2" > Forecast.txt

# take the header out by removing lines 2 through 4.
sed '2,4d' /etc/asterisk/local/Forecast.txt > /etc/asterisk/local/Forecast1.txt

# take the footer out by listing the file backwards with tac and taking out lines 1 to 10.
tac /etc/asterisk/local/Forecast1.txt | sed '1,10d' | tac > /etc/asterisk/local/Forecast.txt

# remove all the underscores from the file
sed 's/_//g' /etc/asterisk/local/Forecast.txt > /etc/asterisk/local/Forecast1.txt

# tts_audio doesn't say winds correctly. Make her say "wend" instead.
sed 's/winds/wend/g' /etc/asterisk/local/Forecast1.txt > /etc/asterisk/local/Forecast.txt

# convert the file to a ul file using tts_audio.sh
tts_audio.sh /etc/asterisk/local/Forecast.txt

# play the resulting file on the air by calling asterisk
# for 46891 ... insert your own node number
asterisk -rx "rpt localplay 46891 /etc/asterisk/local/Forecast"

# remove the temporary files after debugging
rm /etc/asterisk/local/Forecast1.txt
rm /etc/asterisk/local/Forecast.txt
------------------------------------------------

Sunday, November 18, 2018

Swan Cygnet 260 repair

This Swan Cygnet 260 was submitted to the Cly Institute for repair.  It had no SSB modulation and the gain control did not work.  The Model 260 came out on the market in 1969 and can be operated from AC or DC without any additional components.  It is a self contained rig boasting SSB and CW operation in a heavy but small package.

This particular radio was very well cared for.  The case is in nice shape and it was relatively clean inside.  The first thing that was done was to check the tubes.  All the tubes were in good condition.  The Audio Input preamp 12BA6 was the only one that was beyond what I consider "weak" and was consequently replaced.

The gain control was removed and cleaned.  The carbon track was filthy and required cleaning for smooth uninterrupted operation.  However, this was not the problem.  The 5uF capacitor that goes between the wiper and ground C1613 was shorted.  This was easily replaced with a modern capacitor.

The PA Load adjust knob did not turn the capacitor.  The coupling was a piece of 1/4" fuel hose.  That hose had disintegrated.  The easiest fix was another piece of fuel hose, but this time instead of trying to glue it to the shafts, I made some crimp clamps out of aluminum tubing.

There had apparently been some arcing on the PA Tune capacitor.  This caused the plates to scrape against one another as the knob was turned.  This was rectified by filing off the arced metal and bending the capacitor plates back into alignment.

The lack of audio modulation was another matter.  One of the wires was off inside the microphone, so that was repaired properly with shrink tube rather than duct tape.  Figuring that this was all the issues solved, we plugged it in and tried it out.

Success was not yet obtained.  There was still no modulation.  So the microphone was opened up again and investigated.  A small LM358 audio amp that I keep in the desk drawer is perfect for use as a signal tracer.  The crystal microphone itself ended up being the problem.  It wouldn't produce any output, and it was open-circuit.


Nothing could be done to make it any worse, so the foil part of the element was opened like a tin-can exposing the real issue.  The mic must have been dropped at some point, which broke the wires from the element.  These flat "wires" are a strange material that resists solder, so they had to be crimped in place.  Some small scraps of resistor leads were used to crimp around the delicate flat wires out of the crystal element, and then soldered to the output leads.  This procedure was not at all easy, but finally successful in that the mic then produced output into the test amplifier.  The foil was straightened back out and hot-glued back in place along the edge.  The repair looked worse than it really was and actually sounded fine.  The SDR was set up and modulation was finally obtained.  A quick adjustment of the PA Bias was required before putting the case back on.  Even though the output wasn't a full 260 watts, it could probably be attributed to the age of the final tube.



Wednesday, November 7, 2018

New Life for Yaesu VX-1R

I can't claim credit for this hot tip.  I found this searching the internet for replacement batteries for the Yaesu VX-1R.

I bought the VX-1R years ago right after I got my license.  It is a sub-miniature dual band transceiver with wide band receive.  It is perfect for stuffing in your shirt pocket at a hamfest to keep in touch with your buddies.  The problem is that the battery doesn't last very long with a 700mAh rating, and new batteries are rather expensive.

The Trustfire 14650 battery (that's 14mm in diameter and 650mm long if you didn't know) are a perfect fit.  They are nearly the exact length of the original FNB-52LI, and maybe just a little shorter.  Shorter is better than longer.  To compensate for this I put a small donut magnet on the positive terminal of the battery.  It allows the door to close with enough positive pressure that it doesn't fall open as it would without enough pressure on it.

For some reason the 14650 battery isn't as easy to obtain as other cells.  I found them at FastTech for $6.57 for a pack of 2 which have a PCB (protected) as well.  That's with 1600mAh capacity which is over double the original capacity, and if the first one runs out on a rag chew, I can just pop the other one in.


So the question is, "Can I charge these cells inside the VX-1R?"  Remember the VX-1R only charges the internal battery when the transceiver is turned off.  There is a circuit board inside the original Yaesu battery.  Checking the spring terminal inside the battery compartment shows that when the charger is plugged into the radio there is 6 volts on the terminals of the battery.  It will not work to charge the battery without the battery management circuit.

The original battery capacity is so low, it doesn't make sense to preserve the original battery.  The convenience of having a modern battery with greater capacity is obvious.  The solution was clear.  The original battery must be removed from the case and the new one inserted in its place.  Since I have no spot welder for this task, it must be soldered.  Solder sticks best to battery terminals that have a rough surface.  This is accomplished with an engraving tool gently across the terminals.  With a blazing hot soldering, solder and flux is applied QUICKLY to provide a good contact patch to sweat the terminals on without overheating the battery itself.


There you have it.  New and longer life for the sub-miniature VX-1R.  Catch you on AllStarLink.

73

de N3FIX


Tuesday, October 23, 2018

IC-28A Volume and Squelch

My first 2m mobile rig was the IC-28A.  With a healthy 25w output on high and a 5w output on low, it is compact and a good little radio.  I gave $20 at a hamfest and I still use it as my go-kit radio for events and the XYL's car.

The volume and squelch controls were getting pretty scratchy.  The volume finally gave up and wouldn't make contact with the wiper, which meant full volume!

Consulting the manual showed that Mouser had the parts in stock

Mouser #:688-RK097111202P
Mfr. #:RK097111202P
Desc.:Potentiometers Potentiometers Flat 25mm 10k


Mouser #:688-RK0971114D0B
Mfr. #:RK0971114D0B
Desc.:Potentiometers Potentiometers Flat 15mm 10k

What was not apparent at first was that the pin arrangement spacing on the volume control was not exactly the same.  This required some modification to the sub board.  A #61 drill bit in a manual push drill made short work of this small modification.  The potentiometer tabs were easily bent over to make contact with the original pads.


The other difference that had to be dealt with was the difference in the shafts.  The original was a splined shaft, these new pots have a D shaft.  Adapting the original knobs was reasonably easy.  Since they are plastic and have a bit of elasticity, they were drilled out with an interference fit.  They could then be pressed on the D shaft and still stay in place.

The next project for this radio will be to build a Lithium battery pack for it and make it so it can be mounted to my bicycle.

Thursday, September 20, 2018

Icom HM-151 microphone data mute mod

I found the design of the Icom HM-151 lacking in that it did not mute the microphone when running data modes through my SignaLink.  The solution is simple.  Install a tiny relay so that the microphone element is only connected to the radio when the PTT button on the handheld mic is pressed.

The tiny relay I found was actually Double Pole Double Throw.
NEC Miniature Non Latching DPDT Relay 5V 1A SMD SMT EB2-5NF


The specifications were quite impressive and the relay coil draw is very low, which is ideal for powering from the little Q1 pass transistor in the mic.

It was easily tacked into the circuit.  First the mic trace on the board had to be cut off.  I did this with an engraving tool.  See the X on the board where the trace was ground away.

The Common (Pin 8) and Normally Open (Pin 7) relay contacts were soldered directly to the board to reduce lead length.  The un-used pins were bent carefully out of the way.

The coil minus lead (Pin 1) was soldered to the PTT button contact.
The coil plus lead (Pin 10) was soldered to J2 pin 2, which is +5 volts.



The results are good.  I can run the local Data Net without fear of background noise, and I don't have to unplug my mic cable.

Saturday, August 4, 2018

TS-440s VCO potting

This Kenwood TS-440s was reported to have PLL issues.  After doing some research it was discovered that the potting material in the VCO was prone to turn conductive after many years.  This throws off the VCO especially in humid environments.

The repair is relatively easy, but labor intensive.  The top cover is removed and the first board flips up out of the way.  The board underneath only has a few connectors and comes out of the case rather easily.


The can around the VCO is best removed to perform this repair.  A few quick turns with the desoldering tool and the can can be separated from the board.  The potting material adheres to the can, but a dental pick can be used to pull and pry and material away gently.  The adjustable transformer also had to be removed to get the potting material out from underneath it.



They say there is better life through chemistry and the proof is here.  The potting material residue on the can was the perfect test subject for what chemical would be best to dissolve it rather than trying to pick it out a little at a time.  It turns out that ordinary brake cleaner softened the potting material back to a jelly-like state, but did not hurt the components on the board.  Dark places around certain components lead me to believe that this was the more overheated and more conductive material.  It was harder to remove and took more scraping with the dental pick.

When all the potting material was removed, the can could be soldered back in, and the radio re-assembled.


A quick test with the SDR proved that the transceiver did not drift when connected to a dummy load.  An on-air QSO confirmed that the audio was good on TX, and listening to WWV confirmed that the alignment was good for RX.