cwbeacon

This program is part of the beaconProject.

cwbeacon runs a CW, morse code beacon through a parallel port, keying down a
transmitter. This program is based on GW4PTS Morse tutor 1.00, written by
Alan Cox in 1993. I've used 98% of the original code with this project. It
only was needed an output to the parallel port, using standard Linux IO
calls and write a little loop to make the beacon running at required intervals.

And also, there is an optional output to enable an external circuit, such as
an attenuator.

beaconProject is an experiment that was born in our EA-QRP discussion mailing
list. We were looking for a program capable to transmit the morse code at
known intervals, and capable to make an attenuator available to reduce (or
increase) the QRP power output levels. The QRP beacon should be running only
at fixed time intervals, and not for weeks! The main purpose is to test
different antennas, home-made receivers, in one amateur band at a given day,
and maybe, if the beacon runs for a whole day, make a "mini propagation
study" with the reports received all over the country.


*Quick install.-
a. Untar the program at, eg. /usr/local/src
b. Take a look at the Makefile, especially for installing site (by default,
   /usr/local/bin)
c. make, make install

*Running cwbeacon.-
After compiling, you can check the program running

	cwbeacon

and you will get a self explanatory help screen. I enclosed in the tar package
a small example. Run:

	cwbeacon -f qrp

and the beacon starts its transmission. You will hear the morse code tones
through the internal PC speaker.

(NOTE: The program will only works with root permissions)

You can make your own beacon text. The characters used are: A..Z, 0..9,
and the following signs:
	/	slash
	.	period
	-	dash
	,	comma
	*	AR, this is the end-of-message

There are two files enclosed to give some kind of automation via crontab
system call: root.crontab and cwoff.

root.crontab is an example to include in the root crontab file at
/var/spool/cron/crontab. It shows how to do a simple start/stop beacon
process.

cwoff is a small script to stop cwbeacon from running, when it is invoked.


*The interface.-
You need an interface to connect to your transmitter. There is an example
below. BE VERY CAREFUL when you connect or disconnect the interface to the
parallel port. It could be static charges present that could destroy the
parallel port.
It is a good idea to connect the interface with the computer and associated
peripherals UNPLUGGED from the mains. This way will prevent any kind of static
charges.

On my tests, I was using an small 5vDC relay directly connected to the
parallel port. It works flawlessly. Right, you will hear an "extra" clicks,
but it doesn't matter at all,  :)

	A sample circuit for PTT (keying down transmitter):

                                 o +KEY (CW input)
                                 |
                                 |
                                 |
                                 | C
                4k7        B |  /
D0       o----/\/\/\----*----|/      BC547, 2N2222 (any small Si transistor)
(pin 2)                 |    |\
                        |    |  \| E
                      \___       |
GND      o         5v1 /_\       |
(pin 25) |              |        |
         |              |        |
        ---            ---      ---


*Attenuator interface.-
Here is a sample of an attenuator interface schematic. The first one is the
interface, and the second the attenuator itself.
Because in our project we are managing QRP levels, the resistors can be even
a quarter of a watt.

	A sample circuit to activate the attenuator:

                                 o +5 or +12vDC
                                 |
                                 -
                            RL1 | | Relay 5 or 12vDC
                                | | DPDT miniature (SDS Relais)
                                 -
                                 | C
                4k7        B |  /
D1       o----/\/\/\----*----|/      BC547, 2N2222 (any small Si transistor)
(pin 3)                 |    |\
                        |    |  \| E
                      \___       |
GND      o         5v1 /_\       |
(pin 25) |              |        |
         |              |        |
        ---            ---      ---


			A 3dB attenuator:

	From TX>-----o---- o--------------------o ----o-----> To ANT
                      RL1-1                      RL1-2
                           o---*---/\/\/\---*---o
                               |   18ohm    |
                               \            \
                               /  2x        /   All resistors 1/2W
                               \  270ohm    \   Carbon film (not inductive)
                               |            |
                              ---          ---

*Final.-
I hope this program will be useful for you. If you plan to make an
improvement, I would like to hear from you. I'm a very beginner in C
language programming, so perhaps it would be a bit difficult to me to answer
some C related questions.

Best regards from Rafael, EA4RJ

e-mail	rgarcia@idr.upm.es

