# 434 RF Transmitter and Receiver for distance measurement problem

As a student I'm working on a project where we use 434 MHz RF Transmitter and receiver pairs for distance measurement. I know that this technology is not a good choice for this, but we have to deal with this problem due to external constraints.

I did a little bit of research how these receivers works, but I found it a bit overwhelming to understand them bit by bit.

We want to use the signal strength for distance measurement. So we tried sending pulses of signals from one transmitter to a receiver. If the amplitude of the signal received is higher than a certain value (let's say 3V), it sends back a signal (let's call it trigger signal) in the gap between the two pulses.

The problem is that that these signals seems to affect each other even though they are not in the same time (so it's not superposition that we are talking about). When there is a signal sent back, the next pulse will be lower, which results in false distance measurement.

The whole difficulty is (to me it seems) that we are not using these signals to send data, we are using it for distance measurement. My idea is that we are using too long pulses and the AC coupling in the receiver doesn't tolerate it, but again, I don't have enough electrical knowledge to safely say that.

I know this is not descriptive, but I don't know how to make it more descriptive, so I'm happy to answer more questions on demand.

• Did you read about the RX module? Does it have AGC (Automatic Gain Control)? If is does it will increase gain until noise level. When a signal is detected it has to "tune back". Mar 10, 2016 at 22:24
• Where can I read more about that? Or what is that for? Mar 10, 2016 at 22:40
• This does sound like transmitting the reply could be desensetizing the receiver's AGC. Perhaps you can run some tests by sending pairs of pulses in one direction a varied time period apart, and a looking at how the amplitude of the second received pulse varies based on the time delay. Perhaps you can simply reduce the experiment frequency to give the AGC more time to recover, or transmit the reply by some other means (2.4 GHz? IR?). Even better implementations of your RSSI distance idea (BTLE chips for example) are less than impressive. Mar 10, 2016 at 23:35
• What do you mean by reducing the experiment frequency? Isn't increasing what would be reasonable here? So it doesn't set its noise level to a new value? Mar 10, 2016 at 23:41
• That depends on which AGC gain you want. I was thinking by waiting longer after each reply pulse (or opportunity) before a new transmit pulse, you could let the AGC reset. Though I suppose an alternative would be to wait less time, and try to keep the AGC active. To do that you would need to always transmit a reply. Perhaps you could encode the result in a variable delay between the outgoing pulse and the reply, but always make the time from the reply to the next outgoing pulse the same. If you miss a reply entirely, you'll probably have to ignore the next one given the unkown AGC state. Mar 11, 2016 at 1:12

It is very likely you have an AGC problem. Try to slow down the measurement. The sender shall send data not often than once per second.

This idea is not fully perfect for doing a distance measurement. It measures incoming power strength - affected by walls, reflection, AGC of the receiver, and a lot more. If you have a scope, measure the waveform on the pin 3 of the module (linear out). It is not a constant voltage, I am afraid, so you need some sort of averaging too.

A tricky way to get along even if you have an AGC is to measure how long the AGC needs to settle. The AGC works as follows: it detects the signal, and within some time (say, 2ms) it will change the amplification so that the signal will look having the full amplitude.

• compare on a two channel scope the signal pulse driving the transmitter
• and the signal on the pin 3 of the receiver module

If you are lucky, you'll see that actually pin3 or pin2 output is delayed a bit compared to the transmitter driving pulse. The delay depends on the power of the incoming signal to the receiver, which depends on the distance.

I was able to make an acceptable distance sensor from a standard AGC enabled IR receiver using the principles above.

• We got around the problem today by sending 2ms pulses and 100ms gaps. This seems to solve the problem on the scope level. The thing is that our Arduino delays seem to be not precise enough to read the 2ms pulse in the right time, but that's another problem. Mar 11, 2016 at 20:09
• I found that delays are surprisingly precise. However, you have to have some mechanism to get the rising edge of your pulse first. For that, you either need a simple loop which checks for the pin state with digitalRead, and once a rising edge is found, you can start timing. But, aren't you planned to read the analog value on pin 3 of the module? Mar 11, 2016 at 20:55
• I don't know why I haven't accepted this answer before. It was a very old project and I do remember that making a sensor using an RF receiver is not a good idea. The automatic gain controller (AGC) was a significant problem. You would want to use probably something else but that wasn't available for me back then in an university setting. Dec 2, 2020 at 13:16