Forum > Embedded

Wifi signal strength test for ESP controllers + cantenna

(1/2) > >>

ccrause:
This post is not primarily about Pascal, but hopefully will inspire some to combine Pascal, microcontrollers and a bit of DIY.

There are spots around my house that is not properly covered by my single wifi router (TP-Link TL-MR3420 v2 running OpenWrt). I thought it would be interesting to build a cantenna on the cheap to see how much one can improve wifi (2.4 GHz) signal. Doing it cheaply was my main motivation, so instead of the recommended 50 Ohm cable and SMA connectors, I settled for an RG6 TV cable with F-connectors.  The coaxial cable was connected to an ESP32-WROVER-IB board with a U.fl connector (connector stripped form an old DSL router) soldered to the end of the RG6 coaxial cable.  So pretty much not how it is supposed to be done... Attached a picture of the cantenna mounted (with sticky tape) to a tripod.

To record the wifi signal strength I wrote a simple Pascal program that connects to the router and send the RSSI value over serial every second.

For reference other boards with build-in antennas were also tested, see attachment Wifi signal tests.png.  In this test the cantenna signal was on average 8 dB stronger than the best board.  Surprisingly the humble ESP-01 came second out of the boards with onboard PCB antennas. Another interesting observation is that the bottom three boards all have their modules with PCB antenna mounted on top of another PCB that covers the bottom side of the antennas.

In general the best orientation for signal strength is when the copper tracing of the PCB antenna is facing the router.

MarkMLl:
Cantenna design can be very hit-and-miss.

A couple of years ago I needed something in a hurry, and knocked together an approximation based on two Tesco drinking chocolate cans sweated together and a probe made out of an SMA connector.

It's good enough to identify the access points at the airfield about 3/4 mile away.

Unfortunately I had to use the wrong gender of connector, which meant that even though apparently well-tuned (in defiance of the "standard" dimensions) I was potentially losing signal due to reflections at the adapter I had to use to connect to the Ralink Wi-Fireceiver.

Even more unfortunately, despite a significant amount of faffing around with a lathe, I've not yet been able to improve things.

See https://www.eevblog.com/forum/rf-microwave/cantenna-implementation-just-how-tricky-is-it/msg4903340/#msg4903340

Updated: in a slightly different context (ADS-B antenna for local rather than extreme-range coverage) I found xnec2c as shipped by Debian interesting. However I didn't get far enough into it to work out whether it could cope with a waveguide-to-probe transition.

There are of course two ways of looking at this: /either/ seek to analyze the performance of whatever materials are available, /or/ tool up with enough metalworking gear that you can fabricate waveguides and horns to precise dimensions.

MarkMLl

dbannon:
At these frequencies, antenna design is as much magic as science. But it is a space where size does matter.

I am interested in what chips you are targeting ?  I dipped my toes into the water early last year, then all I could buy was the ESP32-C3 and their RISC-V was a problem.

You seem to be using the (lot older) ESP-DOWD ? You have done some great work in that repo but does it translate to more available chips like ESP32-S2 and boards like  Wemos S2 Mini ESP32-S2 ?

(I have moved my work over to RasPi Zero, lot more power but easier. And an ADS1115 A/D walks all over that RasPi Pico.  But be fun to test the ESP model.)

Davo

ccrause:

--- Quote from: MarkMLl on February 02, 2025, 09:16:08 pm ---Cantenna design can be very hit-and-miss.

A couple of years ago I needed something in a hurry, and knocked together an approximation based on two Tesco drinking chocolate cans sweated together and a probe made out of an SMA connector.

It's good enough to identify the access points at the airfield about 3/4 mile away.

Unfortunately I had to use the wrong gender of connector, which meant that even though apparently well-tuned (in defiance of the "standard" dimensions) I was potentially losing signal due to reflections at the adapter I had to use to connect to the Ralink Wi-Fireceiver.

Even more unfortunately, despite a significant amount of faffing around with a lathe, I've not yet been able to improve things.

See https://www.eevblog.com/forum/rf-microwave/cantenna-implementation-just-how-tricky-is-it/msg4903340/#msg4903340

--- End quote ---
Interesting read, thanks.


--- Quote ---Updated: in a slightly different context (ADS-B antenna for local rather than extreme-range coverage) I found xnec2c as shipped by Debian interesting. However I didn't get far enough into it to work out whether it could cope with a waveguide-to-probe transition.

There are of course two ways of looking at this: /either/ seek to analyze the performance of whatever materials are available, /or/ tool up with enough metalworking gear that you can fabricate waveguides and horns to precise dimensions.

MarkMLl
--- End quote ---

I've used xnec2 to analyse the dimensions of my can.  The gain seems to be reasonable, but VSWR is terrible (> 10).  Next test should probably be a throughput test.

Data rate is however not always important - I installed a pump controller at a friend's and wanted an http interface so that the status and history can be viewed over local wifi.  A standard ESP32 module could not connect to the local wifi due to poor signal, a similar cantenna (toilet brush holder) ensured a stable connection and access to the onboard web pages.

ccrause:

--- Quote from: dbannon on February 03, 2025, 03:12:33 am ---At these frequencies, antenna design is as much magic as science. But it is a space where size does matter.

I am interested in what chips you are targeting ?  I dipped my toes into the water early last year, then all I could buy was the ESP32-C3 and their RISC-V was a problem.

You seem to be using the (lot older) ESP-DOWD ? You have done some great work in that repo but does it translate to more available chips like ESP32-S2 and boards like  Wemos S2 Mini ESP32-S2 ?

(I have moved my work over to RasPi Zero, lot more power but easier. And an ADS1115 A/D walks all over that RasPi Pico.  But be fun to test the ESP model.)

Davo

--- End quote ---
Michael Ring and I have tested building esp-idf for all controllers supported up to v5.1 (S2, S3, C2, C3, C6) I think and linking with FPC.  This works.  It does mean updating all Pascal bindings for new versions.  Espressif is rolling out new versions quite often, so keeping up with changes in bindings and testing it is very time consuming. Even now not all peripheral libraries have been translated even for esp-idf 4.3.  More manpower would help...

Navigation

[0] Message Index

[#] Next page

Go to full version