PIC APRS Beacon
This project was started as a fun experiment to see if an AFSK signal could be generated using only an 8 bit PIC and a resistor ladder network. Since this is now realized, the additional features to make it a fully capable beacon will (hopefully:) be implemented.
High Level System Requirements
- Implementation should be simple and inexpensive
- AX.25 packet capability for data transmission
- Interface with a GPS using either ASCII NMEA or a binary protocol
- On-board landing prediction based on wind data gathered during ascent
- Logging
- Data to be stored on on-board flash memory.
- Board temperature
- Battery voltage
- Ability to configure volatile parameters via RS232 console
- Call Sign & SSID
- Status string
Hardware
The hardware started out based around a PIC18F14K22 (?) which is one of the higher end 8 bit PICs. It's capable of running at up to 64 MHz, or 16 MIPs since each instruction takes 4 clock cycles to execute. This worked well, but only has 512 bytes of RAM which may get a little thin handling NMEA strings. The PIC18F2525 would be a second choice if more RAM is necessary.
Software
The software is written in C and built with the Hitec C compiler. The AFSK modulator works using a 32 entry lookup table, which produces a single cycle of a sin wave. AFSK switches between 1200 Hz and 2200 Hz to represent mark and space, with a baud rate of 1200 bps. The data itself is encoded using NRZI (non-return to zero inverted), meaning zeros cause a state (as in, mark or space) change while 1's cause the state to remain the same. Bitstuffing is performed to keep 5 or more 1's from ever being sent in a row - this helps keep the receiver's clock synced up.
void main() {
for(int i = 0; i < 20; i++)
printf("This is a test");
}
Currently the remaining capabilities still need to be implemented:
- Flash memory interface (in progress, partially complete)
- GPS NMEA interface
- RS232 Console interface