Reading RF signal strength

Hello all,

I was wondering if anyone had any ideas of how I could measure the signal strength of radio frequencies. I am in the middle of a project that requires me to detect whether the RF signal from a 315 MHz key fob transmitter is close or far away. My assumption is that if you were within say 10 feet of the receiver without any obstacles the RF signal would be stronger than if you were 30 feet away with obstacles in the way of the RF signal. Am I correct in my thinking here?

I have currently tried to solve this problem by buying the AD8318 RF Power meter. I read that this is supposed to be able to convert RF signals into corresponding output voltages. I connected the devices according to the datasheet and attached an SMA 3.5 GHz antenna to it, but I still get no differnece of reading when I transmit an RF signal from the key fob.

Am I going about this the right way. Is there an easier/better/more cost effective way of differentiating between strong and weak RF signals from a key fob transmitter?

I am an electronics newbie, but any sort of help with this would be greatly appreciated! I will post the devices I am using below.

AD8318:
https://www.amazon.com/AD8318-Logarithmic-Detector-Measurement-1-8000MHz/dp/B074RFSLMP

Key Fob RF transmitter:

Can you add a second sensor and compare the time difference between the FOB signal? Or maybe a second Arduino & sensor at another location?

surveyranger:
Can you add a second sensor and compare the time difference between the FOB signal? Or maybe a second Arduino & sensor at another location?

Could you elaborate on this? I think it is a really good idea, I'd just need to know a little more of how to do it. How would I compare the time difference of the FOB signal from far away versus from up close?

Some receiver modules report the RF signal strength, but the measurement is generally useless as a distance indicator.

Check out anarduino.com for some inexpensive options.

Forget time of flight for the time being; only highly specialized circuitry can do that.

This is hard to do.

I would be inclined to try using a SYN470-based receiver (like RXB12) and reading the voltage on the CAGC and CTH pins. I'm not sure if this would work, or which one would be more useful, but I think this might be a viable approach.

The tricky part is that the signal sent by those isn't a constant on/off, but a repeating pattern (of turning carrier on and off) - in fact, the receivers commonly used with those only work if the carrier is being turned on and off with approx 50% duty cycle.

There are a HUGE number of variables that will effect signal strength though - interference, geometry of the surrounding area (the waves can reflect off things, or be absorbed by them, etc). Generally detecting distance via RF is much harder than people who ask about it on here think it is.

Measuring time difference is hopeless IMO - the different receivers will have their AGC's and thresholds auto-adjusted differently, so you can't trust that they'll react at exactly the same speed, and you're trying to measure speed-of-light periods of time.

StoodRaindrop23:
Could you elaborate on this? I think it is a really good idea, I'd just need to know a little more of how to do it. How would I compare the time difference of the FOB signal from far away versus from up close?

I'm not familiar with the AD8318, so I can't help much with that module. Different sensors will measure different things.

How good are you at Physics? Have you looked into what happens to a waveform as it travels? Comparing changes in a wave's properties is a good way to determine how far away it is.

DrAzzy:
This is hard to do.

I would be inclined to try using a SYN470-based receiver (like RXB12) and reading the voltage on the CAGC and CTH pins. I'm not sure if this would work, or which one would be more useful, but I think this might be a viable approach.

The tricky part is that the signal sent by those isn't a constant on/off, but a repeating pattern (of turning carrier on and off) - in fact, the receivers commonly used with those only work if the carrier is being turned on and off with approx 50% duty cycle.

There are a HUGE number of variables that will effect signal strength though - interference, geometry of the surrounding area (the waves can reflect off things, or be absorbed by them, etc). Generally detecting distance via RF is much harder than people who ask about it on here think it is.

Measuring time difference is hopeless IMO - the different receivers will have their AGC's and thresholds auto-adjusted differently, so you can't trust that they'll react at exactly the same speed, and you're trying to measure speed-of-light periods of time.

