Need help in RF module problem

Bluetooth, XBee, RF......

Need help in RF module problem

Postby cheehao » Tue Apr 05, 2011 5:21 pm

Hi all,

I am a final year student and i am using cytron product 315MHz transmitter and receiver and 2400 baud rate to proceed my final year project. I am also using PIC16F877A in this project.

The problem i face is...

- In the part of transmitter is fine, it i will continuous sent signal...i check it on oscilloscope the "HIGH" of rectangular waveform is 4.8V and "LOW" is almost 0V...when i sent a signal by pressing button and the waveform is pretty nice for what i want...so I think it is function well.

- In the part of receiver, what receiver receive is the "HIGH" of waveform is 4.6V but "LOW" is not 0V but 3.6V. Of course, the wave shape and frequency is the same no matter what type of signal i sent..So anyone here know what is the problem of this and any method can help me solve it?

I have reference the cytron design and almost same with PR16, so I think this is the problem cause I cant get the result i wan at the receiver side (example light on a LED when pressed a button in transmitter side), since when i was directly connected UART pin (RC6) at tx side to uart pin (RC7) at rx side it is work what i want.

I am very appreciate to anyone can help me to solve it...because i was rushing my project in this month..THANK! ;)
cheehao
Freshie
 
Posts: 4
Joined: Tue Apr 05, 2011 4:57 pm

Re: Need help in RF module problem

Postby shahrul » Tue Apr 05, 2011 6:28 pm

What UART data you send?
What I do is just send 0xFF, then send the data. This is my example Low Cost RF Module.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: Need help in RF module problem

Postby cheehao » Tue Apr 05, 2011 9:08 pm

Hi there are my simple coding for tx and rx...
You will understand after go through it ^^
Thank in advance!


TX
CODE: SELECT_ALL_CODE
unsigned char ch;
unsigned int adc_rd, j;

void main()
{


TRISB=0;
PORTB=0;
TRISC.F7=1;
TRISC.F6=0;
TRISD=0b11111111;
PORTD=0;

Usart_Init(2400);

while(1)
{


        if (portb.f0 == 1)     //DC Motor
        {
        Usart_Write(1);
        }
        else
        {
        Usart_Write(0);
        }
}
}



RX
CODE: SELECT_ALL_CODE
unsigned int j;

void initmain()
{

TRISA = 0b11111111;
PORTA = 0;
TRISB = 0;
PORTB = 0;
TRISC.F7=1;
TRISC.F6=0;
TRISD = 0;
PORTD = 0;

Usart_Init(2400);
                           }
                           
            void led_on()
            {
            portb.f0=1 ;
                             }


void main()
{
initmain();

  while(1)
  {
  if (Usart_Data_Ready())
  {
  j = Usart_Read();

  if (j == 1)                        //DC Motor
  {
    led_on();

  }

  else
  {

  PORTB = 0b00000000;

  }
  }
  }
}
cheehao
Freshie
 
Posts: 4
Joined: Tue Apr 05, 2011 4:57 pm

Re: Need help in RF module problem

Postby shahrul » Tue Apr 05, 2011 9:49 pm

Ok, that's is simple UART send, just send '0' and '1'. Then the receiver just compare between these value. If the LED not response succesfully, I think that's is hardware problem.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: Need help in RF module problem

Postby cheehao » Tue Apr 05, 2011 10:23 pm

ya...just sent "0" and "1"...

erm...but if was hardware problem...why when i directly connected from uart pin to uart pin there will work but through the RF module then cannot...somemore the wave shape when "HIGH" is 4.6V and "LOW" is 3.6V ? It is different with what the tx waveform being sent ( "HIGH" is 4.8V and "LOW" is 0V)...

When i check it out with my circuit...It is correct since i was using cytron development board..
so can u help me point out the problem??

Thank...
cheehao
Freshie
 
Posts: 4
Joined: Tue Apr 05, 2011 4:57 pm

Re: Need help in RF module problem

Postby yonghui » Wed Apr 06, 2011 5:38 pm

hi,

can post a picture of the hardware?

thanks

yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Need help in RF module problem

Postby cheehao » Wed Apr 06, 2011 7:31 pm

Hi,
sry for the no clear picture...since i am using development board..so i just doing a simple connection for an led only..

i can explain to u if u have question on it...

TX
DSC03460.JPG
TX


RX
DSC03461.JPG
RX
cheehao
Freshie
 
Posts: 4
Joined: Tue Apr 05, 2011 4:57 pm

Re: Need help in RF module problem

Postby fuad » Thu Apr 07, 2011 4:31 pm

fuad 2011-04-06 23:37:14
i has buy 2XBee starter kit and 2 XBee pro module. the starter kit just to make sure my coding is right and i can transmit and receive between 2 of them. my project is build coding and board for the XBee pro module... for the coding, it has been done...but circuit xbee pro, i can't do it...i has dl some schematic and testing them, but until now, i still can't set the MY and DL address. please help me about the schematic. i has serach many source and till now i can find the right circuit to set my MY and DL address.
Admin Reply :
hi, setting the MY and DL address is from the software, not circuit. Anyway please do discuss in our technical forum as this section is for short inquiry, thanks :)

ok, i know it was set from the software...but i just bought XBee Pro module, only the module...i need a circuit to connect it to pc then i can use the software to set it...i need to use to transmit and receive data..but till now, i cannot built the board...
fuad
Greenhorn
 
Posts: 3
Joined: Fri Jan 21, 2011 1:16 pm

Re: Need help in RF module problem

Postby ober » Thu Apr 07, 2011 10:56 pm

fuad,please open a new topic to discuss this. You actually posted under RF module problem where forumers are discussing about RF module. Your question is about interface with XBee.

You can also search for solution and discussion from previous topics, there are plenty of discussion about XBee interface and recommendations from forumers.
maybe this can help?
http://forum.cytron.com.my/viewtopic.php?f=10&t=10905
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Need help in RF module problem

Postby andyxin » Tue Jun 28, 2011 3:46 pm

Hi,

can i know how's the coding in Usart_Write() function in Tx and also Usart_Read() & Usart_Data_Ready() in Rx for the simple coding that attach on the reply there?
Because i have some problems in programming. Thx.

:)
andyxin
Greenhorn
 
Posts: 2
Joined: Tue Jun 28, 2011 3:39 pm


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 18 guests