noise at 433MHz Rx module

Thread Starter

onlyvinod56

Joined Oct 14, 2008
369
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.
 

Attachments

Thread Starter

onlyvinod56

Joined Oct 14, 2008
369
How about some source code?
Tx code
Rich (BB code):
#include <REGX51.H>
void main()
{
int i,j,sig,x=0,a[9]={1,2,4,8,16,32,64,128};	 // signal to be transmitted.

TMOD=0x20;	 // selecting Timer 1, with mode 8bit auto reload.
TH1=0xFA;	 // setting baud rate = 4800
SCON=0x50;	
TR1=1;	 	// starting the timer
while(1)	 
{
sig=a[x];
SBUF=sig;
while(TI==0);
TI=0;
x++;
if(x==8)
x=0;
for(i=0;i<200;i++)
for(j=0;j<1000;j++);
}
}


Rx code
Rich (BB code):
#include <AT89X51.H>
sbit rs=P1^0;
sbit rw=P1^1;
sbit en=P1^2;

void lcdcmd(char value);
void lcddata(char value);

void delay(unsigned int count)  // Function to provide time delay in msec.
{
int i,j;
for(i=0;i<count;i++)
  for(j=0;j<1275;j++);
}

void main()
{
int a,m,r,a1,p,rxdata;
rw=0;	 // this variable recieves data
TMOD=0x20;	 // selecting Timer 1, with mode 8bit auto reload.
TH1=0xFA;	 // setting baud rate = 4800
SCON=0x50;
TR1=1;
while(1)
{
while(RI==0);	 // this line will wait for the data to come
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
RI=0;	 // clearing the flag.

p=rxdata; 
a=p/100;
a1=p%100;
m=a1/10;
r=a1%10;

lcdcmd(0x38);
lcdcmd(0x0e);
lcdcmd(0x01);
delay(1);
lcddata(a+0x30);
delay(1);
lcddata(m+0x30);
delay(1);
lcddata(r+0x30);
delay(1);
}}

void lcdcmd(char value)
{
P0=value;
rs=0;
en=1;
delay(1);
en=0;
}
void lcddata(char value)
{
P0=value;
rs=1;
en=1;
delay(1);
en=0;
}
 

nerdegutta

Joined Dec 15, 2009
2,684
Read THE_RBs page. He has a section:

[SIZE=-1][SIZE=+1]Synchronising bytes[/SIZE]

As the first byte or two might be corrupted, the receiving USART might synchronise badly, and then all following bytes would not be correctly decoded.

A common way to get around this is to keep the first few bytes very short (with minimal 0 bits), and combined with the few extra spare bits between each byte this allows the maximum time to re-synchronise on each following byte; [/SIZE]
Your issue could be solved if you synchronise the receiver with the transmitter.

Check out my web page here;
http://www.romanblack.com/RF/cheapRFmodules.htm

It shows some info on connecting the USARTS directly to the RX and TX modules. :)
Great work, THE_RB!
 
Top