Decoding FSk with SoftModem Arduino

I'm not sure this is the right place to start!

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)

#define SOFT_MODEM_LOW_FREQ (4900)

#define SOFT_MODEM_HIGH_FREQ (7350)
#define SOFT_MODEM_MAX_RX_BUFF (32)

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)

Would a soundsample help I'll attach it

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.

Lefty

Sorry I had the idea it was user commonly used

To get the librarie

http://code.google.com/p/arms22/downloads/detail?name=SoftModem-004.zip&can=2&q=

Now post your code.

Pete

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);
}
}

A shorter one, just got the Android App tonight, some other device to test on.
This one isn't tested yet.

#include <SoftModem.h>
#include <ctype.h>

SoftModem modem;

void setup()
{
Serial.begin(57600);
delay(1000);
modem.begin();
}

void loop()
{
while(modem.available())
{
int c = modem.read();
Serial.write(c);
}
while(Serial.available())
{
char c = Serial.read();
modem.write(c);
}
}

I can't get it to compile with V1.0

Pete

Strange, and V2? I can't attach a sample 500K is too much

V2 of what?

Pete

V2 off my code, that actually works.

OK post V2 of your code. I'd like to try it.

Pete
P.S. I was talking about V1.0 of the IDE. The library doesn't compile.

Then you can't compile the second post off code either.
Haven't tried V1 off IDE yet, shouldn't be to complex, I'll hear about it later this evening.

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.

Here is a sample of fsk timing from OLS

Hi there,

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.

Cheers,
Baz.

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.

Thanks for your answer, i'll test it !

This shouldn't give you hard time, only changes I made is in SoftModem.h
#define SOFT_MODEM_BAUD_RATE (1200)

#define SOFT_MODEM_LOW_FREQ (1200)

#define SOFT_MODEM_HIGH_FREQ (2200)

#define SOFT_MODEM_MAX_RX_BUFF (32)

But rx-buffer is quite small, I decided to dump it so far. Replaced it with xr2211 circuit, maybe going back to SoftModem.

Take a look at KI4MCW's arduino_tnc project, using analog input with 3.3V ref, Works better but not perfect for my project.

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) !

Thanks a lot again for your help.

Baz.

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.