How to design 433 MHz RF Tx Rx pair which will opperate when other 433Mhz remote opperating

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
I have a problem now, I designed RF tx rx of 433 Mhz with cheap modules available on stores ST-TX01-ASK and ST-RX01-ASK but when i use any of my other available old RF remote and press both remote simultaneously not any one of my output device operate, I have to press both remote one by one, I know it happens due to both of my device opperate on same band and my RX AGC take both signal as input signal which conflict my resultant input and that makes no sence to decoder causing no output or else if i am without decoder it will give random value!
So is there any way to make both of them opperate I want to make 10 such systems which will need to operate simultaneously!
So is it possible with my simplex communication technique?
any help will be appreciated!
Thanks in advance!
 

nerdegutta

Joined Dec 15, 2009
2,676
Hi.

It sounds to me that the transmitters interfere with each other, which "confuse" the receivers.

To get better answers, I advice you to upload your schematics, both transmitter and receiver, and you source codes. If you do so, please use the CODE-tags, located in the top menu of the editor.
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
RECEIVER:-
C:
#include "INCLUDES.h"

//----------------------------Configuration Bits--------------------------------
__CONFIG(FOSC_INTRC_NOCLKOUT & WDTE_OFF & PWRTE_OFF & MCLRE_ON & CP_OFF & CPD_OFF & BOREN_ON & IESO_OFF & FCMEN_OFF & LVP_OFF);
__CONFIG(BOR4V_BOR21V & WRT_OFF);

int cnt,A;
static unsigned int blink_count=0, speed_delay=0, debounce_delay=0;
static BOOL query_started=FALSE;
static unsigned char j=0;
unsigned char ch=0, input_query[10]={'0','0','0','0','0','0','0','0','0','0'};
BOOL query_recd=FALSE;
volatile unsigned long count=0;
void InitializeSystem(void);

