Hi Andrew
Nice time lapse sequence!
A few thoughts on your WiFi connection problemā¦
One of the problems with the RPi WiFi sub-system is that the antenna is embedded in the PCB, and while the actual antenna design is pretty clever, the overall performance is generally quite constrained by the location of the device and the presence of surrounding materials that absorb and reflect the signal.
Typical WiFi āstickā antennas offer gains of a few dB, but the placement of the antenna can easily affect the end to end signal path by several 10s of dBs.
A general rule of thumb for maximising WiFi range is to place the antennas as high as possible above the ground (at least 2-3 metres), and try to get a clear line of sight between the WiFi stations.
This is due, at least in part, to the Fresnel Zone effect:
https://www.digitalairwireless.com/articles/blog/fresnel-zones-what-are-they-and-why-are-they-so-important
For a simple vertical āstickā antenna, the signal is radiated in a pattern that is strongest in the horizontal direction. Plotted in 3D, the signal strength looks like a doughnut shape around the antenna. As the antenna gain increases, the doughnut flattens out ie more signal is pushed horizontally, and less vertically.
It is relatively easy to get a working range of several hundred metres between standard WiFi devices with simple omni-directional āstickā antennas, as long as they are properly positioned with a reasonable line of sight.
For the RPi, it is generally not practical to fit an external antenna as such, so it is usually necessary to adopt an alternative approach which involves providing another WiFi device connected to the RPi using USB or Ethernet.
The Alfa USB WiFi adapter device that you mentioned should provide a good omni-directional signal from its 5dB antenna, and you can use several metres of USB extension cable to locate the antenna in the best possible position, without incurring any RF signal loss as you would with an antenna connected by RF coax cable.
One thing to note about using USB WiFi adapters with the RPi is that not all USB WiFi adapters will support AP mode on the RPi - some will only support Client mode.
A second issue is that the RPi needs to have the software driver for the particular WiFi chipset loaded. The standard RPi image has a range of drivers pre-installed for common chipsets, but I donāt know whether the MT7610 chipset used in that Alfa device is specifically supported by default in the RPi software.
However there are many low cost USB WiFi adapters that will work with the RPi, at least in Client mode.
This device is based on the MT7601 chipset, and works quite well, but only in Client mode on the RPi:
https://www.ebay.com.au/itm/195295928535
Another alternative is to connect a second WiFi device to the RPi by Ethernet. I have successfully used the GL-iNet travel routers for this purpose.
https://www.gl-inet.com/products/gl-ar300m/
https://www.gl-inet.com/products/microuter-n300/
https://www.gl-inet.com/products/gl-mt300n-v2/
The AR300M is available with external antennas, but even the devices with internal PCB antennas will work quite well when suitably positioned.
These devices are USB powered and use around 200mA of current, and so will run from a USB battery pack for many hours.
You can also use simple passive Power over Ethernet adapters to deliver power and data over the same Cat5 cable.
https://www.ebay.com.au/itm/275278064420
In this arrangement, the internal RPi WiFi is not used and can be disabled. The router device can be configured as either AP or Client, depending on how you want to connect the phone/tablet device at the other end.
In a simple set up, you can run the WiFi Router connected to the RPi as an AP, and have the phone/tablet connect to it as a WiFi client. The RPi and the phone will be assigned IP addresses by the router and so establish a network connection.
It is probably worthwhile setting up a static IP for the RPi so that you know its URL in advance.
Of course the WiFi performance of the phone/tablet is also constrained by its small internal WiFi antenna and the presence of nearby objects (such as a human hand wrapped around the phone).
One way to get around this problem is to provide a second WiFi Router.
In this scenario, you would run the WiFi Router connected to the RPi as a Client, and the second WiFi Router as an AP. The phone would connect to the AP, and thus get a network connection to the RPi via the WiFi Router Client device.
You can position the second WiFi Router so that it gets good signals from both the RPi end and from the phone end.
You can even use this arrangement to āsee around cornersā.
For example if you have a hill between the RPi and the phone/tablet, then you can position the AP WiFi router on top of the hill where both devices can see it, even though they canāt see each other.
As a last resort, you can change the radiation pattern of an omni-directional antenna by using a simple reflector to make it somewhat directional. This technique can typically add a few dB of signal strength.
https://electronicsdesk.com/corner-reflector.html
https://www.pcworld.idg.com.au/slideshow/261270/extend-your-wi-fi-range-parabolic-reflector/
I hope some of this might be helpful. Please post back and let us know how you go.