FM Transmitter on Arduino/chipKIT
Hardware
- chipKIT Max32
- Radiometrix HX1 or similar radio
- A couple of resistors, wire and a breadboard
Setup
I recommend hooking up the radio to the chipKIT with a voltage divider circuit. The input to the radio needs to shift between 2 levels to represent the high/low tones for the modem protocol.
Background: http://ukhas.org.uk/guides:linkingarduinotontx2?s[]=rtty
Receiving
The minimodem tool works well for decoding. Just run:
minimodem --rx 300 --ascii --stopbits 2 -a -q
where 300
is the baud rate you've configured for the transmitter.
Run this to hear the audio locally (if you use pulseaudio):
pactl load-module module-loopback latency_msec=1
Alternative Setups
- Use the PWM to create an output wave
- Pass the output voltage through a low pass filter using two poles
trackuino has a nice implementation of AX.25
Known Issues
SPACE/MARK were reversed, hence why we couldn't decode anything. Tested with the "Rv" button in dl-fdigi, then added an option to librtty to reverse in software. Our circuit needs to pull the TX pin HIGH to send SPACE, and LOW to send MARK.
Async?
Use a queue for packets scheduled to send?
how do we make that async with interrupts?
create a timer interrupt to match the baud rate or keep track of when last bit was sent, and don't send another bit until time is up - might be simpler and still allows loop() to continue