noise at 433MHz Rx module

Discussion in 'The Projects Forum' started by onlyvinod56, Apr 3, 2014.

  1. onlyvinod56

    Thread Starter Active Member

    Oct 14, 2008
    362
    1
    Hello,
    I made a microcontroller based TX Rx set.
    I Wrote a code which sends an array [0,2,4,6,8,16,32,64,128] through TX pin. I connected a 16×2 lcd to the receiver microcontroller. First i tested with wired communication and it worked perfectly.
    But using the 433MHz Tx Rx pair, the lcd keeps on displaying random numbers from 000 to 255.

    Again i made the wired communication and checked the link signal in oscilloscope which i found a periodically high to low going signal (90% high and 10% low).

    I checked the same with Tx Rx pair, I got the same 90% high 10% low periodic signals at TX data pin. But at Rx data pin, an irregular period pulse train is observed.

    How can i resolve this. I checked the experiment with two different Tx Rx pairs and even on breadboard with switch on Tx side and led on Rx side. But no result. In almost 30-40 attempts, i got the result once but two/ three values are missing from the array.
     
  2. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
    How about some source code?
     
  3. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
  4. onlyvinod56

    Thread Starter Active Member

    Oct 14, 2008
    362
    1
    Tx code
    Code ( (Unknown Language)):
    1. #include <REGX51.H>
    2. void main()
    3. {
    4. int i,j,sig,x=0,a[9]={1,2,4,8,16,32,64,128};     // signal to be transmitted.
    5.  
    6. TMOD=0x20;   // selecting Timer 1, with mode 8bit auto reload.
    7. TH1=0xFA;    // setting baud rate = 4800
    8. SCON=0x50; 
    9. TR1=1;      // starting the timer
    10. while(1)     
    11. {
    12. sig=a[x];
    13. SBUF=sig;
    14. while(TI==0);
    15. TI=0;
    16. x++;
    17. if(x==8)
    18. x=0;
    19. for(i=0;i<200;i++)
    20. for(j=0;j<1000;j++);
    21. }
    22. }


    Rx code
    Code ( (Unknown Language)):
    1. #include <AT89X51.H>
    2. sbit rs=P1^0;
    3. sbit rw=P1^1;
    4. sbit en=P1^2;
    5.  
    6. void lcdcmd(char value);
    7. void lcddata(char value);
    8.  
    9. void delay(unsigned int count)  // Function to provide time delay in msec.
    10. {
    11. int i,j;
    12. for(i=0;i<count;i++)
    13.   for(j=0;j<1275;j++);
    14. }
    15.  
    16. void main()
    17. {
    18. int a,m,r,a1,p,rxdata;
    19. rw=0;    // this variable recieves data
    20. TMOD=0x20;   // selecting Timer 1, with mode 8bit auto reload.
    21. TH1=0xFA;    // setting baud rate = 4800
    22. SCON=0x50;
    23. TR1=1;
    24. while(1)
    25. {
    26. while(RI==0);    // this line will wait for the data to come
    27. rxdata=SBUF;     // as soon as the data is recieved its tranferred to a variable so that the next variable doesnt overwrite the data just receieved
    28. RI=0;    // clearing the flag.
    29.  
    30. p=rxdata;
    31. a=p/100;
    32. a1=p%100;
    33. m=a1/10;
    34. r=a1%10;
    35.  
    36. lcdcmd(0x38);
    37. lcdcmd(0x0e);
    38. lcdcmd(0x01);
    39. delay(1);
    40. lcddata(a+0x30);
    41. delay(1);
    42. lcddata(m+0x30);
    43. delay(1);
    44. lcddata(r+0x30);
    45. delay(1);
    46. }}
    47.  
    48. void lcdcmd(char value)
    49. {
    50. P0=value;
    51. rs=0;
    52. en=1;
    53. delay(1);
    54. en=0;
    55. }
    56. void lcddata(char value)
    57. {
    58. P0=value;
    59. rs=1;
    60. en=1;
    61. delay(1);
    62. en=0;
    63. }
    64.  
     
  5. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
    Read THE_RBs page. He has a section:

    Your issue could be solved if you synchronise the receiver with the transmitter.

    Great work, THE_RB!
     
    THE_RB likes this.
Loading...