Add a USB serial port to your Trinket using software Trinket Fake USB Serial 7 Advanced Old School analog meters are used to create modern art timekeeping. Trinket Powered Analog Meter Clock 38 Beginner. Kaleidoscope Eyes (Trinket-Powered NeoPixel LED Ring Goggles) 109. 'To get 19.2 kilobaud on the serial port, you need to get down to the bare metal.' People who can do this sort of thing are held in high regard. Barf: /barf/ from mainstream slang meaning `vomit' 1. Term of disgust. This is the closest hackish equivalent of the Val -speak 'gag me with a spoon'.
Building a computer controlled radio transmitter
How would you like to send text messages to your friends withoutwires, and without an Internet connection, and without paying monthlyfees?
In this project we will build a very simple radio transmitter thatyou attach to a serial port on your computer. The computer then runsa free program that converts words you type into radio signals that aredecoded by another computer, using a cheap radio receiver, and a sound card.
With a little study, you don't even need the second computer, sincethe radio signals are in Morse code, which anyone can learn to decodein their head with a little practice. It also comes in handy as a secretlanguage, or as a way to send long distance messages with a pocket mirror.
Click on photo for a larger picture
The computer controlled transmitter needs these parts:(We carry most of the necessary parts in ourcatalog.)
A one megahertz oscillator You can use other frequencies if you have a radio that can receive them. We carry this item in our catalog.
A serial port connector We use a 9 pin RS232 connector. You can take apart an old serial cable, or buy a new connector from an electronics or computer store. We carry this item in our catalog.
Some insulated wire for an antenna Just about any kind of wire will do, the longer the better.
An alligator test lead This is a piece of wire with alligator clips at each end. We carry this item in our catalog.
For our first transmitter, we will connect the parts with alligatorclips. This lets us quickly change frequencies by replacing the1 megahertz oscillator with an oscillator with a different frequency.Later we will show a version made with a socket for the oscillator,a printed circuit board, and a light emitting diode that flashesmorse code along with the oscillator.
Click on photo for a larger picture
The first step is to cut the test lead in half. In these photosI have cut two test leads, one red and one black, to make it easierto see where the connections go. But unless you are making twotransmitters (your friend wants to send messages back, doesn't she?)you can just use one test lead (cut into two pieces).
Remove a little insulation from the cut ends of the wire, and solderone of the cut ends to pin 5 and the other to pin 4.
Pin 5 of the serial port connector (the black wire in the photo)connects to the ground pin of the oscillator. Pin 4 of the serialport connector goes to the power pin of the oscillator. The drawingshows the transmitter from the top (pins pointing down). The photobelow shows the oscillator upside down, with the pins facing up.
Click on photo for a larger picture
The green alligator clip attaches to the antenna, which can be anylong wire. It is attached to the output pin of the oscillator. Theremaining pin of the oscillator (the one nearest the sharp corner)is not used.
Your Computer Controlled Transmitter is now complete!
Controlling the transmitter
To send a message, we now need a computer program that can convertwhat we type into Morse code, and turn the oscillator on and off inthe short and long pulses (dots and dashes) that are required.
A program to do that (for the Windows operating system) can bedownloaded by clickinghere. Save the ZIP file on your computer,use a ZIP file decompressor to unpack it,and then double-click on the resulting MorseCode.exe to start running it.
Once the program is running, you will see a window like the one above.Type something in the window (such as 'Hello there!') and then selectthe Transmit item in the Radio menu. Your transmitter is nowsending your message.
To receive the message, it helps to also select the Repeat Messagemenu item (as we did in the screen shot shown above). This will make thetransmitter send the message over and over again, so we can more easilyhunt for the signal on an AM radio dial.
We want to tune the AM radio to 1,000 kilohertz. If your radio has anumeric tuning indicator, this is easy. If the radio only has a dialwith a few numbers on it, you will have to hunt around, tuning it untilyou hear clear morse code coming from the speaker. It helps at this pointto have the AM radio close to the transmitter's antenna.
You can select how fast the message is sent by using the Speedmenu.
You can control which serial port to use through the Com Portmenu.
The Radio menu has three selections we have not discussed yet.The AM Low Tone selection sets the tone you hear in the AM radioto 500 hertz. The AM High Tone selection sets the tone to 1,000hertz. The CW selection is only for short-wave radios that have an SSBor CW mode. This selection does not modulate the radio signal, so anAM radio will just hear clicks. This selection allows the signal to beheard farther away, but requires a more expensive short-wave receiver.I have used the radio with great success. It usually sells for about $150.00.
If you are a computer programmer, and would like to look at the sourcecode for this program, you can download ithere. There is also a much simpler, command-lineversion of the programhere.
Receiving the code with a computer
Until you have learned to decipher Morse code in your head, you will wantto have a computer do it for you.
There are many free programs floating around the Web that will do thisfor you. One such program can be downloadedhere. I won't go into its operation (since I didn'twrite it), but it has a Help menu, and it is fairly straightforward to use.You will need an audio cable to connect the radio's earphone jack to thecomputer's sound card input jack, but that is all the hardware required.
You can see it working in the screen shot above, decoding our endlessloop of 'hello there'.
How does it do that?
Most of the important concepts for this project have been covered in othersections of this chapter.
The computer provides power to the oscillator through the DTR pin of theserial port. The program turns the DTR signal on and off, which causesthe oscillator to turn on and off in return.
To make the signal audible in a cheap AM radio, the computer turns thepower to the oscillator on and off 1,000 times per second while sendingthe dots and dashes of the code, and leaves it off in between the dotsor dashes. This modulates the radio signal at a frequency your earscan hear. In AM Low Tone the audio frequency is 500 times persecond.
In the CW mode (CW stands for Continuous Wave), the computer doesnot modulate the radio signal. It just turns on the oscillator long enoughfor the dot or dash to be sent. In this case, the receiver does the workof converting the signal into an audible tone your ears can hear, by usinga circuit called a beat frequency oscillator. Your short-wave radiomay have a switch labelled BFO, or SSB, or CW that allows this circuit tooperate.
Some nicer packaging
The computer program turns on DTR and also another signal called RTS,while sending the dots and dashes. In the version of the transmitter shownbelow, we have mounted a 14 pin socket to a general purpose circuitboard from Radio Shack, and plugged the oscillator into that. A bluelight emitting diode is connected to the RTS pin of the serial port connector(pin 7). The LED flashes Morse code along with the oscillator, makingan eye-catching project.
Click on photo for a larger picture
The serial port connector is wedged onto theprinted circuit board by placing the board between the pins.
Click on photo for a larger picture
The wires that connect the serial port connector to the oscillatorand the LED also serve to hold the connector onto the printedcircuit board.
The antenna in this case is a 6 inch long wire. In CW mode, thiswire is all that is needed to receive the signal anywhere in the house.A longer antenna will allow the whole block to receive the signal.
By replacing the 1 megahertz oscillator with a 28.322 megahertzoscillator, and connecting the transmitter to a large amateurradio antenna (10 meter beam), I was able to send signals fromCalifornia to Texas. To do that, you will want to get anamateur radio license.
Learning Morse Code
There are many free programs for helping you learn to deciphermorse code in your head. Some of them are:cw_play,MorseMad,NuMorse,andMorseCat.
For more information on radio, see theRecommended Readingsection.