Wiki source code of Power controller

Version 33.40 by Mathias Larsen on 2026/09/23 16:12

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