Topics

Wireless remote control of nanoVNA-H


Piero Tognolatti
 

Hi all,

thanks to the support of DaveLapp I was able to interface a HC-05 Bluetooth module to the "P3" port of my nanoVNA-H (PCB 3.4). Just few days ago, Dave made available a firmware release (at https://github.com/DaveLapp/NanoVNA-H/releases) which starts the shell on UART1 if USB is not active at power-on/reset (otherwise it starts, as usual, the shell on the USB virtual serial port when the USB is active at power-on/reset).

In the following figure you can see my setup, consisting in the nanoVNA and the HC-05 module, interconnected by four wires.


These wires are connected to the proper pads on the PCB V.3.4 (highlighted in the following photo). Pads are labelled "P3 UART".


according to the following schematic

Please, note that Hugen79 suggests (see below), when powering an external module by P3, to add two tantalum capacitors to reduce voltage ripple. (I didn't yet add them).

As a first step you have to install the DaveLapp firmware release on your nanoVNA-H (https://github.com/DaveLapp/NanoVNA-H/releases). You have to follow the well known instructions for firmware update.

Let's now discuss if and how configure HC-05 before the use. HC-05 default settings should be OK, but I cannot be sure of that, because I lost default configuration before connecting the HC-05 to the nanoVNA (I made other experiments before).  So my suggestion is, if you have a HC-05 brand new, to try to use it as it is.   If it doesn't operate correctly, then you have to disconnect it from nanoVNA and put it in a setup that allows to dialog with it. To do this I used an "Arduino Uno" in a configuration similar to the one described here: https://create.arduino.cc/projecthub/electropeak/getting-started-with-hc-05-bluetooth-module-arduino-e0ca81 Please, don't forget to use a voltage divider on the 5V signal that come out from Arduino Uno TX pin, otherwise you can destroy your HC-05. Moreover, you can follow the instruction of the attached pdf file to manage HC-05 configuration mode. Once in configuration mode, I just sent the two following commands to the module:

AT+NAME=nanoVNA     (followed by CR & LF)

AT+UART=38400,0,0     (followed by CR & LF)

The first command is optional, but it is nice to see the system appearing with name that we set.  To check these settings and to make other queries to the module you can follow the attached file.

After any configuration you will reconnect the HC-05 module to the nanoVNA and everything should be OK. You should immediately be able to pair the module to your laptop or to your smartphone. Pairing is confirmed by a reduced blinking frequency of the red led on the module.  I did it very easily and I checked the connection using a terminal emulator on both (see following pictures). My laptop runs Windows10, while my smartphone is a Samsung Galaxy A51, running Android 10.

Once you have checked that Bluetooth connection operates correctly, you can move to using some Apps on your laptop or smartphone. Please note that these Apps should be compatible with hugen79 shell syntax. I used nanovna-saver-v0.2.0 for Windows. Such an App was not able to find by itself, after pressing the "Rescan"button, the port on which the VNA is connected. A simple turnaround is that you have to provide by yourself the indication of which "COM" port is currently used by the Bluetooth link. You can detect it having a look at Windows Bluetooth panel. In my case it was "COM11" port, as you can see from the following screenshot. (By the way, the nanoVNA wasn't properly calibrated)

I hope that all this will be useful to those who need to make remote VNA measurements without any metallic cables between the instrument and the laptop/smartphone.  In my case I need it to measure impedance matching of an antenna inside a 3U cubesat satellite. Any metallic cable connected to the satellite mokup would modify antenna behavior, even with respect to impedance matching.

Thanks again to Dave, that promptly satisfied my request to have a firmware that uses UART port.

Best regards

Piero, I0KPT


OneOfEleven <cmoss296@...>
 

My NanoVNA v3.3 doesn't have the serial port from the CPU fed to pins like yours. Looks like they were added after the v3.3 board.

Thank you for sharing Piero !


Dave VE3LHO
 

On Thu, Sep 10, 2020 at 08:27 AM, OneOfEleven wrote:


My NanoVNA v3.3 doesn't have the serial port from the CPU fed to pins like
yours. Looks like they were added after the v3.3 board.

Thank you for sharing Piero !
Correct. Apparently the P UART connection was added in the v3.4 pcb.

Curriously, I found that the ChibiOS serial driver and HAL were already configured to nable that UART. I'm not sure if this was left from some previous project or if someone had started to add UART support in the FW


Piero Tognolatti
 

Il 10/09/2020 17:27, OneOfEleven ha scritto:

My NanoVNA v3.3 doesn't have the serial port from the CPU fed to pins like yours. Looks like they were added after the v3.3 board.
A friend of mine, which have a v.3.3 board, is planning to solder two (RX & TX) very thin wires directly on the proper pads of STM32. I will invite him to report his experience.


Roger Need
 

Very nice solution!

When purchasing an HC-05 module make sure it works with a power input of 3.3V like the Itead HC-05 module in this implementation. Some of the ones you see for sale require a higher voltage (3.6 to 6V) for Vcc.

Roger