Skip to content

Commit aa72c93

Browse files
committed
Adapt parameter block documentation to safety fw v0.2.6
Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
1 parent 2439852 commit aa72c93

1 file changed

Lines changed: 53 additions & 14 deletions

File tree

docs/source/safety_controller_parameterization.rst

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,21 @@ To make the handling of parameters human-friendly, all parameters can be put tog
3232

3333
.. code-block:: yaml
3434
35+
version: 1
3536
pt1000s:
36-
- 75.0 °C
37-
- 85.0 °C
38-
- disabled
37+
- abort-temperature: 75.0 °C
38+
resistance-offset: 0.85 Ω
39+
- abort-temperature: 85.0 °C
40+
resistance-offset: 1.042 Ω
41+
- 80.0 °C
3942
- disabled
4043
4144
contactors:
45+
- type: without-feedback
46+
close-time: 100 ms
47+
open-time: 100 ms
4248
- without-feedback
43-
- without-feedback
49+
- disabled
4450
4551
estops:
4652
- active-low
@@ -52,35 +58,64 @@ To make the handling of parameters human-friendly, all parameters can be put tog
5258
The YAML file is required to be encoded in UTF-8. While most parameters are ASCII only, temperature thresholds require
5359
trailing `°C` suffix which has a special UTF-8 encoding sequence. This might be displayed incorrectly in the editor
5460
when editing on the device itself and/or finally stored wrong in the YAML file.
61+
The same applies to the resistance offsets in Ohm.
5562
When unsure, adapt/create the YAML file on your Linux host system with your preferred editor and transfer it
5663
to the board via Ethernet network (e.g. SCP/SFTP).
5764

5865
Such a YAML file must be converted to a binary parameter block file afterwards. And this binary parameter block file
5966
must finally be flashed to the safety controller's flash memory, see below.
6067

68+
.. important::
69+
70+
The YAML file allows to specify a numeric parameter block version. This version is used internally by the
71+
safety controller firmware to detect the binary structure of the parameter block. It must thus match the
72+
safety firmware's expectation, otherwise the safety controller will refuse to work and enters safe state directly.
73+
6174

6275
Temperature Channel (PT1000) Configuration
6376
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6477

6578
The safety controller supports up to 4 PT1000 temperature channels. Thus the YAML file expects for each channel
66-
either a temperature threshold in °C at which the safety controller stops and/or prevents charging.
67-
In a PT1000 channel is not wired/used, it is required to disable this channel using the special word `disabled`
79+
a temperature threshold in °C at which the safety controller stops and/or prevents charging. Also for each channel,
80+
an offset value in Ohm can be specified. This offset depends on the actual physical wiring and must be determined
81+
in the specific customer setup.
82+
If a PT1000 channel is not wired/used, it is required to disable this channel using the special word `disabled`
6883
instead of a temperature value.
84+
The example YAML file above shows that the PT1000 configuration is an array with up to 4 items. Each item can either
85+
be a single temperature threshold, the special token `disabled` or it is a key-value list. Valid keys are
86+
`abort-temperature` and `resistance-offset`. If no `resistance-offset` is given, then it is assumed to be zero.
87+
88+
The accepted value range for `abort-temperature` is -80.0 °C to 200.0 °C and it is stored with one decimal digit.
89+
90+
The range for `resistance-offset` is -32.0 Ω ... 32.0 Ω and these values are stored with three decimal digits internally.
6991

7092

7193
Contactor and Contactor Feedback Configuration
7294
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7395

74-
The safety controller allows to control up to 2 high-voltage contactors and can monitor corresponding mirror contacts.
75-
The mirror contacts need to have `Normally Closed` semantic. In the YAML parameterization, it is possible to
76-
specify whether the safety controller should actually switch the corresponding output pin and whether to monitor
77-
the feedback input pins.
96+
The safety controller allows to control up to 3 high-voltage contactors and can monitor corresponding mirror contacts.
97+
The mirror contacts support `Normally Closed` and `Normally Open` semantic, but customer must follow chargebyte's
98+
Charge SOM's EVB reference design otherwise the logic might be inverted.
99+
In the YAML parameterization, it is possible to specify whether the safety controller should actually switch the
100+
corresponding output pin and whether to monitor the feedback input pins. When using the feedback, it is usually also
101+
required to specify the open and closing times of the used contactor. These times are expected in milliseconds and
102+
used by the Safety Firmware to check after the given time whether the feedback pin has expected level. If the level
103+
differs from the expectation, then Safety Firmware assumes a malfunction and thus enters safe state.
78104

79-
Possible parameter values are:
105+
The example YAML file above shows all allowed variants how to parameterize a contactor.
106+
Possible values for the `type` are:
80107

81108
- `disabled`
82109
- `without-feedback`
83-
- `with-feedback`
110+
- `with-feedback-normally-open`
111+
- `with-feedback-normally-closed`
112+
113+
Since the open/close timings make no sense in case of `disabled` or `without-feedback`, it is possible to use these
114+
tokens directly as array item (actually, it is also possible to use the `with-feedback...` ones, but then the timings
115+
are considered zero).
116+
117+
Both `close-time` and `open-time` accept integer values in the range 0 to 2550 ms, however the given value is
118+
divided by 10 before it is actually stored internally.
84119

85120

86121
Emergency Input Configuration
@@ -105,15 +140,19 @@ The following session transcript shows how the install procedure works:
105140
106141
# create a YAML file on-the-fly
107142
$ cat <<EOL > /tmp/my-parameters.yaml
143+
version: 1
108144
pt1000s:
109-
- 75.0 °C
110-
- 85.0 °C
145+
- abort-temperature: 85.0 °C
146+
resistance-offset: 0.85 Ω
147+
- abort-temperature: 75.0 °C
148+
resistance-offset: 1.1 Ω
111149
- disabled
112150
- disabled
113151
114152
contactors:
115153
- without-feedback
116154
- without-feedback
155+
- disabled
117156
118157
estops:
119158
- active-low

0 commit comments

Comments
 (0)