I really appreciate your thorough and thoughtful reply. I was starting to lean towards the feeling that this was going to be a very difficult thing to differentiate between. With that in mind, do you know of any other type of signal that I could send that would be easier to differentiate?

The main part of this project is that I need a small wireless device to trigger a receiver in the room a person is standing in, but it also has to not trigger a receiver in the adjacent room. The best solution I found for this was the wireless RF key fob, but the problem I am running into is that the signal is strong enough to trigger the receivers in both rooms, so I am unable to differentiate which room the person is standing in.

Any recommendations for small wireless devices that can transmit a reliable signal to cover the length of a room, but not reach any adjacent rooms would be very helpful.

Thanks again for the reply!

The first thing I see is you need to use an antenna for 315mHz to receive a 315 mHz signal. The other thing is the fob only transmits for a very few milliseconds when you push a button. Not much time to check signal strength.

Paul

Paul_KD7HB:
The first thing I see is you need to use an antenna for 315mHz to receive a 315 mHz signal. The other thing is the fob only transmits for a very few milliseconds when you push a button. Not much time to check signal strength.

Paul

Does this mean that a 3.5 GHz antenna will only be able to pick up RF signals transmitted at 3.5 GHz? If so, doesn't that limit the ability of antennas? Are there antennas that exist that can receive multiple frequencies of RF signals? Thanks for your reply... I think I'm getting on the right path here!

StoodRaindrop23:
Does this mean that a 3.5 GHz antenna will only be able to pick up RF signals transmitted at 3.5 GHz?

No.

An antenna may be designed and tuned to maximise 3.5Ghz signals, but will also receive up other frequencies, but not as well.

StoodRaindrop23:
Any recommendations for small wireless devices that can transmit a reliable signal to cover the length of a room, but not reach any adjacent rooms would be very helpful.

Thanks again for the reply!

It might just be possible to calibrate a system so that you almost achieve that for a specific and particular location.

But there is no practical way of making it universal, rooms vary in size too much as does the signal attenuation of walls.

StoodRaindrop23:
The main part of this project is that I need a small wireless device to trigger a receiver in the room a person is standing in, but it also has to not trigger a receiver in the adjacent room. The best solution I found for this was the wireless RF key fob, but the problem I am running into is that the signal is strong enough to trigger the receivers in both rooms, so I am unable to differentiate which room the person is standing in.

Any recommendations for small wireless devices that can transmit a reliable signal to cover the length of a room, but not reach any adjacent rooms would be very helpful.

Thanks again for the reply!

I do not think this is viable to do with RF; furniture within a room is often less transparent to RF than walls between rooms. We constantly have people asking about this. I have yet to hear of anyone reporting success with it.

Maybe you'd have better luck with IR, maybe with a brighter LED than is usually used so that the light reflecting off walls would be enough to trigger it within the room, but the closed door would keep it from getting into the next room.

I signed up just for this.

You want two receivers, not one. Maybe three or even five. You can't determine how the fob's signal strength will appear at any moment, but you can determine the differential of two signals. Because strength from a point source is related to the cube of the distance, you can use the ratio of signal strength between antennas to determine relative distance. No matter the initial signal strength, this ratio will be an effective trigger.

Please note, this is how many detectors work for listening devices; it's old, reliable, solid-state thinking. Calibrated signal inputs to an Arduino should be even easier.

Edit: For more helpful commentary:

Bottom line up front:

This code is untested, please see the annotated pseudocode and explanation below!

bool isRange(float In1,float In2,float Trigger)
{
if((In1/In2) >Trigger)
{
return true;
}
else if((In2/In1) > Trigger )
{
return true;
}
else
{
return false;
}
}

Explanation:

When you drop a pebble in a still pond, ripples expand from the center. As they get further and further away, the peaks and valleys get smaller and smaller. This is because the larger the rings, the larger the circumference that needs energy. RF is basically the same in three dimensions, so bear with me and I’ll tell you how it changes later.

