User Tools

Site Tools


fox_hunt_transmitter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fox_hunt_transmitter [2014/07/23 10:52]
whitezw
fox_hunt_transmitter [2014/09/03 08:41] (current)
whitezw
Line 1: Line 1:
 +==== Frequencies for Transmitter:​ ====
 +
 +^Frequency ^Notes |
 +|145.530MHz |Primary High-power transmitters |
 +|145.570MHz |  |
 +|145.610MHz |  |
 +|145.650MHz |  |
 +|145.690MHz |  |
 +|145.730MHz |  |
 +|145.770MHz |Low Power transmitters |
 +
 ==== Parts List: ==== ==== Parts List: ====
  
Line 9: Line 20:
   * 9v battery and case   * 9v battery and case
   * Perfboard   * Perfboard
 +
 +==== Schematic: ====
 +
 +{{:​foxhunttransmitter_schem.jpg?​nolink&​800x729}}
  
 ==== Source Code: ==== ==== Source Code: ====
 +
 <​code>​ <​code>​
 /* /*
Line 16: Line 32:
 Morse blinker/​sounder Morse blinker/​sounder
 */ */
- +
 // Global variables // Global variables
- +
 boolean done = false; // initialize a Boolean flag if we don't want to endlessly loop boolean done = false; // initialize a Boolean flag if we don't want to endlessly loop
- +
 #define PTT_Low 2  // Transmitter PTT. If PTT goes LOW, use PIN 2 #define PTT_Low 2  // Transmitter PTT. If PTT goes LOW, use PIN 2
 #define PTT_High 3  // Transmitter PTT. If PTT goes HIGH, use PIN 3 #define PTT_High 3  // Transmitter PTT. If PTT goes HIGH, use PIN 3
Line 27: Line 43:
 #define SPEAKER 6  // Audio out to radio #define SPEAKER 6  // Audio out to radio
 #define TONE 600.0   // Tone of CWID #define TONE 600.0   // Tone of CWID
-#define USESPEAKER true  +#define USESPEAKER true 
- +
 #define intracharacter 3 // delay between characters #define intracharacter 3 // delay between characters
 #define dot 1 // length of a dit -- 1 unit #define dot 1 // length of a dit -- 1 unit
Line 36: Line 52:
 #define wpm 15 // *** SET THIS TO YOUR DESIRED SPEED *** #define wpm 15 // *** SET THIS TO YOUR DESIRED SPEED ***
 #define speed fiveWPM / (wpm / 5) // multiplier to apply to 5 wpm rate. 2 = 10wpm, 2.5 = 15wmp, etc. #define speed fiveWPM / (wpm / 5) // multiplier to apply to 5 wpm rate. 2 = 10wpm, 2.5 = 15wmp, etc.
- +
 // CHANGE THESE SETTINGS // CHANGE THESE SETTINGS
 // CHANGE THESE SETTINGS // CHANGE THESE SETTINGS
- +
 char send[] = "​KM4CNN FOXHUNT BEACON"; ​ // SET THIS TO THE CW STRING YOU WANT TO SEND -- MUST BE UPPRCASE *** char send[] = "​KM4CNN FOXHUNT BEACON"; ​ // SET THIS TO THE CW STRING YOU WANT TO SEND -- MUST BE UPPRCASE ***
 char sendFound[] = "​KM4CNN BEACON FOUND"; ​ // SET THIS TO THE CW STRING YOU WANT TO SEND -- MUST BE UPPRCASE *** char sendFound[] = "​KM4CNN BEACON FOUND"; ​ // SET THIS TO THE CW STRING YOU WANT TO SEND -- MUST BE UPPRCASE ***
 int timer = 10; // Set the time between transmissions in SECONDS int timer = 10; // Set the time between transmissions in SECONDS
 char PTT_Setting = LOW; // Set how your radio transmits. ​    Low = PTT goes LOW.       High = PTT goes HIGH char PTT_Setting = LOW; // Set how your radio transmits. ​    Low = PTT goes LOW.       High = PTT goes HIGH
- +
 // CHANGE THESE SETTINGS // CHANGE THESE SETTINGS
 // CHANGE THESE SETTINGS // CHANGE THESE SETTINGS
- +
 int tx_hold = timer*1000; int tx_hold = timer*1000;
- +
 // Morse code tokens. 0 = dit, 1 = dah any other character will generate 8 dit error. // Morse code tokens. 0 = dit, 1 = dah any other character will generate 8 dit error.
- +
 // NOTE: These need to be in ASCII code sequence to work // NOTE: These need to be in ASCII code sequence to work
- +
 char tokens [][7] = { "​110011","​100001",​ // ,,- char tokens [][7] = { "​110011","​100001",​ // ,,-
 "​010101","​10010",​ // .,/ "​010101","​10010",​ // .,/
 "​11111","​01111","​00111","​00011","​00001","​00000",​ // 0,1,2,3,4,5 "​11111","​01111","​00111","​00011","​00001","​00000",​ // 0,1,2,3,4,5
 "​10000","​11000","​11100","​11110",​ // 6,7,8,9 "​10000","​11000","​11100","​11110",​ // 6,7,8,9
-"​111000","​10101","<",​ // :,;,< +"​111000","​10101","<",​ // :,;,<"​=",">","​001100",​ // =,>,?
-"​=",">","​001100",​ // =,>,?+
 "​@",​ // @, "​@",​ // @,
 "​01","​1000","​1010",​ // A,B,C "​01","​1000","​1010",​ // A,B,C
Line 71: Line 86:
 "​1011","​1100"​};​ // Y,Z } "​1011","​1100"​};​ // Y,Z }
 ; ;