void interrupt isr(void)
{
    
 
    if((PIR1bits.RCIF==1)&&(PIE1bits.RCIE==1))
       {  ch = RCREG;
/*------------------------------------------------------------------------------
* First, take the data received into a temporary variable(ch). If the character
* received is '#', it indicates start of string. In this case, start taking the
* data into the string variable.
------------------------------------------------------------------------------*/
     NOP();
      PIR1bits.RCIF = 0;
   }
}
void main(void)
{
    InitializeSystem();
 
    __delay_ms(10);
 
    while(1)
    {
         if((ch=='#')&&(query_started==FALSE))
      {  query_started = TRUE;
         NOP();
         NOP();
         NOP();
         NOP();
//        return;                          //Return after receiving '#'.
      }

      if(query_started==TRUE)
      {
        if(ch=='#')
            {
                NOP();
            }

        else 
            {
                /*------------------------------------------------------------------------------
                * Sometimes, junk characters are received at the serial port. If these characters
                * are put into the string variable, it unnecessarily inflates the variable which
                * causes the microcontroller's stack to overflow. To avoid this, if the string
                * length goes above 20 characters, it is discarded. It is observed that the
                * junk data appears in between two queries and not in the middle of a single
                * query.
                ------------------------------------------------------------------------------*/
                if(j<6)
                {      input_query[j] = ch;
                    if((input_query[j]=='*')&&(query_started==TRUE))
                    {
                        /*------------------------------------------------------------------------------
                        * If the character received is '*', it indicates that the string has ended. Tell
                        * the microcontroller that a valid string has been received by making the
                        * query_recd variable TRUE.
                        ------------------------------------------------------------------------------*/
                        j = 0;
                        query_recd = TRUE;
                        query_started = FALSE;
                        return;
                    }
                    j++;
                }
                else
                {      j = 0;
                    query_started = FALSE;
                }
            }

      }
        if( query_recd == TRUE )
             {
                        query_recd = FALSE; 
                        test_led = 1;
                        count++; 
                        //__delay_ms(1000);
                        test_led = 0;
                 
                }
   }
}
void InitializeSystem(void)
{
    OSCCON = 0b01111110;  // INTERNAL 8 MHZ

       OPTION_REG = 0b11000000;
       //             1-------> (RBPU) PORTB pullups are disabled.
       //             -1------> (INTEDG) Interrupt on rising edge.
       //             --0-----> (T0CS) TIMER0 clock source is FOSC/4;
       //             ---0----> (T0SE) Ignored when T0CS is '0'.
       //             ----0---> (PSA) Prescalar is assigned to TIMER0.
       //             -----000> (PS<2:0>) Prescalar is 1:2.

       ANSEL = 0x00;
       ANSELH = 0x00; 

    PORTB = 0x00;
    TRISB = 0x00;
    PORTA = 0x00;
    TRISA = 0x00;

  
/*               //All pins digital.
       TRISCLOCK_4017 = 0;                   //Output.
       TRISRESET_4017 = 0;                   //Output.
       TRISSH_CP = 0;                        //Output.
       TRISST_CP = 0;                        //Output.
       TRISDATA_74595 = 0;                   //Output.
       TRISSENSOR_IP = 1;                    //Input.
       TRISSW_EXIT = 1;                      //Input.
       TRISEXT_RST_IP = 1;                   //Input.
       TRISPOWERDOWN_IP = 1;                 //Input.
*/

    TRIStest_led = 0;

    test_led = 0;

    TRISUART_RX = 1;                        //Necessary for serial communication.
       TRISUART_TX = 1;                        //Necessary for serial communication.
       TRISUART_485_EN = 0;                    //Output.

       UART_485_EN = 0;


/*------------------------------------------------------------------------------
* UART is used for RS485 communication.
------------------------------------------------------------------------------*/
       TXSTA = 0b00100100;
       //        0-------> (CSRC) Ignored in asynchronous mode.
       //        -0------> (TX9) Select 8 bit transmission.
       //        --1-----> (TXEN) Enable transmitter.
       //        ---0----> (SYNC) Select asynchronous mode.
       //        ----0---> (SENDB) Sync break transmission completed.
       //        -----1--> (BRGH) High speed baud rate selected.
       //        ------0-> (TRMT) Read only bit.
       //        -------0> (TX9D) Ignored in 8 bit transmission mode.

       BAUDCTL = 0b00000000;
       //          0-------> (ABDOVF) Read only bit.
       //          -0------> (RCIDL) Read only bit.
       //          --0-----> (Unimplemented).
       //          ---0----> (SCKP) Transmit data is non-inverted.
       //          ----0---> (BRG16) Use 8 bit baud rate generator.
       //          -----0--> (Unimplemented).
       //          ------0-> (WUE) Receiver is acting normally.
       //          -------0> (ABDEN) Auto Baud rate detect is disabled.

/*------------------------------------------------------------------------------
* We have selected high speed baud rate. The formula for high speed baud rate
* calculation is:
* Baud Rate = (FOSC/(16(n+1))).
* Where, Baud Rate = Baud Rate in bits/second.(e.g. 9600).
*        FOSC = Oscillator Frequency in Hz.(e.g. 12000000).
*        n = The value to be loaded in the SPBRGH:SPBRG registers.
* According to this formula, n comes to be 78. This value is accomodable in 8
* bits. So, we have taken 8 bit baud rate generator. In this mode, the SPBRGH
* is ignored.
------------------------------------------------------------------------------*/
       RCSTA = 0b10010000;
       //        1-------> (SPEN) Enable serial port.
       //        -0------> (RX9) Select 8 bit transmission.
       //        --0-----> (SREN) Ignored in asynchronous mode.
       //        ---1----> (CREN) Enable receiver.
       //        ----0---> (ADDEN) Disable address detection.
       //        -----0--> (FERR) Read only bit.
       //        ------0-> (OERR) Read only bit.
       //        -------0> (RX9D) Read only bit.

       SPBRG = 1666;                         //300 baud rate

       INTCONbits.T0IE = 0;                  //TIMER0 interrupts enabled.
    PIE1bits.RCIE = 1;                      //Enable serial interrupts.
       INTCONbits.INTE = 0;                  //Enable external(powerdown) interrupt.
       INTCONbits.PEIE = 1;
    INTCONbits.GIE = 1;                   //Global interrupts enabled.
}
TRANSMITTER:-
C:
/*------------------------------------------------------------------------------
* Program for:   RF TX.
------------------------------------------------------------------------------*/

#include "INCLUDES.h"

//----------------------------Configuration Bits--------------------------------
__CONFIG(FOSC_INTRC_NOCLKOUT & WDTE_OFF & PWRTE_ON & MCLRE_ON & CP_ON & CPD_ON & BOREN_ON & IESO_OFF & FCMEN_OFF & LVP_OFF);
__CONFIG(BOR4V_BOR21V & WRT_OFF);

