Skip to content

Commit 93f6eb8

Browse files
committed
Safety Controller: add chapter about parameter blocks
Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
1 parent b4ca6c8 commit 93f6eb8

2 files changed

Lines changed: 149 additions & 0 deletions

File tree

docs/source/safety_controller.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ This state can only be left by a reset.
9999
.. figure:: _static/images/safety_controller_states.svg
100100
:width: 1000pt
101101

102+
.. include:: safety_controller_parameterization.rst
103+
102104
.. include:: safety_controller_uart.rst
103105

104106
.. include:: everest_bsp.rst
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
.. _safety_controller_parameterization.rst:
2+
3+
Safety Controller Parameterization
4+
----------------------------------
5+
6+
7+
Overview
8+
^^^^^^^^
9+
10+
The safety controller can or must be parameterized to a certain extent. For example, it is required to know
11+
which temperature channels are actually in use and at which temperature thresholds the charging process needs to
12+
be stopped to avoid injuries to users and/or prevent damage to the EVSE itself.
13+
Futhermore, the safety controller can control high-voltage contactors and can then monitor feedback contacts to
14+
detect contactor welding.
15+
It also supports up to four emergency input channels, each can be disabled when not connected/required in
16+
the actual customer setup.
17+
18+
These safety controller parameters are stored as a binary parameter block, directly in the safety controller's flash.
19+
When shipped from factory, there is a default parameter block installed which allows easy evaluation of the product,
20+
but is not intended for production usage in the field.
21+
Customers are encouraged to adjust the parameters to their requirements/needs during deployment of the board into
22+
an actual charger.
23+
24+
To adjust the parameters, some small command line tools are included in the shipped Linux firmware which allow
25+
to create/modify the parameters on the board itself. However, it is also possible to use these tools on a Linux
26+
host system (e.g. in a virtual machine) and then to transfer the created parameter block to each board
27+
and install it.
28+
29+
The mentioned tools are part of the `ra-utils repository <https://github.com/chargebyte/ra-utils>`__ on Github.
30+
31+
To make the handling of parameters human-friendly, all parameters can be put together using a YAML text file.
32+
33+
.. code-block:: yaml
34+
35+
pt1000s:
36+
- 75.0 °C
37+
- 85.0 °C
38+
- disabled
39+
- disabled
40+
41+
contactors:
42+
- without-feedback
43+
- without-feedback
44+
45+
estops:
46+
- active-low
47+
- disabled
48+
- disabled
49+
50+
.. important::
51+
52+
The YAML file is required to be encoded in UTF-8. While most parameters are ASCII only, temperature thresholds require
53+
trailing `°C` suffix which has a special UTF-8 encoding sequence. This might be displayed incorrectly in the editor
54+
when editing on the device itself and/or finally stored wrong in the YAML file.
55+
When unsure, adapt/create the YAML file on your Linux host system with your preferred editor and transfer it
56+
to the board via Ethernet network (e.g. SCP/SFTP).
57+
58+
Such a YAML file must be converted to a binary parameter block file afterwards. And this binary parameter block file
59+
must finally be flashed to the safety controller's flash memory, see below.
60+
61+
62+
Temperature Channel (PT1000) Configuration
63+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
65+
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`
68+
instead of a temperature value.
69+
70+
71+
Contactor and Contactor Feedback Configuration
72+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73+
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.
78+
79+
Possible parameter values are:
80+
81+
- `disabled`
82+
- `without-feedback`
83+
- `with-feedback`
84+
85+
86+
Emergency Input Configuration
87+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88+
89+
The safety controller can monitor up to 3 emergency inputs.
90+
91+
Possible configuration values are:
92+
93+
- `disabled`
94+
- `active-low`
95+
96+
97+
Installing a Parameter Block
98+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99+
100+
Once the YAML file is created and fits your charger setup, it is required to convert it to a binary parameter block file.
101+
In the mentioned repository, there exists a tool `ra-pb-create` to generate such a binary file from the YAML file.
102+
The following session transcript shows how the install procedure works:
103+
104+
.. code-block:: sh
105+
106+
# create a YAML file on-the-fly
107+
$ cat <<EOL > /tmp/my-parameters.yaml
108+
pt1000s:
109+
- 75.0 °C
110+
- 85.0 °C
111+
- disabled
112+
- disabled
113+
114+
contactors:
115+
- without-feedback
116+
- without-feedback
117+
118+
estops:
119+
- active-low
120+
- disabled
121+
- disabled
122+
EOL
123+
124+
# convert YAML to binary
125+
ra-pb-create -i /tmp/my-parameters.yaml -o /tmp/my-parameters.bin
126+
127+
# stop EVerest - to have exclusive access to safety controller
128+
systemctl stop everest
129+
130+
# flash the parameter block
131+
ra-update -a data flash /tmp/my-parameters.bin
132+
133+
# restart EVerest
134+
systemctl start everest
135+
136+
137+
Checking the Installed Parameter Block
138+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
139+
140+
To check which settings are currently used by the safety controller firmware, it is possible to read back the parameter block.
141+
142+
.. code-block:: sh
143+
144+
systemctrl stop everest
145+
ra-update -a data dump | ra-pb-dump
146+
147+
This will print the current settings in YAML format on stdout.

0 commit comments

Comments
 (0)