1.1. Hall Sensor Driver - HallSnsrDrvr
Id |
HallSnsrDrvr |
Title |
Hall Sensor Driver |
System |
Advanced Driving Assistance |
Document Type |
Application Software Component Specification Preview |
1.1.1. Overview
This software component is responsible for reading and processing data from a Hall effect sensor, which is used to measure the rotation speed and position of a rotating object, such as a wheel or motor shaft. The component supports different input modes, including direct input from a debug signal, reading from a quadrature encoder, or reading from a digital input channel.
1.1.2. Functions
Title |
Description |
|
|---|---|---|
1 |
Calculate Rotation Speed |
Calculates the rotation speed based on the input signal and the configured wheel resolution. |
2 |
Calculate Position |
Calculates the position based on the input signal and the configured wheel resolution. |
1.1.3. Ports
Id |
Direction |
Data Type |
Dimensions |
Unit |
|
|---|---|---|---|---|---|
1 |
DbgSignal |
Incoming |
int32 |
[-1] |
inherit |
2 |
DbgEnabler |
Incoming |
boolean |
[-1] |
inherit |
3 |
RotationSpeed |
Outgoing |
single |
[-1] |
inherit |
4 |
RotationSpeed_send |
Outgoing |
boolean |
[-1] |
inherit |
5 |
HallSensorPosition |
Outgoing |
int32 |
[-1] |
inherit |
6 |
HallSensorPosition_send |
Outgoing |
boolean |
[-1] |
inherit |
1.1.4. Parameters
Id |
Data Type |
Dimensions |
Range |
Unit |
Description |
|
|---|---|---|---|---|---|---|
1 |
HallSnsrDrv_InvertDirection |
boolean |
[1,1] |
Min: 0, Max: 1 |
if true, sign for direction enabled output will be inverted |
|
2 |
HallSnsrDrv_MovingAvgSamples |
uint8 |
[1,1] |
Min: 1, Max: 100 |
number of samples for calculation of average value |
|
3 |
HallSnsrDrv_PinsMode |
uint8 |
[1,1] |
Min: 0, Max: 2 |
0 - input, 1 - pullUp, 2 - pullDown |
|
4 |
HallSnsrDrv_UseDirectionalInput |
boolean |
[1,1] |
Min: 0, Max: 1 |
if true, ther both pins will be used and direction of movement will be calculated |
|
5 |
HallSnsrDrv_WheelResolution |
uint16 |
[1,1] |
Min: 1, Max: 65535 |
pulse/rev |
Tooth wheel resolution: pulses per one turn |