int cnt=0,cnt1=0,abc=0;
unsigned char ch[20], str[30];
BOOL query_recd=FALSE;
void InitializeSystem(void);
void WriteStringUSART(unsigned char *);
void interrupt isr(void)
{
   // A=INTCON;
    //if(0xA4)
    if((INTCONbits.T0IF==1)&&(INTCONbits.T0IE==1))
        {
            INTCONbits.T0IF = 0;
            TMR0 = 68;
            cnt1++;
        }
}
void main(void)
{

    InitializeSystem();
 
    __delay_ms(100);
    LED = 0;
    //cnt1=123;
    while(1)
    {
        if (cnt1>=1000)
        {
         
            //cnt1=123;
            sprintf(str,"##AA%03d*",cnt);    //
            UART_485_EN = 1;
            __delay_ms(15);
            WriteStringUSART(str);
            __delay_ms(10);
            LED = 1;
            UART_485_EN = 0;
            //
            cnt++;
            if(cnt>999)
                {
                    cnt = 0;
                }
         
         
            __delay_ms(10);
            LED = 0;
//            __delay_ms(10000);
         
        } 
     
     
        {            
            UART_485_EN = 1;
            __delay_ms(15);
            sprintf(str,"555");
            WriteStringUSART(str);
            __delay_ms(25);
            UART_485_EN = 0;
        }
     
    }
}
void InitializeSystem(void)
{
    OSCCON = 0b01111110;  // INTERNAL 8 MHZ

    OPTION_REG = 0b11000000;
       //             1-------> (RBPU) PORTB pullups are disabled.
       //             -0------> (INTEDG) Interrupt on rising edge.
       //             --0-----> (T0CS) TIMER0 clock source is FOSC/4;
       //             ---0----> (T0SE) Ignored when T0CS is '0'.
       //             ----0---> (PSA) Prescalar is assigned to TIMER0.
       //             -----100> (PS<2:0>) Prescalar is 1:2.

       ANSEL = 0x00;
       ANSELH = 0x00;                        //All pins digital.

       TRISCLOCK_4017 = 0;                   //Output.
       TRISRESET_4017 = 0;                   //Output.
       TRISSH_CP = 0;                        //Output.
       TRISST_CP = 0;                        //Output.
       TRISDATA_74595 = 0;                   //Output.
       TRISSENSOR_IP = 1;                    //Input.
       TRISSW_EXIT = 1;                      //Input.
       TRISEXT_RST_IP = 1;                   //Input.
       TRISPOWERDOWN_IP = 1;                 //Input.

    TRISUART_RX = 1;                        //Necessary for serial communication.
       TRISUART_TX = 1;                        //Necessary for serial communication.
       TRISUART_485_EN = 0;                    //Output.

    TRISLED = 0;

       UART_485_EN = 0;


/*------------------------------------------------------------------------------
* UART is used for RS485 communication.
------------------------------------------------------------------------------*/
       TXSTA = 0b00100100;
       //        0-------> (CSRC) Ignored in asynchronous mode.
       //        -0------> (TX9) Select 8 bit transmission.
       //        --1-----> (TXEN) Enable transmitter.
       //        ---0----> (SYNC) Select asynchronous mode.
       //        ----0---> (SENDB) Sync break transmission completed.
       //        -----1--> (BRGH) High speed baud rate selected.
       //        ------0-> (TRMT) Read only bit.
       //        -------0> (TX9D) Ignored in 8 bit transmission mode.

       BAUDCTL = 0b00000000;
       //          0-------> (ABDOVF) Read only bit.
       //          -0------> (RCIDL) Read only bit.
       //          --0-----> (Unimplemented).
       //          ---0----> (SCKP) Transmit data is non-inverted.
       //          ----0---> (BRG16) Use 8 bit baud rate generator.
       //          -----0--> (Unimplemented).
       //          ------0-> (WUE) Receiver is acting normally.
       //          -------0> (ABDEN) Auto Baud rate detect is disabled.
/*------------------------------------------------------------------------------
* We have selected high speed baud rate. The formula for high speed baud rate
* calculation is:
* Baud Rate = (FOSC/(64(n+1))).
* Where, Baud Rate = Baud Rate in bits/second.(e.g. 9600).
*        FOSC = Oscillator Frequency in Hz.(e.g. 12000000).
*        n = The value to be loaded in the SPBRGH:SPBRG registers.
* According to this formula, n comes to be 78. This value is accomodable in 8
* bits. So, we have taken 8 bit baud rate generator. In this mode, the SPBRGH
* is ignored.
------------------------------------------------------------------------------*/
       RCSTA = 0b10010000;
       //        1-------> (SPEN) Enable serial port.
       //        -0------> (RX9) Select 8 bit transmission.
       //        --0-----> (SREN) Ignored in asynchronous mode.
       //        ---1----> (CREN) Enable receiver.
       //        ----0---> (ADDEN) Disable address detection.
       //        -----0--> (FERR) Read only bit.
       //        ------0-> (OERR) Read only bit.
       //        -------0> (RX9D) Read only bit.

       SPBRG = 207;

    //TMR0         = 68;
       INTCONbits.T0IE = 0;                  //TIMER0 interrupts enabled.
    PIE1bits.RCIE = 0;                    //Enable serial interrupts.
       INTCONbits.INTE = 0;                  //Enable external(powerdown) interrupt.
       INTCONbits.PEIE = 1;
    INTCONbits.GIE = 1;                   //Global interrupts enabled.
}

