Pages: 1 2 3 [4] 5 6 ... 11   Go Down
Author Topic: Cheap UHF spectrum analyzer (and RC tx rx) using RFM22 module  (Read 44209 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No the RFM12BP (and lower power RFM12) uses a completely different RF chip. Although there are probably arduino code for it somewhere on the intarwebs since it's been around for a while.

Ok, will be easier to maintain rfm22 and when everything is operational, use the rf2126 booster mentioned by msev (datasheet says it is compatible with 433MHz).
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What would I have to modify in the circuit to use it for 433MHz? In regards to that example circuit for 2.4GHz?
Logged

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

Take a look in the attached file. 

* RF2126_datasheet.pdf (180.58 KB - downloaded 75 times.)
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I must have had a "shortened" version of the datasheet... That looks great..hope these chips will still be available once I get to the stage of building a booster...Dfidalgo if you build it be sure to post some pics of it, a tell where you got the chip  smiley
« Last Edit: April 15, 2012, 02:56:06 am by msev » Logged

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

Today I received the Zitron PCB's, look much better in my hands than here in the pictures !   smiley-grin
Now just need to buy the RFM22.

Thanks Zitron smiley-wink
Logged

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

My PCB's are in the post as well smiley

I ordered my HopeRF modules here
http://rf-store.com/index.php?s_phr=rfm&pv=search&view=2

Nigel.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What differences are between RFM22-S1 and RFM22-S2? Only the crystal size?
Logged

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

What differences are between RFM22-S1 and RFM22-S2? Only the crystal size?

Yes, as far as I am aware, plus €0.50 better price !!

Nigel.
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 223
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Today I received the Zitron PCB's, look much better in my hands than here in the pictures !   smiley-grin
Now just need to buy the RFM22.

Cool! Let me know how it goes!

What differences are between RFM22-S1 and RFM22-S2? Only the crystal size?

I heard someone mention that the bigger crystals have better frequency tolerances, but that could be just a rumour.
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 223
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,

For those of you building the board, here's a test code to make sure that the ATMEGA is working. It simply blinks the red and green LEDs:

Code:
#define OUTA 18
#define OUTB 19

unsigned int duration = 500;

void setup()
{
  pinMode(OUTA, OUTPUT);
  pinMode(OUTB, OUTPUT);
}

void loop()
{
    digitalWrite(OUTA,HIGH);
    digitalWrite(OUTB,LOW);
    delay(duration);
    digitalWrite(OUTB,HIGH);
    digitalWrite(OUTA,LOW);
    delay(duration);
}

Logged

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

I got my parts together now for a build of Zitrons latest board.

Works fine with the 'blink' test program.

When trying to compile the specan.pde - I get lots of errors due to missing files...
FastSerial.h
RF22.h
C++.h
Menu.h  -- and many more.

@ Zitron,
I guess you use other library files when making your specan & Tx/Rx firmwares.

Is there some single download I can get the required lib files or do I need to hunt them down individually?

EDIT
Tracked down a bunch of missing lib files and now the only remaining compile error is:

C:\Arduino\arduino-0023\libraries\RF22\RF22_Specan.cpp:379: error: prototype for 'boolean RF22::setFrequency(float)' does not match any in class 'RF22'
C:\Arduino\arduino-0023\libraries\RF22/RF22.h:813: error: candidate is: boolean RF22::setFrequency(float, float)


What do I need to change/add??

/EDIT


So close and yet so far !!

Nigel.


* DSCN0790.JPG (1107.04 KB, 2272x1704 - viewed 76 times.)

* DSCN0792.JPG (1127.36 KB, 2272x1704 - viewed 56 times.)
« Last Edit: April 20, 2012, 03:41:42 pm by Devonian » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 124
http://roverduino.blogspot.com/ http://uhebeuav.co.za
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Great Find this Good work !!!!!!!

I downloaded the programs and Pde. but i get compilation errors almost so much that it looks like im missing a library , can some one please confirm this ? i have played with the RF22 modules alot so i have the RF22.h libraries but i cant get this source code to compile

any help would be great
Logged

He who does not try ,does not fail ,does not learn not to fail again http://powerduino.blogspot.com/

0
Offline Offline
Full Member
***
Karma: 1
Posts: 223
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I knew there would be problems!

Which version of arduino are you using? I'm using 0023, I have not tested it on version 1.0.

Try this version of the specscan without the fastserial stuff:

Code:
// rf22_specan
// A simple spectrum analyser for the RF22
// Uses the RSSI measurement to plot signal strength
// against frequency
// Specify the start and and requencies and the step size below.
// The output is suitable for a VT100 terminal emulator
// Note the baud rate is set to 115200 for better performance,
// but you can change this to suit your needs
//
// TO DO: add some interactivity
// Copyright Mike McCauley

// modified to work with PC program
// Zitron

#include <RF22.h>
#include <SPI.h>
#include<stdlib.h>

#define redLED 18
#define greenLED 19

char temp[51];
uint8_t rssi;
// Singleton instance of the radio
RF22 rf22;

void setup()
{
  pinMode(redLED, OUTPUT);
  pinMode(greenLED, OUTPUT);
 
  Serial.begin(115200);
  if (!rf22.init())
    Serial.println("RF22 init failed");

  rf22.setModemConfig(RF22::GFSK_Rb2Fd5);
  rf22.setModeRx();
  // Defaults after init are 434.0MHz, modulation GFSK_Rb2_4Fd36
  digitalWrite(greenLED, HIGH);
}

float Start = 430;
float End = 460;
float Step = 0.1;

float freq;

void loop()
{
  ProcessRx();
 
  for (freq = Start; freq < End; freq += Step)
  {
    rf22.setFrequency(freq);
    digitalWrite(redLED, LOW);
    delayMicroseconds(6000); // Let the freq settle
    digitalWrite(redLED, HIGH);
    rssi = rf22.rssiRead();
   
   
    Serial.print(rssi, DEC);
    Serial.print(",");
   
    //Serial.println(dtostrf(freq,0,3,temp));
  }
  Serial.println();
  //Serial.println("");
}

void ProcessRx() {
  byte n = 0;
  byte m = 0;
  char* sptr1;
  char* tempstr;

  if (Serial.available()) {
    temp[n] = Serial.read();
    while ((temp[n] != '\n')&&(n<50)) {
      if (Serial.available()) {
        n++;
        temp[n] = Serial.read();
      }
    }

    //Serial.println(temp);

    tempstr = strtok_r(temp,",\n",&sptr1);

    do
    {
      switch (m) {
      case 0:  // Wheel 1
        Start = atof(tempstr);
        break;
      case 1:  // Wheel 2
        End = atof(tempstr);
        break;
      case 2:  // Wheel 3
        Step = atof(tempstr);
        break;
     
      }
      m++;
    }
    while (tempstr = strtok_r(NULL, ",\n",&sptr1));
  }
}


I have also uploaded my modified version of the RF22 lib.

* RF22.zip (381.22 KB - downloaded 81 times.)
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 124
http://roverduino.blogspot.com/ http://uhebeuav.co.za
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I loaded both versions now and they seem to work great . thanx , one question , they PC application seem to very slow updating the graph
Logged

He who does not try ,does not fail ,does not learn not to fail again http://powerduino.blogspot.com/

0
Offline Offline
Full Member
***
Karma: 1
Posts: 223
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I loaded both versions now and they seem to work great . thanx , one question , they PC application seem to very slow updating the graph

Update speed depends on how many steps you are scanning. By default it scans from 430-460MHz at 0.1MHz step (300 samples), which is a bit slow. You can make it faster by increasing the step size or reducing frequency range.

BTW are you using your own board??
Logged

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