Serin Serout possible wiring distance


Closed Thread
Results 1 to 34 of 34
  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Serin Serout possible wiring distance

    I'm using the wireless modules as per a previous post.

    Running at 3.3v what length wiring would possibly work ok for Serin/Out.

    I need to separate the radio module from the pic by about 3-4 metres, will it work that far?

    Rob

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,519


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    As with most things it depends....On the baudrate, cable, environment etc etc but most likely yes it'll work just fine. Easy enough to try isn't it?
    I've run UART comms (2400 baud, 5V levels) thru ~25m cable and it worked. I can't recommend it though.

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    What radio module? What speed? What type cable?

  4. #4
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Sorry here's further details :-

    arf-high-power-radio-transceiver

    Baud is set at 9600

    No cable as at the moment the radio module is inserted on a socket on the pic prototype pcb so is only tracks.

    I need to separate the radio with aerial and the pic controller.

    There is a switch and two leds for the 'control' pic, which then sends the serial commands to the radio module on the same pcb.

    The radio module is connected to a yagi aerial at 450mm long overall which needs to be at least 3m in the clear.

    Due to cable losses at 868Mhz it's not reasonable to use coax, so the radio module is in a weatherproof box and connected with 50mm of coax to the aerial. At the moment during testing it's also the pic pcb.

    With one yagi and a loop on other module I've reached 865m, which is two way. 'Control' sends signal and 'receive' acknowledges back to action a led.

    865m is not it's range limit, it's the farthest distance I can use control module due to running off a cigar lighter plug in car.

    I need a small battery pack for the control so I can go farther on foot for testing, I have the 'receive' part connected to my psu at home and at the moment drive off to location that's line of sight.

    I will try to post pictures of the modules.

    Rob

  5. #5
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Pictures of the prototypes. The 9db gain yagi aerial is made from oval plastic electrical conduit using UK 2.5mm twin and earth wire for the elements.
    The coax and super mini plugs were from a junk laptop wifi aerial. It's the grey lead on the loop aerial on the 'receive' board.

    The pic controller is in the box at the moment with the switch showing, the leds are on board for now. The switch and leds need to be in a desktop box with the pic and the radio module left in the box with the aerial. Nothing is yet sealed, it will be later with a hot glue gun.

    I've made the pcb's with a set of pads on the connecting tracks so that the boards can be cut and wire used to connect. They can be just made out on 'receive' board.
    The red led on the 'receive' board is a 'heartbeat' led that confirms radio module operating.

    Name:  control-aerial.jpg
Views: 1558
Size:  119.3 KB
    Name:  control-box.jpg
Views: 1428
Size:  176.5 KB
    Name:  receive.jpg
