RC3563 IR tester

Looking now to figure out how to directly implement it into Excel.
I went at it a little differently. Rather than have excel pull the data from the serial port have python write to excel.
Well I got a bit further with @enki's python code.Thank you @enki for that.
Did a bit of research and found an include in python called xlwings.
Bumbling along I found out how to write to an open excel file. Most includes that I found would either create a new excel file or write the data to a closed excel file. This include works on the presently open workbook/excel file. It can also be programed to write to a specific excel book and sheet.
So @Bubba I got as far as writing the data to excel and it works great. The problem is when you pull the cell out the data does not remain.
The update to the 2 fields is dynamic Sure we can copy and paste the data while the cell is in the holder but that defeats the purpose.
Also I am trying to figure out how to write the 2 parameters (mΩ and V) to selected fields or even better to the next empty fields in the designated columbs for IR and V. Once the cell is removed the data is saved to the 2 excel fields and excel progresses to the next empty fields in the columb.
Now mind you it was midnight when this worked and I needed my beauty sleep so there is still a ways to go but I figured I would share what I have done so far. Maybe someone way smarter in programing than me can continue. I will bumble along till it works though.
Wolf
python.PNGpython1.PNG
#!/usr/bin/env python3 import xlwings as xw # Original Code............................. ..................................... # xw.Range('B1722').value = (f"{voltage}") xw.Range('A1722').value = (f"{resistance}")
 
Last edited:
All right another midnight coding spree and I have solved it at least for my purposes. @enki wrote the python code that allowed us to read the RC3563 data in a serial stream. It is a continuous stream repeating the loop. Perfect. I added some code for Excel so now just start the python script with your Excel sheet open and your data is imported. I'm sure there are ways to open the Excel book when starting the python script but I haven't gotten there yet.
python.PNG
By installing xlwings and using this include to sent the data (Resistance and voltage) to a set of specific cells, in my case in the open sheet,
to cells A1722 and B1722. That data can then be copied and pasted into the next empty row with a VB script. Assigning a keyboard shortcut such as Ctrl+s runs the script and inserts the reading below the last entry and so on. So all I do is insert my numbered cell into the RC3563 cell holder hit Ctrl+s and the data that is written to the cells in a descending order.
In my case A1722 and B1722 is copied and inserted into column "7" or G with the VB code looking for the 1st empty cell.
As cells A1722 and B1722 are dynamic you can just insert cells one after the other running the VB script with Ctrl+s and the data will populate the cells
This is the code.
1619609635304.png
And these are the results .
1619609761863.png
Im sure I will do some tweaking but all in all the proof of concept works and it works very well.

Wolf
 
Last edited:
Thank you all for your great work! That's a awesome idea (y):D
Can you tell me how you could connect to the RC3563? Did you use the pyserial module for this?
I use Windows 10 and Open Office Calc and have already been able to edit a calc table with the integrated Python 2.7. But because of the simplicity and my lack of knowledge of basic, I would prefer to use Microsoft Excel because otherwise I would have to rewrite all your macros.

Thanks in advance

harvester
 
Can you tell me how you could connect to the RC3563? Did you use the pyserial module for this?
Yes then I created my version of the rc3563.py with the xlwings module (for excel export)

Found out which com port the RC3563 used after enabling it.
Wrote a small batch file.

@echo OFF
cd\
cd rc3563
ECHO ============================
ECHO Press enter to start RC3563 to Excel
ECHO ============================
PAUSE
python3 rc3563.py COM3

Make sure you have an excel file open and active and this is the result.
Cant get any easier than that. From there you can work with the VBscript in excel to copy and paste as I showed above.
1636947992271.png

Original code is found here.

Wolf
 
Last edited:
Hello Wolf Thank you for your efforts! I should have written earlier a few days ago I got it to work. First I had to clean up the variable at the path to Python because I had too much there. Then I installed pyserial and xlwings. Then entered the COM port to the rc3563x.py file and after trying in vain for a while it worked after I had the idea to unplug and plug in the usb and to close the program. 🙈 Now I get the values from the RC3563 :cool:
I wanted to test a little further before I answer because everything doesn't seem to work for me. If I have your Excel sheet open and the Python script is running I have a very long delay of the measured values of up to 90 seconds.
With the removed values on the side IR & V & Capacity Test I have no delay.
With the Ctrl + s / z / w shortcuts the field jumps to the last cell but only with the values 0L & 0. What's that all about? Do I still have to adapt the VB script? or how do I have to proceed?

Thanks in advance

harvester
 

