Note: This project successfully controls the VDI port, but has yet to be applied to Aux ports.
Introduction
The stock VDI actuator and port.
This how-to describes how to get the proper operation from an S5 VDI on an S4 engine block. In the stock S5, the VDI port is turned by a linear air actuator. The electrical system applies pressure to the actuator via a switched air solenoid. This system is not in the stock S4, so people have to be creative in how to actuate the VDI port. Most solutions involve an external rpm switch to either switch an air solenoid fed from the stock air pump, or an aftermarket electrical air pump, as described in
[Air VDI Actuation]. This how-to describes an inexpensive way to avoid air pumps altogether by replacing the VDI actuator with an electronic solenoid.
Project Goals- Electronic port activation - no air pumps, etc.
- Tunable RPM-based port activation
- Control both VDI and auxiliary intake ports
- Allow hysteresis to avoid port fluttering
- Low-ish cost
Project Overview
One microprocessor determines rpm from an ECU pin, and controls two solenoids: one for the VDI port, and the other for the aux ports. The microprocessor switches the aux ports open at 3600rpm, and the VDI open at 5200rpm, with both ports having 100rpm hysteresis.
The Solenoid
Selection
Comparison of actuators.
A good solenoid choice will be about the same size as the old actuator, be rated for continuous duty at or above 12VDC, and have a useful range of motion of at least 0.5". The solenoid chosen here is the Magnet Schultz S-06693, which meets all the above criteria, and has more than enough holding strength at 12V, 1A. However, solenoids are very weak at the far end of their range of motion; they stay closed with a death grip, but they won't close quickly unless you build a boost circuit.
Installation
Top: Holding the solenoid in position.
Bottom: Solenoid installed.
The S-06693 fits well where the VDI actuator used to be. However, the solenoid pulls, while the VDI actuator pushes. A good solution is to face the solenoid away from the VDI port, as in the image at top right, and connect the VDI port to the solenoid plunger with a bracket described later. But first, to mount the solenoid in place, a simple bracket can be made with two short lengths of 90-degree aluminum stock, and another short length of flat aluminum stock (bracket images and dimensions to come). The idea is to use the 90-degree lengths to screw into the solenoid, and the flat length to bolt the solenoid bracket to the UIM using the old actuator's bolts and holes. The mounted, connected, and sprung solenoid looks like the image at bottom right.
To close reliably, the connection between the solenoid plunger and the VDI arm needs to be both stiff and light. A bent rod is not stiff enough; what is needed is an aluminum bracket, like the one below:
Plans for this bracket are available here:
[»http://sdjones.org/gv_files/solenoid_to_vdi_bracket.gif»]. Print the plans and bend your aluminum stock to fit the plans exactly. Before drilling and riveting, your bent pieces should look like this:
After installing the bracket, make sure the VDI is fully open right when the solenoid is fully depressed. The threaded eye bolt can be used to do this calibration. Note that the Bypass Air Solenoid valve pipe on the back of the dynamic chamber has to be ground off and sealed for the solenoid to fit properly. A good method is a Dremel with cut-off wheels, and sealing with JB Weld. This is best done with the UIM off of the car so metal shavings can be cleaned out, and the JB Weld can set with the UIM leaning in a way that lets gravity keep the JB Weld in its place.
Boost Circuit
A fully assembled power circuit, solenoid,
and two possible boost capacitor pairs.
By boosting the initial current to 5A, the solenoid's laziness is cured. Without getting into the details, this can be done with the following circuit:
Solenoid Boost Files
This circuit provides a 5A boost, and works with standard RPM switches, or the controller described below. When the solenoid closes, the 5A boost comes from two large capacitors, but the actual load on your alternator is 1A. When the solenoid is open, the boost circuit draws next to nothing. One of these circuits is needed per solenoid. Be aware that a potentially dangerous charge builds up on the large capacitors, so exercise caution. The layouts for the boost circuit top and bottom will be available for download and ordering from ExpressPCB.com soon. For assembly details, see "Assembling the Boost Box" below.
Assembling the Boost Box
You can wire this yourself, but to keep things simple, you can have the PCB made professionally, cutting hours of wiring into minutes of soldering. This section assumes you chose wisely and went with the professional PCB. The files to place an order with ExpressPCB are available below under the heading "Solenoid Control Files."
Top: One board from an ExpressPCB shipment.
Bottom: Transistors mounted on heat sinks.
When the order comes from ExpressPCB, you should receive two big boards of six smaller boards each; you have to cut individual boards out yourself. The easiest way is with a table saw, but no matter what, use ear, eye, and respiration protection because these boards are fiberglass. Once cut, clean and dry the boards with water, and get ready for soldering.
First, see
[Soldering Techniques] if you're new to soldering. Then, a good place to start is the top board's two dual transistor / heat sinks, labeled
Q2-
Q5, because these are the most complicated components to install:
- Bend each of the four transistors' leads by 90-degrees as in the picture at right.
- Apply a piece of eectrical tape to the back of the heat sinks so they won't short traces on the PCB.
- Position the heat sinks over the mounting holes on the top boost board.
- Apply a thin layer of thermal grease to each transistor's back, the side that will contact the heatsink.
- Mount the transistors, using 1/4" 4-40 machine screws and nuts, and a bit of loc-tite. Make sure the two heat sinks have a gap between them.
- Solder each lead to the PCB.
A technique for soldering the SMT capacitors.
Next are the 100uF SMT capacitors, because they need plenty of elbow room to solder:
- Locate an isolated capacitor pad on the PCB.
- Apply a small pool of solder to the pad.
- "Tack" the capacitor in place by pressing the capacitor lead into the solder pool with your soldering iron.
- Fully solder the other side, and then the tacked side. Refer to the image for details.
The rest is just a matter of soldering. It is best to fit everything where it needs to go, and then determine the easiest order to solder. For instance, the relays are in the way of certain diodes, so the diodes should be soldered first. A good order is transistors, capacitors, connectors, IC sockets, diodes, resistors, then relays. Note that parts marked optional in the bottom boost schematic (Q3, R12, R13, and R15) should only be installed if an RPM switch is used instead of the control board described below, with JP open. If the control board is used, simply jump JP and do not install the optional components. And BJT transistors (boost bottom Q2 and Q3) should test with your DMM's hFE tester greater than 100. Test relay operation before installing with 5V through their coils.

An assembled boost box with boost caps.
Testing and Calibrating the Boost Box
Before assembling the two boards together, test them individually. You will need:
- 12V DC source
- 5V DC source
- Ground source (tie the 12V and 5V ground together!)
- Digital Multi-Meter
- Alligator wires
- 1k resistor
- Small button (for momentary connection)
- Preferably an oscilloscope and signal generator
Note: Transistors are somewhat delicate and should never have their gates floating when powered. They can fry themselves that way - always tell the transistors to be either "on" or "off" by tying their gate to a voltage.
Boost Top
- Use your DMM in continuity mode or resistance mode to make sure Vbat is not shorted to GND.
- Test the charge pump's diode chain. Connect CTRL to 12V, Vbat to 12V, and Vboost through the 1k resistor to ground. Leave GND and PUMP disconnected (the pump transistors aren't included in this test). Use your DMM to measure the voltage before and after each diode. The voltage should drop about 0.4 to 0.6V after each diode, like this:
- 12V - D1 - 11.5V - D2 - 11V - D3 - 10.5V
- Test the charge pump switch, Q1.
- Connect GND to ground, PUMP to ground, CTRL to 12V. Connect your DMM in voltage mode between ground and the drain of Q1.
- Momentarily connect Vbat to 12V and watch the DMM read ~12V. Unplug Vbat.
- Connect CTRL to 12V.
- Momentarily connect Vbat to 12V and watch the DMM read "open circuit" (i.e. something besides 12V). Unplug Vbat.
- Test the pump transistors, Q2 through Q5. This test will leave Q1 on, and toggle the PUMP signal and make sure the pump transistors turn on and off properly.
- Connect GND to ground, PUMP to ground, CTRL to ground, and Vboost through a 1k resistor to ground.
- Attach your DMM in voltage mode between ground and the negative side of C1. Momentarily plug Vbat to 12V and watch the DMM read ~12V. Unplug Vbat.
- Attach your DMM in voltage mode between ground and the negative side of C2. Momentarily plug Vbat to 12V and watch the DMM read ~0V. Unplug Vbat.
- Connect PUMP to 12V.
- Attach your DMM in voltage mode between ground and the negative side of C1. Momentarily plug Vbat to 12V and watch the DMM read ~0V. Unplug Vbat.
- Attach your DMM in voltage mode between ground and the negative side of C2. Momentarily plug Vbat to 12V and watch the DMM read ~12V. Unplug Vbat.
Boost Bottom
- Use your DMM in continuity mode or resistance mode to make sure Vbat is not shorted to GND.
- Use your DMM in continuity mode or resistance mode to make sure the output of the 5V voltage regulator (U3 pin 3) is not shorted to GND.
- Connect your DMM in voltage mode between GND and output of the 5V voltage regulator (U3 pin 3). Connect GND to ground, and Vbat to 12V. Watch the DMM read 5V. Unplug Vbat. If it didn't read 5V, look for shorts.
- Use your DMM in current mode so GND is connected to ground through the DMM. Momentarily plug Vbat to 12V and make sure the DMM reads "way less" than 1A. If it reads high, look for shorts.
- Time to calibrate the LM555's PUMP signal. Unfortunately, this is best done with an oscilloscope, since the variable resistors are sensitive. If you have an oscilloscope, connect it's probe between ground and CTRL. The waveform you want is a 50% duty cycle square wave at about ~700Hz. This frequency comes from the RC time constant of the charge pump. The pump caps are 1000uF, and either see 1.4ohms or 1.1ohms resistance through the power resistors and transistors, making their time constant either 1.4ms or 1.1ms. I've taken the longer of the two, 1.4ms, and rounded 1/1.4ms = 714Hz down to 700Hz. If you don't have an oscilloscope, make R10 17.22k, and R9 3.5ohm.
- Test the LM324 (U2). For now, all you can test is that its output, CTRL, is low when Vboost is grounded. CTRL will go high, turning off the charge pump, when the charge pump raises the boost capacitor voltage (Vboost) above ~32.5V.
- Test the relays' default positions (making sure the switches are "off" and not stuck open) with your DMM in continuity or resistance mode.
Full Boost Box
Connect the two halves together with alligator clips for now. It would be wise to use smaller caps than the 10,000uF boost caps for this step - just make sure the caps you use are rated for 50V or more. Both halves need to share a ground, Vbat, Vboost, CTRL, and PUMP. Connect your temporary boost caps, but don't connect a solenoid - leave the solenoid connection unplugged.
Connect GND to ground, and your DMM in voltage mode between GND and Vboost. Connect Solenoid_Enable to GND. Now, connect Vbat to 12V for a second, then unplug Vbat. You should see your DMM reading above 30V, and slowly draining down, meaning the charge pump is working, boosting the 12V input to above 30V but below 37V on the boost caps. Sweetness! If it reads 10V to 12V, the pump is off, so check the CTRL signal, the LM324, and R1 through R4. If it reads between 12V and 30V, it's possible you didn't power the pump long enough, or the LM324 is turning off CTRL prematurely (check R1 through R4). If it reads above 37V, the LM324 isn't turning off CTRL (check R1 through R4).
If the pump passed the 30V test, check it's current requirement. It shouldn't take more than 15A at any time, and if everything is working properly, it should take "way less" than 1A once the boost caps are charged. Check the current requirement by connecting GND to ground, Solenoid_Enable to GND, and Vbat through the DMM in current mode to 12V. Leave it plugged in long enough that the boost caps are charged and see that the current requirement is low. Unplug Vbat. Be very careful because the boost caps, though temporary test sized, have a good amount of voltage on them now, and can discharge through Vboost.
Check the boost voltage self-regulation by connecting the DMM in voltage mode between CTRL and ground. Connect GND to ground, Solenoid_Enable to GND, and Vbat 12V. Test the self-regulation by observing the voltage on CTRL, which should be low when Vboost is below 32V, and high when Vboost is above 32V. Unplug Vbat.
Still without the solenoid plugged in, test the relays and Solenoid_Enable with the DMM in voltage mode between Vboost and ground. Connect GND to ground, and Solenoid_Enable through a button to 5V (the button should be default open circuit). Connect Vbat to 12V. At this point, the circuit is charged, and self-regulating to ~32V on the boost caps. Push and hold the button - you should hear the relays click, and see the DMM read ~65V on Vboost. Release the button, and it should read ~32V again. Be deliberate with your button pressing because relays are susceptible to sticking when they see fast on-off oscillations (C1 and R5 try to filter that out by "debouncing" the signal). If the voltage didn't double, a relay isn't working, the transistor Q1 has issues, or the jumper JP was left out. Unplug Vbat.
Remembering that the boost caps are fully charged, and with Vbat unplugged, carefully connect the 1k resistor between Vboost and GND to drain them. It should take a few seconds. Do not touch anything metal when you do this, make sure you are insulated. With the caps discharged, remove the 1k resistor and attach the solenoid from Solenoid+ to ground. Attach your DMM in voltage mode between CTRL and ground. You're going to test the circuit's self-regulation that turns off the charge pump (raises CTRL high) when Solenoid_Enable is high. Connect GND to ground, Solenoid_Enable to the button as before, and Vbat to 12V. CTRL should be high after a second since the boost caps are charged again. Press the button (watch out for the solenoid), and make sure CTRL remains high. Since the solenoid is now connected, roughly 1A is flowing through it, so the plunger probably snapped closed. It also saw a bit of a charge boost from the small test boost caps, so the snap may have been "spirited". Release the button and relays should click, and the solenoid should relax. Unplug Vbat.
Discharge the test boost caps as before, and swap in your official 10,000uF boost caps. Make sure the polarity is correct, and that the boost caps are themselves discharged before touching or connecting them. You are now ready for the first firing of the boost box. Connect your DMM in voltage mode between Vboost and ground. Connect GND to ground, Solenoid_Enable to the button as before, and Vbat to 12V. Observe that the DMM reads ~32V. Let it sit there for a bit and watch as the voltage slowly drains, then recharges to ~32V repeatedly. This is the self-regulation working. Before pushing the button, say a quick prayer, and make sure nothing is near the solenoid, including anything that can be demagnetized. Press the button! (if the plunger wasn't fully inside the solenoid, you should have heard and seen something impressive). With the button fully pressed, observe that the DMM reads less than 12V. This is the Solenoid_Enable regulation working properly.
Congratulations, you have a fully functional boost box!
RPM Signals
The Aux ports need to open around 3600rpm, and the VDI around 5200rpm. The standard solution is to use two rpm switches with the correct "pills" for both trigger points, though a more versatile method is to use a single microcontroller to activate both ports as described below.
A good RPM signal comes directly from the Crank Angle Sensor (CAS) as a red wire into the ECU pin T. The microcontroller can read this signal. Because the microcontroller is programmable, any number of outputs can be RPM controlled. For instance, for the VDI port output, the software logic looks something like this (the aux port is the similar):
"If the RPM is greater than the VDI_Open_RPM, and the VDI is already closed, open it. Otherwise, if the RPM is less than the VDI_Close_RPM, and the VDI is already open, close it."
An assembled control board.
Having two RPMs specified, the
Open_RPM and
Close_RPM, means there is hysteresis - i.e. an air conditioner set at 75 waits until 76 to kick in - so the port will not flutter open and closed near the switching point, which could damage the engine. Both the layout (used for ordering boards through ExpressPCB) for the control board and the microcontroller program are available for download:
Solenoid Control Files
Note: If you program the ATmega16 yourself, you will need an AVR-ISP to interface your computer with the control board. Programming is done with Atmel's free AVR Studio and the free avr-gcc compiler, with -o3 optimization set in compile options. Once the AVR-ISP is communicating with the microcontroller, set the following flags:- Disable JTAG
- Preserve EEPROM through flashes
- 4MHz calibrated oscillator with 60ms startup
Reliability
This system has been working in
[stevej88na]'s FC for a few months now, surviving two endurance tests between the California Bay Area and Carson City, Nevada. The endurance tests spanned 220 miles each way, and over 7,000 feet in elevation, with demands ranging from stop-and-go to spirited high altitude wide open throttle.
Resources
See Also...
Note: You must log in to contribute to or view the source of this how-to.