Views: 1382
Size:  161.0 KB

    The loop is a 3db gain Moxon rectangle.
    Last edited by tasmod; - 10th June 2013 at 12:38.

  6. #6
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Unfortunately, Ciseco has no downloadable documentation, as yet. However, the link you supplied does say it is UART RS232 so you really need to know whether it is outputting RS232 voltage levels which will fry your PIC unless you use something like a MAX232 converter. It it outputs TTL, you still need to know the voltage levels. 5V may be too much for your 3V PIC. If 0-3V yuu need to see what voltage is needed for the PIC to see a logic high as the voltage may be marginal over your cable as TTL devices seldom output rail-to-rail voltages.

  7. #7
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Thought I posted that. Radio module is available 3.3v only.

    So Pic and radio module are at 3.3v. Voltage reg in photos is 3.3v device.

    I wanted to separate the modules but I can instead separate the switch and leds and leave rest at aerial.
    Not ideal though. Hopefully thicker cable will ensure low volt drop for leds ...

    It's only for the 'control' the 'receiver' is ok as a boxed item, the relay is needed at top of mounting pole anyway. It's a 3.3v board from Ciseco.

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Quote Originally Posted by tasmod View Post
    Thought I posted that. Radio module is available 3.3v only.

    So Pic and radio module are at 3.3v. Voltage reg in photos is 3.3v device.
    That doesn't necessarily mean that RX & TX are at 3.3V. The purpose of chips like the MAX232 is to boost the supply voltage to RS232 levels which can be +/-15V.

    However, since the ARF is an upgrade of Ciseco's XRF, it probably is wired the same and there is documentation for the latter showing RX & TX directly connected to the microcontroller. It would help if they correctly identified their devices as using a low voltage serial link rather than being RS232 which implies much higher voltage levels.

    As Henrik said, the only way to be sure is to try it. The TX level is likely to be ~3V at best. You can check the PIC datasheet to see if that's adequate.

  9. #9
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Thanks Dave,

    Hmmm Ciseco documentation. Good overall, but very confused descriptions with various devices being refered back to each other. Lots of back and forth. It strikes me of someone who knows their products, but forgot to ask someone who doesn't know to look at the site.

    I was reluctant to split the board as it's a nice fit in box but it's now getting too close to deadline, so I'll try the cable route.

    Rob

  10. #10
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Just for information if anyone wants to use these rf modules. I did a range test of the modules with the shown aerials.

    4.687km line of sight with reliable operation.


    Just modding the boards to test serial cable length working between pic and rf module. I will try 5m cable length, as that's what is required on site.

    I'm also looking at providing RSSI on a lcd display. I need to add AT commands in code to switch the other transceiver into test mode where RSSI is sent every second.

    Just need to work it out.

  11. #11
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Very impressive range. Can you give us your antenna calculations?

    I just have succesfully tested a pair of Adeunis ARF7761 modules at 169MHz@500mW that covered over 12Km range. One side used a 42cm l/4 atached on a short RG58 cable and the other a dipole l/4.

    Ioannis

  12. #12
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hi Ioannis,

    I used Yagi Calculator software from here. It's a simple to use but excellent piece of software.
    Yagi has 9.8dbd gain.

    The Moxon Loop also has design software available but I've now changed my mind re the loop as it is hard to make it rigid enough for the application. Loop has 3dbd gain.

    There is of course the frequency difference losses between our module setups but that's pretty impressive range.

    I estimate that line of sight and two yagis will do 12km as well with these units. It's not out of the way to setup two long yagis of say 21 elements 15.5dbd gain each to achieve more range at fixed locations.

    In my use this will be a portable setup. It needs to be erected and taken down quite easily and to maybe signal penetrate a bit of bush. This at much closer range of course.

    I'm currently building the finished yagi in plumbers 15mm copper pipe as the boom and 4mm brake pipe as the elements. Easy to solder in and to bend the dipole out of. It will be used in vertical polarisation as the 'receive' end will be a small vertical colinear with small gain.

    Software for signal strength for setup of yagis is in progress. This is what I have so far in progress and have posted a question re syntax in Ciseco forum.

    I need to work out the lowest values for sigfield/sigcontrol variables , highest value (lowest signal) is around 88-90 as a returned value. Then send to lcd display.

    Code:
    rssion:
    
        SEROUT2 PortA.3,84,["BOB",sigon]    ; puts slave module in test mode via code
        
        PAUSE 1000                                    ; wait 1 second
        SEROUT2 PortA.3,84,["+++"]           ; send guard character
        PAUSE 1000                                    ; wait 1 second
        SEROUT2 PortA.3,84,["ATNT3"]         ; place unit in test mode
        SEROUT2 PortA.3,84,["ATWR"]          ; write to memory
        SEROUT2 PortA.3,84,["ATDN"]          ; exit command mode
        
    sigstrength:    
        SERIN2 PortA.2,84,1000,sigstrength,[WAIT("aSSRSSIS-",sigfield)]       ; get slave sig strength value
        SERIN2 PortA.2,84,1000,sigstrength,[WAIT("aMMRSSIM-",sigcontrol)]  ; get control sig strength value
        IF jump = 0 then rssioff                                                                     ; check input to reset to serial
        GOTO sigstrength
             
    rssioff:
        PAUSE 1000                                    ; wait 1 second
        SEROUT2 PortA.3,84,["+++"]            ; send guard character
        PAUSE 1000                                     ; wait 1 second
        SEROUT2 PortA.3,84,["ATNT0"]          ; place unit in serial mode
        SEROUT2 PortA.3,84,["ATWR"]
        SEROUT2 PortA.3,84,["ATDN"]
        GOTO main

  13. #13
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Thanks for sharing. Regarding the serial communication, can you use the hardware serial port of the controller?

    The I would suggest to use also the Hserin and wait for the response from the RF module instead of just PAUSE 1000. You can't be sure that the module responded in-time.

    Ioannis

  14. #14
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hi Ioannis,

    The pause 1000 is the 1 second no input then the +++ and then no input for 1 second. This is the format required to put the rf module into 'test' mode for RSSI output.

    Rob

  15. #15
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    OK, I do not disagree. But when the module enters the AT command mode by +++, doesn't reply with some kind of acknowledge? An OK or something?

    I am on a slow internet connection now and cannot download the data sheet of the module.

    Ioannis

  16. #16
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    You are right it does do an "OK" back but after the one second of no activity.

    To be honest so far I've ignored it in the software as it is only just about to be tested for real.

    I appreciate your help. I should do a WAIT in there.

    Rob

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    I'd prefer to do this in hardware serial port because it is much faster. Or at least the Debug and Debugin.

    Some serial devices do respond very fast and had a case where Serin/Serout was unable to follow.

    Ioannis

  18. #18
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Not having any success getting the modules into test mode using the AT commands as per the code.

    I'm saying this because the routine stops waiting for a signal strength report which isn't there. This means the routine to put it into test mode isn't working.

    Anyone any suggestions ?

  19. #19
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Can you post your code please?

    Ioannis

  20. #20
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    I have built a circuit, where PIC16F870 and 16F628A talk to each other via serial port, 9600 bps. Using Cat. 5E ethernet cable, it works fine at 20 meter distance. It may work on longer one too, just I had no need, so haven't tested.

  21. #21
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Thanks for info CuriousOne.


    Ioannis,

    I'll post both codes. At the moment I'm also on the Ciseco forum trying to get to bottom of this. Seems to be sending packets but I'm not getting them. It stops in control code at "Signal Strength" on LCD so it appears that there is no info received in order to carry on in code.

    CONTROL Code (Master)

    Code:
    ;#######################################################
    ;                                                      #
    ;         868.3 MHz RF Link - Control Unit             #
    ;                                                      #
    ;            Rob Lane   22-4-2013                      #
    ;                                                      #
    ;#######################################################
    '
    '
    ;*****************************************************************************
    ;
    ; Target Controller -      PIC16F628A 
    ;                          __________  
    ;    RF MODULE PIN 2--RA2 |1       18| RA1--- R SELECT
    ;    RF MODULE PIN 3--RA3 |2       17| RA0--- E BIT
    ;                   --RA4 |3       16| OSC1--
    ;     +5V--via 4.7k-!MCLR |4       15| OSC2--
    ;           Ground----Vss |5       14| VDD--- +5 V
    ;    sig strength on--RB0 |6       13| RB7--- data 0
    ;           SWITCH  --RB1 |7       12| RB6--- data 9
    ;         GREEN LED --RB2 |8       11| RB5--- data 8
    ;         RED LED   --RB3 |9       10| RB4--- data 7
    ;                          ----------
    ; 
    ; ****************************************************************************
    ; * Configuration fuse information:
    ; ****************************************************************************
    @ __config _HS_OSC & _WDT_OFF & _MCLRE_OFF & _BODEN_OFF & _LVP_OFF & _CP_OFF
    '
    INCLUDE "modedefs.bas" 
    DEFINE OSC 10
    
    TRISA=%00000000
    TRISB=%11110000
    CMCON=7                  ; comparators off
            
    redled VAR PortB.3
    greenled VAR PortB.2
    jump  VAR PortB.0        ; signal strength switch
    switch VAR PortB.1
    
    redstop VAR BYTE
    greengo VAR BYTE
    rfon var byte
    flip VAR BYTE
    
    sigfield var word
    sigcontrol var word
    
    
    DEFINE DEBUG_REG PORTA   ; Set Debug pin port
    DEFINE DEBUG_BIT 3       ; Set Debug pin bit
    DEFINE DEBUG_BAUD 9600   ; Set Debug baud rate
    DEFINE DEBUG_MODE 0      ; Set Debug mode: 0 = true, 1 = inverted
    
    DEFINE DEBUGIN_REG PORTA ; Set Debugin pin port
    DEFINE DEBUGIN_BIT 2     ; Set Debugin pin bit
    DEFINE DEBUGIN_MODE 0    ; Set Debugin mode: 0 = true, 1 = inverted
    
    
            '       LCD Display
            '       -----------
            '       Adjust these to suit your chosen LCD pinout
            '
    Define LCD_DREG PORTB          ' Port for LCD Data
    Define LCD_DBIT 4              ' Use upper 4 bits of Port
    Define LCD_RSREG PORTA         ' Port for RegisterSelect (RS) bit
    Define LCD_RSBIT 1             ' Port Pin for RS bit
    Define LCD_EREG PORTA          ' Port for Enable (E) bit
    Define LCD_EBIT 0              ' Port Pin for E bit
    Define LCB_BITS 4              ' Using 4-bit bus
    Define LCD_LINES 2             ' Using 2 line Display
    Define LCD_COMMANDUS 1200      ' Command Delay (uS)
    
    
           PAUSE 500
           LCDOut $FE,1                   ' Clear LCD
           PAUSE 10
           LCDOUT  $FE,$80,"   Rob Lane  "
           LCDOUT  $FE,$C0,"       2013    "
           PAUSE 2000      
    
    redstop = 1
    greengo = 2
    rfon = 3
    
          LCDOUT  $FE,1
          pause 10
          LCDOUT  $FE,$80, "Waiting"
          
          IF SWITCH = 1 THEN FLIP = 0     ; check staus of switch at power up
          IF switch = 0 then flip = 1     ; counter setup flipflop for single command send
    
          
    main:
    if jump = 0 then rssion
    
    IF switch = 1 AND flip = 0 THEN GOSUB red
        PAUSE 50
    IF switch = 0 AND flip = 1 THEN GOSUB green
    
    GOTO main
    
    red:
        PAUSE 1
        DEBUG "BOB",redstop
        if jump = 0 then rssion                            ; check if signal strength display needed
        DEBUGIN  500,red,[WAIT("ACK")]
        LOW greenled                                       ; turn off green led
        HIGH redled                                        ; turn on red led
        LCDOUT  $FE,1                                      ; clear lcd
        Pause 10
        LCDOUT  $FE,$80," Light is RED "
        flip = 1                                  ; flip flop counter to ensure send only once
    
        RETURN  
        
    green:
        PAUSE 1    
        DEBUG "BOB",greengo
        if jump = 0 then rssion  
        DEBUGIN  500,green,[WAIT("ACK")]
        LOW redled
        HIGH greenled
        LCDOUT  $FE,1
        PAUSE 10
        LCDOUT  $FE,$C0," Light is GREEN "
        flip = 0
    
        RETURN 
        
    rssion:
    
        LCDOUT  $FE,1
        Pause 10
        LCDOUT  $FE,$80," Test Mode "
        pause 1500
        
    ;   ############### TEST MODE ON #####################
    
    ison:
        debug "BOB",rfon
        if jump = 1 then rssioff
        debugin 1000,ison,[WAIT("ACK")]
        
        PAUSE 1100                           ; wait 1 second
        debug "+++"
        debugin 1500,ison,[WAIT("OK")]
        PAUSE 1100                           ; wait 1 second
        LCDOUT  $FE,$80, "Pass +++"
        pause 1500                                                
        debug "ATNT3",13,10                                                    
        debugin 1500,ison,[WAIT("OK")]
        LCDOUT  $FE,$80, "Pass ATNT3"
        pause 1500                                                
        DEBUG "ATDN",13,10
        debugin 1500,main,[WAIT("OK")]
        LCDOUT  $FE,$80, "Pass ATDN"
        pause 1500
        LCDOUT  $FE,$80, "Signal Strength"
        Pause 10
        
    sigstrength:
    
        if jump = 1 then rssioff     ; check input to reset to serial                                             
        debugin  1000,sigstrength,[WAIT("aSSRSSIS-",sigfield)]    ; get slave signal strength value                                        
        debugin  1000,sigstrength,[WAIT("aMMRSSIM-",sigcontrol)]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        goto sigstrength
             
    rssioff:
    
        LCDOUT  $FE,1
        Pause 10
        
        PAUSE 1100                           ; wait 1 second
        debug "+++"
        debugin 1500,rssioff,[WAIT("OK")]
        PAUSE 1100                           ; wait 1 second
        debug "ATNT0",13,10
        debugin  1500,rssioff,[WAIT("OK")]
        debug  "ATDN",13,10
        debugin 1500,main,[WAIT("OK")]
        LCDOUT  $FE,1
        pause 10
        goto main 
        
        
    END

    FIELD Code (Slave)

    Code:
    ;#######################################################
    ;                                                      #
    ;          868.3 MHz RF Link - Field Unit              #
    ;                                                      #
    ;              Rob Lane   22-4-2013                    #
    ;                                                      #
    ;#######################################################
    '
    '
    ;*****************************************************************************
    ;
    ; Target Controller -      PIC16F628A 
    ;                          __________  
    ;    RF MODULE PIN 2--RA2 |1       18| RA1--------- RELAY
    ;    RF MODULE PIN 3--RA3 |2       17| RA0---------
    ;                    -RA4 |3       16| OSC1--------
    ;     +5V-----------!MCLR |4       15| OSC2--------
    ;     Ground----------Vss |5       14| VDD---------+5 V
    ;          -----------RB0 |6       13| RB7---------
    ;          -----------RB1 |7       12| RB6---------
    ;                  ---RB2 |8       11| RB5---------
    ;                   --RB3 |9       10| RB4---------
    ;                          ----------
    ; 
    ; ****************************************************************************
    ; * Configuration fuse information:
    ; ****************************************************************************
    @ __config _HS_OSC & _WDT_OFF & _MCLRE_OFF & _BODEN_OFF & _LVP_OFF & _CP_OFF
    '
    INCLUDE "modedefs.bas" 
    DEFINE OSC 10
    
    TRISA=%00000100
    CMCON=7
    
    relay   VAR PortA.1
    
    signal VAR BYTE
    
    DEFINE DEBUG_REG PORTA   ; Set Debug pin port
    DEFINE DEBUG_BIT 3       ; Set Debug pin bit
    DEFINE DEBUG_BAUD 9600   ; Set Debug baud rate
    DEFINE DEBUG_MODE 0      ; Set Debug mode: 0 = true, 1 = inverted
    
    DEFINE DEBUGIN_REG PORTA ; Set Debugin pin port
    DEFINE DEBUGIN_BIT 2     ; Set Debugin pin bit
    DEFINE DEBUGIN_MODE 0    ; Set Debugin mode: 0 = true, 1 = inverted
    
    LOW relay
    
    
    
    ' Program
    main:
        
        debugin [WAIT("BOB"),signal]
            
        IF signal = 1 THEN 
        GOSUB redstop 
        ENDIF
    
        IF signal = 2 THEN
        GOSUB greengo
        ENDIF
        
        IF signal = 3 THEN
        GOSUB rssion
        ENDIF
    
    GOTO main
        
    
    redstop:
        HIGH relay
        PAUSE 1000 
        debug "ACK" 
        RETURN
    
    greengo:
        LOW relay
        PAUSE 1000
        debug "ACK" 
        RETURN 
        
        
    rssion:
    
        debug "ACK"
        pause 10
        debug "ACK"
        pause 10
        debug "ACK"
        
       
        PAUSE 1100
        debug "+++"
        debugin 1500,rssion,[WAIT("OK")] 
        PAUSE 1100
        high relay                          ;relay has led for ON
        pause 500
        debug "ATNT4",13,10
        debugin  1500,rssion,[WAIT("OK")]
        low relay
        pause 500
        debug  "ATDN",13,10
        debugin  1500,rssion,[WAIT("OK")]
        high relay
        
        
        pause 15000         ; waiting time in test mode before return to normal
        goto rssioff
        
        
    rssioff:
        PAUSE 1100                           ; wait 1 second
        debug "+++"
        debugin 1500,rssioff,[WAIT("OK")]
        PAUSE 1100                           ; wait 1 second
        debug  "ATNT0",13,10
        debugin  1500,rssioff,[WAIT("OK")]
        debug "ATDN",13,10
        debugin 1500,rssioff,[WAIT("OK")]
        goto main
                
      
    END

  22. #22
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Ioannis and all,

    Please forget these modules. The rudeness I received on the Ciseco forum from the manufacturers means I'm abandoning them.

  23. #23
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Without a Datasheet is difficult to make something good.

    There are many modules that can do the job. Do you have a target price and freq range?

    Ioannis

  24. #24
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hi Ioannis,

    Unfortunately I'm stuck with these modules as the 'client' bought them.

    I have his base requirements working 100% but I let myself in for more work when I mentioned signal strength output.

    Trouble is the modules do not have any visual indication as to what they are doing. I'm working blind, other than turning leds on/off on my board at strategic points in the software.

    I get confirmation after each AT command that the slave is in test mode.

    It will not respond to anything else when in test mode other than "+++" guard characters for command mode, so I put in a time loop to turn test mode off later by software.

    The master sits and waits after confirming it is in test mode. Then nothing. Both should be transmitting at 1 second intervals with RSSI information in db fed on the serial port from the master. They loopback the RSSI.

    I do not have an interface to connect to my PC to test, besides that is no use anyway as the modules will be standalone. Testing on a PC just proves they work that way.

    I also considered another set of rf modules originally from another manufacturer. They had red and green status leds on board. Red when TX, green when RX. Both on for config mode. Much more useful.

    I chose the Ciseco modules because of power output and the support forum.

    At first on the forum I thought they were a bit defensive and odd. Now they insult my admittedly limited intelligence and are downright rude.
    I don't believe they read the replies carefully. I had to repeat what I had tested, even though the answer to what I had done was two posts up.

    I've spent tens of hours on this. I'm leaving them just doing the basic function the 'client' wanted. On/off red/green light.

    'Client' is a misnomer, I'm doing them for free.

    Rob

  25. #25
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    THIS IS FROM THEIR SETUP RSSI INFO PAGE

    The AT commands are in the brakets at the side. Compare to my code.


    In order to test the range between two devices, it is possible to put two XRF's into a special mode via either the AT commands or the XCM. Once in the special mode it will send a packet once a second from an XRF connected to your PC (master) to another 'remote' (slave) XRF. The slave XRF will measure the incoming RSSI level and send the packet straight back. The master XRF then measures the RSSI of this and displays both packets serially.

    The image below shows the continuous output you will see on your screen. We're interested in the first two values:
    aSSRSSIS-045 (the signal strength of 045) received at the slave and
    aMMRSSIM (046) received at the master (your PC).
    Name:  rssipix.png
Views: 1098
Size:  13.6 KB

    HOW TO SETUP
    During setup we advise turning off any other XRFs, so that only the two you are using to test range are turned on. If this is impossible then change the two devices to be tested to another PANID.
    First set up the slave (remote end).
    1. Configure on your PC using XCM or AT commands
    2. Change ATNT (node type) to 4 (ATNT4)
    3. Write to permanent memory (ATWR)
    4. Close the session (ATDN)
    Unplug the first XRF and plug in the second XRF
    Configure the master (PC end)
    1. Configure on your PC using XCM or AT commands
    2. Change ATNT (node type) to 3 (ATNT3)
    3. Write to permanent memory (ATWR)
    4. Close the session (ATDN)
    5. Leave the second XRF on your PC and in a serial monitor window as above
    Test Power up the first XRF with 2 to 3.6v, at a distance over 1 meter away. Two AA batteries are perfect for this, but make sure your voltage is not greater than 3.6v
    You will see the two RSSI levels being written to the screen once a second.
    MAXIMUM RANGE When the RSSI figures reach 88 to 92 you've reached the maximum distance you can achieve reliably. If you are planning to run at distances close to this then we advise conducting the test a few times during the day to make sure you are getting a reliable connection.

  26. #26
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Well, it seems OK to me. With direct connection to PC did you have any better luck?

    I understand it is very annoying.

    How are you checking if the transmitter is really transmiting?

    Ioannis

  27. #27
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    PC connection, that's one of the problems, I don't have an ftdi interface or want to buy theirs at £25 as it's at my cost.

    I tried direct 9pin max232 connection but I don't get a response except echo back.

    I'm also completely puzzled as to why I can't hear anything except a low dull pulse on my UHF sdr receiver when in test mode. It's supposed to be a higher power version rf module. I should see and hear the pulses at 868.3 mhz.

    Yet I can pick up my signal generator strongly which is 100 times less output!

    Every now and then I get a good visual signal with high strength but it's not consistent.

    I will have to abandon the RSSI output and just go to the base use for the modules. It needs to be boxed and out by early next week.

    Rob

  28. #28
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    OK don't know why I didn't think of it before, I used my scope on the TX RX pins when both units are in test mode.

    They have data back and forth at 1 second intervals. That means they are transmitting and receiving.

    So, it's down to this routine not working. Given the details above I just can't see why :-

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  3000,sigstrength,[WAIT("aSSRSSIS-",sigfield)]    ; get slave signal strength value                                        
        DEBUGIN  3000,sigstrength,[WAIT("aMMRSSIM-",sigcontrol)]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        GOTO sigstrength

  29. #29
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Well, the pulsed transmission is not going to be heard on a UHF receiver as they are very short duration.

    Try this on the debugin:

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  3000,sigstrength,[WAIT("aSSRSSIS-",dec3 sigfield)]    ; get slave signal strength value                                        
        DEBUGIN  3000,sigstrength,[WAIT("aMMRSSIM-",dec3 sigcontrol)]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        GOTO sigstrength
    Ioannis

  30. #30
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hi Ioannis,

    I tried that and for some reason it won't compile, errors with "Expected ] " but it is all correct ??



    Since then I've changed things around to suit the cable distance I need between the rf module and the pic.

    I've separated the rf module and also the 3.3v regulator, so the rf module has it's own supply. I then replaced the 3.3v regulator on the pic board with a 5v version.

    So, pic and lcd at 5v. Rf module at 3.3v. Currently separated by 1m of cable just testing.

    I also rewired and connected the module to the hardware serial port. This means that the serial is better able to cope with the distance and hopefully up to scratch for speed.

    At the moment I seem to have disturbed the basic operation of the system, the switch for changing the led status is causing a reset. I need to investigate. I should have it sorted later and will report back.

    Rob

  31. #31
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Yes there is a syntax error:

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  3000,sigstrength,[WAIT("aSSRSSIS-"),dec3 sigfield]    ; get slave signal strength value                                        
        DEBUGIN  3000,sigstrength,[WAIT("aMMRSSIM-"),dec3 sigcontrol]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        GOTO sigstrength
    And I wonder, wasn't that giving you a compilation error before?

    Ioannis

  32. #32
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hmm, that was interesting.

    I had cut the board to separate the two modules but in doing so I had isolated one ground track. The LCD ground was on it.
    Turns out it was using the grounded switch, when selected, to power LCD so when selected switch to 1 it had no ground except via some sort of torturous route, hence resets. Now sorted.

    I have gone back to DEBUG using the hardware pins and turned off the UART. It wouldn't receive from the rf module but would transmit. Puzzling ? DEBUGIN works so back to a working system except data for RSSI.

    I still get a compile error for the DEC3 even though I tried both syntax versions.

    Rob

  33. #33
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    try ... DEC3(sigfield)]

  34. #34
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Yes yes yes, finally !

    This is what was required to make it work.

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  1500,sigstrength,[WAIT("aSSRSSIS-"),DEC3 sigfield, DEC3 sigcontrol]    ; get signal strength values                                         
        LCDOUT  $FE,$80," Light Unit ",#sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",#sigcontrol                                         
        GOTO sigstrength

    Note change(s). Apparently the photo of the display in RSSI is parsed by the software to separate lines. In reality it's a single stream of both items per second. The LCDOUT needed # for ASCII.

    Rob

Similar Threads

  1. Using SEROUT and SERIN
    By acinorth in forum Test Area
    Replies: 1
    Last Post: - 20th July 2011, 11:33
  2. Serout -->>> serin
    By larzazral in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th February 2010, 03:46
  3. SERIN and SEROUT
    By CumQuaT in forum mel PIC BASIC
    Replies: 10
    Last Post: - 3rd September 2009, 00:17
  4. serin,serout
    By andrewwaack in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th July 2006, 19:21
  5. serin/serout
    By simonr in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th September 2003, 18:45

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