02 Race Functions
PWM tables
Four generic 8×8 PWM maps for fans, pumps, nitrous, water injection and anything else.
6 min readUpdated 2026-08
Race Core has four generic PWM maps, 8×8 each. They are not the injector table and they are not the wastegate table. They are spare brains for anything you can PWM from a low-side (or a high-side, where the load wants 12 V). Assign an output, pick the axes, fill the grid.
What they are for
| Use | Typical axis | Notes |
|---|---|---|
| Radiator fan speed | CLT × vehicle speed | A PWM fan module, not a on/off relay. Relays belong on a switched low-side, not a PWM table. |
| Fuel or water-injection pump | MAP × RPM | Ramp the pump in boost instead of a bang-bang relay. |
| Nitrous solenoid | RPM × TPS | Still wants a bottle pressure and a fuel adder — the PWM table is only the spray. |
| Alternator / PWM field | Battery V × RPM | See the firmware’s alternator dialog first; a generic table is the fallback. |
| Trans cooler / extra pump | Oil temp × RPM | On when hot, off when cold. Hysteresis in the table, not in your head. |
| Anything else | You pick | If it needs more than an 8×8 and some axis maths, it is Lua. |
Setup
- 01Pick a spare low-side (or high-side). Confirm in the I/O assignment that nothing else owns it — not an injector, not the wastegate, not the tach.
- 02Set the PWM frequency to what the load wants. A solenoid might want 25–50 Hz; a fan module might want 100–200 Hz. 1 kHz on a MAC valve is a stuck valve.
- 03Pick X and Y axes (RPM, MAP, TPS, CLT, VSS, analog — whatever the firmware offers on that table).
- 04Fill the 8×8. 0 % is off. 100 % is full. Interpolated, same as VE: a spike in one cell bleeds.
- 05Log the output duty and the axis channels. If the table is never visited, the output will sit at the edge cell forever.
The four maps are independent. Fan on PWM 1, water injection on PWM 2, a trans cooler on PWM 3, and a spare for the next idea is a normal Race Core car. If you run out of maps, Lua can drive another pin — but fill a table first. Tables get logged and survive a script crash.