RFM69HCW with ESP8266 Gateway and relay module



  • Hi all,
    i have built very first RFM gateway, sensors and relay module, ds18b20 sensor module works ok, but when i turn on relay module (without relay connected) my gateway reboot itself see below serial output form esp, nothing special in sketch its all standard.

    0_1576786864730_RFM69HCW with ESP8266.jpg

    7915 TSF:MSG:READ,102-102-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    7977 TSF:MSG:BC
    7993 TSF:MSG:FPAR REQ,ID=102
    8024 TSF:CKU:OK,FCTRL
    8047 TSF:MSG:GWL OK
    
    Soft WDT reset
    
    >>>stack>>>
    
    ctx: cont
    sp: 3ffffc40 end: 3fffffd0 offset: 01b0
    3ffffdf0:  00000024 3ffef19c 3ffeee0c 40202c95  
    3ffffe00:  3ffeec9d 00000066 3ffeee0c 402030d4  
    3ffffe10:  0000003d 00000066 3ffeee0c 40203134  
    3ffffe20:  3ffeec9d 00000066 3ffeee0c 4020335c  
    3ffffe30:  00002887 00000008 00000001 402027a4  
    3ffffe40:  002881cc 3ffef2e0 40244010 000027bf  
    3ffffe50:  00000066 3ffeee0c 00000002 40202be0  
    3ffffe60:  3ffeec9d 00000008 00000005 000000c8  
    3ffffe70:  3a465354 3a47534d 00000000 00000008  
    3ffffe80:  00000066 3ffeedf0 3ffeec9d 40203485  
    3ffffe90:  742c333d 702c373d 3ffeec9d 40204617  
    3ffffea0:  303d6773 00000a3a 4bc6a7f0 00000000  
    3ffffeb0:  00000000 4bc6a7f0 55810624 00000000  
    3ffffec0:  00000000 4bc6a7f0 5a1cac08 00000000  
    3ffffed0:  00000000 00000000 4bc6a7f0 00000000  
    3ffffee0:  40105460 002aa322 3ffef1d4 00000000  
    3ffffef0:  3ffee630 3ffef1d4 3ffe8524 3ffef1d4  
    3fffff00:  3ffeedf4 3ffeedf0 40203d7c 3ffeedf0  
    3fffff10:  3ffeedf4 3ffeec9d 00000066 40204760  
    3fffff20:  3ffeedf4 00000066 3ffeecbe 40204e05  
    3fffff30:  00000007 00000000 00000000 00000000  
    3fffff40:  3ffeec68 3ffef19c 3ffeee0c 3ffeec44  
    3fffff50:  00000003 000000ff 00000066 00000000  
    3fffff60:  000000ff 00000000 3ffeedf4 00000007  
    3fffff70:  3fffdad0 00000000 3ffeece0 3ffeec44  
    3fffff80:  3fffdad0 00000000 00000005 40204e70  
    3fffff90:  3fffdad0 00000000 3ffeec28 40204e8c  
    3fffffa0:  00000000 00000000 3ffeec28 40205773  
    3fffffb0:  3fffdad0 00000000 3ffeec28 40205a8c  
    3fffffc0:  feefeffe feefeffe 3ffe8524 4010010d  
    <<<stack<<<
    ⸮⸮⸮⸮z9⸮⸮59 MCO:BGN:INIT GW,CP=RRNGE---,REL=255,VER=2.3.1
    110 TSF:LRT:OK
    126 TSM:INIT
    140 TSF:WUR:MS=0
    160 TSM:INIT:TSP OK
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 3
    cnt 
    
    connected with myfi, channel 7
    dhcp client start...
    ip:192.168.1.12,mask:255.255.255.0,gw:192.168.1.1
    376 TSM:INIT:GW MODE
    398 TSM:READY:ID=0,PAR=0,DIS=0
    430 MCO:REG:NOT NEEDED
    456 MCO:BGN:STP
    *WM: 
    *WM: AutoConnect
    *WM: Connecting as wifi client...
    *WM: Already coWebServer started...
    *WM: freeing allocated params!
    551 MCO:BGN:INIT OK,TSP=1
    635 TSM:READY:NWD REQ
    3159 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    4234 TSF:MSG:READ,102-102-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    4295 TSF:MSG:BC
    4312 TSF:MSG:FPAR REQ,ID=102
    4342 TSF:CKU:OK,FCTRL
    4365 TSF:MSG:GWL OK
    
    Soft WDT reset
    
    >>>stack>>>
    
    ctx: cont
    sp: 3ffffc80 end: 3fffffd0 offset: 01b0
    3ffffe30:  001d2768 00000008 00000066 402027a4  
    3ffffe40:  00151fda 3ffef2e0 40244010 0000188d  
    3ffffe50:  00000066 3ffeee0c 00000005 40202bfe  
    3ffffe60:  3ffeec9d 00000008 00000005 000000c8  
    3ffffe70:  3a465354 3a47534d 00000000 00000008  
    3ffffe80:  00000066 3ffeedf0 3ffeec9d 40203485  
    3ffffe90:  742c333d 702c373d 3ffeec9d 40204617  
    3ffffea0:  303d6773 00000a3a 4bc6a7f0 00000000  
    3ffffeb0:  00000000 4bc6a7f0 e8b43958 00000000  
    3ffffec0:  00000000 4bc6a7f0 f0a3d70a 00000000  
    3ffffed0:  00000000 00000000 4bc6a7f0 00000000  
    3ffffee0:  40105460 00162c97 3ffef1d4 00000000  
    3ffffef0:  3ffee630 3ffef1d4 3ffe8524 3ffef1d4  
    3fffff00:  3ffeedf4 3ffeedf0 40203d7c 3ffeedf0  
    3fffff10:  3ffeedf4 3ffeec9d 00000066 40204760  
    3fffff20:  3ffeedf4 00000066 3ffeecbe 40204e05  
    3fffff30:  00000007 00000000 00000000 00000000  
    3fffff40:  3ffeec68 3ffef19c 3ffeee0c 3ffeec44  
    3fffff50:  00000003 000000ff 00000066 00000000  
    3fffff60:  000000ff 00000000 3ffeedf4 00000007  
    3fffff70:  3fffdad0 00000000 3ffeece0 3ffeec44  
    3fffff80:  3fffdad0 00000000 00000005 40204e70  
    3fffff90:  3fffdad0 00000000 3ffeec28 40204e8c  
    3fffffa0:  00000000 00000000 3ffeec28 40205773  
    3fffffb0:  3fffdad0 00000000 3ffeec28 40205a8c  
    3fffffc0:  feefeffe feefeffe 3ffe8524 4010010d  
    <<<stack<<<
    ⸮⸮⸮⸮z9⸮⸮60 MCO:BGN:INIT GW,CP=RRNGE---,REL=255,VER=2.3.1
    112 TSF:LRT:OK
    128 TSM:INIT
    141 TSF:WUR:MS=0
    161 TSM:INIT:TSP OK
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 3
    cnt 
    
    connected with myfi, channel 7
    dhcp client start...
    ip:192.168.1.12,mask:255.255.255.0,gw:192.168.1.1
    377 TSM:INIT:GW MODE
    399 TSM:READY:ID=0,PAR=0,DIS=0
    432 MCO:REG:NOT NEEDED
    457 MCO:BGN:STP
    *WM: 
    *WM: AutoConnect
    *WM: Connecting as wifi client...
    *WM: Already coWebServer started...
    *WM: freeing allocated params!
    552 MCO:BGN:INIT OK,TSP=1
    636 TSM:READY:NWD REQ
    1878 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    
    

  • Mod



  • @mfalkvidd thank you for quick reply. any chance of no signal after 20ish meeter (just outside the house) related to same issue?


  • Mod

    @pihome sorry, I have no idea



  • adding following line to sketch fixed the reboot issues for me, but signal problem is still here 😞

    #define MY_RFM69_NEW_DRIVER```


  • If you are experiencing the same range issues with different boards, that removes a rogue RFM from suspicion, so all that is left is implementation errors. Even at 868MHz reasonable range should be available.
    Presumably you previously tested range with a couple of a couple of pro-mini/? lashups and dipoles, perhaps comparing the two will give clues where it has gone wrong?
    You have not said which type or frequency or setup is used, but the photo implies these are the 'C' version, which have different pinout to the standard version. Presumably you have double checked this?
    Board faults aside, possibly the chip is not set to the correct frequency, antenna incorrectly matched or connected, or inadequate groundplane?



  • @zboblamont, @mfalkvidd
    Thank you both.

    Relay Node:
    Powered by 5v and using MIC5205-3.3v voltage regulator. 10uf & 100nf cap on radio
    Arduino 8Mhz with RFM69CHW at 433Mhz

    DS18B20 Sensors:
    Powered by 3xAAA battery and using MIC5205-3.3v voltage regulator. 10uf & 100nf cap on radio
    Arduino 8Mhz with RFM69HW at 433Mhz

    Gateway:
    Powered by 5v via micro USB to ESP.
    ESP8266 with RFM69CHW at 433Mhz

    First Test:
    Gain:2dBi-3dBi
    Wire diameter:0.6MM
    Spring outer diameter:5MM
    Total Length include soldering part: 34MM
    Coil Turns: 28
    Range around 20 to 30m while gateway was inside house.
    0_1577486723577_2019-12-27 22.32.18.jpg

    Second Test
    Gain:2dBi
    Wire diameter:0.5MM
    Spring outer diameter:5.5MM
    Total Length include soldering part: unknown
    Coil Turns: 17
    Range around 20ish meter while gateway was inside house.
    0_1577488748610_2019-12-27 22.31.27.jpg

    are there any customisations i can try in sketches to improve range? i.e max power level in sketch?

    #define MY_RFM69_MAX_POWER_LEVEL_DBM 100u
    


  • @pihome Whereas I understand the desire for physically short antennae for aesthetics or to fit within a specific case size, the trade off is always reduced performance even with a perfect ground plane. All my 433 MHz antennae are shrouded screw-ons of length 110mm, easily getting 50m+ comms from inside a RC/masonry building on standard power RFMs.

    Your final question looks to tweak the transmit power to overcome this compromise, ignoring receive gain being unaffected.
    Perhaps you might rethink at least the Gateway antenna to establish working comms at the hub, then figure out how to disguise it later.



  • @zboblamont
    i was expecting bit more range with 2dbi antenna, you are right i have to put better antenna gateway.
    are you referring to
    MY_RFM69_TX_POWER_DBM in sketch? on same note
    what would be different between MY_RFM69_MAX_POWER_LEVEL_DBM and TX_POWER, i have tried MY_RFM69_MAX_POWER_LEVEL_DBM to 100u but made no difference in range.



  • @pihome I wouldn't hold much store by claimed/calculated gain, it is a minefield... eg the 110mm whips referred to earlier are commonly referred to as 2dBi, quite a bit shorter than the theoretical 170mm quarter wave.... But crucially, they work flawlessly, on standard power modules, to 50+m, through structures.... Have not yet tested one in the below ground pump chamber, but would not be surprised if it worked.

    Although tempted to play with the auto-power facility on the RFMs when it was made available on the newer driver version, since the reduced erp would have limited impact on battery life, didn't pursue it.
    I would suggest seeking to increase power to overcome receive limitations MAY lift the signal out of the mush, but would not make for stable comms..
    Others here are better able to advise, but I vaguely recall a portable RSSI test setup having been outlined. So going back to a question from my first post, perhaps a couple of pro-minis so set up with differnent antennae would yield clues toward a solution.


Log in to reply
 

Suggested Topics

  • 35
  • 7
  • 2
  • 30
  • 9
  • 14
  • 14
  • 7

123
Online

9.4k
Users

10.0k
Topics

104.4k
Posts