problem with RF receiver


Closed Thread
Results 1 to 14 of 14
  1. #1
    nanami7702002's Avatar
    nanami7702002 Guest

    Default problem with RF receiver

    i have read a lot of discussions on "serin2" statements in this forum. i guess most people have come acrossed with the timeout problem in "serin2" . my project is simple as this: a 2*16 LCD is to work as a real time clock, besides, it also can receive a signal (a decimal number) from "DETECT" output of RF receiver and display the number on LCD as well as the number of times of the signal being received.

    while i was using "SERIN2", the program was just hanging there without updating the real time clock. after getting some hints from the forum, i tried to put "SERIN2" in the timer1 interrupt(set to 100ms). this had really solved the " static" clock problem. however, "listening "process in every 100 ms made the # of time of signal being received not accurate.i know it was because of the noise at the "DETECT" output.
    pls give me a hand to this. this question needs solving immediately. for all of the professions like u, it is just a piece of chicken. but for me, i am already at the end of the tether.

    ps: 16f876 with osc at 20MHZ

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Lightbulb

    mmm, most than often you can solve your RF problem playing with Baudrate.

    wich kind of RF module are you using ?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    nanami7702002

    your code and schematic would help us to help you.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  4. #4
    nanami7702002's Avatar
    nanami7702002 Guest


    Did you find this post helpful? Yes | No

    Default

    i'm using FMRX1, 7 LEADS radiometrix receiver.
    The transmitter is the R.F solutions rage of FM radiometrix TRANSMITTER. they r in a pair
    Last edited by nanami7702002; - 31st January 2005 at 04:33.

  5. #5
    nanami7702002's Avatar
    nanami7702002 Guest


    Did you find this post helpful? Yes | No

    Default data rate

    according to the module, the high data rate is up to 5kbps. but when i tried to adjust the baudrate higher, the receiver was not able to reveive
    regarding to the schematic diagram. the circuit itself is not a complicated one. PORTC of the PIC is connected to the LCD datainput. RF "detect" is fed into PORTB.7
    Last edited by nanami7702002; - 31st January 2005 at 04:32.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    What about if you try slower baudrate... as slow as you can ? simple thought here because i solve many of my noise problem with that...

    AND NOW let's shrink this part of your code
    Code:
    '*****************************************
    	DISABLE
    
    TIMER_INTERRUPT:
    	PIR1.0 = 0  
    	TMR1TEMP.LOWBYTE = TMR1L
    	TMR1TEMP.HIGHBYTE = TMR1H
    	TMR1SET=TIMER1PRE+TMR1TEMP
    	TMR1L=TMR1SET.LOWBYTE
    	TMR1H=TMR1SET.HIGHBYTE
    
    	LCDOUT	$FE,$C0
    	IF DAY = 1 THEN
            LCDOUT	"MON"
    	ENDIF
    	IF DAY = 2 THEN
            LCDOUT	"TUE" 
    	ENDIF
    	IF DAY = 3 THEN
            LCDOUT	"WED" 
    	ENDIF
    	IF DAY = 4 THEN
            LCDOUT	"THU" 
    	ENDIF
    	IF DAY = 5 THEN
            LCDOUT	"FRI" 
    	ENDIF
    	IF DAY = 6 THEN
            LCDOUT	"SAT" 
    	ENDIF
    	IF DAY = 7 THEN
            LCDOUT	"SUN" 
    	ENDIF
    	LCDOUT $FE,$C3
    	LCDOUT	#H2
    	LCDOUT 	#H1
    	LCDOUT 	":"
    	LCDOUT 	#M2
    	LCDOUT 	#M1
    	LCDOUT 	":"
    	LCDOUT 	#S2
    	LCDOUT 	#S1
    	LCDOUT $FE,$CC
    	LCDOUT  #REC
    	LCDOUT  " "
    	LCDOUT 	#T2
    	LCDOUT 	#T1
    
    	RESUME
    	ENABLE
    it has to work but gives you a load of delay IMO.

    this is my own version
    Code:
    '*****************************************
    	DISABLE
    
    TIMER_INTERRUPT:
    	PIR1.0 = 0  
    	TMR1TEMP.LOWBYTE = TMR1L
    	TMR1TEMP.HIGHBYTE = TMR1H
    	TMR1SET=TIMER1PRE+TMR1TEMP
    	TMR1L=TMR1SET.LOWBYTE
    	TMR1H=TMR1SET.HIGHBYTE
    
    	LCDOUT	$FE,$C0
    	select case DAY
    	       case 1
                    LCDOUT	"MON"
               case 2
                    LCDOUT	"TUE" 
               case 3
                    LCDOUT	"WED" 
               case 4
                    LCDOUT	"THU" 
               case 5
                    LCDOUT	"FRI" 
               case 6
                    LCDOUT	"SAT" 
               case 7
                    LCDOUT	"SUN" 
        end select 
    	LCDOUT $FE,$C3,#H2,#H1,":",#M2,#M1,":",#S2,#S1
    	LCDOUT $FE,$CC,#REC," ",#T2,#T1
    
    	RESUME
    	ENABLE
    and probably LCDOUT in one shot can also work
    Code:
    LCDOUT $FE,$C3,#H2,#H1,":",#M2,#M1,":",#S2,#S1,_
           $FE,$CC,#REC," ",#T2,#T1
    Last edited by mister_e; - 31st January 2005 at 03:36.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    one other thing about this part...
    Code:
    PIR1.0 = 0  
    TMR1TEMP.LOWBYTE = TMR1L
    TMR1TEMP.HIGHBYTE = TMR1H
    TMR1SET=TIMER1PRE+TMR1TEMP
    TMR1L=TMR1SET.LOWBYTE
    TMR1H=TMR1SET.HIGHBYTE
    I always feel safer to stop the timer before reload it
    Code:
    T1CON.0=0 'stop timer1
    PIR1.0 = 0  
    TMR1TEMP.LOWBYTE = TMR1L
    TMR1TEMP.HIGHBYTE = TMR1H
    TMR1SET=TIMER1PRE+TMR1TEMP
    TMR1L=TMR1SET.LOWBYTE
    TMR1H=TMR1SET.HIGHBYTE
    T1CON.0=1 'start timer1
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    and a last one... tired to heard me ?!?!?

    Have you use the recommended circuit?!? I mean did you place a resistor in serie on the supply pin + capacitor ?!?

    and, i'm sure you did, 47K to VCC on pin 3 to always unmute the device?
    Last edited by mister_e; - 31st January 2005 at 03:46.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Still me....

    I have to apologize SERIN2 with 3313 give 300 bauds... you can't go slower... my fault for the very first time

    I know that SERIN2 will place the used pin to input automatic but it can be safe to set TRIS the right way... in your case TRISB=0

    lets say we change it to TRISB=$80.

    OK now i shut my mouth untill you post your result.

    Cheers!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    nanami7702002's Avatar
    nanami7702002 Guest


    Did you find this post helpful? Yes | No

    Default

    NO. sorry to disapoint u . i did not connect the aditional rsistor to the supply. the supply is a single +5v .
    I fOUND problem with the format of the code, i uploded it again.for those who have no problem reading it, pls ignore this
    Attached Files Attached Files
    Last edited by nanami7702002; - 31st January 2005 at 05:11.

  11. #11
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    NO. sorry to disapoint u . i did not connect the aditional rsistor to the supply. the supply is a single +5v .
    they recommend a 10ohm + 10-47uF... you must install those to provide a better noise rejection from/to supply line. That's really important. And the other one is to set the device to normal operation...Un-Muted as they says.

    If somebody here can second me on that... i'll appreciate.


    PS... your previous attachement is blank... as now
    Last edited by mister_e; - 31st January 2005 at 04:52.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  12. #12
    nanami7702002's Avatar
    nanami7702002 Guest


    Did you find this post helpful? Yes | No

    Default WHY IS IT SO DIFFFICULT

    as u said, i connected a 47kohm resistor to pin 3 before the power supply. but i am not sure how to connect the power SUPPLY-filtering part(10ohm+10uf). anyway, i tried putting them in series with the power supply and in parallel and no matter what kind of design.
    actually, now all the circuits(transmitter part and receiver part) r patched up on the same breadboard. and the antenna is just a jumper wire. r these the factors of noise? i think so. but i have already fabricated the printed circuit board(PCB). as long as i am on the right track, there should be no problem when they r tested on the PCB.
    oh, i also want to clarify that i am taking the output from pin 7 not pin 6. pin 6 is not used at all.
    maybe there r some further problems with my receiver circuit, i describe it as below:
    pin 1 is connected to a jumper wire(as antenna);
    pin 2 and pin 4 are fed to the GRound
    pin 3 is connected with a 47k resistor to the +5 vpower supply;
    pin 5 is connected directly to the +5v power supply
    pin 6 is not connected
    pin 7 is the connected the PORTB.7
    transmitter part will be posted upon request.
    why is it so difficult to meet the requirement? i just want the LCD to show signal it received and no. of times.
    and the signal is just a binary digit(2-8). ONLY!!!!!!!!!

  13. #13
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    try to remove rf stuff and try it directly first.


    the 10 Ohm must be in serie with supply line. The capacitor must be between the supply line of the rf device and ground.

    I'm not sure that's a good practice to have everything on the same board... looks like a big amount of signal is creating something like *standing waves*

    If you can send both code for emmiter and receiver it will be handy to help you on that.

    don't give up!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  14. #14
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Sorry guys,

    If I understand the problem correctly
    you are still struggling with the RF connection
    and I think you are on a wrong track.

    presuming you have wired up the hardware correctly
    it is a matter of Manchester Encoding the Data
    before sending it to the Transmitter using SEROUT / SEROUT2 / HERROUT
    (all 3 versions should work)

    BTW
    A Breadboard is not the best choice for this kind of application!


    See the following Threads:

    http://www.picbasic.co.uk/forum/show...ght=manchester

    http://www.picbasic.co.uk/forum/show...ght=manchester

    I'm sure you will have better results by "balancing" you RF-Devices.
    Last edited by NavMicroSystems; - 31st January 2005 at 22:02.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. Generic RF Receiver
    By dhouston in forum Code Examples
    Replies: 0
    Last Post: - 8th September 2009, 14:35
  2. problem with sending data using RF module
    By rano_zen06 in forum mel PIC BASIC Pro
    Replies: 51
    Last Post: - 10th April 2008, 17:08
  3. rf problem
    By -Dan- in forum General
    Replies: 9
    Last Post: - 20th November 2007, 16:05
  4. Problem with manchester code for RF
    By Dhanushka in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 6th August 2007, 11:46
  5. a problem RF Signal with PULSIN
    By muskut in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd July 2005, 16:42

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts