Interpretation of raw ADC values ​​in uTracer6

54 views
Skip to first unread message

S3b

unread,
Nov 13, 2025, 10:39:32 AM (13 days ago) Nov 13
to uTracer
Hello, I recently acquired a uTracer 6 and would like to customize it by making it portable and adding some options.

To avoid manually drawing a label for each of my tubes, I plan to use a small thermal receipt printer (the idea is to print the same information as the "Quick Test" section of the uTracer software, and possibly a curve or two). I would then like to control the uTracer with a smartphone interface (via ESP32), again using simple data (quick test and a curve or two), so that the device is portable and can be taken with me to flea markets and swap meets.

Unfortunately, all software development around uTracer is closed ... (it's as if open source is scary ?). What a pity ! But, that's not the point...

I managed to use an "Arduino" to intercept and transcribe the data frames. Thanks to this, I can display the frames (and hide the echoes) to understand how the uTracer and the PC communicate. (Note, in the picture, that I will also use the Metrix U61 method for the tube holders and the selector, in order to avoid long cables and limit oscillations.)

unnamed.jpg

I thought I could retrieve converted values from the uTracer to the PC, but unfortunately for me, these are raw values from the PIC's 10-bit ADC, and the calculations are done within the program. I managed to recover some values (like the supply voltage measurement) by deduction: (float Vpower = rawVpower * (5/1024.0f) * 11.0f * Calibration_Vsup; //Vref de 5V ? 11.0f pour 11K car R1 = 1K et R2 = 10K : (1K+10K)/1K). But I believe the task will not be so simple for Va, Vs, Ia, etc... Especially because of the use of PGA? And also, I seem to recall reading somewhere that for Va and Vs, Vpower had to be deduced.

I found the following information: https://www.dos4ever.com/uTracer3/code_blocks1.txt, https://www.dos4ever.com/uTracer3/code_blocks2.txt, but it seems to me that this information is for uTracer 3+, and I understand that you did things differently for uTracer 6 ?

I don't understand the relationship between Ia and Ia Comp, or Is and Is Comp (Comp. for compensation?).

Could you please help me implement the missing formulas and decode the returned voltages and currents ?

Capture d’écran 2025-11-12 210008.png



Have a good day and see you soon,
S3b

Ihor

unread,
Nov 13, 2025, 11:44:35 AM (13 days ago) Nov 13
to uTracer
I believe there is lots of information at this forum about this subject. The communication protocol is fully describer and open, with all the formulas

The solution with esp32 is also available already for more than 5 years :)

Ronald even published his code in Visual Basic how everythign is converted n the code, also available on this forum. 

There is even an implementation in pearl 

The different between 3+ and 6 is minor in terms of the formulas as long as you do not want to implement the grid current measurement module. 

Cheers, 

Ihor

S3b

unread,
Nov 13, 2025, 5:40:43 PM (13 days ago) Nov 13
to uTracer
Thank you so much for your feedback :)

And thank you for the link explaining the uTracer 6 formulas! (Since I was using the GUI manual for the uTracer 3, I didn't realize I was on the wrong page...).

That said, in my screenshot, with the decimal value set to "203", the GUI software displays "197.7V".

However, when applying the formula: Vtubes = 1.0448*n-Vsup -> I get 1.0448*205-19.8 = 194.3V, which is not 197.7V (I've tried recalculating it every which way, but I can't find anything that matches...). Also, what should I do with my correction factor of Va = "0.974" in the "Cal." file?

Capture d’écran 2025-11-12 210008.pngCapture d’écran 2025-11-13 230535.png

- - - 

"The solution with esp32 is also available already for more than 5 years :)

Thanks, I did look at that solution, it looks really great!
But again, the code seems closed (at least, I haven't found an open-source repository or anything like that) and it's impossible to implement my own functions...
Since AI can't yet properly disassemble programs (one can always dream, haha), I'm planning to reinvent the wheel with a version on ESP32 (lighter, unfortunately) to implement my thermal printing function.

I'll try to find the VBA code on the forum :)

Thanks again for all this information and have a good evening,
S3b

Ihor

unread,
Nov 14, 2025, 7:26:48 AM (12 days ago) Nov 14
to uTracer
The formulas on the webside by the way differ from the actual implementation by using 1024 instead of 1023, but also the formulas for conversion are in the two visual basic source code files that you attached
Va = Va_ * (5 / 1024) * ((AnodeDivR1 + AnodeDivR2) / (AnodeDivR1 * CalVar1)) - VsupSystem

S3b

unread,
Nov 19, 2025, 5:41:05 PM (7 days ago) Nov 19
to uTracer
Thank you very much.
Okay for the Va and VS formulas :) 

Capture d’écran 2025-11-19 223404.png

But, when I try to apply the Vneg formula to the code files, with R1 = 200000, R2 = 4700, n = 641, CalVneg = 0.978 (and dblVmin = -15,6) :

Case 8 'The negative power supply voltage frmCom.lblStr8.Caption = strWord frmCom.lblInt8.Caption = lngWord dblVmin = (CDbl(lngWord) / 1024#) - 1# dblVmin = 5# * ((dblVminR1 + dblVminR2) / dblVminR1) * dblVmin + 5# 
frmCom.lblVal8.Caption = Decimals(dblVmin, 1)

Or, as explained here:
Capture d’écran 2025-11-19 231404.png

dblVmin = 5# * ((dblVminR1 + dblVminR2) / dblVminR1) * ((CDbl(lngWord) / 1024#) - 1#) + 5#
dblVmin = 5 * ((200000 + 4700) / 200000) * (641 / 1024) - 1) + 5
dblVmin = 7.2V -15.6V


