Hi all,
I am trying to use an Arduino UNO Rev 3 with a USB Host 2.0 shield to interface with VNA6000 or NanoVNA V2. Attached at the bottom of the post is a link to the shield documentation and a photo of the one I have.
The goal is to eventually make a system that could work on mobile vehicles, which is why I am using Arduino. Right now, I am struggling to set up communication between the UNO and the VNA. I am unsure whether my Arduino sketch is correct or if it is because I am failing to enter USB mode. The program is designed to send an indicate command through serial by initially sending the OP command and then followed by the indicate command in hex. Then the program will just wait and write the response from serial. However, there is no good way to test this if I cannot enter into USB mode. Would anyone have any advice or help?
Additionally, I have considered using a raspberry PI, but my preference is to use Arduino for this project as it will be controlling other components as well. Another issue that could be occurring is that the current is too low for USB operation. I found from another post that the USB needs to drive 500mA current in order to enter USB mode. So, my work around was to connect a 9V battery to the power pins of the UNO and it will increase the USB to drive at 500mA, as detailed by the Arduino site.
Please let me know if anyone has any ideas or advice. Thank you!
Components:
USB Shield Documentation: Arduino USB Host Shield | Arduino Documentation | Arduino Documentation ( https://docs.arduino.cc/retired/shields/arduino-usb-host-shield )
Beware of cheap underperforming clones
As of 2023 there are many badly performing clones on the market. V2/3GHz NanoVNA uses parts like ADF4350 and AD8342 which are costly and clones have been cutting costs by using salvaged or reject parts.
See official store and look for V2 Plus4/V2 Plus4 Pro versions only to avoid getting a bad clone. We have stopped selling V2.2 versions since October 2020, so all V2 hardware that are not Plus or Plus4 are not made by us and we can not guarantee performance.
Click here to join and see most recent posts.
nanoVNA V2 Support for Arduino UNO with Host Shield 2.0 and USB Mode Difficulties #v2
For what will the arduino help what the v2 can not do alone?? Ok if you have a
vna without display... And do not wanna carry a laptop outside.. Yes then i
understand you.. But... The v2 and all of its clones does have a display...
Dg9bfc sigi
Am 21.04.2023 18:18 schrieb alexottinger16@gmail.com:
> Hi all,
>
> I am trying to use an Arduino UNO Rev 3 with a USB Host 2.0 shield to
interface with VNA6000 or NanoVNA V2. Attached at the bottom of the post is a
link to the shield documentation and a photo of the one I have.
>
> The goal is to eventually make a system that could work on mobile vehicles,
which is why I am using Arduino. Right now, I am struggling to set up
communication between the UNO and the VNA. I am unsure whether my Arduino
sketch is correct or if it is because I am failing to enter USB mode. The
program is designed to send an indicate command through serial by initially
sending the OP command and then followed by the indicate command in hex. Then
the program will just wait and write the response from serial. However, there
is no good way to test this if I cannot enter into USB mode. Would anyone have
any advice or help?
>
> Additionally, I have considered using a raspberry PI, but my preference is
to use Arduino for this project as it will be controlling other components as
well. Another issue that could be occurring is that the current is too low for
USB operation. I found from another post that the USB needs to drive 500mA
current in order to enter USB mode. So, my work around was to connect a 9V
battery to the power pins of the UNO and it will increase the USB to drive at
500mA, as detailed by the Arduino site.
>
> Please let me know if anyone has any ideas or advice. Thank you!
>
> Components:
>
> USB Shield Documentation: [Arduino USB Host Shield | Arduino Documentation |
Arduino Documentation](https://docs.arduino.cc/retired/shields/arduino-usb-
host-shield)
> ![](cid:attach_0_1757FF7E0DF9461A_11412@groups.io)
_._,_._,_
* * *
The platform will be used for UAV research. So I will not be able to operate the VNA via wired connection if it's airborne. The arduino will be able to save to SD any scans of the VNA and it will also be operating other components. I could switch to a raspberry pi if needed but it's not ideal for my current setup.
uav research?? then you maybe need a spectrum analyzer / wideband
receiver... and not a vna...
an sdr with a raspberrry pi ... wifi towards ground ... that could work
dg9bfc sigi
Am 22.04.2023 um 08:37 schrieb alexottinger16@gmail.com:
Sigfried is correct; a spectrum analyzer, like the tinySA , could gather a
lot of information during a flight on a UAV. What information are
you looking for from a VNA?
On Sat, Apr 22, 2023 at 2:59 PM Siegfried Jackstien <
siegfried.jackstien@freenet.de> wrote:
On 4/22/23 9:05 AM, Siegfried Jackstien wrote:
> uav research?? then you maybe need a spectrum analyzer / wideband
> receiver... and not a vna...
Not if you're using the VNA as a radar...
Actually your solution is rather genius.
W4JDY
Your idea is a smart implementation for UAS communication, however, it would not be viable for my specific application. I cannot disclose much more information about the scope of my project, other than that a portable application of the VNA would be very beneficial.
With that said, developing support for open-source microcontrollers like raspberry pi or Arduino should be heavily considered as it may be helpful for niche projects like mine. If anyone knows of the necessary USB CDC programming for the VNA device, or any other advice, please let me know.
Hi, the VNA should automatically enumerate as a USB serial device when connected, and upon sending any WRITE commands to any sweep parameters register the VNA will enter "USB mode" visible on the device display. The protocol description can be found here: https://nanorfe.com/nanovna-v2-user-manual.html#__RefHeading___Toc2537_2953165397
If you need interfaces other than USB, please get in touch with us using the "Contact Seller" button on Tindie or through my email edelswartz123@gmail.com.
Thanks
On 4/23/23 10:44 AM, alexottinger16@gmail.com wrote:
> Your idea is a smart implementation for UAS communication, however, it
> would not be viable for my specific application. I cannot disclose much
> more information about the scope of my project, other than that a
> portable application of the VNA would be very beneficial.
>
> With that said, developing support for open-source microcontrollers like
> raspberry pi or Arduino should be heavily considered as it may be
> helpful for niche projects like mine. If anyone knows of the necessary
> USB CDC programming for the VNA device, or any other advice, please let
> me know.
>
There is open source command line control for the nanovna. Check out
nanovna.py or nanovnacmd.py . I don't know if it does all the versions,
but I do know it uses pyserial, so if pyserial can talk to your VNA,
then nanovna can talk to it.
That would probably be the ideal for your UAS.. It's what I use for my
antenna project to automate measurements and do calibrations at the end
of the coax, since there needs to be some relay controlling as well.
As it happens, I'm driving it from a RPi, but I don't see why a
sufficiently capable Arduino couldn't do it. Given that the RPi doesn't
draw much power, you might be better off in the long run just Pi-ing it
from the start.
In reality, I have a combination of a Pi and a teensy (arduino clone) -
I use a teensy to give me a high level interface to the relay controller
board which is discrete lines.
The fact that RPi does a fairly standard Linux means that "someone else"
has dealt with all the ickyness of device drivers and the like. You just
open /dev/serialxyz. With arduino, you're probably going to need
someone's USB serial library, figure out how to make it work, etc.
----
#!/usr/bin/env bash
# makes three measurements for an ant box to calibrate the cable
#
ssh -o ConnectTimeout=3 antbox$1.local exit
if [[ $? != "0" ]] ; then
echo "no connection to antbox $1"
exit 1
fi
./nanovna.py -e "cal reset"
ssh antbox$1.local ./rcs.py open
./nanovna.py --start 50000 --stop 100000000 --points 201 -o cable$1open
--port 0
ssh antbox$1.local ./rcs.py load
./nanovna.py --start 50000 --stop 100000000 --points 201 -o cable$1load
--port 0
ssh antbox$1.local ./rcs.py short
./nanovna.py --start 50000 --stop 100000000 --points 201 -o cable$1short
--port 0
ssh antbox$1.local ./rcs.py open
To reply to this topic, join https://groups.io/g/NanoVNAV2