DL2SBA’s milliwattmeter calibration

Publié: 6 septembre 2017 dans Instrumentation

cal bolo

Cet article fait suite à la description du milliwattmètre de DL2SBA à base d’Arduino et d’un détecteur log d’Analog Device

The calibration procedure  given by DL2SBA Dietmar on his website is a little bit Spartan.

For those who had some hard time following this operation, here is a kind of “how to” or “callibration for dummies”

First of all, put the milliwattmeter in “Raw” value reading (pressing twice on the “mode” button located on the screen).

Switch an already calibrated RF genererator “on” and let it warm up during at least one or two hours. Theorically, your generator, in term of output power, must be 10 times more accurate than the level of accuracy you intend to reach with your milliwattmeter. That means your RF generator must have been calibrated by a specialized lab within the last 2 years.

Keep in mind that the calibration figures (or more exactly the correction table) will be loaded in memory, and that this memory is not infinite. You ‘ll only be able to store around 30 x 11 calibration points (in other words, a set of 11 power level going from 0 to –60 dBm over 30 different frequencies ). It’s up to you to decide the distribution of each calibration set all over the measuring range of your milliwattmeter. The detector itself is able to cover 8000 MHz… or one calibration every 250 MHz approximately.

The procedure is really straighforward :

  • Plug the RF gen. output to the milliwattmeter input,
  • Set a frequency,
  • Set the output power to 0 dB,
  • Read the “Raw” value and write it down in a spreadsheet
  • Lower the  output power by 5 dB
  • Read the “Raw” value and write it down in a spreadsheet
  • … etc
  • Once –60 db is reached, change the frequency to the next step and start again from the beginning

For each chosen frequency, a measure should be done at 0, –5, –10, –15, –20, –25, –30, –35, –40, –50, –60 dB

You can decrease the number of steps, but the accuracy will be impaired.

Increasing the steps between –40 and –60 dB will decrease the number of  possible frequency calibration points (remember the 30×11 limit)

The following screen capture gives an idea of what such a procedure will looks like

tableau puissance 1

Beware : the “raw” power level must be the first column, and the “dB” power level must be the second one.

Once your 330 calibration points (max) have been saved, go to the the Regression Tool page, select “3” in the polynomial  degrees pull-down menu, cut and past your first “frequency bloc” in the yellow window.

regression 1

Press the “calculate” button, cut and past the result in a word processor

regression 2

Why a word processor ? because it’s still the simplest and best tool to play with characters and chains (unless you are a Python Pundit)… if you know how to “search and replace” things, the following will be easy as pie

Repeat this operation for each “frequency calibration bloc”, cuting and pasting each results on a separate line. At the end of this operation, you’ll have 30 lines (or less), one by calibration frequency.

Now, you’ll have to “clean” and format your series of regressions to an “Arduino compatible array”. That means :

  • Separate each figure by a coma
  • Invert each figure in the line (in our example, 58.52195853 must be located first, followed by – 8.271047501·10-2 etc.
  • Erase all “+” signs (do NOT touch the “minus” one). By default, all numbers are positive in C language unless specified.
  • Erase all “Y =”, “x3”, “x2” and “x”
  • Add the frequency of each bloc after a "comment” double-slash sign (ex :    // 1 MHz). This is not mandatory but helps a lot when sorting the different calibration datas
  • Normalize the math formulation of each figure. All numbers expressed to the power of 10 should be noted “xxxE-6” or “xxxE+20” (note : no space between the end of the real number and it’s exponential, take care of the sign of the exponential). Example : – 8.271047501·10-2  will be written – 8.271047501E-2
  • Note that the first number shoud be divided by 10 (5.852195853 instead of 58.52195853)

The final result should looks like this :

regression 3

Cut and past this spreasheet at line 84 of the data.cpp file of your Arduino sketch

regression 4

Line 62, add the frequency list you have chosen for your calibration scope

(this line begins with “uint16_t calFreqSteps[CALFREQ_NUM] = {1, 2, 5,….

regression 5

Save your data.cpp file  and put it in a backup repository (who knows) . Breathe, you’re almost done !

Edit your data.h file, seek for the string “CALFREQ_NUM” (line 71)

change the CALFREQ_NUM variable with the number of calibrated frequencies (in our example, 29)

regression 6

Save your data.h file, plug your Arduino, compile and transfert your code

Your milliwattmeter is fully calibrated !
Publicités
commentaires

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s