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

0 Members and 1 Guest are viewing this topic.

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #300 on: January 30, 2025, 05:15:45 pm »
New KP184 Modbus Software Version 1.0.89.0:

Setup KP184 Software V1.0.89.0 32-bit

Setup KP184 Software V1.0.89.0 64-bit

User_Manual


Changes:

1. Corrected some last version self inflicted bugs when opening PDF report files (an error was being thrown).

2. Replaced some deprecated function parameters on PDF test reports code (battery capacity, internal resistance and solar panel).
 

Offline larrybud

  • Contributor
  • Posts: 37
  • Country: us
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #301 on: February 04, 2025, 02:25:32 pm »
The FTDI cable I bought claims to be straight through, but it didn't work. I first did a loopback test with a local terminal program (simply connect pins 2 and 3 of the db9 together) and the character was echoed back. I confirmed I wasn't looking at a local echo by removing the jumper between pins 2 and 3.

For S&G I then took some jumper wires and crossed pins 2 and 3 between the db9 and the kp184, and lo and behold it connected right up!

I then took at closer look at the "manual" that came with the KP184. It specifically states that Pin 2 is TXD and should be connected to RXD on the computer, and vice-versa for Pin 3 RXD, so with my version of hardware a straight through cable is not what you want.

Also, my version of KP184 has a TX/RX light on the back of the unit right next to the RS-232 port, which was helpful in diagnosing all of this.
« Last Edit: February 04, 2025, 02:44:18 pm by larrybud »
 

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #302 on: February 04, 2025, 08:55:51 pm »
Well done. It all depends on your USB to serial adapter DB-9 connector pinout. When the gender (male or female) of the DB-9 connector changes the 2 and 3 pin functions also swap.
 

Offline larrybud

  • Contributor
  • Posts: 37
  • Country: us
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #303 on: February 05, 2025, 11:20:23 pm »
Not sure I know what you mean? It's a single cable. The KP184 has a male db connector on it, so the cable is female.
 

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #304 on: February 06, 2025, 10:43:38 am »
A standard DB-9 DTE (male port) RS-232 pinout is:
2 RXD
3 TXD
5 GND

A standard DB-9 DCE (female port) RS-232 pinout is:
2 TXD
3 RXD
5 GND

KP184 DB-9 (male port) RS-232 pinout is:
2 TXD
3 RXD
5 GND

Pins 2 and 3 are swapped from the normal DTE standard.

When the user connects the DB-9 female - DB-9 female straight through cable that comes with the device (KP184):

KP184 DB-9 (male port) + DB-9 F-F straight cable = standard DB-9 DCE (female port):
2 TXD -------------------------------------------------------> 2 TXD
3 RXD -------------------------------------------------------> 3 RXD
5 GND -------------------------------------------------------> 5 GND

You end up with a standard DB-9 DCE (female port). That's why Kunkin supplied this cable.

If your USB to Serial RS232 adapter has a male DB-9 port you should be good to go.

On the other hand if your USB to Serial RS232 adapter has a female DB-9 port you need to cross pins 2 to 3 and 3 to 2.

You can do this with those short DB-9 M-M adapters (they cross pins 2 and 3, image below) and add it at the end of the supplied straight F-F cable or
replace the DB-9 F-F straight through supplied cable with a DB-9 F-M crossed cable:
(cable diagram)
2 ------------> 3
3 ------------> 2
5 ------------> 5

That's why you can't connect a USB to Serial RS232 adapter with a female DB-9 port directly to KP184 RS232 DB-9 male port:
This will not work:
KP184 (M)                 USB to Serial Adapter (F)
2 TXD -----------------> 2 TXD
3 RXD -----------------> 3 RXD
5 GND ----------------> 5 GND

This will work:
KP184 (M)                 USB to Serial Adapter (F)
2 TXD -----------------> 3 RXD
3 RXD -----------------> 2 TXD
5 GND ----------------> 5 GND

You just have to hope if you buy a dodgy USB to Serial adapter that it does not come with a non standard port pinout. In all cases documentation and this forum are your friends.
Buy USB to Serial adapters from reputable and well documented sources. KP184 is a bit picky on the serial adapters. Avoid very low cost Prolific (Ex: PL2303) and WCH (Ex: CH340) chipset based USB to Serial Adapters. Go for a FTDI/FT232RL chipset based adapter, it won't break the bank and save you countless headaches and lost hours.
« Last Edit: February 06, 2025, 11:43:57 am by interflexo »
 
