Go Down

Topic: Looking for someone with AFSK experience and interest (APRS project) (Read 519 times) previous topic - next topic

MaineWebDad

Greetings! I'm looking for someone who has AFSK experience and an interest in sharing some of that knowledge as I build a project this year that will evolve over the summer into part of a hands-on course for advanced middle and high school students. This project involves ham radios - I am a licensed ham operator.

I know there will be a temptation to suggest other ways of doing this project - we're all like that sometimes. Please keep in mind I have solid reasons for approaching the project as described below. I have about 30 years experience tinkering with technology such as the Arduino, but not a formal computer science degree. I'm someone who codes to get stuff done, not for the joy of it. (Therefore holes in what I know. But always happy to do my homework if folks are willing to suffer through a couple "everyone should already know this" questions.)

The Project
I need some coding and electronics assistance with a project to turn an Arduino into a Terminal Node Controller (TNC) which is a modem for communicating over a 2m ham radio.

I'll know this project is successful when...
I can send and receive serial data from another Arduino or device, which this Arduino will process using AFSK and connect to a ham radio - a TX cable to the Mic port and an RX cable to the Speaker port. Once this is tested, the next step is to ensure the data processing (encoding/decoding) is done as APRS packets.

I need some help with...
- The hardware (I've played with the Markqvist board but am not sure I have it done correctly and not sure what other configurations are out there or how they compare.)
- The software (looking for libraries and sample code - I can make round pegs fit in square holes if I at least have a place to start.) 

Requirements/Constraints
- I'm not using an on-board "radio" - such as the RadioMetrix HX1. It needs to be able to plug into an external 2m ham radio. (Anyone who has a favorite HX1 project and wants to transcribe it into an external radio configuration, I'm all ears - this is just a step beyond what I feel I can do/understand.)
- I'm not using a pre-made TNC. There are some great ones out there, but I want students to have a "made from scratch" experience.
- I want to focus on Arduino technology. True, it might be overkill for some of this, but students are familiar with the Arduino Uno from other projects and I want a comfortable transition to this project. So I'll probably take a solution that uses three Arduino Megas over something with a simple PIC and two components.
- I have access to a "fab lab" and can therefore mill custom circuit boards, do surface mount soldering, etc.. Eagle files gratefully accepted or even just good schematics.
- There are some great firmware solutions out there - such as Unsigned.io - where folks are encouraged to load the monolithic firmware onto the Arduino. I feel it's important for students to have the experience of setting up a library and uploading individual sketches, even if they aren't writing the code themselves.
- Purchased daughterboards are ok, especially getting something working. But I want a solution where students can put a bunch of basic components in a breadboard and make this work, so at some point the daughterboard would be broken down into components before using it with students. 

Please let me know if I missed anything or if there are additional questions.

Thanks,
-- Markus  K1FIG
markus@feathermark.org


Being told is the opposite of finding out - James Britton

Grumpy_Mike

OK well the AFSK is easy enough. Just use the PWM to generate an audio signal. By changing the registers you can get its frequency to change and you only need two frequencies. There are libraries that will make that easy for you but if you want to see how it is done then just look at some example code or read the processor's data sheet about timer 2.

The rest of the project is going to be more tricky. I did buy a TNC some years ago but that was a blank PCB that used a Z80 processor. I assembled it and got it going but like all such kits it just turned into a soldering exercise and I learned little about the design. Good luck with it.
73's de G8HBR

MaineWebDad

Thanks for the response! Some questions:
- signal processing needs to go two ways, are your comments aimed at both or just one?
       TX: serial signal -> AFSK encode -> audio signal
       RX: audio signal -> AFSK decode -> serial signal
- Sample code - is there any specifically you would recommend?
I would appreciate any "homework assignments" you'd care to share - anything I don't know isn't for a lack of trying, it's usually because I'm blind to something I just don't know.
Thanks,
-- Markus
Being told is the opposite of finding out - James Britton

Grumpy_Mike

Quote
are your comments aimed at both or just one?
It was aimed at just how to create an AFSK signal from inside the Arduino.

You might be better off generating it from circuitry outside the Arduino by using some external hardware like an NE555 chip. As to the decoding, again I would tend to go for a frequency to TTL ( logic levels ) solution outside the computer like a PLL ( Phase Locked Loop ) or a tone decoder chip, which normally has a PLL in in. Or I have used in the past a phase discriminator. This is simply the audio triggering a one shot monostable, smoothing output with an RC filter and feeding that into a comparator to give you a logic signal that changes with the audio either side of a reference point, set by the voltage on the other comparator inputs.  

Then you could use the normal serial input / output and concentration on the protocol of decoding the message. I would also use an Arduino Mega because that has three extra serial ports so you can leave the main port for downloading code and sending debug messages and use the extra poet for your over air input / output.

I would be surprised if someone had not done this sort of thing before. Have you searched the radio ham web sites?

Go Up