Attachments

  • SharedScreenshot2.jpg
    SharedScreenshot2.jpg
    500 KB · Views: 149
  • SharedScreenshot3.jpg
    SharedScreenshot3.jpg
    411.1 KB · Views: 141
Last edited:
@harvester

Good OK you got most of it to work.
Not sure about the delay but here is my modified rc3563.py code. and I don't have any delay

Python:
#!/usr/bin/env python3

import serial
import struct
import sys
import xlwings as xw


with serial.Serial(sys.argv[1], 115200) as ser:
    while True:
        pkt = ser.read(10)
        #print("PKT: ", pkt)
        status_disp, r_range_code, r_disp, sign_code, v_range_code, v_disp = struct.unpack('BB3s BB3s', pkt)
          
        #print(f"status_disp='{status_disp:#x}'")

        r_disp = struct.unpack('I', r_disp + b'\x00')[0]
        resistance = float(r_disp) / 1e4

        r_disp_code = (status_disp & 0xF0) >> 4

        if r_disp_code == 0x05:
            r_unit_disp = 'mΩ'
        elif r_disp_code == 0x06:
            r_unit_disp = 'mΩ'
            resistance = 'OL'
        elif r_disp_code == 0x09:
            r_unit_disp = 'Ω'
        elif r_disp_code == 0x0a:
            r_unit_disp = 'Ω'
            resistance = 'OL'
        else:
            print(f"Unknown display code '{r_status_disp_code:#x}'")

        #print(f"r_disp_code='{r_disp_code:#x}' r_unit_disp='{r_unit_disp}'")

        r_unit = r_unit_disp

        if r_range_code == 1:
            r_range = '0-20 mΩ'
            r_range_unit = 'mΩ'
        elif r_range_code == 2:
            r_range = '0-200 mΩ'
            r_range_unit = 'mΩ'
        elif r_range_code == 3:
            r_range = '0-2 Ω'
            r_range_unit = 'Ω'
        elif r_range_code == 4:
            r_range = '0-20 Ω'
            r_range_unit = 'Ω'
        elif r_range_code == 5:
            r_range = '0-200 Ω'
            r_range_unit = 'Ω'
        elif r_range_code == 6:
            r_range = 'AUTO'
            r_range_unit = None
        else:
            r_range = None
            r_range_unit = None
            print(f"Unknown resistance range code '{r_range_code:#x}'")

        if r_range_unit and r_unit_disp != r_range_unit:
            print(f"Display unit '{r_unit_disp}' override by range unit '{r_range_unit}' for selected range '{r_range}'")

            # Range unit has preference
            r_unit = r_range_unit
  
        print(f"RESISTANCE range='{r_range}' {resistance} {r_unit}")

        sign_multiplier = None
        if sign_code == 1:
            sign_multiplier = 1.0
        elif sign_code == 0:
            sign_multiplier = -1.0
        else:
            print(f"Unknown sign code '{sign_code:#x}'")

        v_disp = struct.unpack('I', v_disp + b'\x00')[0]
        voltage = sign_multiplier * float(v_disp) / 1e4

        v_disp_code = ( status_disp & 0x0F )
        if v_disp_code == 0x04:
            pass # Nop, everything is OK
        elif v_disp_code == 0x08:
            voltage = 'OL'

        if v_range_code == 1:
            v_range = '0-20 V'
        elif v_range_code == 2:
            v_range = '0-100 V'
        elif v_range_code == 3:
            v_range = 'AUTO'
        else:
            v_range = 'Unknown'
            print(f"Unknown voltage range code '{v_range_code:#x}'")

        #print(f"v_range_code='{v_range_code:#x}' v_range='{v_range}'")
  
        print(f"VOLTAGE range='{v_range}', {voltage} V")

        xw.Range('A1722').value = (f"{resistance}")

        xw.Range('B1722').value = (f"{voltage}")

I removed a bunch of stuff I didn't need.
Notice at the bottom (Xw.Range) I send the voltage and resistance to excel column A and B row 1722. You can make this any place you want. I just put it low enough in my sheet so it would not interfere with the rest of the sheet.

Once you get the data showing up in excel at the appropriate column and row then you need to modify the VBScript to where you want this data to be copied from and pasted to.
Here is the VBScript with some explanations.

Sub Copy_Paste_Below_Last_Cell()
'Find the last used row in a sheet and copy and paste data below it.

Dim lRow As Long

ThisWorkbook.Activate ' The active workbook that you have open

