Running a common rail diesel pump

Hey guys i am fairly new to arduino and a complete noob when it comes to writing software. Hardware i have no problems with.

So i was challenged at my work place to come up with a way to test a common rail diesel pump (although we have many test benches, we dont have a specific one for this type of pump)

The type of pump in question is a Denso Hpo. It has 2 solenoid vales on the top that determine how much fuel has to enter the fuel channels, and it has to close again before the momentum of the pump has to force that fuel to the rail and then to injectors. So basically it gets a 12v dc 3a signal to open and the volts fall away to close the valve.

The pump uses a inductive type crank sensor to measure the position of the shaft. It has 9 cut aways in total, with 2 very close to each other

If i look inside with the vales removed and the sensor removed i can see that the 2 cut aways that is very close to each other the shaft is in a neutral state. With no lobe on the top or bottom position. Only when i turn the pump anti clock wise to the first cut away solenoid one's lobe is facing upwards and solenoid 2 is facing downwards.if i turn it to the 2nd cutaway it is vice versa again. Solenoid one's lobe is facing down and solenoid 2 is facing up

I am hoping someone can direct me in a direction on how to begin writing software so that the arduino can register the cut aways and process the information at hand

My harware setup is as follows. Arduino uno R3. 2 channel relay. 2x 150w dc to dc step up converters running at 12v 3a

Any help will be extremely appreciated


The "one different" is so that the computer can detect the orientation, as you have observed. This only works if the pump speed is relatively constant. If it could suddenly speed up or slow down on one of the other regular indents, such that it appeared like the different one, then it is not possible to reliably detect the position this way.

You need to know how fast the pump is expected to spin, so you have an idea of the normal time delay between indents or you need to keep track of the speed and adjust your expectation of time delays based on the previously-measured speed.

Measuring the exact timing of the indents is going to be important. You can't have the processor wasting time printing something to the screen and then taking a measurement of when the indent passed the sensor. So you need to use interrupts. Look for Nick Gammon's tutorial on interrupts. On an UNO, pin 2 and 3 are best for this.

In practice SW typically keeps an array of the last n edges and/or pulse widths and has an adaptive threshold to detect the direction pulse(s). Few motors or engines can accelerate so fast that two consecutive pulses will be that different.