- +
 // Arduino setup routine // Arduino setup routine
 void setup() void setup()
- +
 { {
 pinMode(SPEAKER,​OUTPUT);​ pinMode(SPEAKER,​OUTPUT);​
Line 83: Line 98:
 digitalWrite(PTT_High,​ LOW); // Sets the PTT to OFF when its not supposed to TX digitalWrite(PTT_High,​ LOW); // Sets the PTT to OFF when its not supposed to TX
 } }
- +
 // Routine to output a dit // Routine to output a dit
 void dit() void dit()
Line 97: Line 112:
 digitalWrite(LED,​ LOW); // set the LED off digitalWrite(LED,​ LOW); // set the LED off
 } }
- +
 delay(speed);​ delay(speed);​
 } }
- +
 // Routine to output a dah // Routine to output a dah
 void dah() void dah()
Line 117: Line 132:
 delay(speed);​ delay(speed);​
 } }
- +
 // Intracharacter delay // Intracharacter delay
 void ic() void ic()
Line 124: Line 139:
 delay (intracharacter * speed); // wait for a half second delay (intracharacter * speed); // wait for a half second
 } }
- +
 // a space is 7 units of off based on speed // a space is 7 units of off based on speed
 void spaceCharacter() void spaceCharacter()
Line 131: Line 146:
 delay((eow * speed) + (intracharacter * speed)); // wait for 7 units delay((eow * speed) + (intracharacter * speed)); // wait for 7 units
 } }
- +
 // Send a CW error for unknown characters // Send a CW error for unknown characters
 void error() void error()
 { {
-for (int i = 0; i < 8; i++)+for (int i = 0; i <8; i++)
 { {
 dit(); dit();
Line 141: Line 156:
 ic(); ic();
 } }
- +
 // Look up a character in the tokens array and send it // Look up a character in the tokens array and send it
 void send_element(int c) void send_element(int c)
Line 147: Line 162:
 char token_to_send[7];​ // allocate space for the token char token_to_send[7];​ // allocate space for the token
 strcpy(token_to_send,​tokens[c]);​ // copy the token from the table into our variable strcpy(token_to_send,​tokens[c]);​ // copy the token from the table into our variable
- +
 int len = strlen(token_to_send);​ // figure out how many dit dahs are in it int len = strlen(token_to_send);​ // figure out how many dit dahs are in it
-for (int i = 0; i < len; i++) // for each item in the token+for (int i = 0; i <len; i++) // for each item in the token
 { {
 if (token_to_send[i] == '​0'​) // if its a 0 if (token_to_send[i] == '​0'​) // if its a 0
Line 166: Line 181:
 ic(); // after each character there is an intercharacter delay ic(); // after each character there is an intercharacter delay
 } }
- +
 // The main send routine. Pull each character apart and determine its corresponding token. // The main send routine. Pull each character apart and determine its corresponding token.
 void send_code() void send_code()
Line 172: Line 187:
 int len = strlen(send);​ // get the length of the string to send int len = strlen(send);​ // get the length of the string to send
 int c; int c;
-  + 
-for (int i = 0; i < len; i++) // loop thru each character in the string to send+for (int i = 0; i <len; i++) // loop thru each character in the string to send
 { {
 c = send[i]; // get the ASCII integer value of the character c = send[i]; // get the ASCII integer value of the character
Line 184: Line 199:
 c -= ',';​ // offset it by the lowest ASCII character in the tokens table (a comma) c -= ',';​ // offset it by the lowest ASCII character in the tokens table (a comma)
 send_element(c);​ // send that element from the token array send_element(c);​ // send that element from the token array
- +
 } }
- +
 } }
 } }
- +
 void startup_tones() void startup_tones()
 { {
Line 217: Line 232:
 delay(1000);​ delay(1000);​
 }; };
- +
 void found_tones() void found_tones()
 { {
Line 239: Line 254:
 delay(3000);​ delay(3000);​
 }; };
- +
 // The Arduino main run loop // The Arduino main run loop
 void loop() void loop()
- +
 { {
 if (!done) // see if we are done the loop if (!done) // see if we are done the loop
 { {
- +
 digitalWrite(PTT_Low,​ LOW);    // Enable PTT for "​Low"​ type radios digitalWrite(PTT_Low,​ LOW);    // Enable PTT for "​Low"​ type radios
 digitalWrite(PTT_High,​ HIGH); ​ // Enable PTT for "​High"​ type radios digitalWrite(PTT_High,​ HIGH); ​ // Enable PTT for "​High"​ type radios
Line 258: Line 273:
 digitalWrite(PTT_Low,​ HIGH); ​ // Disable PTT for "​Low"​ type radios digitalWrite(PTT_Low,​ HIGH); ​ // Disable PTT for "​Low"​ type radios
 digitalWrite(PTT_High,​ LOW);  // Disable PTT for "​High"​ type radios digitalWrite(PTT_High,​ LOW);  // Disable PTT for "​High"​ type radios
- +
 // Multiple delays are used below, since the code doesnt like to run long delays. Use multiples for more time. // Multiple delays are used below, since the code doesnt like to run long delays. Use multiples for more time.
 delay(tx_hold); ​ // Delay between transmissions,​ set above in config area delay(tx_hold); ​ // Delay between transmissions,​ set above in config area
Line 267: Line 282:
 done = false; // Uncomment to set our flag to finish sending done = false; // Uncomment to set our flag to finish sending
 } }
- +
 } }
 </​code>​ </​code>​
 +
 +\\
 +
fox_hunt_transmitter.1406130752.txt.gz · Last modified: 2014/07/23 10:52 by whitezw