Extending the transmission range of Sonoff PIR-3RF (and other) 433MHz sensors

Like many other 433MHZ devices, the Sonoff PIR-3RF sensor uses a serpentine track on the PCB as an antenna. This makes for a very compact device, but it is not optimal for achieving long range to the receiver.
So as a quick aside, let’s first talk about receivers: In my case the receiver is a RXB6 board connected to a Sonoff Basic flashed with tasmota-sensors. I had no joy with the receiver shown at left below – it is a so-called super-regenerative type, very cheap, but far too noisy to be useful. Avoid it. The superheterodyne RXB6 is powered by 3.3V and GND from the Sonoff, with the data line connected to GPIO3 (the RX pin) – this means I could simply plug the receiver into the pins I had soldered onto the Sonoff for flashing. And of course Tasmota is configured to use the RX pin as an RFRecv input, relaying received messages to Home Assistant via MQTT. This is far cheaper and more versatile than using the Sonoff RF bridge.
Picture1Picture2

The receiver has an insulated solid-core copper wire soldered to the antenna pin.
What length should the transmitting and receiving antennas be? The simplest would be a quarter-wave antenna, preferably oriented vertically, using the earth as a reflector, which, unfortunately, is rarely practical with these devices when mounted where they normally are. Anyway – the wavelength is of course dependent on the frequency (433.92MHz), as well as the group velocity in your insulated copper wire antenna (which in turn depends on the dielectric constant of the insulation around your wire). Opinions vary on what the magnitude of this effect may be – probably around 0.95, which is similar to that of bare copper wire vs. free space. In other words:
λ/4=(c * 0.95 * 0.95) / (4 * 433.92) = 156mm
This is slightly shorter than the lengths usually suggested on the intertubes, mainly because the effect of the insulation is often neglected. A perfect quarter-wave antenna should present as a purely resistive load to the transmitter, which is probably a good idea. In reality it does not seem to be that critical, although it is bound to make a difference of a dB or two in the effective gain, but what is that between friends?
Now at last we come to the Sonoff PIR-3RF. Open it up, remove the battery, pry out the plastic cover below the battery, and remove the PCB:

The meandering antenna can be clearly seen. Scrape off the conformal coating in the corner, and cut the track completely just above it, as shown by the red arrow. We are left with about 26mm of track on the PCB, measured from its apparent start below the battery connector, where it says C3, to the corner of the PCB. We therefore need to add another 130mm of antenna, assuming the retained piece of track behaves like our wire, which it probably does not, being closer to a stripline, which would substantially increase its electrical length. But at least the remaining part of it is relatively short, and as mentioned before, it is not that critical anyway. Tin the cleared track, solder your wire to it, and trim it to length, measuring from the edge of the board. Alternatively, you can solder a wire to the track right below the battery connector at C3, and cut the track at its first corner, right below the lower slanted rectangular hole. In this case you would use the entire 156mm of wire, extending it downwards rather than to the right as I have done here.


Inside the housing of the PIR-3 the top surface of the PCB sits 9mm below the edge. Drill a hole in the housing about 8mm down from the top edge, in the corner, thread your wire antenna through it, and close everything up again.

Also shown is the 20x3mm round Nd magnet I use to mount the sensor – a year or two down the line, when the battery must be changed, I shall be glad that I did not stick it down using the double-sided tape. The magnet attracts the battery, and it is strong enough to comfortably carry the sensor even when stuck to the mere head of a screw. It makes relocation of the sensor easy too. Additionally, the PIR-3 is set into Normal mode, which reports movement when first sensed, but then needs at least 60 seconds of no movement before it will report again. This should substantially increase battery life, especially in busy areas, because the RF transmitter is the main power hog. Change modes by pressing the button (using a toothpick or similar) for about 5 seconds, until the LED lights up red for a few seconds. If it shows green you are in Alert mode, so do it again until you get it right.
It is also probably a good idea to orient both the transmitting and receiving antennas vertically, as the radiation pattern is supposedly approximately doughnut-shaped around the antennas. I have no idea what walls and door frames are likely to do to the pattern, though.
Lacking any patience, or RF measurement equipment (or knowledge, as patently demonstrated above) I cannot quantify the improvement, except that this modification has enabled me to use the Sonoff PIR-3RF sensor reliably in a room whence previously I could not receive anything at all. A similar modification on a 433MHz door sensor also turned it from useless to apparently reliable at its rather challenging desired installation point inside a metal garden shed.
Except for some keyfob transmitters, on which a dangling wire antenna may be problematic, I therefore now modify all my 433MHz devices this way, reasoning that more (signal) is probably better, even when it already works out of the box.

1 Like

@Kladrie this is really cool, thanks! I just bought this sensor. I attempted to change modes using the 5 second press, but it just reenters the pairing mode. I don’t get any green lights. Any suggestions?

Thanks!

What a brilliant, thorough post… thank you! Can’t wait to try it out but you lost me at this part:

Can you break this formula down for me? What do each of the variables in the formula mean?

What I’m really wanting to find out is if the diameter of the copper aerial makes a difference?

The standard formula for wavelength is:

λ = c / f

Where:
λ = Wavelength for the target frequency
c = speed of light in vacuum
f = frequency (MHz)

Normally, you would multiply c by the velocity factor of the material of the conductor (0.95 for bare copper wire). OP is making an assumption that insulated copper wire compared to bare copper wire will decrease the velocity about as much as bare copper wire compared to vacuum… that is why they multiply by 0.95 twice.

A larger diameter conductor can provide more bandwidth than a thinner conductor and will alter the capacitance and inductance of the antenna but unless you are planning to use something crazy thick or hair-thin, it shouldn’t matter that much for this use case.

1 Like

Thanks for the detailed reply, much appreciated. I attached 0.5mm wire as per the original post and I definitely got extended range. This was a fun hack