Or, with : dblAnodeRs = 4.7, n = 1216, dblCalVar3 = 1.006 (et Ia = 635,4) :

Case 1 'dblIa is the anode current frmCom.lblStr1.Caption = strWord frmCom.lblInt1.Caption = lngWord dblIa = (CDbl(lngWord) * (5# / 1024#) * 1000#) * dblCalVar3 / dblAnodeRs dblMeasMX(I, intIa) = dblIa

dblIa = (CDbl(lngWord) * (5 / 1024) * 1000) * dblCalVar3 / dblAnodeRs
dblIa = (1216 * (5 / 1024) * 1000) * 1.006 / 4.7
dblIa = 1270,8  635.4
 

I admit that understanding this is a bit confusing for me. I apologize for all these questions.

Ihor

unread,
Nov 19, 2025, 6:06:24 PM (7 days ago) Nov 19
to uTracer
dblVmin = 5# * ((dblVminR1 + dblVminR2) / dblVminR1) * ((CDbl(lngWord) / 1024#) - 1#) + 5#
That formula is correct, your R1 and R2 values for uTracer6 are wrong. 
5 * ((4700 + 470) / 470) * ((641 / 1024) - 1) + 5 = -15.5712890625

Ihor


S3b

unread,
Nov 20, 2025, 9:21:33 AM (6 days ago) Nov 20
to uTracer
Thank you so much!
Arf, indeed! The mistake was mine; I wasn't looking at the right information (since there's so much information scattered around, I have trouble organizing everything I find and get confused very easily). It's really kind of you to help me anyway!

I'm wondering why retrieve the negative voltage value of -15V? Is it simply to check that the "Step-Down" is working correctly? Or is this value used for measurements?

All that's left for me to understand is the current. From the documents and code snippets I've read, it seems that the formula is the same for all four values ​​(Ia, Ia Comp, Is, Is Comp).

From my interpretation, what we're retrieving aren't the raw values ​​from the ADC for measuring the voltages across the shunt resistors. Otherwise, we won't be able to define a value of "1216" (the maximum of 10-bit ADC values ​​being 1024). I imagine there's already some initial processing with the PGA113? And therefore, that the returned Gain values ​​(Ia and Is) are indicative?

S3b

unread,
Nov 20, 2025, 5:37:47 PM (6 days ago) Nov 20
to uTracer
120*(5/1024)*(1000/4,7)*1,006 = 125,4
13*(5/1024)*(1000/4,7)*1,006 = 13,5

S3b

unread,
Nov 23, 2025, 6:06:34 PM (3 days ago) Nov 23
to uTracer
Okay, I managed to convert the most important data for interpretation. Thank you so much for your help. 

In the meantime, I tried the ESP32/uTracerJS version from https://boffin.nl and I think it's a real shame to reinvent the wheel (knowing that I wouldn't do any better than that version, that's for sure!). I also understand that you developed that version? If so, would it be possible to integrate the ability to print a quick test report using a small thermal printer? (Exemple : EM5820) (If needed, I can write a module/functions for this purpose?) 

Have a good evening, 
Sébastien

Ihor

unread,
Nov 24, 2025, 5:22:21 PM (2 days ago) Nov 24
to uTracer
I checked quickly and it would not be difficult to include that printer, as it supports TTL levels and even has a arduino (thermalprinting lib). I do not have one so indeed if there would be some tested piece of code for esp32 that works I can add it to work with the quick test functionality for example. 

I briefly checked EM5820 online, does it also supports self-adhesive labels or just standard paper for thermal printing? 

S3b

unread,
Nov 25, 2025, 4:53:38 AM (yesterday) Nov 25
to uTracer
Great! For now, I have a piece of code that displays "test" on thermal paper, using an ESP32. I'm going to work on the code so it displays quick test information :) (and later on, it would be great if it could print a graph or two). Are you using ESP-IDF? Or the Arduino IDE?

Unfortunately, it seems to me that this printer doesn't support labels. Or maybe it does? If you're okay with it, I'll order a roll of thermal labels and do some testing! Because it would really be great to have that option!

Reply all
Reply to author
Forward
0 new messages