OK so what I am trying to accomplish involves an Arduino Uno reading pulses from an ignition coil and then produces a variable pulsed digital output (that corresponds to the engine speed ) for the purpose of driving a solenoid lube oil pump .
I have an isolation module that converts the 120vdc + ignition coil primary pulse into an opto isolated low level 5 v pulses 10.833 PPS at idle speed increasing to 100 PPS at WOT .
The signal driving the oil pump must be "ON" for a 42 ms duration to get a forceful enough stroke to operate the pump piston followed by a pause .
I was planning on using constrained speed values at 11 different points based on the speed reference using the spark coil firing. I know these PPS transition points can't be expressed as tight as I've made them but this shows the gist of it .
How long us the pulse from the ignition?
If it's short interrupts are likely used.
Calculate the RPM and decide for the factor needed to control the oil pump.
Iām guessing that it is not directly engine speed but engine revolutions. That is, every X revolutions you deliver a pulse, of a particular shape, to the pump.
The only reason an automobile engine oil pump increases oil pressure, flow, is for cooling. Do you have a cooling problem that requires a variable oil flow?
Paul
Yes I can this is a soleniod driven lube pump for a large 200 HP 2 cycle outboard .
Oil delivery is based on a negative curve increasing oil delivery as rpms increase starting at 100:1 and gradually increasing to 50:1 . I've got all of that part figured I just need to figure out the code to pulse (stroke) the pump . It has a 42 ms coil pulse duration required to get a full "positive " stroke out of the pump piston and the off time will vary dependent on lubrication requirements . At " Idle " engine speed lube oil requirement is 100: 1 which equates to 0.820 CC's of oil per minute . Oil pump output is 0.2 CCs of oil for each oil pump piston stroke so if the oil pump solenoid is energized 4 x within this 1 minute time period (approx . once every 15 seconds ) everyone's happy .
OK. So, for example, by 50:1 you mean every 50 revolutions of the engine there is one pulse of the oil pump ? ( Or is this a fuel to oil ratio ? )
Anyway, what is the maximum range RPM and is this a linear change throughout the entire RPM range ?
If it is linear, you can use the map() function to control the interval between oil pump pulses. If it is not linear, then you can use a table lookup or a series of if / then / else if / else statements instead, depending on the desired granularity.
No it is non linear ( 100:1 (Idle) through 50:1 (WOT) fuel to lube oil ratio @ 700 thru 6000 RPMs) There are individual spark coils for each cylinder so the pulse count range is 12 to 100 pulses per second input to the Arduino . I was looking at the switch case coding and thinking about creating 10-12 cases each representing a different constrained rpm range with an increasing pump rate up to the maximum fuel flow.
the pulse count range is 12 to 100 pulses per second input to the Arduino .
Yes, there is a contradiction. A 42 ms pulse length is 23.8 pulses per second. You need to resolve the contradiction.
If the 42 ms cycle time is correct and required, you can use a pwm library like TimerOne.h and vary the duty cycle at the 23.8 Hz frequency.
Alternatively you can create the pulse cycle with a millis() timer and set the on/off times like a "blink without delay" example where there are different on and off times.
The 42 ms pump pulse time needs to fixed I was hoping to control the oil flow amount based on increasing /decreasing the delay time between each pump pulse .
Minimum "OFF" time between pump pulses will be at top engine RPM .
I am planning a test running the pump on the bench with free running 42 ms pulses timed at one per second for a timed duration to see how many CCs of oil it can pump and then calculating the pulse rates for each required "fuel to oil ratio" steps
I'm guessing also that the calculations of the number of oil pump pulses per second has to be reviewed.
Say the motor has a fuel consumption of 100 liters per hour. That is 28ml (milliliters) of fuel per second.
If the fuel/oil ratio is 100:1, that implies an oil consumption of 0.28ml per second
If you spread that 0.28ml over 50 oil pump pulses in that second, that is an incredibly small 0.0056ml oil delivered per pulse. There are about 30 drops in a milliliter of oil so that would be one fifth of a drop per pulse. I suppose that is closer to the performance of an ink jet printer!
Remember also that if the Arduino crashes, the motor seizes up.
Not sure what the volume of oil pumped per stroke is but the pump will be definitely be cycling slower the rotational pulses via the ignition coil module .
At Idle the engines lube oil demand = 100:1 ( 0.82 cc / .028 ounces per minute )
At WOT engine lube oil demand = 50:1 (26.533 cc / .897 ounces per minute )
If the lube pump's output is .25 ounce per stroke then 4 pulses in one minute will cover WOT demand . After I run my volume testing on the pump I can work up exact pump pulses per revolution . The pump I purchased to trial this idea is off of a newer outboard of same make and displacement so I know the pump is capable . My motor's ECU has no provision for driving an oil pump like the later models that I assume is probably sync'ed to the injector pulses for timing .
There is a vapor separator tank on the side of the plenum . It has a capacity 14 ounces of fuel and has the high pressure fuel pump feeding the injector fuel rail mounted inside . A vacuum assisted fuel pressure regulator mounted on top to dump fuel rail pressure back to this tank . There is a hose barb tapped into the bottom to feed oil from the pump in where it is picked up and mixed with fuel by the fuel pump .
very little there is a low pressure mechanical fuel pump that keeps the VST full .
there is a float /needle /and seat that maintains fuel VST fuel level . there is also a small check valve in the lube oil VST fitting.