This is the PICAXE code for an RF Beacon, actually the PICAXE in SPACE code with mission specific stuff removed. The code is for a PCB that uses a 40X2, but should run on a 28X2 also.
The objective was to see if it would be possible to produce a small low cost satellite using commercial components, and still be able to communicate with it in low Earth orbit.
The RF transmitter is the Hope RFM22, and this is used to transmit a number of different modes to see which are viable at such low powers, 100mW max. The RF transmission modes are;
Slow Speed Morse beacon – for messages and call signs. The slow Morse is transmitted as FM audio, the tone and rate is altered low\medium\high dependant on battery and solar volts.
Fast Morse – FM for decode via PC. Data sent is measured currents and voltages.
FSK RTTY – transmits the contents of a memory block as ASCII numbers.
RFM22 data packets, uplink and downlink. Uplink allows for various commands to control the beacon, turning transmit on \off, requesting data or slow Morse RSSI reports for incoming packets and remotely changing one of the messages. Command packets, such as to turn transmit on\off require an 8 byte key from the remote transmitter to match a key stored in the beacon, before they are acted on.
The software goes around in a loop. At the start it measures, battery and solar voltages, solar charge current and board current, measures RFM22 and PCB temperatures and does a check on a 512 byte RAM buffer for changes. All this data is put in a RAM buffer for transmission as RFM22 data packets and FSK RTTY. The software then transmits one of the 5 slow Morse messages, listens for an incoming command packet, transmits the fast Morse or FSK RTTY data and goes to sleep for a period. The sleep periods are used to power manage the beacon, longer sleeps for lower battery voltages. Battery is a single Lithium Ion battery.
The software keep track in EEPROM of the transmission state (on\off), number of processor resets (from an external watchdog or low volts supervisor) and the number of RFM22 resets detected.
Of particular interest to amateur radio enthusiast is probably the FSK RTTY. This does need a reasonable communications receiver to pick up or Funcube dongle but is highly efficient. In this implementation the block of memory between StartRAMdata1 and EndRAMdata1 is converted into ASCII numbers and transmitted in the form of a GPS NMEA formated string. See a typical decode below, taken form a PC screen;
$ABCDE,,,1,25,,88,255,65,255,17,255,255,40,5373,*58
If you cut and paste the bit between the $ and * into one of the on-line NMEA check sum checkers, you will see that the check sum (58) is correct.
The FSK RTTY send routine (sendRTTYpacket) builds up the ASCII data in the scratchpad, from location 0 onwards, replacing any leading zeros in the numbers with nulls (0) so that a word value of 1 gets sent as 1, rather than 00001. The routine that transmits the actual FSK shifts (sendRTTY) ignores the null characters. A $FF in the scratchpad signals the transmit routine to stop sending from the scratchpad and append the checksum.
The objective was to see if it would be possible to produce a small low cost satellite using commercial components, and still be able to communicate with it in low Earth orbit.
The RF transmitter is the Hope RFM22, and this is used to transmit a number of different modes to see which are viable at such low powers, 100mW max. The RF transmission modes are;
Slow Speed Morse beacon – for messages and call signs. The slow Morse is transmitted as FM audio, the tone and rate is altered low\medium\high dependant on battery and solar volts.
Fast Morse – FM for decode via PC. Data sent is measured currents and voltages.
FSK RTTY – transmits the contents of a memory block as ASCII numbers.
RFM22 data packets, uplink and downlink. Uplink allows for various commands to control the beacon, turning transmit on \off, requesting data or slow Morse RSSI reports for incoming packets and remotely changing one of the messages. Command packets, such as to turn transmit on\off require an 8 byte key from the remote transmitter to match a key stored in the beacon, before they are acted on.
The software goes around in a loop. At the start it measures, battery and solar voltages, solar charge current and board current, measures RFM22 and PCB temperatures and does a check on a 512 byte RAM buffer for changes. All this data is put in a RAM buffer for transmission as RFM22 data packets and FSK RTTY. The software then transmits one of the 5 slow Morse messages, listens for an incoming command packet, transmits the fast Morse or FSK RTTY data and goes to sleep for a period. The sleep periods are used to power manage the beacon, longer sleeps for lower battery voltages. Battery is a single Lithium Ion battery.
The software keep track in EEPROM of the transmission state (on\off), number of processor resets (from an external watchdog or low volts supervisor) and the number of RFM22 resets detected.
Of particular interest to amateur radio enthusiast is probably the FSK RTTY. This does need a reasonable communications receiver to pick up or Funcube dongle but is highly efficient. In this implementation the block of memory between StartRAMdata1 and EndRAMdata1 is converted into ASCII numbers and transmitted in the form of a GPS NMEA formated string. See a typical decode below, taken form a PC screen;
$ABCDE,,,1,25,,88,255,65,255,17,255,255,40,5373,*58
If you cut and paste the bit between the $ and * into one of the on-line NMEA check sum checkers, you will see that the check sum (58) is correct.
The FSK RTTY send routine (sendRTTYpacket) builds up the ASCII data in the scratchpad, from location 0 onwards, replacing any leading zeros in the numbers with nulls (0) so that a word value of 1 gets sent as 1, rather than 00001. The routine that transmits the actual FSK shifts (sendRTTY) ignores the null characters. A $FF in the scratchpad signals the transmit routine to stop sending from the scratchpad and append the checksum.