Pages

Monday 22 July 2024

NanoNVA - Just how good is it?

I own 4 versions of the NanoNVA and have found it incredibly useful. However, I never stopped to question just how accurate or reliable the measurements are. That was until Matthew, VK5ZM, was in my workshop on the weekend and he made a suggestion in response to some concerns I was having over the measurement of attenuators. The outcome of following that suggestion was a better understanding of just how good the NanoVNA is and what might be limiting it's performance.

The assumption I implicitly made was the SOLT calibration process reduced errors in measurement to an immaterial level. Rather than lots of mathematics to validate or invalidate the NanoVNA you should repeat the following steps with your instrument to decide for yourself what you are prepared to accept as correct, close enough or simply wrong.

Ideally you will have a SMA attenuator, 10-15dB in value, that you can insert before the 50 ohm calibration load.

Step1 

Perform a SOLT calibration directly on the SMA port, with the load being the attenuator / reference load combination and the Through step using one of the supplied cables. I used the NanoVNA app to average 8 readings and a 1 to 801MHz range with 401 or 801 steps.

Step 2

Now reattach the attenuator / reference combination  and measure the input return loss. Save that to perhaps M1.

Step 3

Now remove the reference load leaving just the attenuator attached to the measurement port. You should see a chart like this:


The purple trace is the input return loss of the load plus attenuator combination and two things stand out: Noise ( even after averaging ) and the step change in measurements once the frequency was higher than 300MHz.

The red line is the attenuator alone and as expected the return loss was twice the attenuation (2x-10dB).

That red line confirms that input return loss measurements at the NanoVNA SMA connector down to -20dB can be accepted as correct, anything down to -45dB up to 300MHZ and perhaps -35db to -30dB above that is probably close enough. And any return loss measurements approaching the purple line, or below that, is probably invalid and you should be rounded up to whatever "close enough" reference you decide upon.

Step  4.

Save your calibration and then attach the attenuator / reference load combination at the point you normally calibrate to. For me that's at the end of a SMA to SMA cable some 25cm in length. It could be one of the supplied cables but I replaced mine since one became damaged.

Repeat the SOLT calibration at the end of the SMA cable (Reference plane) then measure the input return loss of the attenuator load combination, and the attenuator by itself.

My results are shown below:

The red line, attenuator only, is essentially unchanged but the attenuator / load combination had shifted upwards and noise has reduced.

At this point you should be starting to question why this is so. Is the cable lossy? Is this a consequence of the SOLT calibration? Why did this happen?

Step 5 - Be afraid. This will change your life forever.

OK, it's not that bad but now you will see some results that should forever change your opinion on how good your measurements are.

Restore the calibration to the values saved when the attenuator / load were directly attached to the NanoVNA. Attach your SMA cable to the NanoVNA and the attenuator / load on the far end. Blink in disbelief and sit down. A 50 ohm load at the end of a 50 ohm cable should measure the same return loss as when the cable was not present. If the cable had loss then the return loss would be lower. 

Blue SMA cable supplied with NanoVNA V4 in metal box (ie the supposedly top end version)

Clearly it's not a 50 ohm cable. Calibration means I never knew this cable was rubbish since calibration hides how bad this cable is. But it puts into question past measurements I made using this cable with the "Top End" NanoVNA model.

The black SMA to SMA cable supplied with the lower end NanoVNA is slightly better but still rubbish:


And now a collection of results as I tried to look for a good cable.


Long Cable SMA one end, N Connector the other

Hardline - SMA to N

Double shielded Silver plated - SMA to N (A quality cable)

SMA to N Pigtail from AliExpress

Conclusion

I now appreciate why high end equipment comes with very expensive connecting cables. The intrinsic ability of the NanoVNA to measure input return loss is quite good, especially below 300MHz. However, the cables used can result in meaningless measurements below a certain threshold despite the SOLT calibration.  I seems I don't own a single cable with SMA connectors each end that I would accept for measurement purposes.