'1. Find last used row in destination sheet. In my case the worksheet name is IR & V & Capacity Test.
' The Rows.Count, 7 where the 7 correlates with the 7th column (G) you want to paste the data to. The 8th column (H) is understood as it ' copies and pastes 2 cells adjacent to each other.


lRow = Worksheets("IR & V & Capacity Test").Cells(Worksheets("IR & V & Capacity Test").Rows.Count, 7).End(xlUp).Row

'Offset 1 row below last used row
lRow = lRow + 1

'2. Copy data
Worksheets("IR & V & Capacity Test").Range("A1722:B1722").Copy
' Range("A1722:B1722") is where the rc3563.py script should be sending the data to and that is what you want to copy.
'3. Paste data
Worksheets("IR & V & Capacity Test").Range("G" & lRow).PasteSpecial
' Range("G" & lRow) is where we are pasting to given the instructions above to "Offset 1 row below last used row"


'Clear copy mode (marching ants around copied range)
Application.CutCopyMode = False

Everything in green is just my explanation and should be removed from the code.
The Macro shortcut you just add to run the VBscript.
In my case as I do 3 separate IR and V measurements,( Pre charge, post charge, post 25 day) hence I have 3 separate scripts that paste the IR and V into 3 different columns. therefore the Ctrl+s , z and so on. Hope this explains how it works. Let me know if you need more help.
1636986419543.png
Oh also check to see in my sheet that you are getting the data on row 1722 where you see OL and 0 after you insert a cell.
1636993085916.png
It should show you the V and IR as in this example. Try it with a plain empty workbook and see if you get the right data.
Wolf
1636993153212.png
 
Last edited:
I do not know what was wrong but now it works like clockwork! Thank you very much for your help! (y):)

I am in the process of building a 24 port cell holder in order to be able to test the cells quickly. I want to give something back to the community and will open an extra post to show my project in case someone intends to recreate something like that. At the moment i'm still waiting for an order for springs for the brass contacts. I overlooked that it is being shipped from china dammed 🙈. But i think i'll get it done this year. The cell holder is good for measuring many cells one after the other (IR & V), to test a battery pack before connecting the cells firmly and to test fuses between the cells. I will see that I have little transition resistance and document this. I have a SKYRC UltimateDuo Balance Charger / Discharger with which I would like to test various smaller battery packs.

To automate Wolf's script even more, I'll use an Autohotkey script for the cell holder to trigger ctrl + s (^ s) every 3 seconds. It remains to be seen whether it will work then but you can increase the time in milliseconds.

install -> right click -> new -> AutoHotkey Script -> insert (below) -> start if excel is open to measure

#Persistent
SetTimer, PressKey, 3000
Return

PressKey:
Send,^s
Return

To stop it you can click on exit in the system tray

With Autohotkey you can certainly do even more to stop the script after 24 or x times measurements or to start and end it with the push of a button.
 
With Autohotkey you can certainly do even more
Interesting.....
The only issue I have found is that sometimes it takes the RC3563 a bit to settle on an IR reading. Most of the time it is quite quick and a 3 second delay is probably OK.

Question..... does it trigger the ^+s every 3 seconds whether the cell is inserted in the holder or not?
If it does, for me anyway, since I am a fumbling old fart it may cause more missposts than good ones.

Wolf
 
Yes it only makes the key combination time-dependent whether a cell is inserted or not. Not the best way but might work for most. Maybe you know a better way. That was the easiest and feasible with my knowledge. I'm more of a practitioner i need a long time to write a code. Maybe this works in excel with basic so that you can trigger the next ctrl + s depending on a value in the cell so that a null value is not mistakenly copied. You're right, it takes a while for the value to settle down. For you it would be best to increase the value to 10-15 seconds if you only have one cell holder and have to insert it every time and see that it has a good contact. What i have planned is that i will insert all 24 cells and that they will have a good connection. Then, with the help of a slide and copper sliding contacts, i can always drive a little further to the next cell. 3 - 5 seconds would probably be enough for me. I hope I have the apparatus ready soon then you can see it as I mean it.
 
Bubba

6 of one half a dozen of the other
I still like the YR1035+ it is smaller and the probe wires are not covered in a thick shrink tubing like the RC3563

View attachment 14267


The battery testing fixture on the other hand is quick to use very well constructedand way better than what comes with the YR1035+
The RC3563 fixture has no sides so it is easy to insert a cell read the results and on to the next one.

View attachment 12326

The YR1035+ fixture

View attachment 9282


So in conclusion I think I will start to use the RC3563 when I check single cells with the fixture as it is very quick to insert the cell get a reading and move onand the YR1035+ when I am just spot testing a cell.

