Welcome to the N1IR Electronics Website. Totally off the cuff, one take, unrehearsed video projects for anyone interested in amateur radio, electronic design, makers, hardware hackers and science.


Get off you duff and build something!
Training the hand and mind since 1982.

Thursday, January 19, 2012

Arduino Fox Controller

Hello all, sorry for the long delay on posts. It's been a crazy xmas and new years.

Anyways I finished another project on a simple Arduino based Ham Radio Fox Controller. Basically this will control a 2 meter HT and send out my call in Morse code and send so test tones for 1 minute duration then unkey wait for a duration and do it all again. All that is needed is a 5 Volt relay (Solid State Relay will work to but I had none in stock) and connectors to interconnect the radio and a 8 ohm to 100 ohm transformer, connect the 8 ohms side between ground and port 12. In my case I'm using a Puxing 777 (similar to a kenwood mic wiring).

I used a transformer and a relay to keep the Arduino and radio isolated, in my next version I think I will pull 5 volts from the radio (available at the connectors mic/spk) and power the Arduino thus eliminate the transformer, relay and Arduino main board and directly use the ATMEGA 328 chip for a smaller package, But that will be in version 2. but anyways Here is the code:

void setup() {

pinMode(12, OUTPUT); //Tone out connect to mic input via 8:1000 ohms xformer
pinMode(13, OUTPUT); //Relay for PTT
}

void loop() {

digitalWrite(13, HIGH); //turn on radio
delay (1000); //Wait for 1 second


tone(12, 750); //DAH
delay(200);
noTone(12);
delay(100);

tone(12, 750); //DIT
delay(100);
noTone(12);
delay(100);

delay(750); //REST

tone(12, 750); //DIT
delay(100);
noTone(12);
delay(100);

tone(12, 750); //DAH
delay(200);
noTone(12);
delay(100);

tone(12, 750); //DAH
delay(200);
noTone(12);
delay(100);

tone(12, 750); //DAH
delay(200);
noTone(12);
delay(100);

tone(12, 750); //DAH
delay(200);
noTone(12);
delay(100);

delay(750); //REST

tone(12, 750); //DIT
delay(100);
noTone(12);
delay(100);

tone(12, 750); //DIT
delay(100);
noTone(12);
delay(100);

delay(750); //REST

tone(12, 750); //DIT
delay(100);
noTone(12);
delay(100);

tone(12, 750); //DAH
delay(200);
noTone(12);
delay(100);

tone(12, 750); //DIT
delay(100);
noTone(12);
delay(100);


delay (10000);

tone(12, 500); //test tones, 500 Hz
delay(10000); // Transmit for 10 seconds
noTone(12);
tone(12, 1000); //test tones, 1000 Hz
delay(10000); // Transmit for 10 seconds
tone(12, 2000); //test tones, 200 Hz
delay(10000); // Transmit for 10 seconds
noTone(12);
delay (10000); // Transmit for 10 seconds

digitalWrite(13, LOW); //turn radio off

delay (60000); //Wait 1 min then loop again

}

You can play around with the delays pretty much do any combination you would like like xmit for 10 seconds and off for 2 min, for on for 30 seconds and off for 5 min. Endless possiblityes.

Here is the Shield layout



Again I think in version 2 I'll stick with a ISP and go directly to a 328 to make things smaller.