Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« on: January 09, 2012, 01:49:26 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15320
Measurement changes behavior
|
 |
« Reply #1 on: January 09, 2012, 01:57:31 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #2 on: January 09, 2012, 03:10:50 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 14
Posts: 911
|
 |
« Reply #3 on: January 09, 2012, 04:09:05 pm » |
Now post your code.
Pete
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #4 on: January 09, 2012, 07:37:00 pm » |
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); } }
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #5 on: January 09, 2012, 08:05:13 pm » |
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); } }
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 14
Posts: 911
|
 |
« Reply #6 on: January 09, 2012, 08:35:04 pm » |
I can't get it to compile with V1.0
Pete
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #7 on: January 10, 2012, 05:56:17 am » |
Strange, and V2? I can't attach a sample 500K is too much
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 14
Posts: 911
|
 |
« Reply #8 on: January 10, 2012, 10:53:52 am » |
V2 of what?
Pete
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #9 on: January 10, 2012, 11:24:52 am » |
V2 off my code, that actually works.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 14
Posts: 911
|
 |
« Reply #10 on: January 10, 2012, 11:27:39 am » |
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.
|
|
|
|
« Last Edit: January 10, 2012, 11:36:29 am by el_supremo »
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #11 on: January 10, 2012, 12:17:56 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #12 on: January 16, 2012, 08:36:36 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Esbjerg,DK
Offline
Newbie
Karma: 0
Posts: 28
|
 |
« Reply #13 on: January 16, 2012, 08:41:36 pm » |
Here is a sample of fsk timing from OLS
|
|
|
|
« Last Edit: January 16, 2012, 08:44:15 pm by HUDIBRAS »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #14 on: January 25, 2012, 02:49:47 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
|