After initially finding that I couldnβt tune the 868Mhz ground plane antenna with the radials bent down at 45 degrees I decided to experiment to find out why.
Initially I had the radials connected to the 4 corners of the base of the chassis mount N Type socket. This works great if you have the radials completely horizontal and gives an SWR of 1.1:1 but, with the radials bent down at 45 degrees the best SWR is around 2:1.
M0AWS 868Mhz Ground Plane Antenna Close Up
Removing the radials from the base of the N Type chassis socket and soldering them to the outer of the N Type plug at the same level as the feed point for the radiating element I found that an almost perfect SWR can be achieved very easily.
M0AWS 868Mhz Antenna with radials soldered to the N Type Plug
It seemed weird to me that such a small change could have such a big effect on the obtainable SWR for the antenna but, as can be seen in the image below with the radials soldered to the N Type plug and bent downwards I immediately got an SWR of 1.07:1 and a much wider SWR curve.
M0AWS 868Mhz Antenna SWR curve with radials soldered to N Type plug.
By making my own antennas Iβm learning a lot about antenna design for the 800-900Mhz frequency range. Minor changes seem to have a much bigger impact than they do at much lower frequencies.
In my quest to improve my Meshtastic signal range using home-brew antennas Iβve finally put together a neat little ground plane vertical antenna for the 868Mhz ISM band.
The design follows the normal ground plane simplicity using 4 radials and a vertical radiating element albeit on a tiny scale. The radiating element is 82mm long and the radials are each 92mm long.
M0AWS 868Mhz Ground Plane Vertical Antenna
Initially I modelled the antenna at a height of 3m above the ground with the radials tilted downwards at 45 degrees. I took this approach as this is how I have built ground plane verticals for the 70cm band in the past and so I thought Iβd try the same approach on the 868Mhz ISM band. (I later found this to be detrimental to tuning!)
The 3D far field plot for the antenna shows it has a very nice, relatively high gain lobe at just 2 degrees elevation with a number of lower gain lobes higher up.
M0AWS 868Mhz Ground Plane Vertical Antenna 3D Far Field Plot
Looking at the 2D far field plot you can get a better understanding of the radiation pattern and gain figures at various angles. At 2 degrees there is 6.7dBi gain with the next major lobe being at 8 degrees with 4.36dBi gain, far more than I imagined Iβd see for such a simple antenna.
M0AWS 868Mhz Ground Plane Vertical Antenna 2D Far Field Plot
Putting the antenna together was easy enough with particular attention being paid to the measurements of both the radials and radiating element. I soldered some lugs to the ends of the 2.5mm diameter solid core wire radials to enable easy attachment to the N Type chassis socket that I decided to use as the base for the antenna. This worked out well and provided a good solid mechanical and electrical connection for the 4 radials.
For the radiating element I used an N Type plug with the vertical 2.5mm solid core wire element soldered to the inner centre pin of the male connector. I also slid a small piece of insulation down the wire to stop it from shorting against the metal outer of the plug and then pushed in a tight rubber plug to stop water ingress.
M0AWS 868Mhz Ground Plane Antenna Close Up
Connecting my VNA I found the antenna was mostly resonant at 790Mhz with an SWR of 2.5:1. I knew this would be the case and that the wires would need a little trimming.
Trimming the wires a couple of times in 1mm nibbles I got the point of resonance up to 868Mhz but, the antenna was still exhibiting a lot of reactance that was keeping the SWR above 2:1. Trimming the radials reduced this slightly but, I could not get an SWR much lower than 1.95:1.
Scratching my head I decided to try moving the radials back up so that they were horizontal rather than at 45 degrees downwards, this had the immediate effect of the SWR dropping to 1.1:1.
M0AWS A rather fuzzy photo of the 868Mhz SWR curve for the GP Antenna
The SWR stays below 1.2:1 from 868Mhz to 871Mhz which is plenty wide enough for the Meshtastic devices. Why there is so much reactance when the radials are bent down at 45 degrees I am not sure, but it was easy enough to resolve.
M0AWS 868Mhz Ground Plane Antenna
The finished antenna is tiny but, seems to work well. Signals from my other nodes are up by 6-9dB according to the SNR reports in the Meshtastic app. I now need to make a couple more of these for my other nodes and then hope to hear some other nodes locally once they appear on air.
Remodelling the antenna in EzNEC with the radials as shown above the gain at 2 degrees is now 5.5dBi, down 1.2dBi but, the overall radiation pattern is identical to the original.
Total cost of the build is about Β£1 and an hour of my time tinkering with it, bargain!
Following on from my last article on improving the Heltec ESP32 v3 antennas I found during the installation of the 90 degree SMA connector that the device was very sensitive to stray capacitance from things around it. After reconnecting my VNA I found the SWR curve would change substantially depending on what the device was near and so I set about rectifying this.
I decided to remove all the insulation from the single radial inside the unit and then added two more radials to increase the ground for the antenna to tune against. I then removed the N type plug with the antenna connected to it and made a new antenna from a piece of 1.5mm solid core insulated mains wire connected directly to the N type socket, without using an N type plug. Tuning to resonance was much easier than before and I soon had the SWR down to 1.2:1. Moving the device around and placing near to other objects the SWR curve was now much more stable than before with only very slight changes in curve shape.
M0AWS Updated 868Mhz Antenna
Making this change to the 868Mhz antenna has shown an improvement in signal strength from my node-1 device of almost +0.5dB, every dB counts when you only have 100mW to play with!
The Bluetooth antenna update has made a massive improvement to the usability of the device via the iOS Meshtastic app. Being able to have a reliable, solid connection from anywhere in the house is great and I no longer lose messages because Iβve strayed outside the range of the Bluetooth connection.
I now have 2 new Heltec ESP32 v3 devices on the way to me and will be getting those configured and operational outside with external antennas in the hope of hearing some nodes locally to me.
The Heltec ESP32 v3 LORA devices have a coil type Bluetooth/Wifi antenna on the PCB from the factory. This antenna doesnβt work particularly well and has very limited range so, I decided to do something about it.
Getting out the calculator a quarter wave at 2400Mhz is 29.7mm. Looking at the coil antenna on the PCB I decided the best way to connect the new antenna would be to solder it to the coil of the existing antenna. This would short out the coil completely whilst creating a solid mount point for the new antenna.
After a little measuring I decided to use a 31mm long piece of 1.5mm hard core mains cable for the new antenna. I stripped back the insulation from one end of the wire so that the exposed copper wire was exactly the length to short across all the windings of the coil antenna on the PCB.
Attaching replacement Bluetooth Antenna to the Heltec ESP32 v3 Device
Attaching the the wire to the coil was easy enough to do but, itβs worth pointing out that you need to be quick so that the heat doesnβt transfer down onto the PCB desoldering the coil antenna from the device.
Whilst tinkering with the Bluetooth antenna I decided I would also make a neat little quarter wave 868Mhz vertical antenna for this device whilst I had it all apart. This is my Meshtastic node-2 and itβs sole purpose is to allow me to use my iPad to send/receive messages via bluetooth which are then forwarded on to my base node-1 in the house. Node-1 is connected to the house wifi and the Meshtastic MQTT server. This combination allows me to message people on the mesh even though there are no local nodes within RF range.
Running the numbers for the 868Mhz antenna the vertical will need to be around 82.1mm long with a radial of similar length. I had to hand a very nice SMA to N Type chassis mount socket that would be ideal to mount the antenna to the case. I drilled out the holes in the case, measured out the wires and attached it all to the case. Connecting the antenna to the N Type socket I connected my VNA and set about tuning the antenna to resonance.
M0AWS Hidden Radial for the 868Mhz Heltec Antenna
Squeezing the radial and SMA connector into the case I realised I really could do with a 90 degree SMA connector so, I quickly ordered one from Amazon which will be delivered tomorrow. Connecting up my VNA, I had to trim the antenna down to get it to resonance. The SWR ended up at 1.2:1 which is ideal. I ended up cutting off more wire than I thought I would to get the antenna to resonance but, this is due to the extra capacitance caused by the insulation on the wire. If I had used bare copper wire then I wouldnβt of had to cut so much off. I eventually ended up with around 72.9mm of wire for both the antenna and radial.
M0AWS Heltec ESP32 v3 Device with replacement Bluetooth and 868Mhz Antennas
Putting the device back into the case and connecting the USB battery the device fired up and immediately connected to my node in the house. Checking the signal strength of node-1 in the house I could see a 7dB increase in signal strength compared to the little wire antenna that comes with the device. This is a significant improvement for such a simple antenna and well worth the effort.
Next I had to drill a hole in the front of the Heltec case so that the Bluetooth antenna could poke out the front and be bent up vertically. This worked out really well and improved the Bluetooth range massively.
M0AWS Completed alterations to the Heltec ESP32 v3 antennas
Putting the node back in the house and taking my iPad down to the end of the garden some 30m away I could instantly connect to the device via Bluetooth from my iPad, something Iβd not been able to do prior to adding the new antennas. I can now use the Heltec device via Bluetooth from anywhere in the house or garden making it much more accessible.
Itβs amazing the difference an hour and two little pieces of wire can make to these devices and is well worth the effort.
The loading of the Meshtastic firmware on the Heltec ESP32 v3 devices is really simple if done via a Linux PC/RaspberryPi. There are of course other ways to load the firmware using a web browser that supports USB/Serial devices and this method is preferred by many however, being a Linux command line junkie I far prefer the simplicity of using the Linux command line to do the job.
So, how much experience with the Linux command line do you need?
In all honesty none at all. If you know how to use copy and paste then all you have to do is follow the simple steps Iβve detailed below. In reality it will only take a few minutes to do so, donβt be put off by the long article, Iβve just tried to cover everything and provide screen shots along the way.
To get started fire up your Linux PC/RaspberryPi and get yourself to the desktop. Next you will need to open a Linux command line terminal. This is often just called βTerminalβ on most Linux desktop installations.
The first thing you need to do is check to see if you have python3 installed. This is done using the following command:
python3 --version
Running the above command you should see a result something like what is shown below.
Python3 command showing installed version
Next we need to check if pip3 is installed using the following command:
pip3 --version
If pip3 is installed then you should get a result similar to that shown below.
Pip3 command showing installed version
If your computer doesnβt have Python3 or Pip3 installed they can be easily installed from the command line. To install Python3 enter the following command into your terminal:
sudo apt install python3
You will be asked to enter your login password and then the installation will begin. You should see output in your terminal similar to that shown below.
Installing python3
To install Pip3 enter the following command into your terminal:
sudo apt-get install python3-pip
This will detail a long list of packages that will be installed on your computer, Enter Y to answer Yes and let the packages install.
M0AWS β Installing Pip3
You will see many messages scroll up the terminal screen such as getting, selecting, preparing, unpacking and setting up, this is all normal.
Once Pip3 is installed you should be dropped back at the command line with a terminal screen that looks something like the one below.
M0AWS β Pip3 install complete
At this point you will now have Python3 and Pip3 available on your computer.
You are now ready to install the tool we are going to use to check your Meshtastic device is connected to your PC and install the firmware to it. (Do not connect your Meshtastic device to your PC just yet!)
Run the following command in your terminal to install the ESP Tool:
pip3 install --upgrade esptool
You will see an output from the installation process similar to that shown below.
M0AWS β Installing the ESP Tool
Now that we have the ESP tool installed plug your Meshtastic device into your USB port on your computer and then run the following command to interrogate the device to find out what kind of device it is.
esptool chip_id
You should see the information about your device that looks similar to that shown below. This information should confirm the device type (ESP32) and which USB port it is connected on (/dev/tty/USB0).
M0AWS β Expected output from the ESPTool command showing device information
Once you have this information you will need to download the firmware for your device from Github using the following URL:
https://github.com/meshtastic/firmware/releases
At the time of writing this I downloaded and used the v2.2.22.404d firmware which I have found to be extremely reliable.
In your terminal you now need to change directory (cd) into the Downloads directory where your downloaded firmware should be. (If you downloaded your firmware into another directory then you will need to cd into that directory). Use the following command to change directory into the Downloads directory.
cd ~/Downloads
Now we need to find the filename of the firmware we have just downloaded, we can use the list directory contents command to find the file using the simple command below.
ls -la firm*.zip
M0AWS β List firmware file name from the Linux command line
In the screenshot above we can see that the filename is called firmware-2.2.22.404d0dd.zip. We now need to unzip the file using the unzip command.
unzip firmware-2.2.22.404d0dd.zip
Youβll see lots of output from the unzip command about inflating files etc, this is normal.
Once the file has been unzipped you are ready to load the firmware onto your Heltec device. First you need to find the .bin file for your Heltec device. Use the following ls command to list the files available.
ls -la firmware-heltec*
This will list out all the firmware file options for the Heltec device as shown below.
M0AWS β List of Heltec firmware files
The file you need to use for a new firmware installation on a Heltec v3 device is firmware-heltec-v3-2.2.22.404d0dd.bin. (If you downloaded a different version then the version number in the file will be different).
Using the filename you found above enter the following command into your terminal.
This will now clear down your Heltec device and will load the Meshtastic firmware. This will take a little time especially on slower computers like the RaspberryPi so, just let it run until it finishes. Do not interrupt the process whilst it is running.
Installing the Meshtastic firmware onto my Heltec ESP32 v3 using the Python command line tool
Once the firmware is loaded the Heltec device will reboot and you will see the Meshtastic banner on the OLED screen. Your device is now ready for configuration.
Now that you have Python3 and Pip3 installed you can load the firmware onto other devices just by downloading the firmware and then running the device-install.sh script file, you wonβt need to install Python3 or Pip3 again.
If you want to update your device in the future to a newer version of the firmware then just use the update script and update binary file as shown below.
Meshtastic is a relatively new thing in the internet of things (IOT) world and is gaining traction in the U.K. at the moment.
So what is Meshtastic?
Meshtastic is an open source, off-grid, decentralised mesh network built to run on affordable, low-power devices on the 868Mhz industrial, scientific, and medicalΒ (ISM) band. (Some devices can also run on the 433Mhz 70cm HAM band.)
The ISM band is licence free but, has limits on the RF power levels that can be used. The one plus over the HAM bands is that you can legally transfer encrypted messages over the ISM band making it secure.
The best way to think of Meshtastic is a radio version of the online decentralised Matrix chat system but, without the large server requirements and ever growing database!
Heltec ESP32 v3 Wifi, Bluetooth and 868Mhz device for Meshtastic
There are quite a few Meshtastic compatible devices on the market today with many costing around the Β£20 mark whilst others like the LillyGo T-Echo costing over Β£100 in the U.K. even though they are less than half the price in the USA.
Since Iβm just starting out on my Meshtastic adventure I thought Iβd start with a pair of Heltec ESP32 v3 devices that are normally readily available on Amazon but, due to the current push to build a U.K. wide mesh, they are currently out of stock pretty much everywhere.
Loading the Meshtastic firmware onto the devices is fairly straight forward and can be done using the web installer via either the Edge or Chromium web browsers. (Note: If using Windows O/S you will need to install some drivers from the Meshtastic website to be able to communicate with the devices)
Having neither of the two browsers and being a Linux command line junkie I decided to use the Python programme to load the firmware onto the two devices. Itβs worth noting that you donβt need any drivers to be able to communicate with the devices if youβre using either Debian or one of the many Ubuntu flavours of Linux O/S.
Using the Python command line program sounds like a more complicated approach but, in reality itβs super simple, extremely reliable, quick and if like me you use a Linux PC in the radio shack then you most likely already have most of what you need to get the job done. Just follow the simple steps as laid out on the Meshtastic web site and youβll have the firmware loaded in no time at all.
Installing the Meshtastic firmware onto my Heltec ESP32 v3 using the Python command line tool
The firmware takes less than a minute to copy across to the Heltec device and is automatically rebooted ready for configuration once the transfer has completed.
It is possible to configure the device via the command line tool however, since there is a nice GUI app for both Apple iOS and Android devices I decided to install the Meshtastic app on my iPad and connect to the device via Bluetooth to configure it.
Once youβve got the Meshtastic app installed on your device and have connected via Bluetooth youβll be ready to start configuring the device to join the mesh. The first thing you want to do is set the region. This is different in each country but, in the UK we use the EU_868 region settings. This will set the device to use the 868Mhz ISM band which is the band being used to build the U.K. wide mesh.
View of the Meshtastic app on iOS showing the configuration options for the Heltec ESP32 v3
There is a multitude of configuration options within the app which I will go into in greater detail in a series of articles at a later date.
Heltec ESP32 v3 running Meshtastic Firmware
For those of you that, like me arenβt near any other nodes you can connect the devices to the internet and use the Meshtastic MQTT server to communicate with other nodes. This of course isnβt off-grid but, it will get you started until the mesh grows into your local area at which point your device will automatically start communicating with the other nodes over radio.
Meshtastic MQTT connectivity
Once you are connected to either the MQTT server or other nodes via radio you will see the other node details appear in the Meshtastic app. Itβs interesting to look at the information and see signal strengths and traffic levels etc for each node.
View of the Meshtastic app on iOS showing Nodes in the Mesh and Device Metrics for the M0AWS-1 Node
There are a multitude of cases available for the Heltec v3 devices, especially if you have access to a 3D printer. One of the nicest cases I have seen is the Bender from IKB3D (I know, itβs a strange name!) but, it really is a super little case for the Heltec series of devices.
Bender case for Heltec ESP32 v3 devices
You can either buy the 3D print files for Β£8.99 and print it yourself or just order a pre-printed and assembled case directly from the website although, due to demand there is a long lead time currently.