Pages: 1 ... 3 4 [5] 6   Go Down
Author Topic: Decode NOAA Weather Radio SAME codes  (Read 7598 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have tried just about everything I can think of to no avail.  I took out all of the Serial.print statements, hooked up a button to INT1 and copied each char received into a buffer so that when I press the button, the buffer would then display.  The thought was that the serial functions were eating up more time and therefore skewing the input reads.  No luck with that.

Could it be that the digitalRead() function is too slow?  I'm studying up on bit manipulation to see if there is a better way to grab the state of the digital input, but maybe the function is not the holdup.

Have either of you had any luck?

Thanks,
tsc
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HerrProfessor:

This is what I have discovered:

First off, the XR-2211 generates a glitch sometimes, when transitioning between tones.  Sometimes its on the leading edge, sometimes on the trailing edge and sometimes on both.  I'm not sure if its the components that I selected or a trait of the XR-2211.  On top of this the bit timings are not equal.  A single low is approximately twice as long as a single high.  However, this appears to only apply to the first received bit of multiple high's.  (The timing on the first bit is short, the the rest are at the correct spacing.) 

I've tried multiple sync methods and so far, I can always sync to the preamble.  I can get most of the message up to somewhere around 200+ characters or I get nothing at all beyond the preamble - nowhere in between thus far!

Secondly, you cannot print while you are receiving.  You have to set a flag at the end of carrier detect to signal that you have received characters.  After you print the buffer, clear the flag and the received buffer.  This is an example:

if (same_available == 1)  // If there is a SAME message, print it out.
  {
    for (int i = 0; i < same_rx_buffer_index; i++)
      {
        Serial.print(same_rx_buffer, HEX);
        Serial.print(" ");
      }
   
    Serial.println();
   
    for (int i = 0; i < sizeof(same_rx_buffer); i++)  //  Clear out the entire SAME buffer.
      same_rx_buffer = 0x00;
    same_available = 0;
  }

Capture as bytes instead of characters and you can see that you are at least receiving something.  Only send one message to the Arduino, not three message spaced one second apart.  This way, you have time to print out and analyze what you received.

I've made only one change to my original components so far, change the carrier detect cap to 4.7 uf.  It completely eliminates voice falsing and has negligable effect on synchronizing to the preamble.

I don't think using digitalRead() makes a difference, for now.

I know my posts have been few and far between lately, but we are going to succeed at this!

Ray
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not sure where you are with this project but here is a pdf file for the protocol they use for NWR Same. I made an encoder for testing my decoder with an ATMega16 and an XR2206 FSK encoder. My decoder uses the ATMega16 too I pick this chip because I have the AVRJTagIcemkii for debugging. I have a few circuits with all of the parts needed for the XR2211 if you want I can scan them.

Link for pdf: http://www.nws.noaa.gov/nwr/same.pdf
Don
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't realize there was 5 pages of posts to this thread. I found that I had to measure bit periods in the back around to stay in synced of to the data. I'm kinda new to Ardunio but been using the AVR and AVR Assembler for some time. How exact do you think the Ardunio is as a encoder? I can set off a weather radio every time with the ATMega and the XR2206. The first encoder I made uses the AT90S2313 I guess that is like 8 years old now. They sure picked a odd ball way of sending the data.
Don
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The details of how I did it can be found here:

http://www.raydees.com/Weather_Radio.html

Ray

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've added a Same.fill() function that will make it easier for you to create your own SAME test messages.  You can do this is text mode without having to actually receive data via an audio source.  You can then write your specific application code accordingly.

Ray

Logged

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Take a look at adafruit forum or dangerous prototypes forum under arduino weather radio or weather radio shield. I'm working on a project right now with the si4707 from silicon labs.
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So that is a VHF weather band receiver? That ic is so small next to the smd crystal!
I wonder how much it is?
Don
Logged

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The si4707 is just under $17 ea from digi-key. You would need another way to solder it to your board like an oven/solder paste. I tried to solder under microscope and still couldn't get it done right.

Chip has great docs on how to program. I2C or SPI is available.

That receiver board u saw was populated by a contract electronics assembling company so I could make sure I didn't screw it up.
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was looking over the docs seem great. I have never used a oven/paste before. It sure would make my life easier. I have a broadcast quality receiver with a noaa radio, am, fm radio in it which was meant for EAS encoder/decoder. I'm using a weather radio with a xr2211 for testing now with Ray's library it work great.
Don
Logged

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So with that setup are u able to properly decoded the same messages and integrate with arduino?

Did u see the red shield Ian made on D.P. or my project at the end of either forum topic (adafruit/DP)? I'm under AIW on those forums.
« Last Edit: August 18, 2012, 08:04:58 pm by vogel1230 » Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We can decode messages just fine. Ive made a simple sketch to control a repeater. I have some components on order to make a bread board to test my design.

I saw the board with the BNC connector on it. I bet I would need a preselector so block out unwanted RF from the 144-148 Mhz transmitter.
Don
Logged

Kansas City, MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's great!

What's nice about the 4707 is that the decode is integrated in the IC. You just have to request the data out of the SAME buffer that's internal to the chip. I'm still working on the basic radio function code at this point. Once I get that done I'll progress to the same functions.

Rick
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ray deserves all the credit! Here is a link to his library http://www.raydees.com/Weather_Radio.html
Let us know how it goes with your design.
Don
Logged

Chicago
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anything new going on with ? Is there a place to purchase the si4707 weather radio shield?
Happy New Year to everyone
Don
Logged

Pages: 1 ... 3 4 [5] 6   Go Up
Jump to: