Logo Banner

ELECTRONICS - [BK1786B supply] - [hardware addon] - [page 2/4]

BK1786B Hardware Addon

BK1786B's serial communication

The BK1786B programmable power supply has a serial DB9 connector at the back of the unit. This is *NO* standard RS-232 interface so you may *NOT* connect other devices to this connector. Instead, you need to use the IT-E131 adapter between the unit and any other external hardware like a computer, PLC, your own hardware...

The connector on the BK unit doesn't provide real RS-232 signals (-12/+12V). Instead, it uses TTL signals (0.5 V). So you need to place a converter between the BK unit and any other hardware. The BK instrument is shipped with an IT-131 cable to do just this.

This cable has two functions:

  1. It converts the voltage levels RS-232 from and to TTL.
  2. It provides an optical isolation between BK unit and the external system. This is done to prevent the BK unit can be damaged through the RS-232 link.

Connecting systems together

RS-232 systems can be connected by connecting only 3 cables: Rx (Receive), Tx (Transmit) and GND (Ground). The IT-E131 needs an additional +12 V signal on the pin 4 (DTR - Data Terminal Ready). This voltage is used to supply the IT-E131 adapter: There is some electronics inside that needs to be powered.

The schematic below shows you how both systems must be interconnected. Notice the Rx and Tx signals are crossed.

It is easy to find out the numbering on a DB9 connector. If you look closely you will see some numbers printed on the connector:

Communication with the BK unit

The BK1786B uses its own communication protocol. You can communicate with the power supply by sending data frames. Such frames contain 26 bytes with data. The following list shows all other parameters:

The power supply doesn't send frames on its own initiative. You always need to send a request frame first. Then, the unit will respond with a single frame. This frame also contains 26 bytes of data. So in short: you send 26 bytes in, you get 26 bytes back.

We are interested in getting the status of the current limiting from the device. We can obtain this status by sending the following bytes to the device:

The unit will execute the command and reply with a second hexadecimal data packet:

This response is very similar to the request frame, but more bytes are filled in right now. We are only interested in the 10th byte of this frame, as it contains the state of the power supply.

In our example the 10th byte contains the hexadecimal code 0x06. This value converts to the binary number 0b00000110. Each bit of this word represents a status flag of the BK unit. Here you can find a list with the meaning of each bit (bit 0 is the LSB, or the bit at the right).

bit 0 Unit output state (0=OFF,1=ON)
bit 1 Over heat protection (0=NORMAL, 1=ABNORMAL)
bit 2 Unit is in CV mode (0=CC MODE, 1=CV MODE)
bit 3 Unit is in CC mode (0=CV MODE, 1=CC MODE)
bit 4, 5, 6 Fan speed
bit 7 Unit operation state (0=front panel mode, 1=remote control mode)

So, our binary number learns us the output of the power supply is currently disabled, the over heat protection is in an abnormal state and the unit is in CV mode. This means the current limit is not reached.

Duration of a transmission cycle

I was wondering how long it takes to complete a full transmission cycle: send a request and get a response. This is important to know because it affects the maximum polling frequency for our applications.

By default, our communication speed is set to 9600. This number is the baud rate. I measured the length of a complete data transmission with the use of a digital oscilloscope, and came up with a value of approximately 56 ms. This means the minimum polling interval is 56 ms. I opted for an interval of 100 ms to stay on the safe side (10 samples per second).

Eventually the baud rate of the BK1786B can be increased to 38400. Doing so you can speed up the communication. A complete data transmission cycle will then only take 15.5 ms. This means you could poll the device 50 times per second.


Copyright ©1998-2022 Vanderhaegen Bart - last modified: August 24, 2013