Author Topic: Serial to usb on Kunkin KP184 electronic load  (Read 2482 times)

0 Members and 1 Guest are viewing this topic.

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Serial to usb on Kunkin KP184 electronic load
« on: November 08, 2019, 05:40:44 pm »
I love my Kunkin KP184 electronic load and would like to control it via the serial port (or RS485, don't care which), but none of the adapters I've tried (FTDI, Prolific, all the usual suspects) work. Has anyone managed it or does anyone have any tips for troubleshooting? The serial port settings are very clear and I did once manage to get it working so I know it's possible but now I can't get it back. There's no information in the manual about voltage levels, but my understanding is that most of the adapters should work regardless of whether it's 5 or 12 or whatever. I would measure it but it only sends data in response to a modbus command, and I can't get it to talk.

Any help or tips very welcome.

Thanks

Manual is available on their product page: http://www.kunkin.com/gb/products.asp?id=2&menu=ShowDetail&P_Id=67
 

Offline Noy

  • Regular Contributor
  • *
  • Posts: 132
  • Country: de
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #1 on: November 09, 2019, 09:09:09 am »
Where did you get the software ? I have a KP184 but no Software.
 

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #2 on: November 09, 2019, 09:52:47 am »
I think there was a disk which came with it but I threw it away, the software which comes with these things is usually not great. There's some example code in the manual which explains the protocol and I did verify that it works when I had a serial port setup which worked, but I can't get the serial port to work any more.

Here's a very basic utility but I can't test it until I get the serial port working: https://github.com/cskilbeck/modbus/
« Last Edit: November 09, 2019, 10:14:19 am by cskilbeck »
 
The following users thanked this post: timber23

Offline Black Phoenix

  • Frequent Contributor
  • **
  • Posts: 523
  • Country: hk
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #3 on: November 09, 2019, 01:01:59 pm »
I love my Kunkin KP184 electronic load and would like to control it via the serial port (or RS485, don't care which), but none of the adapters I've tried (FTDI, Prolific, all the usual suspects) work.

I'm still looking to find the equipment that doesn't work with this adapter:



I use one since 2005 (this is my second one since I lost my previous one, that were only Keyspan in the brand): From using with a Renishaw QC10 Ballbar System to Rollover Cisco Cables, from NSN MGW/MSS terminal connection to old measurement equipment, it never let me down, including Allen-Bradley/Siemens Simatic PLCs. It's based on the TI 75LV4737A Multichannel RS232 Line Driver/Receiver, so it have have HW handshake.

It's a little expensive compared with other models, but is probably the only one you will need for the rest of your professional life.
« Last Edit: November 09, 2019, 01:07:38 pm by Black Phoenix »
 

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #4 on: November 10, 2019, 09:11:29 pm »
Thanks @Black Phoenix. Yikes! That is expensive. I'll give it one more go with a homegrown FTDI adapter -> 9 pin D plug and bite the bullet when that doesn't work.
 

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #5 on: November 10, 2019, 09:20:20 pm »
Aha!! Tried once more with a cheapo generic usb to serial adapter and added a 100ms delay between sending the message and getting the reply and voila! I have reasonable looking data. So the takeaway is add a delay after sending!

Thanks all for your help.
 

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #6 on: November 10, 2019, 11:08:16 pm »
Annoyingly it has stopped working again - same adapter, settings etc but now I just get timeout. I wonder if it's actually faulty.
 

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #7 on: November 11, 2019, 05:37:42 pm »
Just to close this thread out, the 9 pin socket on the back of the device wasn't making good contact with the plug. Some of the pins were pushed in, after reseating everything it's working. Out of 4 serial adapters, only one works, and it's a completely generic cheapo CH340 from eBay like this one https://www.ebay.co.uk/itm/USB-to-Serial-RS232-9-Pin-DB9-COM-Port-Converter-Adapter-Cable-for-Windows-XP-7/202700911358 (with the male plug, so I used a gender changer).
 

Offline timber23

  • Contributor
  • Posts: 47
  • Country: de
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #8 on: March 09, 2020, 09:32:39 pm »
I think there was a disk which came with it but I threw it away, the software which comes with these things is usually not great. There's some example code in the manual which explains the protocol and I did verify that it works when I had a serial port setup which worked, but I can't get the serial port to work any more.

Here's a very basic utility but I can't test it until I get the serial port working: https://github.com/cskilbeck/modbus/
Thank you for your utility.
Are you going to further develop the software? I tried it and I can switch the load on and off, but nothing more.
Code: [Select]
E:\Modbus\modbus-master\bin\Debug>KP184 port COM11; baud 9600; address 1; on
Main                :Checksum error, got 0x0000. expected 0xC00B

E:\Modbus\modbus-master\bin\Debug>KP184 port COM11; baud 9600; address 1; off
Main                :Checksum error, got 0x0000. expected 0xC00B
I do not understand why I get 0x0000 back. Do you know why?

Edit: I played a little bit around with your code and extended it a little bit. Hope you will pull my changes to you master branch  :)

Best regards
timber23
« Last Edit: March 10, 2020, 10:40:03 pm by timber23 »
 

Offline cskilbeck

  • Contributor
  • Posts: 18
  • Country: gb
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #9 on: March 23, 2020, 05:54:03 pm »
It seems to be working well for me, I just pushed some changes, let me know if it's not working for you? I added some delay() here and there, it seems picky about that.

Verbose  17:52:08.850 port                :COM Port: com15
Info     17:52:08.876 checksum            :Checksum checking: True
Verbose  17:52:08.877 baud                :BAUD rate: 115200
Verbose  17:52:08.878 address             :Device address: 1
Verbose  17:52:08.879 get_voltage         :Calling get_Mode from KP184
Verbose  17:52:08.879 get_voltage         :Get voltage
Verbose  17:52:08.881 open                :Opening serial port 'com15' at 115200 baud
Info     17:52:08.941 get_voltage         :Voltage is 5924mV
Verbose  17:52:08.942 switch              :Turning load switch on
Verbose  17:52:08.943 set_load_switch     :Set switch on
Verbose  17:52:08.996 get_status          :Calling get_status from KP184
Info     17:52:09.049 get_status          :Status:
Info     17:52:09.050 get_status          :   Switch is on
Info     17:52:09.051 get_status          :   Mode is CC
Info     17:52:09.052 get_status          :   Current is 0
Info     17:52:09.053 get_status          :   Voltage is 5924
Info     17:52:09.055 ramp                :Ramp: from 0 to 1000 in steps of 100 at intervals of 200
Verbose  17:52:09.056 set_current         :Set current to 0mA
Info     17:52:09.109 ramp                :        0mA, elapsed: 00:00:00.0531564
Verbose  17:52:09.256 set_current         :Set current to 100mA
Info     17:52:09.309 ramp                :      100mA, elapsed: 00:00:00.2534356
Verbose  17:52:09.456 set_current         :Set current to 200mA
Info     17:52:09.508 ramp                :      200mA, elapsed: 00:00:00.4522986
Verbose  17:52:09.656 set_current         :Set current to 300mA
Info     17:52:09.709 ramp                :      300mA, elapsed: 00:00:00.6532109
Verbose  17:52:09.856 set_current         :Set current to 400mA
Info     17:52:09.908 ramp                :      400mA, elapsed: 00:00:00.8521267
Verbose  17:52:10.056 set_current         :Set current to 500mA
Info     17:52:10.109 ramp                :      500mA, elapsed: 00:00:01.0532407
Verbose  17:52:10.256 set_current         :Set current to 600mA
Info     17:52:10.313 ramp                :      600mA, elapsed: 00:00:01.2576433
Verbose  17:52:10.456 set_current         :Set current to 700mA
Info     17:52:10.510 ramp                :      700mA, elapsed: 00:00:01.4544644
Verbose  17:52:10.657 set_current         :Set current to 800mA
Info     17:52:10.710 ramp                :      800mA, elapsed: 00:00:01.6546185
Verbose  17:52:10.857 set_current         :Set current to 900mA
Info     17:52:10.911 ramp                :      900mA, elapsed: 00:00:01.8551085
Verbose  17:52:11.057 set_current         :Set current to 1000mA
Info     17:52:11.109 ramp                :     1000mA, elapsed: 00:00:02.0531923
Verbose  17:52:11.257 get_voltage         :Calling get_Mode from KP184
Verbose  17:52:11.258 get_voltage         :Get voltage
Info     17:52:11.310 get_voltage         :Voltage is 5922mV
Verbose  17:52:11.312 get_current         :Calling get_Mode from KP184
Verbose  17:52:11.313 get_current         :Get current
Info     17:52:11.365 get_current         :Current is 787mA
Info     17:52:11.367 ramp                :Ramp: from 1000 to 0 in steps of -100 at intervals of 200
Verbose  17:52:11.367 set_current         :Set current to 1000mA
Info     17:52:11.419 ramp                :     1000mA, elapsed: 00:00:00.0515168
Verbose  17:52:11.568 set_current         :Set current to 900mA
Info     17:52:11.622 ramp                :      900mA, elapsed: 00:00:00.2543872
Verbose  17:52:11.767 set_current         :Set current to 800mA
Info     17:52:11.821 ramp                :      800mA, elapsed: 00:00:00.4541509
Verbose  17:52:11.967 set_current         :Set current to 700mA
Info     17:52:12.024 ramp                :      700mA, elapsed: 00:00:00.6573842
Verbose  17:52:12.167 set_current         :Set current to 600mA
Info     17:52:12.225 ramp                :      600mA, elapsed: 00:00:00.8577865
Verbose  17:52:12.367 set_current         :Set current to 500mA
Info     17:52:12.420 ramp                :      500mA, elapsed: 00:00:01.0534372
Verbose  17:52:12.567 set_current         :Set current to 400mA
Info     17:52:12.624 ramp                :      400mA, elapsed: 00:00:01.2567874
Verbose  17:52:12.767 set_current         :Set current to 300mA
Info     17:52:12.823 ramp                :      300mA, elapsed: 00:00:01.4561288
Verbose  17:52:12.967 set_current         :Set current to 200mA
Info     17:52:13.024 ramp                :      200mA, elapsed: 00:00:01.6569999
Verbose  17:52:13.168 set_current         :Set current to 100mA
Info     17:52:13.225 ramp                :      100mA, elapsed: 00:00:01.8573013
Verbose  17:52:13.368 set_current         :Set current to 0mA
Info     17:52:13.422 ramp                :        0mA, elapsed: 00:00:02.0547666
Verbose  17:52:13.567 switch              :Turning load switch off
Verbose  17:52:13.572 set_load_switch     :Set switch off
 

Offline cvanc

  • Frequent Contributor
  • **
  • Posts: 605
  • Country: us
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #10 on: March 23, 2020, 06:59:05 pm »
I'm still looking to find the equipment that doesn't work with this adapter:




I have the same unit, have used it for years, and can also report that it "simply works" with everything I have ever thrown at it.  Nice piece.
 

Offline timber23

  • Contributor
  • Posts: 47
  • Country: de
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #11 on: March 27, 2020, 08:24:08 pm »
I found an interesting alternative for connecting the KP184 to a PC. Instead of using a USB serial adapter you can use a network serial adapter.
I tried this device: https://www.aliexpress.com/item/33014747838.html
It is called USR-TCP232 and this is the manufacturer's website: https://www.usriot.com/products/rs232-to-ethernet-converter.html
My KP184 is now connected to my LAN and I can access it via "virtual COM ports" from every PC within my network.  :-+
 
The following users thanked this post: classical

Offline classical

  • Regular Contributor
  • *
  • Posts: 60
  • Country: de
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #12 on: April 20, 2020, 03:40:11 am »
My KP184 is now connected to my LAN and I can access it via "virtual COM ports" from every PC within my network.  :-+
Thanks, very interesting. Did you use the virtual com port driver of the manufacturers website?
Which application do you use controlling and reading the KP184?
 

Offline interflexo

  • Contributor
  • Posts: 12
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #13 on: April 21, 2020, 12:04:22 pm »
I am using a Digitus DA-70156 USB 2.0 to Serial (FTDI/FT232RL) on Win 10 with no issues from ASSMANN Electronic GmbH 8,67 EUR + Shipping on Amazon.

Scoping Kunkin KP184 serial communication with the stock National Instruments based light application I noticed there are a lot more register addresses available than the ones listed on the product manual.

The manual states on page 14:

If you need more specific information about communication protocol, please contact the technical support department of our company to get it.

I sent an email to sales@kunkin.cn but it could not be delivered.

Does anyone have this complete protocol information?

Does anyone have an open English speaking channel with Kunkin to ask for more information?

I am glad to share some details but there is a lot of missing information...
 
The following users thanked this post: classical

Offline voltlog

  • Regular Contributor
  • *
  • Posts: 97
  • Country: ro
    • VoltLog
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #14 on: April 25, 2020, 08:48:56 am »
I wasn't even able to get their labview app running, I obtained two different versions, the first one wouldn't let me change the serial port for connection and the second would complain right from the start that there are missing files. The best I could do is connect with the visual studio command line app that someone designed and released on github.
 
The following users thanked this post: classical

Offline interflexo

  • Contributor
  • Posts: 12
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #15 on: May 28, 2020, 05:16:51 am »
New software written in Python for Kunkin KP184 V1.0.1.0:
KP184_Software V1.0.1.0
User_Manual


« Last Edit: June 02, 2020, 01:17:02 pm by interflexo »
 
The following users thanked this post: classical

Offline interflexo

  • Contributor
  • Posts: 12
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #16 on: June 02, 2020, 01:31:41 pm »
New version 1.0.1.0:
Capacity (Ah)/Energy (Wh) calculations error fix.
Minor bug fixes.
New software CVL mode with current limiting capability. Operates Kunkin in CC mode and a PID configurable control loop holds the configured CV setting by permanently adjusting the CC load.

User Manual updated.
 

Offline dc8wan

  • Newbie
  • Posts: 4
  • Country: de
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #17 on: June 04, 2020, 10:00:17 pm »
For the reversing engineering gays:
the Command
      
  •    0x01   byte
  • [1]   0x03   byte
          [2]   0x03   byte
          [3]   0x00   byte
          [4]   0x00   byte
          [5]   0x01   byte
          [6]   0x4e      byte
          [7]   0x84   byte

    The Anwser:
    With out externel Powersupply
          
  •    0x01   byte
  • [1]   0x03   byte
          [2]   0x1e      byte
          [3]   0x02   byte
          [4]   0x00   byte
          [5]   0x00   byte
          [6]   0x00   byte
          [7]   0x00   byte
          [8]   0x00   byte
          [9]   0x00   byte
          [10]   0x00   byte
          [11]   0x00   byte
          [12]   0x04   byte
          [13]   0xb0      byte
          [14]   0x07   byte
          [15]   0xd0      byte
          [16]   0x07   byte
          [17]   0xd0      byte
          [18]   0x00   byte
          [19]   0x03   byte
          [20]   0xe8      byte
          [21]   0x31   byte
          [22]   0x91   byte
     
    with externen powersupply
    approx 13.020V
    1,200A
    15.62W
          
  •    0x01   byte
  • [1]   0x03   byte
          [2]   0x1e      byte
          [3]   0x03   byte
          [4]   0x00   byte
          [5]   0x00   byte
          [6]   0x32   byte
          [7]   0xe9      byte
          [8]   0x00   byte
          [9]   0x04   byte
          [10]   0xb0      byte
          [11]   0x00   byte
          [12]   0x04   byte
          [13]   0xb0      byte
          [14]   0x07   byte
          [15]   0xd0      byte
          [16]   0x07   byte
          [17]   0xd0      byte
          [18]   0x00   byte
          [19]   0x03   byte
          [20]   0xe8      byte
          [21]   0xfc      byte
          [22]   0x3d      byte
 

Offline Voidugu

  • Contributor
  • Posts: 13
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #18 on: June 06, 2020, 02:12:22 pm »
Softwae feedback: For some reason, when I try to log data, the logging stops after 14:04 minutes, regardless of the sample rate (ie 4 samples per second or 1 sample per second). I am using software version v1.0.1.0 with windows 10.
 

Offline interflexo

  • Contributor
  • Posts: 12
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #19 on: June 08, 2020, 10:45:52 am »
Thanks for your feedback.
From the User Manual (page 3) or App Info Tab: "This unregistered product works in trial mode for 15 minutes, after the expired
period the data capture features are disabled. If you find out that this software product is useful, you can register..."
 

Offline interflexo

  • Contributor
  • Posts: 12
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #20 on: June 13, 2020, 08:14:36 am »
New version 1.0.3.0:

1. Plot graphs are now placed on the same directory as the configured .csv file.
2. A matching “.png” plot graph image file is also added to the same output directory for easier document insertion.
3. Dimmed icons bumped 78% in brightness.
4. Several minor cosmetic issues fixed.
5. Several support modules were updated in the Python ecosystem.

KP184_Software V1.0.3.0
User_Manual
« Last Edit: June 14, 2020, 09:39:26 pm by interflexo »
 
The following users thanked this post: Seichan

Offline interflexo

  • Contributor
  • Posts: 12
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #21 on: June 20, 2020, 09:15:29 am »
New version 1.0.4.0:

1. Fixed an issue with the battery capacity test max duration
2. A new log tab allows the user to keep a track record of the current session activities and results. Events like over temperature, over power and over current are also logged as well as its recoveries. Right click on the text widget and select “Copy to clipboard” to export the complete log in
text format.

KP184_Software V1.0.4.0
User_Manual
 

Offline belzrebuth

  • Frequent Contributor
  • **
  • Posts: 272
  • Country: gr
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #22 on: Today at 07:53:13 am »
I found an interesting alternative for connecting the KP184 to a PC. Instead of using a USB serial adapter you can use a network serial adapter.
I tried this device: https://www.aliexpress.com/item/33014747838.html
It is called USR-TCP232 and this is the manufacturer's website: https://www.usriot.com/products/rs232-to-ethernet-converter.html
My KP184 is now connected to my LAN and I can access it via "virtual COM ports" from every PC within my network.  :-+

I've got the same LAN module, based on your post here.
How did you connect the module to the Kunkin load?
I could make an adapter board with a DB9 and a DC power port I guess...
Does the module need 3V3 or 5V to operate?Or 5V gets converted to 3v3 regardless?
« Last Edit: Today at 07:56:50 am by belzrebuth »
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 2455
  • Country: ca
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #23 on: Today at 10:50:42 am »
For the serial to usb adapter(s) on the market , many of them a prolific based,  some with ch340 ic's and the ones you need are ftdi based,   but you need to check the hardwares id's in the windows device managers to get the vid / pid  to be sure.

Tons of compatibility issues, buffer lenght, communication drop out,    etc .... i always resort to real ftdi chipset.
 

Offline belzrebuth

  • Frequent Contributor
  • **
  • Posts: 272
  • Country: gr
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #24 on: Today at 01:45:47 pm »
So those RS232 to USB that are flooding ebay are out of the question I guess?
I think I have an FTDI friend clone around here; I could check if it works.
« Last Edit: Today at 01:47:30 pm by belzrebuth »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf