Analog interface¶
The analog interface enables device control through a single pin, supporting either simple DC voltage level or the industry-standard RCPWM interface.
Analog interface internal schematic.¶
Magnet state feedback is provided on the same pin by setting the internal pull resistor \(R_\text{pull}\) to \(V_\text{hi}\) when the device is magnetized and grounding it when demagnetized. If the magnet state is unknown, the pull resistor is set to \(\frac{V_\text{hi}}{2}\). For the specific values of \(R_\text{pull}\) and \(V_\text{hi}\), please refer to the hardware-specific documentation.
The device automatically detects the type of the connected interface and adjusts its behavior accordingly. This is done by checking for the presence of the RCPWM carrier signal; if such is not found, the device assumes that the voltage level control is used. If used concurrently with Cyphal, the latter takes precedence and the analog input is ignored.
To clear the latched fault state via the analog interface, send the FORCE command and hold it for at least 3 seconds; then send either ON or OFF command, which will cause the fault state to be cleared and the magnet to be magnetized or demagnetized, respectively, unless another fault is triggered in the process.
RCPWM control¶
In RCPWM control mode, an external RCPWM signal source is connected to the analog interface input. The impedance of the source should be low enough to robustly override the pull resistor feedback.
The RCPWM signal is sampled by the device and the magnet is commanded to the corresponding state as specified in the table. See Functional description for the state transition logic.
Min |
Max |
Interpretation |
---|---|---|
0.8 ms |
1.2 ms |
OFF |
1.6 ms |
1.9 ms |
ON |
2.1 ms |
2.5 ms |
FORCE |
The RCPWM interface characteristics are summarized in the table below.
Parameter |
Min |
Max |
Unit |
---|---|---|---|
Pulse frequency |
40 |
400 |
Hz |
Low level duration |
0.1 |
ms |
Voltage level control¶
In the voltage level control mode, a low-impedance external voltage source is connected to the analog interface input such that it overrides the pull resistor feedback.
The device measures the voltage at the analog interface, \(V_\text{analog}\), to command the magnet to the corresponding state as detailed in the table. See Functional description for the state transition logic.
A debouncer is applied to the input signal to prevent spurious transitions. The pull resistor feedback ensures that the magnet will reside in the current state if the input is left floating.
Min |
Max |
Interpretation |
---|---|---|
0.0 V |
0.8 V |
OFF |
2.5 V |
3.8 V |
ON |
4.4 V |
6.0 V |
FORCE |
Typical application examples¶
3.3 V logic level control¶
An ordinary GPIO pin of a microcontroller can be used to control the magnet via the analog interface. If the application does not require the use of the FORCE command (which can be substituted with cycling the magnet off and on), the GPIO output can be connected directly to the analog interface input.
5 V logic level control¶
A 5 V logic level GPIO can be interfaced with the magnet in two ways: either through a voltage divider or by using an input-output pin.
The voltage divider will reduce the logic high level to the 3.3 V nominal, effectively rendering the circuit equivalent to the 3.3 V logic level control example above. This approach cannot leverage the FORCE command.
The input-output pin approach enables three possible states of the output:
High impedance (i.e., input): the current magnet state is maintained unchanged. This is ensured by the pull resistor feedback. The current state of the magnet can be read by sampling the voltage level at the pin.
Low level: the OFF command is issued.
High level: the FORCE command is issued. After the FORCE command is issued, the output should be switched to the high impedance state (input) to allow the pull resistor feedback to maintain the magnet state.