A very very very strange problem-Urgent help needed please!


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1

    Exclamation A very very very strange problem-Urgent help needed please!

    Hi, I am having RF modules operating a switch only when button is pressed AND as long as the button is pressed on the Tx. I am using 12F635.
    Problem is that the PIC LATCHES when I go beyond lets say 5 meters. When I come near and press the second button on the Tx the latch opens and it starts behaving fine.
    RF Modules have a range of greater than 100 Meters. I can't figure out WHY is this happening?
    I need urgent help on this please. Thanks
    Code:
    main:
    Receiver code
    serin gpio.2,N2400,100,stop,["p34"],b
    if b=24 then gpio.1=1
    if b=54 then gpio.0=1
    goto main
    
    stop:
    gpio.1=0
    gpio.0=0
    goto main
    
    Transmitter code
    main:
    if gpio.0=1 then
    serout gpio.5,N2400,["p34",54] : pause 5 : low gpio.0 :  endif
    if gpio.1=1 then
    serout gpio.5,N2400,["p34",24] : pause 5 : low gpio.1 : endif

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    These are actually Data certified 2400 Baud Transmitter/Receiver Modules, or they're just plain junk Tx/Rx modules whereby you are simply keying the carrier at 2400 Baud and hoping that the receiver will attempt to replicate what's happening at the Transmitter once the signal dips into noise and the other rubbish floating about?

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    Some of our R/C sets do not dare to work when too close to the transmitter ...

    Saturated HF input stage of the receiver ... locked decoder.

    = oversensitive devices ...

    Low priced receivers with a "simply engineered AGC Stage ...

    Alain

    PS:
    Urgent help needed please
    I do not know why, but these words always make me laugh ... like the word " problem " ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    If your transmitter switch pins are inputs, and a switch press applies Vcc to a pin, why are
    you flipping these pins to outputs after a switch press and setting them at ground?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5


    Did you find this post helpful? Yes | No

    Exclamation

    Quote Originally Posted by Bruce View Post
    If your transmitter switch pins are inputs, and a switch press applies Vcc to a pin, why are
    you flipping these pins to outputs after a switch press and setting them at ground?
    Point noted, Thanks. I will remove "low..." statements from the code.

    Alain: Do you mean problem is with RF Link? as they do work fine as per my post above.

    My config Fuses are set as follows:
    WDT_ON
    PWRTC_ON
    MCLR_OFF
    BOD_ON
    IESO_OFF
    INT_OSC-NOCLKOUT

    and other configuration is:
    intcon=0
    cmcon0=7
    TRISIO=%001100
    GPIO=0

    I have checked that with my toggling switch, once you go out of range receiver PIC does not respond as soon as you walk within range it starts working fine.

    BUT, with this momentary design, after the PIC latches I checked the voltage on Rx pin and it is fluctuating as other signals are in the air as well. I also found out that once PIC latches there could be one sure shot way of making it work again, which is power reset and the other not so sure shot way is press the second button on the transmitter which sends a different code. BUT again this hangs the PIC as soon as you go few meters away.
    Last edited by FromTheCockpit; - 5th November 2009 at 17:53.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Be careful that the module you select has a data in = data out feature. Some low cost modules need to have a "balanced" data stream in order to work well.

    One of the symptoms is reduced range, the closer you are the more likely the data makes it through the demod stage. The further out you go the more you get DC offsets that creep up and cause the demod to hold states longer causing bit distortion. You should be able to see this on a scope.....latch the tx in continuous transmit at 30m and look at the output of the RX.

    Nick

  7. #7


    Did you find this post helpful? Yes | No

    Exclamation

    Quote Originally Posted by Macgman2000 View Post
    Be careful that the module you select has a data in = data out feature. Some low cost modules need to have a "balanced" data stream in order to work well.

    One of the symptoms is reduced range, the closer you are the more likely the data makes it through the demod stage. The further out you go the more you get DC offsets that creep up and cause the demod to hold states longer causing bit distortion. You should be able to see this on a scope.....latch the tx in continuous transmit at 30m and look at the output of the RX.

    Nick
    Thanks, Reading your post I am assuming that if I make the following changes to the code, it will help to balance the data stream and allow sufficient time to the receiver to process previous data before new one is thrown in:

    receiver code:
    main:
    serin gpio.2,N2400,250,stop,["p34"],b
    if b=24 then gpio.1=1
    if b=54 then gpio.0=1
    goto main

    stop:
    gpio.1=0
    gpio.0=0
    goto main

    Transmitter code
    main:
    if gpio.0=1 then
    serout gpio.5,N2400,["p34",54] : pause 50 : endif
    if gpio.1=1 then
    serout gpio.5,N2400,["p34",24] : pause 50 : endif

    Have I understood the point right?

  8. #8


    Did you find this post helpful? Yes | No

    Exclamation

    Quote Originally Posted by Melanie View Post
    These are actually Data certified 2400 Baud Transmitter/Receiver Modules, or they're just plain junk Tx/Rx modules whereby you are simply keying the carrier at 2400 Baud and hoping that the receiver will attempt to replicate what's happening at the Transmitter once the signal dips into noise and the other rubbish floating about?
    They are just normal Rx/Tx with stated range upto 150 Meters. They actually work very well upto 100 Meters when I use it for toggling pins high or low (my other kind of switch- Tx button pressed once, receiver switches on somthing, Tx switch pressed again - receiver switches it off) at the receiver. But dont know why the receiver PIC latches up in this kind I am making where it should only stay on untill TX is pressed.

Similar Threads

  1. strange serout2 problem
    By KaanInal in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th January 2010, 09:33
  2. PIC stop responding - Strange Problem!
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st August 2009, 14:06
  3. Strange I2C problem (and solution)
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2008, 19:14
  4. Strange problem with Serin/Serout on 16F628
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 22nd August 2008, 00:16
  5. strange problem 12f675
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th July 2007, 13:47

Members who have read this thread : 0

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