/*------------------------------------------------------------------------------
* Function:        void WriteStringUSART(unsigned char *ptr_str)
* PreCondition:    Serial transmission must be initialized and configured.
* Input:           Pointer to the string to be transmitted on serial port.
* Output:          None
* Side Effects:    None
* Overview:        This function transmits a string on the serial port.
* Note:            None
------------------------------------------------------------------------------*/
void WriteStringUSART(unsigned char *ptr_str)
{  do
   {  while(TXSTAbits.TRMT==0)         //Check if the transmit buffer is empty.
      {//If transmit buffer is full, remain here and don't send next character.
      }
      TXREG = 'F';
      *ptr_str++;
   }while(*ptr_str);
}
And I am connecting my transmitter and receiver directly to those modules on serial line!
It sounds to me that the transmitters interfere with each other, which "confuse" the receivers.
Yes absolutely, they are appearing on same time at my receiver causing conflict at it so it dont recognize both my signal!
That's where i need help is any option that can make this possible other than designing my own oscillator and filter to modulate data and send it in air or using transceiver making time division with duplex communication!

Mod note: added code tags.
 
Last edited by a moderator:

MikeML

Joined Oct 2, 2009
5,444
The receivers in the inexpensive 433MHz modules are very simple. They use only a single tuned LC super-regenerative detector circuit that resonates at the operating frequency to select which signal they respond to. The bandwidth of the LC resonance curve is several MHz wide, so unfortunately, they respond to ANY low power transmission within +- 2MHz, and can be blocked by a high power transmitter up to +- 20Mhz...

I know this because I am a Ham Radio Operator, and am licensed to transmit up to 1000W anywhere in the 420 to 450Mhz band, which includes the 433MHz signaling devices. If I transmit anywhere between 440 and 450MHz at a power level of 25W, my 433MHz weather station stops receiving its remote sensors...

The reason that these modules are so cheap is because they are so bad...

When the ISM bands (315MHz and 433MHz) were created by the government regulators, continuous transmissions were not allowed, only short bursts with low duty cycles, exactly because of the problem you have discovered. By transmitting continuously, you not only interfere with your own receivers, you are effectively blocking the frequency so that your neighbor's devices (garage door remote operators, remote thermometers, door bells, etc cannot work .

