RF Transmitter/Reciver - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 76 of 76
  1. #41
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    From page 3:
    http://www.parallax.com/Portals/0/Do...ceive-v1.0.pdf

    ===========================
    Basic Stamp 1:

    PULSOUT 1, 300

    300 = 300 * 10 µs = 3000 µs
    ===========================
    Basic Stamp 2:

    PULSOUT 8, 1200

    1200 = 1200 * 2 µs = 2400 µs
    ===========================

    See page 339 of the Basic Stamp manual:
    http://www.parallax.com/dl/docs/prod...icStampMan.pdf

    Best regards,

    Luciano

  2. #42
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    But whats is the value for my PIC16F628? how do i calculate that valu?

  3. #43
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    The synchronization is for the microcontroller connected to the receiver.
    The duration of the synchronization pulse depends from the used baud rate.

    Here is the duration of a frame at 1200 baud.

    (Click to enlarge the picture).

    Make sure you use 8 data bits, no parity, one stop bit.
    Must be INVERTED. (See PicBasic manual).

    Best regards,

    Luciano

  4. #44
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    You can get more noise "filtering" by making your pre-amble more unique. Right now you are using 9, which is 0b00001001. So anytime the receiver puts this out the PIC will display the next character. You can see (in particular if you look at David's plots) that you can almost guarantee the receiver will output this at any particular time. That is, a noisy receiver will output ones randomly.

    So if you make your pre-amble longer and more "unique" you gain some advantage over the noisy output of the receiver.

    Say:
    Code:
    SEROUT TransmitterPIN,T1200,[Synk,Synk,Synk,Synk,Synk,Synk,42590,Counter]
    and:
    Code:
    SERIN ReciverPIN,T1200,[42590],Counter
    This of course is in addition to all that has been said here. The RSSI output is a nifty way to create a "listen to me" or "wake-up" signal, and FM-based systems (e.g. FSK) modules have an inherent advantage over noise. However you can get the AM-based (e.g. ASK) modules to work ok if you understand the limitations and caveats.

  5. #45
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,


    The Parallax example:

    http://www.parallax.com/Portals/0/Do...ceive-v1.0.pdf

    From page 6:

    '===TX CODE ===========================
    PULSOUT 8, 1200 'Sync pulse for the receiver
    SEROUT 8, 16468, [ "!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE ]
    '======================================

    '===RX CODE ==========================
    SERIN 7, 16468, [WAIT("!"), x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
    '======================================


    In the Parallax example, SERIN waits to receive an explanation mark "!".
    This is called a "qualifier" in the PicBasic manual. If the character
    received does not match the qualifier "!", the qualification process starts over.
    Once the qualifier is satisfied, SERIN begins storing data in the variables
    we have specified.

    The synchronization pulse (PULSEOUT) triggers the qualification process of
    SERIN and makes sure that SERIN will be ready to receive the next character
    which is "!" in the Parallax example. With PULSEOUT we simulate a character
    NULL. (NULL = Binary 0, inverted logic is used).

    * * *

    When a logic "1" is present on the DATA line and the PDN line is high, then
    the power amplifier will be activated and the carrier frequency will be sent
    to the antenna. When a logic "0" is present on the DATA line and the PDN line
    is high, the power amplifier is deactivated and the carrier is fully suppressed.

    When "Inverted logic" is used, then there is no RF carrier when the data line
    is idle. Note that the inverted logic is not a must, but if you don't use it, the
    code will be more complicated and you will have to use an I/O pin of the PIC
    in order to control the PDN line of the transmitter.


    Best regards,

    Luciano
    Last edited by Luciano; - 16th February 2008 at 10:25.

  6. #46
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    When "Inverted logic" is used, then there is no RF carrier when the data line
    is idle. Note that the inverted logic is not a must, but if you don't use it, the
    code will be more complicated and you will have to use an I/O pin of the PIC
    in order to control the PDN line of the transmitter.
    When i trying to send in inverted mode whit SERIN (N2400 insted of T2400) the reciver doest work very well it misses many numbers.

    If we look on the BS2 sample they using this
    SEROUT TransmitterPIN, 84, [ "!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE ]
    Shold i try to use SERIN2 insted like this?
    SEROUT2 TransmitterPIN, 16468, ["!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]

  7. #47
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Can you post the results of the RSSI test?

    http://www.picbasic.co.uk/forum/show...8&postcount=38

    If you do so we will know if somebody else is transmitting on the same frequency.

    Best regards,

    Luciano

  8. #48
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    Step 1: Connect a digital voltmeter to the RSSI PIN of the receiver.
    (Make sure the multimeter is set to DC volt and that you measure from the RSSI PIN to GND).
    Power on the receiver and make sure the transmitter is powered off.
    Q1: What voltage do you get on the RSSI PIN of the receiver?
    A1: 1,22V

    Step 2: Power on the transmitter.
    Q2: What voltage do you get on the RSSI PIN of the receiver?
    (The transmitter and the Receiver are powered on).
    A2: 1,22V

    Step 3: Connect +5V via a 1k ohm series resistor to the DATA pin of the transmitter.
    (The transmitter and the receiver are powered on).
    Q3: What voltage do you get on the RSSI PIN of the receiver?
    A3: 1,77V

    Step 4: Connect GND via a 1k ohm series resistor to the DATA pin of the transmitter.
    (The transmitter and the receiver are powered on).
    Q4: What voltage do you get on the RSSI PIN of the receiver?
    A3: 1,22

  9. #49
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano View Post
    If you do so we will know if somebody else is transmitting on the same frequency.
    Everyone in Europe is transmitting on that frequency. It's the only one allowed for this type of use. There are restrictions on how often & how long you can transmit because so many share the frequency. Allowing 25mW when everyone uses the same band is sure to lead to problems.

    An RSSI output, in and of itself, may be of little help as noise can generate a high RSSI - it depends on the details of both the circuit and the methodology - it's not equivalent to CD on FSK. With the RWS superregenerative receivers, I measure the modulation depth (difference between the pulse and following space) of the lead-in pulse which has proven to be a good proxy for signal strength.

    Recording or viewing the data output line is the best way to determine whether it's random noise or a signal (or signals) from the transmitter (or other transmitters). It's easy to do by recording with a soundcard and viewing it in a soundfile editor or with soundcard oscilloscope software (Google Virtins) or even the Parallax USB oscilloscope. The data output will be audible. You can even distinguish noise from signal by listening to it with a sound card.

    You can also grasp why a relatively long lead-in pulse is needed by looking at a the output in graphical form. The noise pulses tend to be of short duration so a long lead-in makes it easy to separate wheat from chaff..

  10. #50
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    When i trying to use the BS2 sampel code i does not work at all, is´t the BS2 SERIN/SEROUT comand like PBP´s SEROUT2/SERIN2?

    Whats wrong.

    Code:
    SERIN2 reciverpin, 16468, [WAIT("!"), x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
    Code:
    PULSOUT TransmitterPIN, 1200 
    SEROUT2 TransmitterPIN, 16468, ["!", x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE]
    This at least works.. it counts from 0 to 255 whit maby a total off 1 - 10 numbers that are wrong, maybe thats normal and i must let that problem over to the program to handle.
    And it only work whit True mode not whit Inverted...
    Code:
    SEROUT  transmitterpin,T2400,[synk,synk,synk,synk,9,Counter]
    Code:
    SERIN   reciverpin,T2400,[9],Counter
    But i still wonder why the BS2 code does´t work at all, i shold do that i think?
    Last edited by Fredrick; - 16th February 2008 at 15:22.

  11. #51
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Fredrick,

    Are you living in a city area?
    If not, it is possible that there is another transmitter within 500m?

    Do you have an oscilloscope? If yes, try to see what do you get on the DATA pin
    of the receiver when the transmitter is powered off.

    See also these links:

    LinxTechnologies.com Linx Knowledgebase - RF Modules - LR Series Long Range Wireless Communication Modules
    The DATA line of the LR receiver seems to switch randomly when the transmitter is not on.
    http://www.linxtechnologies.com/Supp...ation-Modules/

    APPLICATION NOTE AN-00160
    Considerations For Sending Data Over a Wireless Link
    http://www.linxtechnologies.com/Documents/AN-00160.pdf

    * * *

    Before you test with the RF modules, make sure that your system works when the
    two microcontrollers are connected with a 1k ohm resistor.
    Make sure that the two PIC microcontrollers share the same ground. (GND).

    Code:
    PIC #1                 PIC #2
                 1k
    TX Pin-----/\/\/\------RX pin
    
    GND -------------------GND

    Best regards,


    Luciano
    Last edited by Luciano; - 16th February 2008 at 16:05.

  12. #52
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    This codes works pretty well for upp to 50 meter if the antenna of the recviver is not moving and it uses True mode and SERIN/SEROUT and it does´t work with Inverted mode????

    If i´m in the range of 30 meters it does´t miss any numbers or loos the value in the variable "Check".

    Why does the the Serin2 and Serout2 thats used in the BS2 sampel for these 2 modules don´t work at all.

    Are you living in a city area?
    No.

    If not, it is possible that there is another transmitter within 500m?
    I don´t think so but you never know.

    Do you have an oscilloscope?
    Yes at work, but not here at home.

    I´m going to test later whit a wire direkt to the PIC.

    Maybe this modules does´t work better and this?

    What is the diffrens for the LINX modules to be driven by Inverted mode or True mode?
    inverted mode (as in the BS2 from Parallax sampel) shold be the best for these modules, or?

    Code:
    <html>
    <head></head>
    <body><!--StartFragment--><pre><code><font color="#008000"><i>'****************************************************************
    '*  Name    : Transmitter.BAS                                   *
    '*  Author  : Fredrick                                          *
    '*  Notice  : Copyright (c) 2008                                *
    '*          : All Rights Reserved                               *
    '*  Date    : 2008-02-13                                        *
    '*  Version : 2008-02-16                                        *
    '*  Notes   : PIC16F628A @ 4MHz INTORC                          *                                   
    '*          : Anv&auml;nder INTORC BIT 4 1-0 FOSC 2 - FOSC0 = 1 0 0  *
    '*          : TransmitterPIN = PORTB.4                          *
    '*          : LEDpin = PORTB.0                                  *
    '****************************************************************
    </i></font>CMCON = <font color="#808080">7 </font><font color="#008000"><i>'Alla I/O Digitala
    </i></font>LEDPin <font color="#000080">VAR </font>PORTB.<font color="#808080">0
    </font>TransmitterPIN <font color="#000080">VAR </font>PORTB.<font color="#808080">4
    </font><font color="#000080">INCLUDE </font><font color="#FF0000">&quot;modedefs.bas&quot;
    </font>Check <font color="#000080">VAR BYTE
    </font>Counter <font color="#000080">VAR BYTE
    CLEAR
    
    </font>Check = <font color="#808080">254
    
    </font>Main:
        <font color="#000080">HIGH </font>LEDPin    
        <font color="#000080">SEROUT  </font>TransmitterPIN,T2400,[<font color="#808080">$55</font>,<font color="#808080">$55</font>,<font color="#808080">$55</font>,<font color="#808080">63519</font>,Counter,Check]
        <font color="#008000"><i>'PULSOUT TransmitterPIN, 1200 
        'SEROUT2 TransmitterPIN, 16468, [&quot;!&quot;, Counter.HIGHBYTE, Counter.LOWBYTE]
        </i></font><font color="#000080">LOW </font>LEDPin
        Counter = Counter + <font color="#808080">1
        </font><font color="#000080">PAUSE </font><font color="#808080">100
    </font><font color="#000080">GOTO </font>Main
    <font color="#000080">END 
    
    
    </font></code></pre><!--EndFragment--></body>
    </html>

    Code:
    <html>
    <head></head>
    <body><!--StartFragment--><pre><code><font color="#008000"><i>'****************************************************************
    '*  Name    : Reciver.BAS                                       *
    '*  Author  : Fredrick                                          *
    '*  Notice  : Copyright (c) 2008                                *
    '*          : All Rights Reserved                               *
    '*  Date    : 2008-02-13                                        *
    '*  Version : 2008-02-15                                        *
    '*  Notes   : PIC16F872 @ 20 MHz                                *
    '*                                                              *                                                              *
    '*                                                              *
    '****************************************************************
    </i></font>ADCON1 = <font color="#808080">7 </font><font color="#008000"><i>' Alla digitala
    </i></font><font color="#000080">DEFINE </font>OSC <font color="#808080">20
    </font><font color="#000080">DEFINE </font>LCD_COMMANDUS <font color="#808080">3000   </font><font color="#008000"><i>'Set command delay time in us
    </i></font><font color="#000080">DEFINE </font>LCD_DATAUS <font color="#808080">200       </font><font color="#008000"><i>'Set data delay time in us
    </i></font><font color="#000080">DEFINE </font>DEBUG_BAUD <font color="#808080">2400 
    </font><font color="#000080">DEFINE </font>DEBUG_MODE <font color="#808080">0
    </font><font color="#000080">DEFINE </font>DEBUG_REG PORTC
    <font color="#000080">DEFINE </font>DEBUG_BIT <font color="#808080">7   </font><font color="#008000"><i>'PORTC.7 OLIMEX RS232Board
    </i></font><font color="#000080">INCLUDE </font><font color="#FF0000">&quot;modedefs.bas&quot;
    </font>ReciverPIN <font color="#000080">VAR </font>PORTC.<font color="#808080">0
    </font>Check <font color="#000080">VAR BYTE
    </font>Counter <font color="#000080">VAR BYTE
    
    CLEAR
    PAUSE </font><font color="#808080">500
    
    </font>Main:
        <font color="#000080">SERIN  </font>ReciverPIN,T2400,<font color="#808080">500</font>,NoSignal,[<font color="#808080">63519</font>],Counter,Check
        <font color="#008000"><i>'SERIN2 reciverpin, 16468, [WAIT(&quot;!&quot;), Counter.HIGHBYTE, Counter.LOWBYTE]
        </i></font><font color="#000080">IF </font>Check = <font color="#808080">254 </font><font color="#000080">THEN 
            GOSUB </font>LCD
        <font color="#000080">ELSE
            GOSUB </font>NoSignal
        <font color="#000080">ENDIF    
    GOTO </font>Main
    
    LCD:
        <font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">1  
        </font><font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">$80</font>, #Counter
        <font color="#000080">DEBUG </font>#Counter, <font color="#808080">13</font>,<font color="#808080">10
        </font><font color="#000080">PAUSE </font><font color="#808080">50    
    </font><font color="#000080">GOTO </font>Main
    
    NoSignal:
        Check = <font color="#808080">0
        </font><font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">1  
        </font><font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">$80</font>, <font color="#FF0000">&quot;No signal!&quot;
        </font><font color="#000080">DEBUG </font><font color="#FF0000">&quot;No signal!&quot;</font>, <font color="#808080">13</font>,<font color="#808080">10
    </font><font color="#000080">GOTO </font>Main
    <font color="#000080">END 
    </font></code></pre><!--EndFragment--></body>
    </html>

  13. #53
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Fredrick View Post
    What is the diffrens for the LINX modules to be driven by Inverted mode or True mode?
    When Inverted logic is used there is no RF carrier while the data line is idle.
    The power amplifier is activated only when a logic "1" is present on the DATA line.

    This is what you have on the DATA line when you use the Inverted logic.


    Best regards,

    Luciano

  14. #54
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    Ok, and in True mode you have RF carrier when the DATA line i in idle.

    But i´m still not understanding why its a problem to drive it in true mode, and in my case i have to drive it in true mode for inverted mode does´t work at all.

  15. #55
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Before you test with the RF modules, make sure that your system works when the
    two microcontrollers are connected with a 1k ohm resistor.
    Make sure that the two PIC microcontrollers share the same ground. (GND).

    Code:
    PIC #1                 PIC #2
                 1k
    TX Pin-----/\/\/\------RX pin
    
    GND -------------------GND
    Both microcontrollers must use inverted logic.

  16. #56
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    I have done the Test now.. and here we have the problem

    It dosen´t work whit the BS2 code (SERIN2/SEROUT2) whit wires between the pic´s but the other code whit SERIN and SEROUT works fine.

    What could be the problem?

    Code:
    SERIN2 reciverpin, 16468, [WAIT("!"),Counter]
    Code:
    PULSOUT TransmitterPIN, 1200 
    SEROUT2 TransmitterPIN, 16468, ["!",Counter]
    i´m not sure if the "16468" in the BS2 program shold be the same in a PBP program, i dont understand how to set those bits. but if there shold be "16468" then what else could be wrong?

    EDIT:
    Just find that 9600 baud may be unreliable with 4MHz clock, but it´s still not working when i try to lower the baud to 2400.
    It´s not working in inverted mode whit both SERIN/SEROUT and SERIN2/SEROUT2

    http://www.microengineeringlabs.com/.../ser2modes.htm

    What are i´m doing wrong?

    EDIT2:
    Can it have someting to do whit that i´m using a 4MHz inernal RC on the transmitter? shold i clock it up to 20MHz whit an external crystal like the reciver?
    Last edited by Fredrick; - 17th February 2008 at 00:31. Reason: More info

  17. #57
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Fredrick,

    A sync pulse of 3000 µs is what is used in the BS1 example visible at page 5 of this doc:
    http://www.parallax.com/Portals/0/Do...ceive-v1.0.pdf
    (In the BS1 sample code the baud rate is 2400).

    I am not a PicBasic Pro user or a Basic Stamp user, so what I can do is very limited
    and based only on the user manuals.

    Here is my version of the PBP code:

    Code:
    ' Transmitter code 
    ' (Clock = 4MHz).
    '
    ' At 4MHz, a PULSEOUT of 300 is OK. 
    ' 300 * 10 µs = 3000 µs 
    ' (See PBP Manual PULSEOUT). 
    '
    ' BAUD MODE = 16780 (Baud rate 2400, 8-bit, no-parity, inverted, output DRIVEN).
    '
    '
    PULSOUT TransmitterPIN, 300  ' sync pulse of 3000 µs 
    SEROUT2 TransmitterPIN,16780,["!",Counter] 
    '

    Code:
    ' Receiver code 
    ' (Clock = From 4MHz to 20 MHz).
    '
    ' BAUD MODE = 16780 (Baud rate 2400, 8-bit, no-parity, inverted).
    '
    '
    SERIN2 reciverpin, 16780, [WAIT("!"),Counter]
    '

    Best regards,

    Luciano

  18. #58
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    Does´t work....

    The PIC (16F872) stops at
    SERIN2 reciverpin, 16780, [WAIT("!"),Counter]

    Is there a bug in PBP like the one whit OWOUT that make a never ending loop
    I have version PBP 2.50a

    http://www.picbasic.co.uk/forum/show...79&postcount=4

    Note that both SERIN and SERIN2 make´s the PIC stops when i try to use them whit Inverted mode. whit SERIN and True mode it works..

    UPDATE:
    When i remove "PULSOUT TransmitterPIN, 300" it works....... ??
    Last edited by Fredrick; - 17th February 2008 at 13:30.

  19. #59
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Fredrick,

    Here is how you can test the TX code and the RX with a terminal emulator.

    * * *

    You can test the TX code if you connect the PIC to the serial
    port of your PC. The 1k resistor is mandatory.

    Open your terminal emulator with these settings:

    2400 baud, 8 data bits, No-parity, 1 stop bit.


    Code:
    '                       1k
    ' PIC TX pin ---------/\/\/\---------- DB9 (Pin 2) RS232 port RX data
    '
    '
    ' PIC GND -----------------------------DB9 (pin 5) RS232 port GND 
    '
    '
    '
    Counter = 65  '65 = character A
    SEROUT2 TransmitterPIN,16780,["!",Counter]
    If you run this code you should see in the terminal emulator: !A


    * * *


    You can test the RX code if you connect the PIC to the serial
    port of your PC. The 22k resistor is mandatory.

    Open your terminal emulator with these settings:

    2400 baud, 8 data bits, No-parity, 1 stop bit.


    Code:
    '                       22k
    ' PIC RX pin ---------/\/\/\---------- DB9 (Pin 3) RS232 port TX data
    '
    '
    ' PIC GND -----------------------------DB9 (pin 5) RS232 port GND 
    '
    '
    '
    SERIN2 reciverpin, 16780, [WAIT("!"),Counter]
    After you run the code you must type !A in the terminal emulator.

    * * *

    Note that this direct connection with series resistors works only if you
    use Inverted logic for SEROUT2 and SERIN2.

    Best regards,

    Luciano

  20. #60
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    I give upp now..... Inverted mode does not work but True mode work just fine whit SERIN, i think it has someting to do whit noise in the air becous when i hold my hand over the antenna of the reciver it works a better but not good.

    My solution will be to pull down PDN line when i don´t want to transmitt and pull it high when i want to transmitt or just drive the hole modul from an +5v high PIN on the PIC that is active when i want to transmitt and then pull it low.

    Transmitter supply current is 5.2 mA so a pin from the 16F628A that have 20mA is enought.

    Then i can use True mode whitout have an RF carrier when i don´t send.

  21. #61
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    The maximun output power for the transmitter is 14DBm or 25.11mW
    Is that correct?

    http://www.linxtechnologies.com/Docu...Data_Guide.pdf

  22. #62
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Fredrick View Post
    My solution will be to pull down PDN line when i don´t want to transmitt and pull it high when i want to transmitt or just drive the hole modul from an +5v high PIN on the PIC that is active when i want to transmitt and then pull it low.

    Transmitter supply current is 5.2 mA so a pin from the 16F628A that have 20mA is enought.

    Then i can use True mode whitout have an RF carrier when i don´t send.
    Quote Originally Posted by Fredrick View Post
    The maximun output power for the transmitter is 14DBm or 25.11mW
    Is that correct?

    http://www.linxtechnologies.com/Docu...Data_Guide.pdf
    The datasheet that you just posted...page 2, lower left corner, ABSOLUTE MAXIMUM RATINGS...might have something to do with something...

  23. #63
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    The datasheet that you just posted...page 2, lower left corner, ABSOLUTE MAXIMUM RATINGS...might have something to do with something...
    There is an voltage regulator circut on the parrallax bord allowing it to be driven and controlled from a 5V source, so i´m not extend the maximum.

  24. #64
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Fredrick,
    Ha, Skimask was thinking the same thing I was, overdriving the transmitter chip, but I guess that is not it, so . . . I would make sure the transmitter is away from the power supply a bit, and make sure to tie the grounds together all in the same place, it will help if you can tie to an earth ground. One question, are you still using serin and serout? I ask only because HERSERIN and HERSEROUT will only work in TRUE mode and not INVERTED.
    HTH
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  25. #65
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Fredrick View Post
    The maximun output power for the transmitter is 14DBm or 25.11mW
    Is that correct?
    No.

    From ELECTRICAL SPECIFICATIONS/TRANSMITTER SECTION/Output Power:

    At 2.1V the power is - 4dBm = 0.398 mW
    At 3.0V the power is 0dBm = 1 mW
    At 3.6V the power is 4dBm = 2.511 mW

    Do not modify the hardware you got from Parallax.
    1 mW or 2.5 mW do not make any difference.

  26. #66
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    but 1mW and 25mW makes diffrents...
    Connect the LADJ to vcc will give +10DB and it´s allowd in sweden.

    By the way i have get my code to work now whit inverted mode, idon´t know exaktly what makes it work but i think it have something whit the sync to.

    there maybe som other solution to it but this works.

    FOR I = 1 TO 3
    SEROUT TransmitterPIN,N2400,[$55,$55,$55,63519,Counter,Check]
    NEXT I

    and yes i sending the code whitout pauses three times i think this helps the transmitter to syncronise.


    The Level Adjust (LADJ) line allows the transmitter’s output power to be easily
    adjusted for range control, lower power consumption, or to meet legal
    requirements. This is done by placing a resistor between VCC and LADJ. The
    value of the resistor determines the output power level. When LADJ is connected
    to VCC, the output power and current consumption will be at its maximum. Figure
    4 on Page 3 shows a graph of the output power vs. LADJ resistance.
    This line is very useful during FCC testing to compensate for antenna gain or
    other product-specific issues that may cause the output power to exceed legal
    limits. A variable resistor can be temporarily used so that the test lab can
    precisely adjust the output power to the maximum level allowed by law. The
    variable resistor’s value can be noted and a fixed resistor substituted for final
    testing. Even in designs where attenuation is not anticipated, it is a good idea to
    place a resistor pad connected to LADJ and VCC so that it can be used if needed.
    For more sophisticated designs, LADJ can be also controlled by a DAC or digital
    potentiometer to allow precise and digitally variable output power control.
    Output Power Control Range -80 – +10 dB
    Last edited by Fredrick; - 18th February 2008 at 12:41.

  27. #67
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    From Figure 4:

    Diagram Output Power vs. LADJ Resistance:
    When LADJ Resistance = 0 then the output power is 9 dBm (7.943mW).

    In theory you can get 10mW but then when you read:

    The LR Series transmitter is designed to generate 1mW of output power into a
    50-ohm single-ended antenna while suppressing harmonics and spurious emissions
    to within legal limits
    .


    * * *

    In unidirectional links, a good designed transmission protocol will make the difference.
    Use redundant data for the purpose of error correction.

  28. #68
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    And I will add again.
    A good antenna is a must!
    Dave
    Always wear safety glasses while programming.

  29. #69
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    Yes... Now i have get the program to work very well whit inverted mode, tested it at 100 meters and there no errors or missing numbers.

    But then we come to the next problem, I have searched the forum and I find out that i´m not alone whit this problem, but the solution for it does´t work for me.

    I can´t get the SERIN timeout to work, and yes the input is switching between high and low when the transmitter is off. i have tryed whit an 1K, 3K, 4.7K, 10K resistor between GND and the input pin but when the timeout works the recive module does not and when the reciver work the timeout does not.

    So what else can i do? is there an software solution for this or must i use an hardware solution?

  30. #70
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Could you post your current code? It may be some thing simple that has been over looked.
    Dave
    Always wear safety glasses while programming.

  31. #71
    Join Date
    Jan 2008
    Location
    Sweden
    Posts
    187


    Did you find this post helpful? Yes | No

    Default

    Code:
    <html>
    <head></head>
    <body><!--StartFragment--><pre><code><font color="#008000"><i>'****************************************************************
    '*  Name    : Reciver.BAS                                       *
    '*  Author  : Fredrick                                          *
    '*  Notice  : Copyright (c) 2008                                *
    '*          : All Rights Reserved                               *
    '*  Date    : 2008-02-13                                        *
    '*  Version : 2008-02-16                                        *
    '*  Notes   : PIC16F872 @ 20 MHz                                *
    '*                                                              *                                                              *
    '*                                                              *
    '****************************************************************
    </i></font>ADCON1 = <font color="#808080">7 </font><font color="#008000"><i>' Alla digitala
    </i></font><font color="#000080">DEFINE </font>OSC <font color="#808080">20
    </font><font color="#000080">DEFINE </font>LCD_COMMANDUS <font color="#808080">3000   </font><font color="#008000"><i>'Set command delay time in us
    </i></font><font color="#000080">DEFINE </font>LCD_DATAUS <font color="#808080">200       </font><font color="#008000"><i>'Set data delay time in us
    </i></font><font color="#000080">DEFINE </font>DEBUG_BAUD <font color="#808080">2400 
    </font><font color="#000080">DEFINE </font>DEBUG_MODE <font color="#808080">0
    </font><font color="#000080">DEFINE </font>DEBUG_REG PORTC
    <font color="#000080">DEFINE </font>DEBUG_BIT <font color="#808080">7   </font><font color="#008000"><i>'PORTC.7 OLIMEX RS232Board
    </i></font><font color="#000080">INCLUDE </font><font color="#FF0000">&quot;modedefs.bas&quot;
    </font>ReciverPIN <font color="#000080">VAR </font>PORTC.<font color="#808080">0
    </font>Check1 <font color="#000080">VAR BYTE
    </font>Check2 <font color="#000080">VAR BYTE
    </font>Counter <font color="#000080">VAR BYTE
    </font>Errors <font color="#000080">VAR WORD
    
    
    CLEAR
    PAUSE </font><font color="#808080">500
    </font><font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">1
    
    </font>Main:
        <font color="#000080">SERIN </font>ReciverPIN,N2400,<font color="#808080">100</font>,NoSignal,[<font color="#808080">$55</font>,<font color="#808080">$55</font>,<font color="#808080">$55</font>,<font color="#808080">63519</font>],Counter,Check1,Check2
        
        <font color="#000080">IF </font>Check1 = <font color="#808080">121 </font><font color="#000080">AND </font>Check2 = <font color="#808080">212 </font><font color="#000080">THEN 
            GOSUB </font>LCD
        <font color="#000080">ELSE
           GOSUB </font>NoSignal
        <font color="#000080">ENDIF
            
    GOTO </font>Main
    
    LCD:
        <font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">$80</font>, #Counter, <font color="#FF0000">&quot;    &quot;
        </font><font color="#000080">DEBUG </font>#Counter, <font color="#808080">13</font>,<font color="#808080">10    
        </font>Check1 = <font color="#808080">0  
        </font>Check2 = <font color="#808080">0
    </font><font color="#000080">GOTO </font>Main
    
    NoSignal:
        Errors = Errors + <font color="#808080">1
    
        </font><font color="#000080">LCDOUT </font><font color="#808080">$FE</font>,<font color="#808080">$C0</font>, <font color="#FF0000">&quot;ERROR:&quot;</font>,#Errors,<font color="#FF0000">&quot; &quot;</font>,#Check1,<font color="#FF0000">&quot; &quot;</font>,#Check2
        <font color="#000080">DEBUG </font>#Counter, <font color="#FF0000">&quot;ERROR:&quot;</font>,#Errors,<font color="#FF0000">&quot; &quot;</font>,#Check1,<font color="#FF0000">&quot; &quot;</font>,#Check2, <font color="#808080">13</font>,<font color="#808080">10
        </font>Check1 = <font color="#808080">0
        </font>Check2 = <font color="#808080">0 
    </font><font color="#000080">GOTO </font>Main
    <font color="#000080">END 
    </font></code></pre><!--EndFragment--></body>
    </html>

  32. #72
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    I can´t get the SERIN timeout to work
    Fredrick, what you are seeing is the receiver "wait" loop is being re-triggered continuously by the noise (as you probably know by now). There is no proper way to get the "wait" command to work with software only.

    I would suggest the following (this is a simple way to create your own squelch circuit):
    1. Set the threshold for an RSSI level equivalent to a good signal (above that which you capture noise only). This would give you a cleaner mark-space signal (need to make sure the comparator is high speed).
    2. Output of comparator is "ANDed" with the RX-DATA output and sent to SERIN.

  33. #73
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    From Linx Technologies - Linx Knowledgebase

    The DATA line of the LR receiver seems to switch randomly when the transmitter is not on.

    This is a result of the increased sensitivity of the LR receiver. The sensitivity is below the noise floor of the board, so it is picking up thermal noise and other random signals and outputting it as data. This is generally not a problem for off-the-shelf decoders and can be resolved in software for custom microcontrollers (see Application Note AN-00160 for protocol recommendations), but an external squelch circuit can also be used. Using a squelch circuit will allow the designer to only allow data when the received signal is above a certain threshold, but it will sacrifice the range. This allows the user to make the tradeoff between random noise and range.

    Attached is a circuit schematic for a squelch circuit for the LR Series receiver (or any receiver with an RSSI output). The RSSI line will output a voltage that is relative to the strength of the received signal. Since the LR Series is On-Off-Keyed, this output will follow the data and look like a square wave, so it will be at a lower voltage when receiving a '0' and at a higher voltage when receiving a '1'. D1, C1, and R1 form a peak detector that will follow the peak voltage of the ones.

    This voltage is then fed into the non-inverting input of a comparator where it is compared to a reference level set by a potentiometer. When the signal level becomes greater than the reference voltage set by the potentiometer, the comparator will release the output line. When the signal level falls below the reference voltage, the comparator will pull the output line to ground. Most comparators have open collector outputs, meaning that they can only pull the line to ground or release it. They cannot pull the line high, so a weak external pull-up resistor (R3) is needed to pull the line to Vcc when the comparator releases it. The feedback resistor (R4) is used to stabilize the output.

    The output of the comparator is used to control an analog switch that will pass the received data to whatever external circuitry the application requires. When the control line is high, the data gets passed, otherwise it is not connected. This means that when the received signal is greater than the threshold, the switch is closed and the data is passed. When laying out the board, it is a good idea to place the output of the analog switch close to the device that will be using the data. A long trace or wire here has the potential to couple AC noise onto the data line while it is squelched.

    A discreet voltage divider or a voltage reference IC can be used in place of the potentiometer, and the values for C1 and R1 can be adjusted to tune the response as needed.


    Attached File: LR Series Receiver Squelch Circuit - 56K
    http://www.linxtechnologies.com/Know...%20Squelch.jpg

    APPLICATION NOTE AN-00160
    Considerations For Sending Data Over a Wireless Link
    http://www.linxtechnologies.com/Documents/AN-00160.pdf
    Last edited by Luciano; - 19th February 2008 at 09:25.

  34. #74
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Red face lots to know

    Hello out there,
    I am looking at using the LINX TXM/RXM LR series of serial modules to send real time data for a depth monitoring system. They sure don't look as easy to implement as the LINX TXM KH2 modules with simple bits and adressing with built in encoders and decoders.
    I was hoping to get away with not using any error checking or checksum, just a simple test for one transmitter to pass ...something like....

    Code:
    'transmitter module
    main:
    B0 = 12345
    SEROUT2 TXPORTPIN, 84, ["TEST", B0]
    pause 100
    goto main
    Code:
    'reciever module
    main:
    SERIN2 TXPORTPIN, 84, [WAIT("TEST"),DEC5 B0]
    pause 100
    goto main
    if you pass the test (which is a string), send the simple data and wait for the next time the test is sent/passed to collect the data. Another idea I had to was to create my own adressing with one of the ports for security....
    Are there any other suggestions out there?
    how about using an encoder chipset for serial data? I have not looked at this yet, I will do some more looking and get back with what I find.
    Padawan-78

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


    Did you find this post helpful? Yes | No

    Default

    You can still add a variable who will pass the channel to write to, on the receiver side you just need to monitor that variable an proceed if it match.
    Code:
    'transmitter module
    MyData = 12345
    Channel = 1
    SEROUT2 TXPORTPIN, 84, ["TEST", DEC2 Channel, DEC5 MyData]
    Code:
    'receiver
    SERIN2 TXPORTPIN, 84, [WAIT("TEST"),DEC2 Channel, DEC5 Mydata]
    If Channel = Myaddress then
            ' process MyData
            ENDIF
    You also want to use some encoding, Manchester or else.
    Steve

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

  36. #76
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Talking

    Steve,
    thanks again for all the help along the way with my serial project... I will give it your advice a shot, I feel that my hardware design will follow linx requirements well enough, just want to make sure my firmware is equal to the task.
    I will let you know how it goes.
    Padawan-78

Similar Threads

  1. Generic RF Receiver
    By dhouston in forum Code Examples
    Replies: 0
    Last Post: - 8th September 2009, 14:35
  2. Interfacing 16F88 to RF module
    By scomi85 in forum General
    Replies: 2
    Last Post: - 19th February 2009, 12:52
  3. Help with CC1100 RF Modules.
    By charudatt in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 27th November 2006, 20:58
  4. RF designs
    By Travin77 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th June 2006, 07:50
  5. Interfacting RF Module
    By rastan in forum General
    Replies: 8
    Last Post: - 10th November 2004, 22:27

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