home / articles / building an electronic wastegate controller
Build series ยท Electronics and firmware
Building an electronic wastegate controller for a car that never had one
My Civic Rebirth left the factory without a turbo, so its computer has no way to drive a wastegate. I wanted the ECU to choose the boost itself. That meant designing a complete system: an actuator, a motor driver, a microcontroller with my own firmware, and a data link to the factory ECU.
Why the spring had to go
The car first ran a conventional wastegate held shut by a spring. A spring gives you one boost level and no say in it. Mine regulated at roughly 143 to 148 kPa, crept upward as exhaust flow rose, and on two drives it stuck open and left me with no boost at all.
The ECU already knew the gear, the pedal position, engine speed, the knock state and the fuelling. It had everything needed to decide the right boost for each moment. It just had no hands.
Choosing the actuator
I used the electric wastegate actuator from Honda's own 1.5 Turbo engine. It is a proper automotive part, built for the heat next to a turbine, and it contains a DC motor and a position sensor so whatever drives it always knows where the gate is.
It does not come with a manual. On the bench, on 8 October 2026, I worked out which pin was which and what the sensor does across the gate's travel: it runs on 5 volts and its signal moves from about 0.3 V with the gate shut to about 4.5 V fully open. Feed the sensor 3.3 V and it freezes. The gear train cannot be turned by hand, only by the motor, and the motor needs a firm shove to break away against the spring.
The controller
The factory ECU has no output that can power a motor in both directions, so I built a separate controller:
- an STM32 microcontroller running firmware I wrote from scratch;
- an H-bridge motor driver, which lets the STM32 push the motor open or closed with controlled force;
- a CAN interface, so it can speak on the same network the car's own computers use;
- a protected power supply from the ignition feed, fused, with its own regulated 5 V for the electronics and the sensor.
The box lives under the dash. The actuator connects through a sealed automotive connector, the motor runs on a twisted pair and the position signal on a shielded cable, both passing through the existing firewall grommet. The data wires join the car's network without changing anything Honda fitted.
Who decides, and who moves
This was the most important design decision, and I got it wrong first.
My first version let the controller make some pressure decisions itself, from its own pressure input. On the road that input read 65 to 90 kPa while the ECU was reading 98. Two computers disagreeing about boost is how engines get hurt.
So on 16 October I made the controller deliberately simple. The factory ECU is in charge: it holds the boost target for the gear and engine speed, works out where the gate should be, and corrects from what its own pressure sensor reports. The controller does one job well. It receives a position, drives the motor there, and reports back where the gate really is.
They talk constantly. The ECU sends the wanted position a hundred times a second, and the controller answers fifty times a second with the real position and its health. Every message carries a counter and a checksum, so neither side can be fooled by a stale or corrupted message.
What it does every time you turn the key
At every key-on the controller finds its own limits. It drives the gate gently closed until it stops moving, then open until it stops, and remembers both ends. If the travel it finds is too short to be real, it refuses to run. It then parks the gate open and waits for the ECU's first instruction.
Honda's own turbo cars only relearn the closed position occasionally. Mine does it every start, so a linkage that has shifted or a housing that has grown with heat is accounted for before the first pull.
"Closed" needed more thought than I expected. Exhaust pressure pushes the flap off its seat, so the controller holds it shut with steady force, pushes it back if it is forced open, and lets the remembered seat position drift slowly as the metal expands.
What happens when something fails
The gate opens, and an open gate means no boost. If the controller stops hearing the ECU for half a second, if the position sensor reads something impossible, or if the motor will not move, it drives the gate open and stops. The ECU does the same from its side if the controller goes quiet. Either way the engine drops back to behaving like a standard Civic.
Those faults are also reported to the ECU, which stores them as proper trouble codes. That is its own article.
Testing before it met the engine
On the real gate I ran 150 full open-and-close cycles with zero faults, repeating its position to about half a percent of travel. A full stroke takes about a fifth of a second. I tuned the last part of each move by ear until the gate landed without a thud.
The box went on the car on 14 October with the gate parked open and the ECU ignoring it. I drove about 150 km like that with no faults before letting it control anything.
On the road
- 16 October 2026: the ECU takes control. Second gear at full throttle holds 8 psi from 5,400 to 6,200 rpm.
- 17 October: the target goes to 10 psi.
- 7 November: 13.5 psi.
- 9 November: a third-gear pull holds 184 to 190 kPa against a target of 186 to 189, with no hunting.
One surprise from the first night: this gate does almost all of its work in the first quarter of its travel. Beyond about 25 % open, the engine is effectively off boost.
What went wrong along the way
- The first motor driver failed with a short and pushed the motor with its inputs switched off. It was replaced.
- One evening was lost to three faults at once: a current limit on the bench supply, a stray wire, and a dead serial link.
- My first position tolerance was too tight and the gate hunted on the car.
- The gate's "closed" position was leaking open under exhaust pressure, which gave almost no boost at 3,000 rpm. That is what led to the seat hold.
- The mounting bracket bent from the force of finding the closed stop, so the controller now does that more gently.
- On 7 November the controller stopped receiving commands while still sending its own. The gate went open, as designed, and a restart cleared it. I have not yet proven the cause.
What is not finished
The latest controller firmware adds a self-test at power-up. It is loaded but I have not yet confirmed it running on the car. During boosted gearshifts the pressure still dips more than I want. And boost does not always recover between two shifts that come close together.
Why I think this matters
Fitting a part is one skill. Making a part from another engine, a motor driver, a microcontroller and a factory ECU behave as one system that fails safely is a different one. This is the piece of the car I would point to if you asked what I do. The rest of the boost system is described in the turbo Civic case study.
By Haris, Hex and Boost.
Have a car the usual tools cannot touch?
Tell me the car, the engine, the gearbox and what you want it to do. I reply to every serious enquiry.