ESP with directional aerial

One of the pieces of the puzzle which is my greenhouse project is communicating back to my apartment.

Due to me renting and the position of the (kitset 1.8m x 1.8m) greenhouse, running power or PoE is not feasible, so It’s going to rely on solar power … but that’s a different issue.

I am currently setting up an ESP32-CAM (never got the camera working, so ignore the cam) to take readings from several sensors on a regular basis to send back to my Home Assistant setup inside my apartment. While I’m bench testing, it is working great using the built-in wi-fi aerial … but I half expect that the distance from the greenhouse to the laundry could be too much for the tiny built-in aerial.

In the shared laundry (closest to the greenhouse - less than 10m) I have (until it died a few days ago) a TL-WPA4220 powerline wi-fi adaptor which would happily connect to my mobile phone in the greenhouse. I am conscious of the amount of metal appliances in the laundry, that radio signal are absorbed by rain, and that the ESP’s built-in aerial is almost certainly smaller and probably weaker than a mobile phone’s aerial.

So thinks I, the ESP32-CAM has a tiny connector for an external aerial (as do several other of the ESP32 boards), and I could use a directional antenna at the greenhouse end. Assuming i’m on the right track I found Core products:

  1. Directional Patch 2.4Ghz SMA Articulated Antenna (Seeed Studio) - do you really only have one directional aerial ?
  2. 3 different SMA to U.FL Interface Cables which appear identical except the manufacturer and price

Alternatively Dual Band Antenna - U.FL (2.4GHz, 5.8GHz) looks cute, but I’m guessing it’s omnidirectional (the datasheet says very little), so might be marginal.

So I’m asking for a sanity check. Does this sound reasonable, and are these the products I will need ? Is there a preference for the cables or will the cheapest work just as well ?

I have an ESP32 running inside my tin shed with an omni antenna I scavenged from an old wifi router. The shed is about 20m from where I have my wifi repeater setup and it works fine. So you may not need a flat panel directional antenna for your project, the boost in signal strength you get from almost any well made antenna will often do the trick. I’ve even made my own 1/4 and 1/2 wavelength antennas out of a piece of copper wire with ESP boards that have the UFL connector on board and they work well too.

That being said the parts you linked should work fine, I’d just go for the cheap ones myself.

Edit: I just checked how far away the shed is to make sure I wasn’t leading you astray and it’s only 15m from where I have my repeater. The ESP is located about 1m further inside the shed but it’s been working well even with the doors closed.

Hi Donald,

At that range I’d recommend testing it before getting an antenna. I’ve streamed video from one of my ESP32s a bit further than that in the past without using its antenna. Let us know how you go.

1 Like

Thanks Todd and Jack.

It costs me nothing to start by using the ESP32-CAM as is :wink:
I’m sure I can scavenge an antenna from an old wi-fi something, as plan “b”.
And if that proves unsatisfactory then plan “c” can be buying the directional antenna … and all I’m out is the cost of a RP-SMA to U.FL cable at plan b. I can live with that.

Thank you both for easing my mind about that aspect of this project. Now I just have to arrange to replace the powerline + WAP in the laundry. Might not get it in the budget before christmas though :frowning:

2 Likes

Hi Donald

You need to keep the length of the cable very short or you could lose more than you gain with cable losses.
Cheers Bob

Sometimes just the way you mount the device (ESP32 CAM) in your case can make a difference in regards to range. I’ve never seen an analysis of the radiation pattern emitted from one using the printed antenna built into the board but the design is really a compromise to cram it into a small space, so its output pattern would be far from optimal.

So if you experiment with the orientation of the CAM board (without an external antenna) sometimes you can gain a few metres of range because it can help you match up the polarisation (it’s not really poarisation but that’s a simple way to explain it) of the sending and receiving antennas. The same applies to an omni antenna, you want the antennas both aligned roughly the same way ie have them both in a vertical position or both in a horizontal position and both antennas parallel to each other.

If you have obstacles in the line of sight between the sender and the receiver some weird things can happen to the signal along the way, so the optimal orientation and the antennas can be affected. So in that case the alignment of the antennas might need to be adjusted slightly.

1 Like

The ESP32-CAM typically has a U.FL connector for an external antenna. So, the antenna you choose should be compatible with this U.FL interface.

I assumed it is just a matter of using a short cable with U.FL connector at one end, and the appropriate connector (probably SMA or RP-SMA) at the antenna end.

Can you provide a link to more info about this antenna compatibility issue, because my search didn’t find anything obvious.

Hi Donald
You will have to have a close look at this UFL connection or it might be in the documentation.
There might be a solderable link to select internal or external antenna use. If you use an external antenna you will have to make the appropriate connection. I don’t think it would be a good idea to try and use internal and external antennas together. May not work too well.

Study this SMA business as well. There are two flavours, SMA and Reverse SMA. The reverse is where you find a male pin instead of an expected female socket and vice versa. I don’t know of any laid down standards for antennas, there might well be.
Cheers Bob