Skip to content

Latest commit

 

History

History
137 lines (111 loc) · 5.67 KB

Protocol.md

File metadata and controls

137 lines (111 loc) · 5.67 KB

Conventions in This Document

RX is a message from the power supply to the transceiver
TX is a message from the transceiver to the power supply

Hardware

The Flatpack2's CAN bus runs at 125kbit/s, using an extended ID field. The bus is relative to the PSU's negative output rail. Failure to connect the negative of the supply with the ground of your CAN transceiver will likely blow the transceiver up (this took me 3 MCP2551s to realize).

Messages

(TX) Log in, 0x050048XX

Sent to log into a power supply. Unknown if address is a broadcast or a specific message to a single power supply. After approximately 15 seconds, the power supply will log out again if it does not recieve another log in message.

The ID of the supply is set by the last byte of the address, where XX = ID * 4. The ID ranges from 0x01 to 0x3F (resulting in a range for XX of 0x04 to 0xFC).

Byte 0 1 2 3 4 5 6 7
Value Power supply's serial number 0x00 0x00

(RX) CAN bus introduction (??), 0x0500XXXX

Sent approximately every two seconds. XXXX are usually the last four digits of the power supply's serial number. (Doesn't always exactly match - supply ending with 5418 sends 1418)

Byte 0 1 2 3 4 5 6 7
Value 0x1B Power supply's serial number 0x00

(RX) Status, 0x05XX40YY

Sent by the power supply after it is logged into, and contains information about the current state of the power supply.

XX is the power supply's ID.

Value of YY Power supply state
0x04 Normal operation
0x08 Warning
0x0C Alarm
0x10 Walk in (voltage ramping up)

Current, output voltage and input voltage are stored in little endian (LSB first). All temperatures are in degrees Celsius. Current is in deciamps (i.e. 21.2A is 212). Output voltage is in centivolts (i.e. 48.52V is 4852). Input voltage is in volts.

Byte 0 1 2 3 4 5 6 7
Value Intake temperature Current Output voltage Input voltage Output temperature

(RX) Log in request (??), 0x05XX4400

Sent approximately every 15 seconds. Seems to be the power supply introducing itself to the CAN bus network.

XX is the power supply's ID.

Byte 0 1 2 3 4 5 6 7
Value Power supply's serial number 0x00 0x00

(TX) Set default voltage, 0x05XX9C00

Sent to the power supply to set its default voltage. Does not take effect until the supply is logged out. If the supply is logged in when the command is sent, the voltage is set when the log in times out. If it is not logged in, the voltage will be set when the supply logs in then times out.

XX is the power supply's ID.

The voltage is stored in little-endian and is in centivolts (i.e. 48.52V is 4852).

Byte 0 1 2 3 4
Value 0x29 0x15 0x00 New voltage

(TX) Alarms/warnings information request, 0x05XXBFFC

Sent to the power supply to request information on the current warnings and alarms. Should be sent after recieving an 0x05XX40YY message where YY = 08 or YY = 0C (i.e a warning or alarm is present). Byte 2 determines if warning or alarm information is returned.

Byte 0 1 2
Value 0x08 0x04 (warnings), 0x08 (alarms) 0x00

(RX) Alarms/warnings information, 0x05XXBFFC

Sent by the power supply in response to recieving an 0x05XXBFFC message. Contains information about any alarms or warnings present, depending on the contents of the request message.

XX is the power supply's ID.

Byte 0 1 2 3 4 5 6
Value 0x0E 0x04 (warnings), 0x08 (alarms) 0x00 Warning/alarm bit field byte 1 Warning/alarm bit field byte 2 0x00 0x00

Warnings/Alarms

Bit 0 is the LSB.

Bit Warning/alarm bit field byte 1 Warning/alarm bit field 2
0 OVS Lock Out Internal Voltage
1 Mod Fail Primary Module Fail
2 Mod Fail Secondary Mod Fail Secondary
3 High Mains Fan 1 Speed Low
4 Low Mains Fan 2 Speed Low
5 High Temp Sub Mod1 Fail
6 Low Temp Fan 3 Speed Low
7 Current Limit Inner Volt