The following users thanked this post: korjaa

Offline Pfriemler

  • Regular Contributor
  • *
  • Posts: 160
  • Country: de
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #305 on: February 06, 2025, 01:41:22 pm »
Interflexo just did the answer I planned  :clap:
I thought we had this just in this thread before.

But my experiences are slightly different.

For an additional understanding: In my opinion, there's nothing like a strictly standard male/female port. In fact, you must think rather of host and device.
A PC is a host. The standard is the male connector. And: This is what all my USB-RS232 have, too.
You do not have to tell between a generic PC serial port or a USB-connected serial port: The have the same pinout. (Anything else would be stupid).

(There are DB25 and DB9 connectors with different pin numbers, and tons of adapters. DB9 is sufficient, mostly.)
Any device (back in the past: mouse, modem, printer, any device to be controlled - like the KP184) should have a DB9 female connector.
When connecting host to device, any sender/transmitter line (TX) should be connected to the corresponding receiving line (RX). This is done when the device female connector has 2-TxD and 3-RxD.
A standard serial connection cable has a male and a female side, connected 1:1. You may chain several cables in line from host to the device. As it is a 1:1 connection (and the necessary crossing is done inside the device), it is no difference if you have a PC generic host port with a standard cable  to connect or if you plug the USB-serial adapter straight onto the device (and use a USB prolongation, if the adapter has no cable).
That's the theory  :)

KP184 is the only device I know with a DB male - but it has the correct pinout for a device. To heal the KP184's fault, you only need a so called "gender changer" in the picture in Interflexos Answer. They have two female or two male with a 1:1 pinout. The Kunkin cable is a gender changer with a cable, pinout 1:1.

You only have to think about any line crossing, if you connect a host to a host. Then, you need a female-female cable with crossed lines. That is: if you have suche a cable, it will not work with the Kunkin.

once you do it right, it works :-)
 
The following users thanked this post: interflexo, korjaa

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #306 on: February 07, 2025, 06:37:16 pm »
KP184 Modbus Software Version 1.0.89.0 for Linux - Ubuntu:

Install Bash Script 64-bit

User_Manual

User manual pages 11 to 14 explain the Linux installation procedure.

Installation bash script help:

Synopsis:
./kp184_install.sh
./kp184_install.sh [Option] [--output "install folder"]
./kp184_install.sh [--input "archive filename"] [--output "install folder"]
./kp184_install.sh [-i "archive filename"] [-o "install folder"]

Description:
Bash script file to install the KP184 electronic load data acquisition and control Modbus application software on Ubuntu. The bash script handles new installations as well as upgrades preserving the user application configuration.The application calls this bash script whenever needs to upgrade.
A .desktop file is added to the folder /home/username/.local/share/applications to add the application icon to the desktop application menu.
The archive (tar.gz) file is deleted at the end of the installation.

Options:

-h | --help
Displays this help

-V | --version
Displays the installation bash script file version.

-u | --uninstall
Uninstalls the application from your system, leaving all the application user data files (images, pdf reports and csv data files).

-y | --yes
The script does not stop to ask for y/n to proceed.

-i | --input "archive path and filename"
Specifies path and filename for the installation archive. (Ex: /home/username/Downloads/setup_kp184_10890_64-bit.tar.gz)

-o | --output "installation folder name" (Ex: kp184)
Specifies a name for the application installation folder

Examples:
./kp184_install.sh
Searches https://www.interflexo.com//kp184// for the latest 64-bit Linux release and downloads the archive installation (tar.gz) file to /home/username/Downloads then installs the application on folder /home/username/.local/kp184
This is the simpler method for installation.

./kp184_install.sh -i ~/Downloads/setup_kp184_10890_64-bit.tar.gz
Uses the provided archive file and installs the application on folder /home/username/.local/kp184

./kp184_install.sh -o kp184_modbus
Searches https://www.interflexo.com//kp184// for the latest 64-bit Linux release and downloads the archive installation (tar.gz) file to /home/username/Downloads then installs the application on folder /home/username/.local/kp184_modbus