Both tester (YR1035+ and the RC3563) readings (actually all my YR1030/YR1035+ based testers) are so close to each other in readings it is not worth mentioning.

Hope this helps.

Wolf




Thanks OZ18650

Yea I hope he escapes as well.

Wolf
Hello.
Can you determine which contacts the probes and the stand go to?
For some reason, my "plus" ones are done differently.
2021-12-20 10.57.46.JPG
 
Last edited:
I have the same "issue" with the red holder. It should however not change the result.
 
I have the same "issue" with the red holder. It should however not change the result.
In this case, I agree.
But all the same, this is the wrong assembly.
How is it correct?

I've seen different wire connections.
In this case, the negative is connected in different ways.

Pay attention to the inscriptions on the board «I» and «V»

I - Internal resistance
V - Voltage
Right?
Or does "I" mean something else?
Снимок экрана 2021-12-20 в 13.38.14.png



1. There is only one correct wire shorted for calibration. Right?
2. 1 (black) to 4 (red) and 3 (blue) to 2 (yellow) is the correct connection for zero calibration. Right?
3. 1 (black) to 3 (yellow) and 3 (blue) to 4 (red) is the wrong connection for zero calibration. Right?

If so, is it necessary to calibrate the zero position on different ranges of changes with the correct connection?

Because even with the correct connection, there is no zero on different bands.

Video on this link. https://cloud.mail.ru/public/tQa7/SyAsywuwE
 
Last edited:
I - current
v - voltage

The little needle is for voltage measurement, the big ring around it for current sensing.

The meter is accurate enough for me, so i dont bother with calibration. +/- 0.2 mOhm is more than accurate for what i need.
 
Hey, Blew the pin out of mine. You need to be careful that the cells don't slip off of the Positive post!

Now I need a new end. OUCH they are expensive.
 
I - current
v - voltage

The little needle is for voltage measurement, the big ring around it for current sensing.

Thus, all 4 wires are incorrectly soldered to the board with respect to the inscriptions U and I. Right?

Because it is necessary to measure the voltage in black and in red. Right?

P.S. I understand that this does not affect, I just want to figure it out.
2022-01-21 10.27.12.JPG
 
RC3563 voltage is measured on pins 1 and 4 of the GX16 connector. Right?

Then why is the resistance between 1 and 4 of the GX16 45 kΩ?

If, when measuring only voltage, a multimeter is placed in the gap with RC3563, then when measuring voltage, a current of 0.08 mA will flow.

For example, when measuring the voltage of a CR1632 battery, this affects the accurate measurement.

Typically, multimeters have a resistance for measuring voltage of 1-2 MΩ.
 
Typically, multimeters have a resistance for measuring voltage of 1-2 MΩ.
True but this is not a typical multimeter. This is a 1kHz AC 4 wire impedance/resistance tester.
@BatrakovSV your holder diagram has me confused as my trace outs on the 6 that I own (2 not unpacked) but I assume they are all the same as the 4 I have unpacked is a bit different
1642815658233.png
The actual sense connectors are the small pins and the Voltage measurements are taken by the large barrels.
In this picture next I have color-coded the connections on 1 of the holders.
holder.png
Also how these 4 wires correlate going into the meter.
1642816865473.png1642816941135.png

Additionally the "Red and Black" wires have a 1kHz square wave With an RMS of 2.65V generated that is processed by the "sense" wires as impedance/resistance.
scope.png1642819519226.png
So yea it's not a standard regular multimeter. There is a lot more going on than just voltage.
The interesting thing is that the Voltage wires (red and black) have that low 60kΩ but the sense pin wires are at 2.05MΩ
1642819827413.png1642820091218.png

Either way I have 2 of them and several other IR testers and they all agree with each other. Funny thing Is I checked the (2) RC3563 that I have against each other and they produce exactly and I mean exactly the same readings.
BTW @Oberfail did you ever get your issue resolved with the RC3563?
Wolf
1642820417641.png
 
Last edited:
The actual sense connectors are the small pins and the Voltage measurements are taken by the large barrels.
Thanks for such a detailed answer!

If you focus on the inscriptions on the board of the stand-holder "U" and "I", then your wiring is also not ideal. Right?

holder.png
U and I should be opposite.

I understand that this does not affect the measurements.

I argue from the point of view of how the development of this stand-holder was originally conceived.

By the way, this is logically confirmed by the fact that small needles stick out and therefore it is just convenient for them to measure only voltage, if required.

That's how probes are made. Needles measure voltage.

2021-12-20 10.57.46.JPG
 
Back
Top