Create simple APRS modulator using Arduino UNO
This project is maintained by handiko
Create simple 1200baud APRS/AFSK modulator using Arduino UNO. Examples and Test files are included.
#define OUT_PIN x
into the desired GPIO. Personally, I often use GPIO 14 on ESP8266/ESP-12, so I changed it into #define OUT_PIN 14
.This is the hardware that I used to do some tracking tests. More info on the GitHub page or GitHub repo
Basically, the technique that I used to generate AFSK signal is by directly construct the signal itself as a square wave at the GPIO. Then, the low pass characteristic of the rest of the system will filter the harmonics. Here is some code and comment snippet from the sketch (doesn’t completely explain the AFSK signal generation, but I think you’ll get the idea):
/* SQUARE WAVE SIGNAL GENERATION
*
* baud_adj lets you to adjust or fine tune overall baud rate
* by simultaneously adjust the 1200 Hz and 2400 Hz tone,
* so that both tone would scales synchronously.
* adj_1200 determined the 1200 hz tone adjustment.
* tc1200 is the half of the 1200 Hz signal periods.
*
* ------------------------- -------
* | | |
* | | |
* | | |
* ---- -------------------------
*
* |<------ tc1200 --------->|<------ tc1200 --------->|
*
* adj_2400 determined the 2400 hz tone adjustment.
* tc2400 is the half of the 2400 Hz signal periods.
*
* ------------ ------------ -------
* | | | | |
* | | | | |
* | | | | |
* ---- ------------ ------------
*
* |<--tc2400-->|<--tc2400-->|<--tc2400-->|<--tc2400-->|
*
*/
void set_nada_1200(void)
{
digitalWrite(OUT_PIN, HIGH);
delayMicroseconds(tc1200);
digitalWrite(OUT_PIN, LOW);
delayMicroseconds(tc1200);
}
void set_nada_2400(void)
{
digitalWrite(OUT_PIN, HIGH);
delayMicroseconds(tc2400);
digitalWrite(OUT_PIN, LOW);
delayMicroseconds(tc2400);
digitalWrite(OUT_PIN, HIGH);
delayMicroseconds(tc2400);
digitalWrite(OUT_PIN, LOW);
delayMicroseconds(tc2400);
}
Here is some preliminary test to show you how to generate APRS (or AFSK in general) signal on Arduino UNO. The required GRC Flowgraph can be obtained here : GitHub page or GitHub repo
Here are some examples where the generated APRS/AFSK signal is decoded using GNU Radio and direwolf. This example confirms that the generated APRS/AFSK signal indeed correct and decodeable.
Recently I performed a static test to see whether the Arduino-APRS could send the packet via Radio. Sure it could !
I’ve done several tracking tests. The transmitter that I use was Dorji DRA818V TX Shield (for more info, please visit GitHub page or repo) outputing only 500mW (!) (approx., might be less. More likely between 200mW - 400mW due to the high VSWR exposure last year), powered from a 5V powerbank, 1/4 lambda wire antenna + 1 counterpoise, inserted into my sling bag, and I brought it when I do an evening ride. Best distance so far, I could hit the YB0AZ digipeater (only 4.5km, though).
Best distance to YB0AZ
git checkout -b myfeature
)git commit -m "Adding some feature blah blah blah.."
)git push -u origin myfeature
)