./kp184_install.sh -u
Performs the application uninstallation. It first looks for the /home/username/.local/kp184 installation folder. If it’s not found then a recursive search is made inside the /home/username/.local folder.

./kp184_install.sh -u -o “kp184 modbus”
Performs the application uninstallation. It first looks for the /home/username/.local/kp184 modbus installation folder. If it’s not found then a recursive search is made inside the /home/username/.local folder. Folder names with spaces should be enclosed in double quotes.
« Last Edit: February 08, 2025, 02:00:20 am by interflexo »
 

Offline larrybud

  • Contributor
  • Posts: 37
  • Country: us
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #307 on: February 08, 2025, 04:44:54 pm »
Just note that my KP184 didn't come with a cable. I did buy an FTDI, but obviously the pinout was incorrect. I did buy a null model adapter which swapped 2/3 and everything works great!
 

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #308 on: February 08, 2025, 05:25:41 pm »
What was your FTDI USB to Serial adapter DB-9 connector gender (male or female)?
 

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #309 on: February 17, 2025, 07:10:08 pm »
New KP184 Modbus Software Version 1.0.90.0:

Setup KP184 Software V1.0.90.0 32-bit

Setup KP184 Software V1.0.90.0 64-bit

Ubuntu Install Bash Script 64-bit

User_Manual


Changes:

1. Added icons for the configuration, reports, emails, sounds, registration and updates dialog windows.

2. Added DUT (device under test) customer field on the test PDF reports.

3. Added Open, Save and Append buttons to the battery internal resistance tests list dialog.

4. On the battery internal resistance tests list PDF report the tests are now grouped by customer.

5. Added page header corporate customization on test PDF reports.

6. Added a serial connection troubleshoot section to the user manual.
« Last Edit: February 17, 2025, 07:11:44 pm by interflexo »
 

Offline interflexo

  • Regular Contributor
  • *
  • Posts: 180
  • Country: pt
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #310 on: February 24, 2025, 02:04:19 pm »
New KP184 Modbus Software Version 1.0.91.0:

Setup KP184 Software V1.0.91.0 32-bit

Setup KP184 Software V1.0.91.0 64-bit

Ubuntu Install Bash Script 64-bit

User_Manual


Changes:

1. Corrected an issue when saving the KP184 registers to a file.
 

Offline korjaa

  • Newbie
  • Posts: 5
  • Country: fi
Re: Serial to usb on Kunkin KP184 electronic load
« Reply #311 on: March 01, 2025, 07:56:33 am »
In case it might help others, I ended up buying both variations of this cable https://www.aliexpress.com/item/32922249681.html and the option "Standard Pinout" seemed to work, as should be expected based on the earlier discussion:

Quote
Standard pinout:
2-RXD(yellow),
3-TXD(orange),
5-GND(GND),
7-RTS(green),
8-CTS(brown),
1/4/6/9-NC

The seller claims that it uses genuine FTDI. When plugged in, it identifies as follows in my Ubuntu 24.04, no drivers required:
Code: [Select]
[  421.687585] usb 1-8.1.3: new full-speed USB device number 10 using xhci_hcd
[  421.782826] usb 1-8.1.3: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[  421.782845] usb 1-8.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  421.782847] usb 1-8.1.3: Product: FT232R USB UART
[  421.782848] usb 1-8.1.3: Manufacturer: FTDI
[  421.782849] usb 1-8.1.3: SerialNumber: ABSCDPCI
[  421.815787] usbcore: registered new interface driver usbserial_generic
[  421.815796] usbserial: USB Serial support registered for generic
[  421.817695] usbcore: registered new interface driver ftdi_sio
[  421.817704] usbserial: USB Serial support registered for FTDI USB Serial Device
[  421.817794] ftdi_sio 1-8.1.3:1.0: FTDI USB Serial Device converter detected
[  421.817830] usb 1-8.1.3: Detected FT232R
[  421.818365] usb 1-8.1.3: FTDI USB Serial Device converter now attached to ttyUSB0

As the cable uses female connector and correct pinout for KP184, it plugs directly with no adapters required. This means the tightening screws also work which might not be the case with a gender changer. All gender changers I saw had female threads on both sides, so it cannot be secured to the KP184.

The cable markets is self as a "PC Control TV Cable", so maybe this style RS232 connector is common there.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf