Wiki source code of Power controller

Version 37.1 by Mathias Larsen on 2026/09/23 18:23

Show last authors
1 {{wikibox title="Power controller" image="https://wiki.alignracing.no/bin/download/Electrical/Power%20controller/WebHome/Screenshot%202026-09-22%20211347.png?rev=1.1" caption="3D model of the Power controller from Altium Designer" width="30" labelWidth="50"}}
2 Supply voltage=12–24 V DC
3 Fused circuits=9 (5 × 24 V outputs, fan outputs, digital outputs, 12 V circuit, internal electronics)
4 24 V outputs=5
5 24 V fan outputs=2 (shared fuse)
6 12 V outputs=2
7 Digital outputs (shared fuse)=2 × 12 V switched (5 A), 2 × 24 V switched (330 mA), 2 × PWM
8 Communication interface=CAN FD
9 Maximum data rate=1 Mbps
10 {{/wikibox}}
11
12 == Table of contents ==
13
14 ----
15
16 {{toc/}}
17
18 == Pinout ==
19
20 === Connector pinout ===
21
22 |=(% style="width: 281px;" %)Pin|=(% style="width: 135px;" %)Signal|=(% style="width: 157px;" %)Comment|=(% style="width: 132px;" %)
23 |(% style="width:281px" %)1|(% style="width:135px" %)CANH|(% style="width:157px" %) |(% style="width:132px" %)
24 |(% style="width:281px" %)2|(% style="width:135px" %)CANL|(% style="width:157px" %) |(% style="width:132px" %)
25 |(% style="width:281px" %)3|(% style="width:135px" %)FAN 1 PWM|(% style="width:157px" %) |(% style="width:132px" %)
26 |(% style="width:281px" %)4|(% style="width:135px" %)FAN 2 PWM|(% style="width:157px" %) |(% style="width:132px" %)
27 |(% style="width:281px" %)5|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
28 |(% style="width:281px" %)6|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
29 |(% style="width:281px" %)7|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
30 |(% style="width:281px" %)8|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
31 |(% style="width:281px" %)9|(% style="width:135px" %)Accumulator|(% style="width:157px" %) |(% style="width:132px" %)
32 |(% style="width:281px" %)10|(% style="width:135px" %)Front|(% style="width:157px" %) |(% style="width:132px" %)
33 |(% style="width:281px" %)11|(% style="width:135px" %)Power fan|(% style="width:157px" %) |(% style="width:132px" %)
34 |(% style="width:281px" %)12|(% style="width:135px" %)Power fan|(% style="width:157px" %) |(% style="width:132px" %)
35 |(% style="width:281px" %)13|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
36 |(% style="width:281px" %)14|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
37 |(% style="width:281px" %)15|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
38 |(% style="width:281px" %)16|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
39 |(% style="width:281px" %)17|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
40 |(% style="width:281px" %)18|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
41 |(% style="width:281px" %)19|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
42 |(% style="width:281px" %)20|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
43 |(% style="width:281px" %)21|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
44 |(% style="width:281px" %)22|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
45 |(% style="width:281px" %)23|(% style="width:135px" %)GND|(% style="width:157px" %) |(% style="width:132px" %)
46 |(% style="width:281px" %)24|(% style="width:135px" %)12V|(% style="width:157px" %) |(% style="width:132px" %)
47 |(% style="width:281px" %)25|(% style="width:135px" %)12V|(% style="width:157px" %) |(% style="width:132px" %)
48 |(% style="width:281px" %)26|(% style="width:135px" %)12V power pump 1|(% style="width:157px" %) |(% style="width:132px" %)
49 |(% style="width:281px" %)27|(% style="width:135px" %)12V power pump 2|(% style="width:157px" %) |(% style="width:132px" %)
50 |(% style="width:281px" %)28|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
51 |(% style="width:281px" %)29|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
52 |(% style="width:281px" %)30|(% style="width:135px" %)GND|(% style="width:157px" %)Solder blob|(% style="width:132px" %)
53 |(% style="width:281px" %)31|(% style="width:135px" %)Buzzer|(% style="width:157px" %)Is brake light in wiring harness|(% style="width:132px" %)
54 |(% style="width:281px" %)32|(% style="width:135px" %)Brake light|(% style="width:157px" %)Is buzzer in wiring harness|(% style="width:132px" %)
55 |(% style="width:281px" %)33|(% style="width:135px" %)24V|(% style="width:157px" %)Reserve|(% style="width:132px" %)
56 |(% style="width:281px" %)34|(% style="width:135px" %)24V|(% style="width:157px" %)Reserve|(% style="width:132px" %)
57 |(% style="width:281px" %)35|(% style="width:135px" %)24V|(% style="width:157px" %)Sensor card|(% style="width:132px" %)
58
59 === Microcontroller pinout ===
60
61 The power controller uses a microcontroller to control the pumps, fans, buzzer and brake light. It also handles current monitoring and the LED indicators. The microcontroller used in this system is the STM32G431CBT6.
62
63
64 |=Physical pin|=Electrical pin|=Description
65 |1|VBAT|Backup battery supply, used if an RTC is needed (connected to +3V3 in this design)
66 |5|OSC_IN|Clock input (8 MHz oscillator)
67 |7|NRST|Active-low reset, can be connected to a button (connected to +3V3)
68 |8|PA0|Analog signal: Current 6, supply 24 V reserve
69 |9|PA1|Analog signal: Current 7, supply 24 V reserve
70 |10|PA2|Analog signal: Current 5, supply sensor card
71 |11|PA3|Analog signal: Current 4, supply front
72 |12|PA4|Analog signal: Current 3, supply accumulator
73 |13|PA5|Analog signal: Current 2, supply fans
74 |14|PA6|Digital output: LED 9
75 |15|PA7|Digital output: LED 2
76 |16|PB0|Analog signal: Current 8, supply buzzer and brake light
77 |17|PB1|PWM: Enable fan 1
78 |18|PB2|Input: V-sense
79 |19|VSSA|Voltage source: Ground
80 |20|VREF|Voltage reference (internal voltage reference)
81 |21|VDDA|Voltage source: Power (+3V3)
82 |22|PB10|Digital output: LED 8
83 |23|VSS|Voltage source: Ground
84 |24|VDD|Voltage source: Power (+3V3)
85 |25|PB11|Analog signal: Current 1, internal components
86 |26|PB12|Analog signal: Current 9, supply 12 V pumps, inverter and data logger
87 |29|PB15|PWM: Enable fan 2
88 |30|PA8|Digital output: Enable buzzer (on the car it is the brake light)
89 |31|PA9|Digital output: Enable brake light (on the car it is the buzzer)
90 |32|PA10|Input: ASMS signal
91 |33|PA11|CAN bus RXD
92 |34|PA12|CAN bus TXD
93 |35|VSS|Voltage source: Ground
94 |36|VDD|Voltage source: Power (+3V3)
95 |37|PA13|SWDIO
96 |38|PA14|SWCLK
97 |40|PB3|Digital output: LED 3
98 |41|PB4|Digital output: LED 4
99 |42|PB5|Digital output: LED 5
100 |43|PB6|Digital output: Enable pump 1
101 |44|PB7|Digital output: Enable pump 2
102 |45|PB8|Digital output: LED 6
103 |46|PB9|Digital output: LED 7
104 |47|VSS|Voltage source: Ground
105 |48|VDD|Voltage source: Power (+3V3)
106
107 == Distribution circuit ==
108
109 [[image:1790100104451-169.png]]
110
111 === Green LED ===
112
113 The green LED indicates whether the fuse is intact.
114
115 [[image:1790098808447-123.png]]
116
117 === Current sense ===
118
119 ==== Shunt resistor ====
120
121 A 2 mΩ shunt resistor is placed in series with the load. The voltage drop across it is 2 mV per ampere of current (0.002 V/A).
122
123 [[image:1790100157872-786.png]]
124
125 ==== Amplifier ====
126
127 The amplifier is a quad-channel current sense amplifier with a gain of 200 V/V. When the measured voltage drop passes through the amplifier, the output is therefore 0.4 V per ampere.
128
129 ==== Filter ====
130
131 The filter is a low-pass filter with a cutoff frequency of 1.6 kHz.
132
133 === Power amplifier ===
134
135 [[image:1790101431805-672.png]]
136
137 === Voltage measurement ===
138
139 A voltage divider with a ratio of 1:11 is used, so 24 V corresponds to 2.182 V on the microcontroller pin.
140
141 [[image:1790101449150-901.png]]
142
143 === 12 V supply (did not work) ===
144
145 The buck converter overheated under load and made a whining sound.
146
147 [[image:1790102044737-969.png||height="368" width="925"]]
148
149 A Mateksys PM20S-2 power module was used as a quick fix to provide 12 V for the competition.
150
151 === 5 V, 3.3 V and CAN bus ===
152
153 Uses the standard Align template.
154
155 == Control logic ==
156
157 === Sourced from the microcontroller ===
158
159 The programmable red light is part of the same RGB LED.
160
161 Current is sourced directly from the microcontroller through a 350 Ω series resistor.
162
163 [[image:1790098512666-432.png]]
164
165 === High-side switching ===
166
167 ==== Buzzer and brake light ====
168
169 The buzzer and brake light are switched on the high side using an N-channel MOSFET (BSS123NH6327XTSA1) that drives a P-channel MOSFET (BSS83PH6327XTSA1).
170
171 [[image:1790181075885-591.png||height="343" width="367"]]
172
173 ==== Pump ====
174
175 The N-channel MOSFET (BSS123NH6327XTSA1) is the same as for the buzzer and brake light, but the P-channel MOSFET (BSC084P03NS3GATMA1) has a much higher current rating.
176
177 [[image:1790181054296-268.png||height="306" width="371"]]
178
179 == Known issues ==
180
181 * The 12 V supply did not work.
182 * The current measurement has not been tested.
183
184 == Features to add ==
185
186 * Add MOSFETs to cut power if the LV battery voltage is too low, to save power.
187 * Add power distribution for the autonomous system.
188
189 == BOM (bill of materials) ==
190
191 |=Part Number|=Description|=Ref Des|=Qty|=Manufacturer|=MPN
192 |CC0603KRX5R6BB475|Chip Capacitor, 4.7µF +/-20%, 10V, 0603|C1|1|Yageo Group|CC0603KRX5R6BB475
193 |CL10B104KA8NNNC|MLCC, 0.1 uF, 25V, ±10%, X7R, 0603|C2, C3, C4, C8, C9, C10, C14, C15, C16|9|Samsung Electro-Mechanics|CL10B104KA8NNNC
194 |CL10B105KA8NFNC|MLCC, 1uF, 25V, 10%, X7R, 0603|C5, C7|2|Samsung Electro-Mechanics|CL10B105KA8NFNC
195 |CL10B103KB8NNNC|MLCC, 10nF, 50V, +125C, X7R, ±10%, 0603|C6, C101, C201, C301, C401, C501, C601, C701, C801, C901|10|Samsung Electro-Mechanics|CL10B103KB8NNNC
196 |885012206020|MLCC, General Purpose, 0603, 100nF, 10V|C11|1|Wurth Elektronik|885012206020
197 |885012006051|MLCC, General Purpose, 0603, 10pF, 50V|C12, C13|2|Wurth Elektronik|885012006051
198 |885012208124|MLCC, General Purpose, 1206, 2.2µF, 100V|C17, C19|2|Wurth Elektronik|885012208124
199 |885012108022|MLCC, General Purpose, 1206, 10µF, 50V|C18|1|Wurth Elektronik|885012108022
200 |885012206071R|MLCC, General Purpose, 0603, 100nF, 25V|C20|1|Wurth Elektronik|885012206071R
201 |885012107014|MLCC, General Purpose, 0805, 10µF, 16V|C21, C22|2|Wurth Elektronik|885012107014
202 |MBASU105SB5104KFNA01|MLCC, 50V, 10%, X5R, 0.1uF, 0402|C23, C24|2|TAIYO YUDEN|MBASU105SB5104KFNA01
203 |GRM32ER71H475KA88L|MLCC, 1210, 4.7uF, 50V, ±10%, X7R|C902, C903|2|Murata|GRM32ER71H475KA88L
204 |GRM188R71A225KE15D|MLCC, 0603, 2.2uF, X7R, 10V|C904|1|Murata|GRM188R71A225KE15D
205 |CC0402KRX7R6BB104|Chip Capacitor, 100nF +/-20%, 10V, 0402|C905, C908|2|Yageo Group|CC0402KRX7R6BB104
206 |GRM1555C1H102JA01J|MLCC, 0402, 1nF, 50V, ±5%, C0G|C906|1|Murata|GRM1555C1H102JA01J
207 |GRM1555C1H4R3CA01D|MLCC, 0402, 4.3pF, 50V, C0G, ±0.25pF|C907|1|Murata|GRM1555C1H4R3CA01D
208 |GRM32ER61E226KE15L|MLCC, 1210, 22uF, 25V, X5R|C909, C910, C911, C912|4|Murata|GRM32ER61E226KE15L
209 |824094024|WE-TVS TVS Diode, SOT23-3L, 2 Channel, 24V, 38pF|D1|1|Wurth Elektronik|824094024
210 |824500261|WE-TVSP SMT Power TVS Diode, DO-214AC, 400W, 26VDC|D2|1|Wurth Elektronik|824500261
211 |150282M167310|WL-SFTD Full-color Top LED, 2828, R/G/B, 70°|D101, D201, D301, D402, D501, D601, D701, D801, D901|9|Wurth Elektronik|150282M167310
212 |01550900DR|Fuseholder - Acs Nano|F101, F201, F301, F401, F501, F601, F701, F801, F901, F902, F903, F904|12|Littelfuse|01550900DR
213 |0466.125NR|Electric Fuse, Very Fast Blow, 0.125A, 125VAC/VDC, 1206|F102|1|Littelfuse|0466.125NR
214 |776231-1|Conn Shrouded Header, HDR 35 POS, 4mm, Thru-Hole|J1|1|TE Connectivity|776231-1
215 |76829-0002|Mega-Fit Straight Male Header, 2x2, 5.7mm Pitch|J2|1|Molex|76829-0002
216 |(4 pin header)|2.54mm pitch 1x4 vertical header|J3|1|Generic|
217 |44914-0401|Conn Header Vert 4POS 3mm|J4|1|Molex|44914-0401
218 |1461247-3|Relay, Gen Purpose, SPST, 8A, 24V|K1|1|TE Connectivity|OJ-SH-124LMH,000
219 |784234510|WE-CNSA Common Mode Line Filter, 1210, 7850Ω, 200mA|L1|1|Wurth Elektronik|784234510
220 |74438323100|WE-MAPI SMT Power Inductor, 2510, 10µH, 0.9A, 733mΩ|L2, L3|2|Wurth Elektronik|74438323100
221 |XAL7070-651MEB|General Purpose Inductor, 0.65uH, 20%, 3028|L901|1|Coilcraft|XAL7070-651MEB
222 |BSS123NH6327XTSA1|MOSFET N-CH 100V 0.19A SOT-23|Q201, Q202, Q803, Q804, Q905, Q906|6|Infineon|BSS123NH6327XTSA1
223 |BSS83PH6327XTSA1|SIPMOS Small-Signal Transistor, -0.33A, -60V, SOT-23|Q801, Q802|2|Infineon|BSS83PH6327XTSA1
224 |IAUCN04S7L028ATMA1|Mosfet, N-ch, 40V, 100A|Q901, Q902|2|Infineon|IAUCN04S7L028ATMA1
225 |BSC084P03NS3GATMA1|P-Channel OptiMOS P3, -30V VDS, -78.6A ID, PG-TDSON-8-1|Q903, Q904|2|Infineon|BSC084P03NS3GATMA1
226 |(( TBD ))|Generic Resistor, 350Ω, 0603|R104, R204, R304, R404, R504, R606, R704, R804, R904|9|(( TBD ))|
227 |(( TBD ))|Generic Resistor, 1KΩ, 0603|R205, R206, R807, R808, R913, R914|6|(( TBD ))|
228 |(( TBD ))|Generic Resistor, 10KΩ, 0603|R1, R207, R208, R805, R806, R809, R810, R811, R812, R911, R912, R915, R916|13|(( TBD ))|
229 |(( TBD ))|Generic Resistor, 1.6KΩ, 0603|R2|1|(( TBD ))|
230 |(( TBD ))|Generic Resistor, 2.2Ω, 0603|R3|1|(( TBD ))|
231 |(( TBD ))|Generic Resistor, 27KΩ, 0603|R4|1|(( TBD ))|
232 |(( TBD ))|Generic Resistor, 5.1KΩ, 0603|R5|1|(( TBD ))|
233 |WSLF25122L000FEA|Res Metal Strip 2512, 0.002Ω, 1%, 5W|R101, R201, R301, R401, R501, R601, R701, R801, R901|9|Vishay|WSLF25122L000FEA
234 |CR0603-FX-1002ELF|SMD Resistor, 10kΩ, ±1%, 100mW, 0603|R102, R105, R202, R302, R402, R502, R602, R702, R802, R902|10|Bourns|CR0603-FX-1002ELF
235 |CR0805-JW-472ELF|SMD Resistor, 4.7kΩ, ±5%, 125mW, 0805|R103, R203, R303, R403, R503, R603, R703, R803, R903|9|Bourns|CR0805-JW-472ELF
236 |CR0603-FX-1001ELF|RES SMD 1K Ohm, 1%, 1/10W, 0603|R106|1|Bourns|CR0603-FX-1001ELF
237 |CRCW060347K5FKEA|Res Thick Film 0603, 47.5KΩ, 1%, 1/10W|R905|1|Vishay|CRCW060347K5FKEA
238 |RC0603FR-13100KL|Chip Resistor, 100KΩ, ±1%, 0.1W, 0603|R906|1|Yageo Group|RC0603FR-13100KL
239 |AC0402FR-0712K1L|Res Thick Film 0402, 12.1KΩ, 1%, 1/16W|R907|1|Yageo Group|AC0402FR-0712K1L
240 |CRCW060340K2FKEA|Res Thick Film 0603, 40.2KΩ, 1%, 1/10W|R908|1|Vishay|CRCW060340K2FKEA
241 |CRCW06039K53FKEA|Res Thick Film 0603, 9.53KΩ, 1%, 1/10W|R909|1|Vishay|CRCW06039K53FKEA
242 |WSR33L000FEA|Res Metal Strip 4527, 0.003Ω, 1%, 3W|R910|1|Vishay|WSR33L000FEA
243 |STM32G431CBT6|MCU 32-bit ARM Cortex M4, 128KB Flash, 48-Pin LQFP|U1|1|STMicroelectronics|STM32G431CBT6
244 |NCV7344D13R2G|CAN FD Transceiver, ISO 11898-2, 5Mbps, SOIC-8|U2|1|onsemi|NCV7344D13R2G
245 |INA4180A4IPWR|26V Quad Channel Current Sense Amplifier, 14-TSSOP|U3, U4, U5|3|Texas Instruments|INA4180A4IPWR
246 |AP64060WU-7|DC-DC Synchronous Step Down, 4.5-40V to 0.8-26V, 0.6A, TSOT-26|U6|1|Diodes Inc.|AP64060WU-7
247 |AP2112K-3.3TRG1|Fixed Positive LDO, 3.3V, 0.4V Dropout, PDSO5|U7|1|Diodes Inc.|AP2112K-3.3TRG1
248 |LM5148RGYR|3.5-80V Current Mode Synchronous Buck Controller, 24-VQFN|U801|1|Texas Instruments|LM5148RGYR
249 |ASE-8.000MHz-E-T|Crystal Oscillator, 8MHz, 3.3V, 15pF, 4-Pin SMD|Y1|1|Abracon|ASE-8.000MHZ-E-T
250
251 = AR27 Concept =
252
253 This section describes the concept for AR27.
254
255 == Changes ==
256
257 * Circuits
258 ** More dedicated supply circuits
259 ** Keep the same current rating
260 ** Adjust the signal LED resistor on the PCB
261 * Digital signals
262 ** Adjust the signal LED resistor on the PCB
263 * 12 V supply
264 ** Three separate 12 V supplies:
265 *** Pump 1
266 *** Pump 2
267 *** Inverter / other 12 V loads
268 * Autonomous
269 ** Supplied by ASMS
270 ** Potentially control ASSI
271 ** ASMS state detection
272
273 == Supply table ==
274
275 === Standard supply table ===
276
277 |= |=Voltage|=Shared supply|=Qty
278 |IPC|24V|Standalone|1
279 |Pumps|12V|Standalone|2
280 |Fans|24V|Standalone|
281 |HV box|24V|Standalone|
282 |Energy meter|12V|Inverter, energy meter|
283 |Inverter|12V|Inverter, energy meter|
284 |Accumulator|24V|Standalone|
285 |Brake light|24V|Buzzer, brake light|
286 |Buzzer|24V|Buzzer, brake light|
287 |Sensor module (rear)|24V|Sensor modules, telemetry|
288 |Sensor module (front)|24V|Sensor modules, telemetry|
289 |Tire temperature|12V|Telemetry, tire temperature|
290 |Telemetry|12V|Telemetry, tire temperature|
291 |Telemetry|24V|Sensor modules, telemetry|
292 |Dashboard|24V|Standalone|
293 |SDC|24V|Standalone|
294 |SDC monitor|24V|Dashboard, telemetry, SDC monitor|
295 |Internal circuitry|24V|Standalone|
296
297 === Autonomous supply table ===
298
299 |= |=Qty|=Current
300 |Steering motor|1|?
301 |ASB/ESB| |?
302 |ASSI|2|?
303 |RES|1|?
304
305 == Relevant rules ==
306
307 |=(% style="width: 472px;" %)Rule number|=(% style="width: 650px;" %)Rule
308 |(% style="width:472px" %) |(% style="width:650px" %)
309 |(% style="width:472px" %) |(% style="width:650px" %)
310 |(% style="width:472px" %) |(% style="width:650px" %)
311 |(% style="width:472px" %) |(% style="width:650px" %)
312 |(% style="width:472px" %) |(% style="width:650px" %)
313 |(% style="width:472px" %) |(% style="width:650px" %)
314 |(% style="width:472px" %) |(% style="width:650px" %)