Blog 26th July 2019 – 14CUX Idle Air Speed Stepper motor I've documented elsewhere on this site the full process of retrofitting a Bosch fuel injection system (known as the 14CUX Hot Wire) to my rather elderly 1962 Land Rover V8 in place of the original twin carb induction system. By and large the system has performed well, but with one minor caveat... the Bosch designed idle control system.
Idle Air Valves
All engine fuel injection systems require a specific system for controlling idle speed... which is a tad more involved than you might realise. The idle circuit must control the speed of an engine when the vehicle is stopped at lights and it must also cope with starting the engine in all weather conditions. The idle system also gets involved when the vehicle approaches a set of lights and when a driver is coasting down hill with the throttle closed and as if that isn't enough, it also needs to know when to gracefully bow out, passing control back to the main fuel metering system.
On the 14CUX system, this is accomplished via an idle air valve bolted onto the side of the main plenum. The ECU can gradually open or close this valve permitting a controlled amount of extra metered air into the engine intake - and as that air is metered, the ECU will automatically adjust the fueling to cope whenever the volume of air is varied. Two examples of the idle air valve are shown above - both part number ERR5199. Note the spring loaded air valve shaft on the left with a head that looks a bit like a plunger and a 4 wire electrical connector on the right. The air valve and shaft can also be seen here after being removed from the body of the stepper motor.
Idle Air Stepper Motor Plunger
Internally the idle air valve is a two coil stepper motor which the ECU can rotate clockwise or anticlockwise in small increments. When the stepper motor is bolted to its housing on the vehicle, the ECU rotates it one way to move the plunger valve inwards towards the body of the stepper motor. This increases the amount of air entering the main plenum and causes the engine idle speed to increase to a max of about 2300 RPM. If the ECU rotates the stepper motor the other way, the plunger valve will move outwards causing air flow to decrease and the engine to slow down. If the ECU moves the valve fully outward so that it hits the wall of the housing, idle air flow closes off completely and the engine falls back to a calibrated speed known as base idle. So long as the calibration has been done correctly that should leave the engine running at around 520RPM. Interestingly, and stay with me here... if the stepper motor is physically removed from its housing (and so unrestricted in the range of its possible movement) and there was some way to electrically move the plunger valve continuously outward... then after around 10mm of movement the thread of the shaft would disengage from the body of the stepper motor and pop out (due to the spring). This characteristic would in fact be rather useful because it provides a means to remove and then clean the shaft - ahhh, if only it were possible to electrically rotate the stepper motor in this way?!? There are a number of issues with this system. The first and most obvious is that the idle air valve sits directly in the main airflow entering the system in the plenum and so attracts oil, carbon and dirt. As a result it will become fouled - but because there is no easy way to get the shaft out of and back into the motor body, there is no way to clean it. A second problem is the responsiveness of the idle control system, because the stepper motor is actually rather slow. The 14CUX compounds that problem by being slow to measure engine speed (given there is no crankshaft sensor) a process that takes it around 300mS to complete. When the ECU acquires idle it does so in steps of around 150 RPM and each step takes another (roughly) 300mS to switch. The sample, adjust process iterates until the target idle speed has been reached (760 RPM when warm, higher when cold), but the whole process is very likely to take 3 to 4 seconds to complete. A third issue is that aftermarket idle stepper motors are extremely variable in quality. I have first hand experience of brand new stepper motors that were completely unable to open sufficiently and so when fitted to the engine the idle speed was always too low. By now you'll probably grasp how useful it might be to directly control an idle air valve on the bench. With a simple control system you could control the stepper motor so as to completely remove the shaft for cleaning and inspection and you could use the same system to replace it into the body of the stepper motor afterwards. You would also be able to see the way the shaft behaves dynamically, in order to check if the shaft is moving smoothly or sticking due to a worn thread. You could also measure the maximum and minimum range of movement possible - which as mentioned above with aftermarket parts, is rather important. Take a look at the picture of the two stepper motors above - and note the difference in position of the head of the plunger valve. Both of these are aftermarket ERR5199 parts, purchased around 5 years apart and both have had their stepper motors rotated so that the air valve shaft had been completely withdrawn into the body of the motor. The bottom part worked fine in my engine but the top part wouldn't work at all because the maximum idle speed would only ever reach around 800 RPM (it should have been around 1200) causing the engine to repeatedly stall when starting from cold. The problem here is that the shaft of the top ERR5199 part is actually too long and so the plunger valve can't be opened far enough to provide sufficient extra idle air flow. Consequently, the idle speed of the engine when cold was always too slow.
Idle Air Stepper Cycle
The question then was how to build a test harness? Electrically speaking, stepper motors are not hard to rotate. It is perfectly possible to manually apply the right combinations of +12v and ground to the two coils using wires and a battery and get it to move. The problem is that it takes four different combinations of voltages on the four wires to move the stepper motor by the smallest amount either in or out - using what is called a H bridge arrangement. In practice, any significant movement (ie: attempting to eject the shaft for cleaning) is simply too tedious to manually attempt. A far better solution would be to use a microcontroller and as it happened, I had an old and slightly butchered PIC32MX340-512 CPU PCB hanging around the workshop. Yep, vast overkill for a project such as this but the PCB was rough and probably wouldn't be a good choice for any new project. The 340 CPU is also a wee bit buggy... but only in terms of the internal devices... which we actually wouldn't need for this project anyway. All we need, is a port with 10 outputs and 2 inputs. The two inputs hook up to momentary switches for the user to select either OUT or IN movement of the stepper motor and I've written the software so that when the OUT button is pressed, the stepper moves out by one rotation of the motor but if the button is held down, the cycle repeats reasonably quickly so the air valve plunger moves out of the stepper in around 4 seconds. The other switch moves the plunger in (ie: into the body of the stepper motor). I used two GPIO outputs to drive a pair of LED's as feedback for the user. The 340 PIC chip was configured to run using its internal RC oscillator at 80Mhz and with the peripheral bus running at the same speed. Timer one was configured to generate 1mS interrupts - which I used to monitor the state of the switches. The latency provides an easy way to debounce the switches and deal with repeat actions when either button is held down. PIC chips are so easy to setup - they really are a joy for these types of projects. The remaining 8 output data bits control the power to the four wires of the stepper motor.
The stepper motor is a 12volt device with two coils. Each coil has a resistance of around 55Ω, so think in terms of a quiescent current of 218mA and an inrush probably around four times that amount (0.8A). There are four connections to the motor - two for the first coil (Red and Black in the pic above) and two for the second coil (Yellow and Green in the same pic) and we need to be able to switch each of these four wires between three possible states - 12V, Ground or floating. The need for a floating value (ie: one not connected to either ground or +12) might strike you as a bit odd, but when exercising stepper motors, it isn't a good idea to short one coil (where both legs of the coil are either grounded or connected to +12v) while the other coil is being energised and so being able to float both connections to an unused coil is an asset. I had a look online and found a couple of dedicated controllers but from what I could see these were doing the job of the CPU and if anything might end up getting in the way of single step control. They were also expensive compared to discrete components and so I didn't persue that option. Thinking in terms of a 1A current rating to allow for inrush I had a look in the workshop and the one suitable complementary pair I had available were TIP41's (NPN power transistors in a TO220 case capable of switching around 6A) and TIP42's (PNP complimentary type in the same case). The collectors for both these parts are connected to the heatsink - which means they can be bolted together (further assisting in the removal of heat). TIP transistors are overkill for this project but will end up under-stressed and as I have a decent supply in my stock, are a good candidate.
Stepper motor driver
I also had a bag of 2N3904 NPN transistors which are ideal to allow the CPU 3.3v signals to switch the big TIP4x transistors on and off. All I needed to order were some chunky driver resistors with a value of 330Ω. At 12v, these will carry 36.4mA, dissipating 436.4mW and so can be expected to get warm. I used 1 watt R's from Farnell (along with RS, these are the two best electronic component supply companies in the UK... and have served me very well over many years). All these parts are common and very easy to get hold of. The one part you'd need to figure out, if you were attempting the same thing, is the CPU... but do keep in mind that something like a Raspbery pi or Arduino would be ideal for this project. The transistor driver circuit for the stepper motor is very simple. When the CPU outputs a low on LSB, the linked 2N3904 switches off and so the TIP42 doesn't conduct - in which case the output floats. When the CPU changes LSB to high, the 2N3904 conducts at which point the TIP42 switches on and the output goes to +12V. On the other side if the CPU switches MSB low, the linked 2N3904 switches off, and so the base of the TIP41 goes to +12v via the 330 and switches on - the output then switches to ground. If the CPU forces MSB high, the 2N3904 will switch on grounding the base of the TIP41 causing it to turn off - at which point the output floats. By controlling the state of both bits, the CPU can optionally set the output to float, or to switch to +12v or ground and with the ability to source or sink a large amount of current. The transistor driver diagram above is the circuit required to drive one of the four wires going to the stepper motor (arranged in a H bridge configuration). Four of these circuits are required to drive the two coils on the stepper motor. For each one of the four wires going to the stepper motor, the truth table above shows what changes the CPU needs to make to the MSB and LSB values to set the required voltage for the stepper. Note that there is one combination (see the danger table entry) that results in both power transistors switching on at the same time (shorting the supply rails). This condition generates what is sometimes called shoot through current which will likely cause things to go pop. Steps must be taken within the code to guarantee that this condition cannot happen even momentarily. Consider switching the wire to the stepper motor from +12v where MSB,LSB=1,1 to Ground where MSB,LSB=0,0. If the software completed this process in steps by resetting the MSB bit to zero and then resetting the LSB bit to 0 there would be a short interval (probably a few nanoseconds) where the danger condition of MSB,LSB=0,1 would occur - resulting in a nasty current spike. In code, this was resolved by configuring the GPIO port as a byte wide port where all bits could be changed simultaneously, not one bit at a time. Idle Air Valve - Test Harness The rather tatty CPU board on the left has a 0.1" pitch prototype board soldered underneath and which has the components required to support the two switches and the two LED's. It also includes the full set of eight 2N3904 transistors used to switch the TIP41 and TIP42 power transistors. As those transistors are likely to generate a bit of heat I wired them on a separate PCB and where each pair of TIP41 and TIP42 are bolted together and drive just one wire to the stepper motor. In fact, if you look at the right of the pic above, you'll just be able to see each of the red, black, yellow and green wires heading off to the stepper motor. I first tested this circuit using four 5W filament bulbs all wired with inline diodes just to make sure each of the four power output combinations were switching correctly from +12 to ground and to a floating state. I then ran a dynamic switching test over a 24 hour period, alternating the voltages on all four outputs at varying speeds and intervals to assess the resulting heat generated by the transistors as the bulbs flashed away. After that I connected a stepper motor and tested the operation for both OUT and IN and found that it worked perfectly first time. If you get to this page, you may simply want to drive a stepper motor from something like a Raspberry Pi or Arduino board, or like me, you may need to test a stepper motor that is being used in a real world system (such as a land rover fuel injection system): either way, I hope these notes help you figure out how to tackle that particular problem. Do keep in mind that if your stock of electronic components includes MOSFET transistors then a simpler solution involving fewer components will be within your reach. Comment | Back to Quick Links...