Wiki source code of Sensor Module

Version 30.1 by Heimir Thordarson on 2026/01/22 13:53

Hide last authors
Heimir Thordarson 16.9 1 {{wikibox title="Sensor Module" image="https://wiki.alignracing.no/bin/download/Electrical/Sensor%20Module/WebHome/ASM_AR26.png?rev=1.1" caption="3D model of the Sensor Module from Altium Designer" width="25" labelWidth="50"}}
Heimir Thordarson 9.3 2 Voltage = 4.5V - 40V
Heimir Thordarson 11.1 3 Fuse Current = 125mA
Heimir Thordarson 9.3 4 Sensor Inputs = 13
5 Voltage divider Inputs = 2
6 3V3 Thermistor Inputs = 7
7 5V Pressure Inputs = 4
Heimir Thordarson 2.1 8 {{/wikibox}}
9
Heimir Thordarson 3.1 10 = Description =
11
Heimir Thordarson 9.1 12 The Sensor module is designed to measure any extra analog signals rear of the firewall. For AR26, the module is designed to measure two suspension displacement sensors, two oil temperature, four water pressure, four water temperature, and one air temperature sensor. All of the measurements are then transmitted to a CAN network, which there are two of.
Heimir Thordarson 1.5 13
Heimir Thordarson 1.2 14 = Wiring Diagram =
15
Heimir Thordarson 11.3 16 In the following section, how the sensor module is connected will be covered. The connector for the sensor module is a [[High-Density d'sub-44>>https://www.te.com/en/product-2311770-1.html]] which is directly solderen onto the circuit board. The plug needed for this system is the [[204517-3>>doc:Sandbox.TestPage3]], which uses crimps instead of solder cups which is common for the dsub connectors
Heimir Thordarson 9.4 17
Heimir Thordarson 11.3 18 [[image:AR26_ASM pinout.png||height="221" width="469"]]
Heimir Thordarson 10.2 19
Heimir Thordarson 11.4 20 In the figure above, the pinout shows how the pins are divided. Each box shows which pins belong together for each usecase, where the red box is the power input. Yellow boxes are for each canbus network, while the green box is for each sensor used in AR26.
Heimir Thordarson 10.2 21
Mads Pedersen 12.4 22
Heimir Thordarson 12.9 23 (% style="width:1058.6px" %)
Heimir Thordarson 13.1 24 |=(% style="width: 71px;" %)Pin Number|=(% style="width: 164px;" %)Pin Name|=(% style="width: 124px;" %)Type|=(% style="width: 70px;" %)(((
Heimir Thordarson 12.8 25 Pin
26 Number
Heimir Thordarson 13.1 27 )))|=(% style="width: 218px;" %)Pin name|=(% style="width: 58px;" %)(((
Heimir Thordarson 12.8 28 Type
Heimir Thordarson 13.1 29 )))|=(% style="width: 32px;" %)Pin Number|=(% style="width: 192px;" %)Pin Name|=(% style="width: 90px;" %)Pin Type
Heimir Thordarson 12.9 30 |(% style="width:71px" %)(((
Heimir Thordarson 11.5 31 1
Heimir Thordarson 14.1 32 )))|(% style="width:164px" %)Air Temperature|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)16|(% style="width:218px" %)Air Temperature|(% style="width:58px" %)GND|(% style="width:32px" %)31|(% style="width:192px" %)Suspension Displacement Left|(% style="width:90px" %)GND
33 |(% style="width:71px" %)2|(% style="width:164px" %)Suspension Displacement Left|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)17|(% style="width:218px" %)Suspension Displacement Left|(% style="width:58px" %)3V3|(% style="width:32px" %)32|(% style="width:192px" %)Suspension Displacement Right|(% style="width:90px" %)GND
Heimir Thordarson 13.1 34 |(% style="width:71px" %)3|(% style="width:164px" %)Suspension Displacement Right|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)18|(% style="width:218px" %)Suspension Displacement Right|(% style="width:58px" %)(((
35 3V3
36 )))|(% style="width:32px" %)33|(% style="width:192px" %) |(% style="width:90px" %)
37 |(% style="width:71px" %)4|(% style="width:164px" %)Oil Temperature Right|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)19|(% style="width:218px" %)Oil Temperature Right|(% style="width:58px" %)3V3|(% style="width:32px" %)34|(% style="width:192px" %) |(% style="width:90px" %)
38 |(% style="width:71px" %)5|(% style="width:164px" %)Oil Temperature Left|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)20|(% style="width:218px" %)Oil Temperature Left|(% style="width:58px" %)3V3|(% style="width:32px" %)35|(% style="width:192px" %) |(% style="width:90px" %)
39 |(% style="width:71px" %)6|(% style="width:164px" %)Cooling Temperature 4|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)21|(% style="width:218px" %)Cooling Sensor 4|(% style="width:58px" %)GND|(% style="width:32px" %)36|(% style="width:192px" %) |(% style="width:90px" %)
40 |(% style="width:71px" %)7|(% style="width:164px" %)Cooling Pressure 4|(% style="width:124px" %)Analog (0-5V)|(% style="width:70px" %)22|(% style="width:218px" %)Cooling Sensor 4|(% style="width:58px" %)3V3|(% style="width:32px" %)37|(% style="width:192px" %) |(% style="width:90px" %)
41 |(% style="width:71px" %)8|(% style="width:164px" %)Cooling Temperature 3|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)23|(% style="width:218px" %)(((
42 Cooling Sensor 3
43 )))|(% style="width:58px" %)GND|(% style="width:32px" %)38|(% style="width:192px" %) |(% style="width:90px" %)
44 |(% style="width:71px" %)9|(% style="width:164px" %)Cooling Pressure 3|(% style="width:124px" %)Analog (0-5V)|(% style="width:70px" %)24|(% style="width:218px" %)(((
45 Cooling Sensor 3
46 )))|(% style="width:58px" %)3V3|(% style="width:32px" %)39|(% style="width:192px" %) |(% style="width:90px" %)
47 |(% style="width:71px" %)10|(% style="width:164px" %)Cooling Temperature 2|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)25|(% style="width:218px" %)Cooling Sensor 2|(% style="width:58px" %)GND|(% style="width:32px" %)40|(% style="width:192px" %) |(% style="width:90px" %)
48 |(% style="width:71px" %)11|(% style="width:164px" %)Cooling Pressure 2|(% style="width:124px" %)Analog (0-5V)|(% style="width:70px" %)26|(% style="width:218px" %)Cooling Sensor 2|(% style="width:58px" %)3V3|(% style="width:32px" %)41|(% style="width:192px" %) |(% style="width:90px" %)
49 |(% style="width:71px" %)12|(% style="width:164px" %)Cooling Temperature 1|(% style="width:124px" %)Analog (0-3.3V)|(% style="width:70px" %)27|(% style="width:218px" %)Cooling Sensor 1|(% style="width:58px" %)GND|(% style="width:32px" %)42|(% style="width:192px" %) |(% style="width:90px" %)
50 |(% style="width:71px" %)13|(% style="width:164px" %)Cooling Pressure 1|(% style="width:124px" %)Analog (0-5V)|(% style="width:70px" %)28|(% style="width:218px" %)(((
51 Cooling Sensor 1
52 )))|(% style="width:58px" %)3V3|(% style="width:32px" %)43|(% style="width:192px" %)Main Power|(% style="width:90px" %)GND
53 |(% style="width:71px" %)14|(% style="width:164px" %)CAN High 1|(% style="width:124px" %)CAN|(% style="width:70px" %)29|(% style="width:218px" %)CAN Low 2|(% style="width:58px" %)CAN|(% style="width:32px" %)44|(% style="width:192px" %)Main Power|(% style="width:90px" %)+24V
54 |(% style="width:71px" %)15|(% style="width:164px" %)CAN Low 1|(% style="width:124px" %)CAN|(% style="width:70px" %)30|(% style="width:218px" %)CAN High 2|(% style="width:58px" %)CAN|(% style="width:32px" %) |(% style="width:192px" %) |(% style="width:90px" %)
Heimir Thordarson 11.4 55
Heimir Thordarson 12.1 56
57
Heimir Thordarson 1.2 58 == Typical Application ==
59
Heimir Thordarson 17.4 60 This section will cover the sensors which will be used for AR26 and how the sensor module is designed to accommodate them.
Heimir Thordarson 16.2 61
Heimir Thordarson 15.1 62 === Air Temperature Sensor ===
63
Heimir Thordarson 16.12 64 The air temperature sensor will be used to have a dynamic reference setpoint for the cooling system. This could reduce the current draw from the low voltage system compared to having a fixed reference point. This is because the regulator will not try to cool the water to a temperature lower than the ambient temperature. The sensor works as a resistor which varies depending on its temperature. Where in this case, the resistance lowers when the temperature increases (NTC). To make the microcontroller able to measure the changes in resistance, the thermistor is put into a voltage divider circuit.
Heimir Thordarson 16.4 65
Heimir Thordarson 17.2 66 [[image:circuit with marks.png||height="195" width="465"]]
67
68 (% class="wikigeneratedid" %)
Heimir Thordarson 17.5 69 As shown in the figure above, the thermistor is put into a voltage divider circuit with a 4k7 ohm resistor to convert the resistance changes of the thermistor to a measurable voltage. To find the temperature of the thermistor based on the voltage measure by the analog-to-digital converter (adc), the resistance of the thermistor needs to be calculated based on the voltage from a voltage divider.
Heimir Thordarson 17.2 70
Heimir Thordarson 27.2 71 (% style="font-size: 1.5em;" %)
72 (((
73 {{mathjax}}
Heimir Thordarson 17.6 74 $$
75 R_T = R_f \frac{V_{out}}{V_{in} - V_{out}}
76 $$
Heimir Thordarson 27.2 77 {{/mathjax}}
78 )))
Heimir Thordarson 26.2 79
Heimir Thordarson 27.2 80 Where:
Heimir Thordarson 26.2 81
Heimir Thordarson 30.1 82 * \(R_f\) = the upper resistor in the voltage divider which stays fixed, which in this case is 4.7k \(\Omega\)
Heimir Thordarson 27.2 83
Heimir Thordarson 26.2 84 (% class="wikigeneratedid" %)
85