Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RF Link Transmitter - 434MHz Communication Help

Status
Not open for further replies.

hssn601

Member
This code works fine with wire i want to know if i replace wire with
https://www.sparkfun.com/products/8946
RF Transmitter and reciver than what i have to do?
will it works fine if i simply connect TX pin to RF data in and and RX to RF data out ??
or encoding scheme is needed?
in sample program they did not used any encoding scheme
https://www.electro-tech-online.com/custompdfs/2011/07/KLP_Walkthrough.pdf

i am using CCS Compiler with 16F877a uc.
Code:
//transmitter

printf(lcd_putc,"$Hassan");


//recicver

while(getch() != '$');
for(a=0;a<6;a++)
{
cmd[a]=getch();
}
 
Last edited:
It won't work. You'll need a coding scheme like Manchester Coding. I have the same modules and tried it already.
 
I have used these RF modules before .They work satisfactorily for me without encoding when sending small messages.
But I used to send messages again and again from the transmitter for around 50 times.
When when I sent just one time ,the receiver used to skip the message many a times.
As in the first few receptions would be just some garbage.
So I added a "starting 3 byte" to kind of synchronize communication and remove this garbage phenomenon and worked quite well..
Here is the cut-out for the code I generally use:
For TRANSMITTER:

for(i=0;i<50;i++)
{
Send_Usart('A');
Send_Usart('B');
Send_Usart('C');
//now you can send whatever u want
Send_Usart(i);
//I am sending the loop variable i so that you can see for yourself in which iteration it receives right data
}


For RECEIVER:
//say I know I will receive 10 bytes of data excluding starting code"ABC"
while(1)
{
temp=Get_Usart();
if(temp=='A')
{
temp=Get_Usart();
if(temp=='B')
{
temp=Get_Usart();
if(temp=='C')
{
for(i=0;i<10;i++)
{
rec=Get_Usart();
}
break;
}
}
}
}

//rec is an arrayy in which i store correct received data
 
Last edited:
Even if A,B,C, were sent correctly, the next 10 characters directly after could be garbage though.
 
Last edited:
next could be garbage ...but it hasnt happened ..as in untill there is some other transmitter operating ..chances are less..as of my experience..

Anyways you can use HT12E and HT12D with your RF transmitter,receiver module and develop a good link as it uses good endoding.You can get the schematics from botskool.com
**broken link removed**

My friend d****k uses same and he told me today that he gets perfect transmission -reception ,on 1 transmission itself..

But anyways if you dont want to buy ht12e and ht12d you can use my technique as it has worked good for me both at IIT madras techfest Shaastra and IIT Karagpur techfest Kshitij(just for giving you affirmaation that the transmission technique which I told you worked on national level techfest robotics competitions)..btw d****k 's technique was also tested during IIT Madras techfest Shaastra and it worked well.
 
Last edited:
Well you need to implement some coding to check whether the data is correct or not. See Parity Bit:

https://en.wikipedia.org/wiki/Error_detection_and_correction

Also, the thing with these links, you need to send a bit of useless data to get the reciever to recognize signal from noise.

So like send "Hello", and then your data right after. That will help a LOT. I like to call it a 'warm-up' period..
 
Last edited:
It's interesting. I've used similar LIPDs for simple data transfer without any sort of encoding and they have worked fine.
Occasionally they have an error, but if the TX and RX are running on the bench together there is never a problem.

Those units like most use ASK or OOK, which should not suffer from any bit errors in the physical layer unless there is noise.
Probably from another nearby lipd. In a PSK system a good signal can suffer from phase errors if it is not synchronised.
To overcome this problem a scheme like manchester encoding is used. But it shouldn't be necessary for these devices.
As mentioned, simple error checking like parity should be enough to check bytes, or a CRC to check strings.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top