Go Down

Topic: Decode NOAA Weather Radio SAME codes (Read 10585 times) previous topic - next topic

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

rdsman

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

Frisky

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

Frisky

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

rdsman

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

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

Ray


rdsman

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


vogel1230

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.

Frisky

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

vogel1230

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.

Frisky

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

vogel1230

#70
Aug 19, 2012, 03:03 am Last Edit: Aug 19, 2012, 03:04 am by vogel1230 Reason: 1
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.

Frisky

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

vogel1230

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

Frisky

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

Frisky

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

Go Up