RSSI in short range

Started by momoshiro94, February 27, 2018, 08:23:19 AM

momoshiro94

Hi,

I am using two RFM69HCW 434MHz modules to communicate each other. One is acting as the receiver while the other one as an emitter.
Both of the modules are each powered through an Arduino Mini Pro 3.3V 8MHz.
I would like to use them in an indoor situation and the range I want to work on is around 1 to 2 meters maximum.
Here is my problem:
I would like to use RSSI to determine the distance between these two modules but for some reason:
- Between 0 and 0.5m: the RSSI is decreasing quickly from -65 to - 100 ,which is accurate.
- Between 0.5 and 1 meter:  the RSSI start increasing again ( -100 to -77) , which is not what I expected.

I am new concerning radio frequency communication, but I looked into the register and datasheet,  it is possible to play with parameters such as bitrate, frequency deviation, Rx bandwith, LNA, AGC, AFC but I do not know if it will solve my problem.
Is there a way to correct the RSSI accuracy somehow?

On the other hand, a solution that can also solve my problem without using the RSSI method is to limit the range to 60-80cm maximum which means that if the emitter is outside of this area, the receiver will not detect it. But after a few tests I think it is not really possible to accurately limit the range like this as I need to take in count the interferences such as wood, metal, human body.

Thank you for your help in advance.


TomWS

This range is WAY TOO short for an HCW or even a CW to get a meaningful RSSI reading.  I suspect the reason the RSSI is falling off as the radios are moved closer is that the receiver is significantly overpowered and is heavily distorted.   

I doubt that you can get a reasonable relationship between RSSI and distance until at least 10M (maybe 5M) and even then, only if TX levels are kept low, AGC is disabled, and you step the LNA gain in code (so you know what the gain is).

Tom

momoshiro94

Thank you for your reply.

I will try to disable AGC firstly to see what happened. Do you think the module RFM69 would be able to have a more reliable RSSI since its power will be at -18 minimum compare to the RFM69HCW which the minimum is 5dB ( I saw it somewhere) when I use the function radio.setPowerLevel(0)?

LukaQ

with H version I have one next  to other with RSSI just under -30

momoshiro94

Quote from: LukaQ on February 27, 2018, 04:10:26 PM
with H version I have one next  to other with RSSI just under -30
What happen if you move one away from the other, will the RSSI increase then decrease like I described in my post or will it always decrease?

I tried to disable the AGC by adding this inside the function radio.initialize():
/* 0x14 */{ REG_AGCREF, RF_AGCREF_AUTO_OFF},
and by commenting
/* 0x6F */{ REG_TESTDAGC, RF_DAGC_IMPROVED_LOWBETA1},
.
It's the first time I am using register so I might be wrong.  It seems like The RSSI became less stable than before, I am trying to modify the LNA register but I think It does not work like that, does it?
/* 0x18 */{ REG_LNA, RF_LNA_ZIN_50 | RF_LNA_LOWPOWER_ON | RF_LNA_GAINSELECT_MAXMINUS48},

TomWS

Don't worry about initialization parameters.  Let it set up normally and then tweek the parameters using:
  radio.writeReg(REG_LNA,xxxx);

etc, based on what you want to try.

Tom

LukaQ

Quote from: momoshiro94 on February 27, 2018, 08:15:07 PM
What happen if you move one away from the other, will the RSSI increase then decrease like I described in my post or will it always decrease?
As expected, always goes down, when distance is larger. Changes when one is next to other, is most of the time very little only 1-2dBm, unless you bring hand or something like that close to antenna. What is your antenna anyway? how long?

momoshiro94

Quote from: TomWS on February 27, 2018, 09:05:43 PM
Don't worry about initialization parameters.  Let it set up normally and then tweek the parameters using:
  radio.writeReg(REG_LNA,xxxx);

etc, based on what you want to try.

Tom

Thank you , I didn't see it like that

Quote from: LukaQ on February 28, 2018, 12:12:52 PM
As expected, always goes down, when distance is larger. Changes when one is next to other, is most of the time very little only 1-2dBm, unless you bring hand or something like that close to antenna. What is your antenna anyway? how long?
I do not have antennas on both modules as I would like to work on a short range and I know that if I want to place an antenna on a 434MHz module, it has to be 1/4 of the wavelength which is arount 16-17cm, it has to fit inside the box. I  think I did something stupid, which is soldering a female pin on the GND and ANT (because I thought it would be easier to change the antenna without solder it again and again) which may be the reason of the unstable RSSI. but no matter how I look at that, I start to believe that RSSI is not the good idea to calculate the distance between them, as I intend to work indoor.