As many of my unfinished projects this one started due to a need. When doing service to the 2m repeater the connections to the 70cm repeater was damaged so that it became QRT. Instead of just taking the walk and fixing the broken stuff we brought the repeater with us in order to change repeater shift to 2MHz which is the new European standard. When the decision was made to take the repeater down I took a silient decision to build a new logic for the 70cm variant so that it it would not just be parallell with the 2m repeater.
As I had recently started using UML state-charts as a help when designing software I quickly could draw something that seemed to work like the 2m one. I implemented it using PIC-assembler in a 16F676 and connected up two rigs at home using different antennas. From decision to on-air was less than 5 days!
For a while after first bringing the repeater on air I kept fixing some minor problems with the state-chart and now it runs rather stable.
I wanted to have the following functions in my repeater logic.
As previously stated I ended up with a construction using a PIC16F676. This processor was mainly choosen because I had some available. It has internal clock generator, enough input/output pins (12) for this application and costs almost nothing.
The following state-chart shows how the repeater behaves:
Some notes about the statechart:
Suggested improvements:
NOT Suggested "improvements":
The software consists of at least three parts:
The CW-keyer and event generation routines are interrupt drivven.
Here are some downloads you need or may need:
Source code
UML-model drawn in ArgoUml
There is no such thing yet, but I have at least found a tool that will help me draw it. KICAD. The only problem with this so far is that the libraries included does miss a lot of the stuff I need.
If you want to use this in your own repeater with some modifications you go ahead like this:
The source code available here contains my callsign. You should change this before going on-air. The Id generator is something I am quite proud of in this software. In fact I have never seen any software construction like it. I'm not the original inventor however as it is inspired by a hardware construction I saw many (>10) years ago. Unfortunately I do not remeber where.
Here's how it works:
Towards the end of the source-file there is a table (search for idtbl) each character to
be sent is encoded by a bit pattern in which dah's are represented by 1's and dit's by 0's.
Since each byte is 8 bits and most characters are less than 8 dit's or dah's there is an
additional 1 as a stop-bit. Bits are shifted out LSB first.
The encoding for the character A (dit-dah) would therefore be: 1 10.
The encoding for the character B (dah-dit-dit-dit) would be: 1 0001.
In my case the PIC-assembler code reads:
retlw B'00001000' ; S retlw B'00000111' ; M retlw B'00110000' ; 4 retlw B'00001010' ; R retlw B'00010110' ; P retlw B'00011011' ; Q retlw B'00101001' ; / retlw B'00001010' ; R
Changing this from SM4RPQ/R into for instance ZL9XYZ would give:
retlw B'00010011' ; Z retlw B'00010010' ; L retlw B'00101111' ; 9 retlw B'00011001' ; X retlw B'00011101' ; Y retlw B'00010011' ; Z
Don't forget to change the idchars equate aswell.
As the name of this project says the cost for this one should be super low cost. So is that true and what is the real cost then?
Well, it all is a question about what you use for comparison and what you have in your junk-box. I guess most do not have the PIC16F676 and the NE567 so these are really what will cost something. The PIC is today in sweden about 30sek and the NE567 is something like 10sek. The rest is just resistors and capacitors that should either already be part of every hams junkbox, or possible to come over for less than 40Sek. So, total cost for this controller should be less than 100sek (12US$) including box, connectors and a stripboard with the components on.
You can be the judge but I have not found anything close to this giving both 1750Hz tone detection, CW-identification and a good amount of timeouts and stuff.