Your only hope is to make very short transmissions (packets) from each transmitter, and to stagger (interlace) the transmissions to that they are sent in the clear. You will occasionally suffer a collision from an unrelated transmitter (your neighbor's equipment) over which you have no control.

It is very instructive to use a sensitive, tuneable narrow-band receiver and listen while tuning around 443.9 MHz. You will be amazed at how many short bursts of transmissions you will receive, especially in a high-density urban neighborhood...
 

nerdegutta

Joined Dec 15, 2009
2,676
You can add a transistor to you transmitter circuits, to activate/ deactivate the transmitter modules, to get the small "burst" @MikeML is talking about.

If I understand your initial post right, you are now trying without the RF modules, and connecting the circuits together with wires. Please check that you connected TX from the transmitter circuit to RX on the receiver circuit.

When that is checked, please show how you got the SPBRG values.

...and upload the schematics...
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
I have to visit a plant tomorrow which is using RF communication for wireless operation.
They are using 6 RF 433 mhz module of following type
http://www.amazon.in/IC2262-2272-Wi...8&qid=1451368189&sr=8-1&keywords=2262/2272+rf
All those 6 modules are separated with each other by 10 meters and TX & RX pair has 2 meter distance here all the 6 modules are set to diff address!
Now the problem is all those modules transmitting signal in continuous fashion not in burst signals, and it is causing problem as module away with 10 meter causing interference in operation with other transmitter!
So i have to decrease range of those modules to reduce its interference, how can i do that???
I removed antenna of transmitter still it has providing sufficient range!!!
I removed that 12V 23A battery and replace it ith simple 9V battery still it is providing that much range!!!
Any one having other solutions?
Can after doing both of above if I make a metal casing to transmitter will it work as that case will suppress signal?
Can i reduce sensitivity of RX?
Any suggestion could solve my problem, so please reply!
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
Posting here as I directed by administrator,
  1. I am not using it in house hold application I am using it in industry which hase a huge area so it wont affect any other person out of industry so it wont affect in violation of rules!
  2. I joined this firm and the plant where this system is implemented is our client, and the system is implemented already so I cant tell my boss to take that whole system back i will change rf use and then change my code and then we will give them back!
  3. I just want to make sure that the transmitter dont interfare with other receiver, I am ready to make artificial obstacles like placing metal shit, not using antenna like this to reduce his range, I know it is not ideal way but I just need to fix that for that system, (I will take care those rules for next system that I will design
  4. Please dont take me in wrong way but I didnt desging that system but I have to fix it in one day so pressure is on me and I can only make 'JUGAAD' on this thats all!
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
I maded those as different threads because those two were my different projects and i dont want some one to misunderstand that both are same 1st post can be fixed in ideal ways where as for last post I need to just make a fix thats all!
 
Last edited:

nerdegutta

Joined Dec 15, 2009
2,676
If the distance is short, use wires. Then tell management that the RF solution is not good, and that you are designing a new system, which will eliminate the errors you are encountering now. The members of this forum will guide you - but you need to elaborate a lot about the project.

My .02c

The transmitters should not be transmitting continuously, as this violates the regulations for this frequency, no matter where they are.
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
It is not actually continuously but it is not in burst pulses form means when he connect switch it is nearly connected for 5 to 8 sec and then he disconnect it means it transmitts signal for max 8 sec but problem is it doesn't make packetizing and all, so is that acceptable?
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
Hi friends,
I am wondering that can NRF24L01 communicate with multiple receivers?
As I read following thing in its datasheet
At 2Mbps the channel occupies a bandwidth wider than the resolution of the RF channel frequency setting. To ensure non-overlapping channels in 2Mbps mode, the channel spacing must be 2MHz or more. At 1Mbps and 250kbps the channel bandwidth is the same or lower than the resolution of the RF frequency. The RF channel frequency is set by the RF_CH register according to the following formula: F0= 2400 + RF_CH [MHz] You must program a transmitter and a receiver with the same RF channel frequency to communicate with each other.
So can I solve my above problem using it?
 

MikeML

Joined Oct 2, 2009
5,444
...
  1. I am not using it in house hold application I am using it in industry which hase a huge area so it wont affect any other person out of industry so it wont affect in violation of rules!
So you are excusing a piss-poor design that is in clear violation of broadcasting rules, even in India...
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
MikeML first of all sorry for my post before!
I didnt mean that, I was just saying my this operation wont interfare or hert any one else near to my firm as my signal will lost his strength with distance and it gives range of 50meter and no RF module opperating till 500 meter in radius!! I dont want to defend my mistake, I will soon switch this technology now, cause I didnt implemented it, it was implemented there now they have problem so they come to our firm to solve that thats all!
 

Thread Starter

yatindeshpande77

Joined Dec 20, 2015
38
Hey guys May be it looks like foolish but as we have to set registers and all for 24l01 do we need separate burner too or are we deal with it using SPI of uC only?
 

ericgibbs

Joined Jan 29, 2010
10,837
Hey guys May be it looks like foolish but as we have to set registers and all for 24l01 do we need separate burner too or are we deal with it using SPI of uC only?
hi,
I do not fully understand your question.?
The NRF 'talks' to the MCU/PIC using SPI.

E
 
Top