Using Arduino Uno 16MHz with SoftModem4, some question showed up.
Softmodem.h
The numbers for baudrate and high/low freq are these just calculated numbers?
------------arduino.h---------------- #define SOFT_MODEM_BAUD_RATE (1225)
Look at 1200 Baud normally is mark 1200hz and space 2200hz.
Cant get it to decode anything, setup with AIN half VCC+300mV DC Try changing baud to 1200 mark to 1200 space to 2200 makes no differens
FFT analyze of the FSK signal I want to decode shows peak at 1200hz and 2400hz (both almost same level) with a small spike at 2000hz (at about half level)
SoftModem4 doesn't resolve to anything involving arduino using google that I could find. I assume it is an arduino library? A link to the library code would be useful.
Nothing much just iphone sample #include <SoftModem.h>
//setup as breakoutboard with filter
//FSKOUT Pin 3
//FSKIN Pin 6
//AIN1 Pin 7
SoftModem modem;
int led = 13;
int x;
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 (")");
x++;if (x==50) {Serial.println();//wrapping line
x=0;}//max
}
}
while ( Serial . available ())
{ //PC to make sure data is received from
Serial . print ("Data out");
char c = Serial . read (); //1byte Lead
modem. write (c); //iPhone send
Serial.println(c);
}
}
What failure do you get, some thing like 'virtual size_t Print::write(uint8_t)' overwritten? caused by void write(uint8_t data);
In mean time I found out that the signal i wanted to decode is rather speciel.
Before any transmission no matter length (any amount of bytes transmitted) it starts with 14mS SPACE (2200hz) followed by data. Pause indicated MARK (1200Hz) most off time.
I have to modify Softmodem.cpp grab the 14mS before decoding takes place.
I am interested in using SoftModem lib to build a FSK demodulator for a particular application.
In this application, the FSK modulation can not be modified and uses 900Hz/1500Hz as tones for a baudrate of 600 bauds.
As i see in the lib documentation, the presets frequencies are quite different and before going further i wonder if anyone using this lib has ever tried or succeeded to use different tones.
It works pretty nice even after changing the tone in Arduino applikation. But it wont read transmission from the Android applikation afterwards, I can't change tones definition in Android app. The code from KI4MCW works nice but auto bias is too slow. So I made extra hardware xr2211 because TCM3105 has timing in speed and XR2211 hasn't. Feeding audio to both circuits gives me a delay off decoding 2.5 mS showed by logic sniffer. Hysteresis falling 2040Hz rising at 1360Hz pretty good after considering VCC 5V. At this point I have only bit banging and bit stuffing left.
XR2211 circuit is clearly another option, but it requires external power supply since it needs much more than the 5v coming from USB to work properly.
My goal is to provide HAM radio operators, with who i am working on a sounding balloon tracking project, an easy-to-use and cheap device allowing them to get data coming from radio as a serial input for their laptop or desktop. I already have a software-only solution that uses PC's sound card but it is not very portable and reliable (for hours).
That is the reason why i am interested in using arduino that already comes with USB-Serial interface.
So, i'll give a chance to both solution (arduino soft or hard) !
Don't tell my circuit that, it's running at 5V nicely. If you want it to be perfect, make a step up converter. The current is only 7mA at 12V supply. I decode APRS nicely at 5V so far, if the audio signal is week it don't decode.