The circumference of a circle is pir2. We can estimate the amplitude as a constant K and an initial energy I spread across that circumference. => A=KI/pir^2

If the peaks are a quarter inch high at one inch in radius, then => .25 = KI/pi12, or .2512 = KI/pi

Since K and Pi are constants that we don’t care about, we can estimate I as .25. From there you can determine any amplitude through A = 1/r2, so at .5 inches we expect a peak at 1/.25, or four inches, and at two inches 1/4 or, of course, .25”

As we’ve noted, we can’t actually use the amplitude to find the range, K actually isn’t constant, as it contains attenuation factors from the environment. However, we solve for it anyway => r=sqrt(A*pi/(KI))

There are too many unknowns, but if we add a second microphone, we get another way to eliminate the unknowns. By definition, K, pi, and I are all now constant between the two equations. Playing with the equation again, we can define it as A/r^2 = KI/pi.

We place the first radio, as A1 and R1, and the second as A2 and R2. So => A1/R12 = A2/R22

Then we modify the equation to => A1/A2 = R12/R22

From here you can look at the simplest example: a linear array. If you have two sensors a foot apart and want a trigger at 10 feet, you can use R1=11 and R2=10, then A1/A2 = 1.21.

Two problems: first, we’re still looking at a pond. The surface of a sphere is 4/3pir^3. But those are all constants except for radius. We switch to A1/A2 = R13/R23 and call the new ratio 1.331

Second, this only detects a wave from one direction. We can solve that by setting up a trigger with the reciprocal as well.

So, let’s pseudocode this, because I haven’t touched Arduino in too long.

T = (Trigger Level)

main(){
In1 = (Amplitude from unit 1)
In2 = (Amplitude from unit 2)

isTriggered = (a boolean that is true if the level has been surpassed)

if ([In1/In2] > T)
isTriggered = True
elif ([1/[In1/In2]] > T) // (or In2/In1)
isTriggered = True
else
isTriggered = False
}

What’s happening here is you’re defining a trigger level that takes into account your desired distance, hardware configuration, amplifiers, etc. Then the radios are polled, and if the ratio or the reciprocal (needed to see if the object is within the radius in the other direction) exceeds the threshold then it sets the trigger state. Roll this into a function with a return and you’re good to go.

Now, hardware wise, this is very linear in its detection. At 90 degrees off axis the system will likely never trigger. If set up as a three antenna system, this directionality would be removed, but I’ll leave the coding response and trigger level development up to you. An elephant cage system, with an inner and outer antenna array, is another alternative, but a waste of resources in your case, as you’d need a receiver for each antenna in both arrays. Feel free to look up the sites in question, they’re fascinating relics of long-wave communications during the Cold War, but I imagine they still have uses.

I’ve been working on the electronic side of this for a while, but haven’t gotten around to building one yet: do so at your own risk.

Also, if you get radios that output in dB, remember that these are logarithmic units and the trigger ratios will be very different, but with good signal/noise, you can handle large ranges or small array sizes. In any case, it’s important to know your hardware.

Let me know if I made a mistake you need further help.

in theory these are what you need:

1-500Mhz digital OLED RF Power Meter Power Set RF Attenuation Value + software

Digital LCD RF Power Meter -75-16 dBm 1-600MHz Radio Frequency Attenuation Value

1MHz~10GHz -50~0dBm RF power meter Can set RF Power Attenuation value

but I'm waiting for some chump to buy them and review them. the third one does not appear to have a tuning mechanism

[quote author=Geek Emeritus link=msg=4337111 date=1571099487]the third one does not appear to have a tuning mechanism
[/quote]

Would tuning be preferable to a simple band-pass filter?

tuning is a tight band bass filter. tuning rejects all but one frequency. a band pass filter would allow irrelevant signals to intrude. there is not much chance that you have dozens of 315 mhz transmitters around, so if you have one a bandpass filter should work