While the SOLT calibration can reduce the influence of cables and connectors up to the reference plane there will be a point where measurement uncertainty creeps. And if you flex, twist, curl or bend the cable between the reference plane and NanoVNA the cable impedance could, probably will, change which again introduces measurement uncertainty. 

Measurement uncertainty means that when you are tuning / matching a load to 50 ohms is -35dB actually better than -30dB?  Is a -20dB return loss the influence of cables/connectors or is it a true measurement of the load? I have noted from past testing with a homebrew return loss bridge that different examples of even the best quality 50 ohm cables I have terminated in N Connectors can show several dB of difference when measuring return losses.

If you want to reduce your measurement uncertainty you will need to:

  1. buy/make better connecting cables, 
  2. test them with an attenuator in the fashion described. 

Only then should you be comfortable relying on the measurements.

Whether you call it VSWR, R+jX, a smith chart or input return loss measuring reflections from the load is one of the key uses of the NanoVNA. It is well worth the few minutes it takes to test the cables so you understand when your measurements become uncertain. 

I'm off to buy a -15dB SMA attenuator to improve my comfort level in the measurements being made. I'll post an update once I have procured one and repeated the tests.

Sunday 14 July 2024

LiFePO4 - Charging Adventures

I recently took ownership of some larger 20Ah LiFePO4 cells and the charging adventures that followed are worth sharing.

The first LiFePO4 cells I purchased that were actually delivered were 26700 sized with a claimed capacity of 4000mAh. Charging them for testing was easy enough with a variation of my CC/CV circuit. They never delivered 4000mAh.

Ditto the 14Ah cells I brought for my ride on mower. More like 12.5Ah in capacity they took more effort on my part but I have an old HP power supply on my bench that I can manually set up for CC/CV charging. 

When I received some 20Ah cylindrical cells things started to go awry. I didn't like leaving my HP 20A power supply running unattended with a charging current greater than 2.5A because of the gauge wiring I was using to connect to the battery. However, I couldn't readily charge these cells at less than this. At lower currents the energy just seemed to disappear. 

 

So I built heaver gauge charging cables and charged them while I was present. Surprisingly, the rated 20Ah capacity was achieved when discharged at 1.5A.

During all of this I looked for an alternative. I first tried some supposed LM2596 buck convertors. Advertised as 3A and 40V input I thought these would work really well with some 200W 30V solar panels I have. The first time I connected one to a 30V supply, with no load, for testing the module burnt out forcing a retreat outside till the fumes dissipated.


From a 12V supply they could deliver 2.5A to 3A but the heat they dissipated meant they could only be used intermittently. And some care is needed adjusting the trim-pot which is difficult to set within 20mV of 3.65V.

I had some server power supplies. One model, a HP unit, appeared suitable but the 3.3V rail could only be coaxed to 3.45V. I didn't persist with modifying the unit because I tried the 5V rail expecting it to shut down. Instead, it happily dumped +20A into the cell. Which gave me a different idea.

Take the 5V rail and then regulate it to 3.65V with some current control. Assume a 10A charging rate. 10A x (5-3.65)V means dissipating 13.5W of heat. That sounds achievable. Except the dropout voltage for a LM317 alone is 1.7V. So a purpose built regulator or a lot of time searching/testing would be needed. The design time for this approach seems high. It would be easy to do this from a 12V rail but the additional 70W of heat generated needs a big heat sink.

Then I found some LM1084 regulators. Similar to the LM317 but the drop out voltage is much lower (around 1V) and each one is good for 5A. I plucked a CPU heatsink from the junk box, mounted the regulator and tested the concept with heavy gauge wiring.

Partial success. I can now charge at a little over 4 amps continuously with no concerns over heat dissipation. My bench power supply has been released from battery charging duty.

At present I'm getting on with other projects. But my planned next steps are:

  • adjust the 5V rail to perhaps 5.3V to get more current.
  • Parallel a second or third LM1084 to deliver much higher currents
  • Investigate further a high current switch mode supply. A comprehensive post setting out development of such a supply which almost met my requirements was found here. Well worth a read!