An FSK modem basically convert a digital signal into analog signal or sound signal by frequency shift keying technique. Here we can make our Arduino as an FSK modem by uploading a simple code. This project produce and play a sound corresponding to a digital signal and demodulate a sound signal into the corresponding digital signal.

For executing this, we need an Arduino library named SoftModem. The code is given below.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#include #include SoftModem modem; int led = 13; void setup () { pinMode(led, OUTPUT); Serial . begin (57600); modem. begin (); Serial . println ("Start"); } void loop () { while (modem. available ()) { // iPhone is receiving data from the check //Serial . println ("Data in"); int c = modem. read (); //1byte Lead if (isprint(c)) { Serial . print ((char)c); //PC sends } else { Serial . print ("("); //Hex printable characters are displayed in Serial . print (c, HEX ); Serial . print (")"); } } while ( Serial . available ()) { //PC to make sure data is received from // Serial . println ("Data out"); char c = Serial . read (); //1byte Lead modem. write (c); //iPhone send } } |
For avoiding the outside noise, it is important to connect a filter circuit in the output pins of Arduino. FSK_out on digital pin 6 and FSK_in on digital pin 3. On these pins we connect the filter likewise the picture shown below.
Incoming search terms:
- arduino fsk demodulator
- arduino fsk
- arduino fsk modem
- arduino fsk decode
- fsk arduino
- modem fsk arduino
- arduino modem
- arduino afsk
- afsk arduino
- fsk decode arduino
Filed under: Arduino • Electronics
Like this post? Subscribe to my RSS feed and get loads more!





Hello Shajir,
I am interesting in build a modem for telemetry of my RC airplane. Can you give me more information from softModem library.
Thank you in avance.
Hi Amer,
You can download the softModem library and sample codes from
http://code.google.com/p/arms22/downloads/list?can=2&q=SoftModem+label%3AFeatured
how can change AFSK(square wave to sine wave), because softModem generate square wave
I think, modulate FSK with a carrier signal by AM or FM technique get a RF signal corresponding to the FSK and we can transmit it using wireless transmission and demodulate at the terminal point using appropriate demodulation technique.
out put from softmodem (ARDUINO) is square wave.I think it can not FM modulate technique
we only note the frequency change at the terminal point for decoding the data. so don’t worry about the distortion.
Can you send and receive number (0 2 3 4 5 6 7 8 9) by sofmodem.
I have try it ,but it can only send-receive TEXT
Can you send and receive NUMBER(0 1 2 3 4 5 6 7 8 9) by softmodem.I have try it ,but it can only send-receive TEXT.
can you send and receive NUMBER(0123456789)by softmodem.I have try it, but it can only send – receive TEXT.
Every character is send as its ASCII value. For 0 it send and receive its ASCII 48. So for getting a number we have to subtract 48 from the receive character.
please send me for complete code.
And how can I change FSK frequency ,I have change code in SoftModem.h to the following
#define SOFT_MODEM_BAUD_RATE (126)
#define SOFT_MODEM_LOW_FREQ (882)
#define SOFT_MODEM_HIGH_FREQ (1764)
#define SOFT_MODEM_MAX_RX_BUFF (4)
but it can’t decode
Because,low frequency can send through VHF transceiver.
Thank you
complete code in softmodem lib. you can edit and change the frequency according to your requirements.
I noticed you mentioned a filter on the 2 pins but I only see one?
Hi,
There are two filters ,one in digital pin 3 (for output) and the other in digital pin 6 (for input).
can you tell me whitch libary’s are you used in your code example?