PWM Fuel Pump Control, Map Sampling, etc...

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

myk777
Master MS/Extra'er
Posts: 510
Joined: Tue Mar 27, 2007 9:12 pm
Location: Bellevue, WA

PWM Fuel Pump Control, Map Sampling, etc...

Post by myk777 »

Thought I'd post this topic for discussion:

I currently run my single cylinder engine on the 303 code full sequential 36-1 w single tooth cam, both are hall sensors. This has enabled me to run Speed Density via the crank angle map sampling routine on an engine that this was previously not possible, works great. For a fuel system I've used a GSXR in-tank motorcycle pump which has a contant pressure (non-MAP referenced) regulator built in to the housing, this is a returnless system with a single injector at the end of the line. I also currently have installed one of the AEM 0-100psi fuel pressure sensors hooked up to the MS2 analog input and log fuel pressure which basically stays at a constant 45psi at all times.

Typical of many motorcyle/ATV I am limited on electrical power and suffer from it at times. After reading some great threads over on the TT site by guys converting a Suzuki DR over to EFI via MS, one of the guys has figured out a circuit to PWM control this very pump via feedback from a pressure sensor, this effectivly cuts the power requirements of the pump in half in the worst case scenario and probably much better than that at idle/low PW where I have my worst issues. I've ordered the circuit from him to save on my electrical demands and it got me thinking further about the merits of having the regulator referenced to MAP.

I can see the benefits of having a constant delta pressure across the injector (more available PW range, etc.), however this is nearly impossible to accomplish mechanically on an engine that has a terrible map signal. This got me thinking about the map sampling routine in MS and if it had the ability to send out a signal that corresponded to the "captured" map signal (not the raw measured data). This signal could then be fed into the PWM pump control circuit to maintain a contant pressure across the injector.

Just an idea, any thoughts, comments. I know right now my engine uses from 30 to 245 in the VE table which is about maxed out and it is currently NA (I could help this by turning mult MAP back on but I haven't needed to), something like this would certainly be necessary if I ever wanted to think about boost with my current fuel configuration.

Mike
jsmcortina
Site Admin
Posts: 39619
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by jsmcortina »

PWMing the pump is useful for reducing overall flow and current consumption, but I don't think it would react fast or repeatably enough to try to use it for pressure control.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
msiddalingaiah
Helpful MS/Extra'er
Posts: 70
Joined: Sat Sep 18, 2010 6:43 am
Location: Maryland, US
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by msiddalingaiah »

jsmcortina wrote:PWMing the pump is useful for reducing overall flow and current consumption, but I don't think it would react fast or repeatably enough to try to use it for pressure control.

James
This is the conventional wisdom, so I wouldn't fault you for thinking that. The reality is that not only is the pump plenty fast, but it is a standard way of controlling fuel pressure on many vehicles. I know this is done on several Ford models, specifically the Ford Focus, Escape, and trucks. Bosch makes Fuel Rail Pressure (FRP) sensors specifically for this purpose.

I measured the slew rate of the Mitsubishi UC-T30 pump that is common in Motorcycle in-tank fuel systems and it's something like 450 psi/sec. In simple terms, it comes up to 45 PSI in about 100 milliseconds. I made several measurements from closed injector to wide open and it reacts much faster than 100ms as it doesn't have far to go. Once it's up to pressure, the transient error is quite small (maybe 1/4 PSI), but average pressure is in fact more accurate than mechanical regulators. This is because I added an integrator to zero out any steady state error. The fact that flow rate is proportional to the square root of pressure helps also.

The only problem with it is that without lots of fuel flow at idle, the pump tends to get warm. I think it's manageable, but it is a known issue.

If you haven't seen it, I wrote up the high level details here: http://www.madhu.com/content/Main/FuelInjection
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
msiddalingaiah
Helpful MS/Extra'er
Posts: 70
Joined: Sat Sep 18, 2010 6:43 am
Location: Maryland, US
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by msiddalingaiah »

myk777 wrote:I can see the benefits of having a constant delta pressure across the injector (more available PW range, etc.), however this is nearly impossible to accomplish mechanically on an engine that has a terrible map signal. This got me thinking about the map sampling routine in MS and if it had the ability to send out a signal that corresponded to the "captured" map signal (not the raw measured data). This signal could then be fed into the PWM pump control circuit to maintain a contant pressure across the injector.
This is entirely doable and it probably wouldn't be too hard as long as there was some kind of suitable output from MS. On a similar note, I had considered sampling MAP and selecting the lowest value between two ignition events in software. It would avoid the need for a cam sensor. I'm sure someone has thought about this already.
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
dontz125
Super MS/Extra'er
Posts: 4228
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by dontz125 »

Using the MAP sensor as the cam sensor was discussed over in the SynchroMAP thread on msefi.com. The consensus was that, as the differential gets smaller and smaller (WOT), the probability of mis-timing the 'cam' signal got awful high. The signal is nice and clean at low revs, low throttle. This is one of the reasons I got a little excited when James muttered something about only polling the cam signal during cranking (self-synching wheels only - missing-tooth etc), and ignoring it afterwards.

http://www.msextra.com/forums/viewtopic ... nc#p242042

Are you selling this PWM circuit?
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
msiddalingaiah
Helpful MS/Extra'er
Posts: 70
Joined: Sat Sep 18, 2010 6:43 am
Location: Maryland, US
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by msiddalingaiah »

dontz125 wrote: http://www.msextra.com/forums/viewtopic ... nc#p242042

Are you selling this PWM circuit?
Thanks for the link, it makes sense.

I'm not sure what the promotion policy is on this forum, so it's probably best to send me a PM.
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by racingmini_mtl »

msiddalingaiah wrote:
dontz125 wrote: http://www.msextra.com/forums/viewtopic ... nc#p242042

Are you selling this PWM circuit?
Thanks for the link, it makes sense.

I'm not sure what the promotion policy is on this forum, so it's probably best to send me a PM.
I think this could go in the expansion boards section: http://www.msextra.com/forums/viewforum.php?f=67. This is MS related and not in competition with any B&G product.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
myk777
Master MS/Extra'er
Posts: 510
Joined: Tue Mar 27, 2007 9:12 pm
Location: Bellevue, WA

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by myk777 »

msiddalingaiah wrote:
The only problem with it is that without lots of fuel flow at idle, the pump tends to get warm. I think it's manageable, but it is a known issue.
Thanks for chiming in, I figured you might. Is the above issue likely solved on installations where the pump is submerged in fuel "in-tank" or in a remote reservoir like I have, and likely only a problem when you have the pump external?

@ Jean or Mod, feel free to move this thread to the expansion board forum if you wish, probably a better place as it's not really MS2 specific.

@Jean/Ken/James: What would it take to output the sampled map signal and what outputs would be available for this in the various chips?
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by racingmini_mtl »

myk777 wrote:@Jean/Ken/James: What would it take to output the sampled map signal and what outputs would be available for this in the various chips?
The problem is that this is an analog signal and there is no analog output on any of the MS CPUs. It might be possible to use a PWM output and filter it.

I would also be possible to use the CAN bus in which case nothing would need to be done on MS2/Extra or MS3 since MAP is already available. But I don't know if the refresh rate would be fast enough for good control but it probably would be.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
myk777
Master MS/Extra'er
Posts: 510
Joined: Tue Mar 27, 2007 9:12 pm
Location: Bellevue, WA

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by myk777 »

Jean,

Just to be clear, the goal would be to output some signal that corresponds to the resultant of the MAP after it has been processed by the map sampling algorithm (angle and window) and not the raw analog map from the sensor. I think this "value" only exists inside the code, would need a way of creating an output from that. It could possibly be done externally on the pump PWM circuit as mentioned above, but it would be tough to ensure it's using the same values as the fueling algorithm inside MS.

My primary goal is to reduce power consumption of the pump so I'll probably just stick with the constant pressure setup and let the PWM circuit control the pump via feedback from the pressure sensor as that has been demonstrated to work and work well. The other idea of creating an "electronic" pressure regulator referenced to the map sample is probably more of a longer term goal, ideally the MS itself would be able to control the PWM circuit directly via feedback on the analog input from the pressure sensor since I already have that hooked up and logging on MS2. Doesn't seem too far fetched does it? :D
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by racingmini_mtl »

Mike,

I understand exactly what you want to do but even after being processed by MS, the MAP signal is still not just a 0 or 1 so you either need to use an analog output or some serial comm to get that value out. And those are the 2 alternatives I gave above.

I assume that MS3 could at some point do it either based on the pressure sensor or the MAP signal. There is already some or most of the building blocks in the code and it would basically be a question of either re-using those or duplicating some. And it does have hardware PWM outputs which is probably required in this case. MS2 only has software PWM outputs and that would likely not be sufficient for this application.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
msiddalingaiah
Helpful MS/Extra'er
Posts: 70
Joined: Sat Sep 18, 2010 6:43 am
Location: Maryland, US
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by msiddalingaiah »

Yes, hardware PWM is best. I'm using the AVR's hardware PWM output now. It's just under 8 kHz (8 MHz/1024), which works well. You can hear the high pitched whine from the motor as it is, so 20+ kHz would be nicer. Engine and road noise completely drown it out, so it's not a big deal.
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
msiddalingaiah
Helpful MS/Extra'er
Posts: 70
Joined: Sat Sep 18, 2010 6:43 am
Location: Maryland, US
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by msiddalingaiah »

myk777 wrote:
msiddalingaiah wrote: The only problem with it is that without lots of fuel flow at idle, the pump tends to get warm. I think it's manageable, but it is a known issue.
Is the above issue likely solved on installations where the pump is submerged in fuel "in-tank" or in a remote reservoir like I have, and likely only a problem when you have the pump external?
The pump itself can take plenty of heat (at least 160 F is my guess), it's the gas that can't. I have it set up with the gas inlet up (gravity fed as opposed to suction). When the pump gets above 120 F or so, some of the gas boils, produces bubbles and causes the pump to cavitate. Submerged recirculating pumps, like the GSX-R, also get hot and produce bubbles, but since it sucks fuel from the bottom, cavitation isn't an issue. The pump dissipates upwards of 60 Watts in heat with a recirculating system, which is the upper bound for the PWM setup. If you don't have a problem now, I don't think you will have a problem with PWM.

There was only one occasion when my pump cavitated and got really hot. I was experimenting with loop constants in an attempt to completely eliminate any pressure overshoot. This caused the pump to run way more than necessary and waste a lot of power. The pump made some really nasty noises, so I figured it was toast. It turned out to be fine. At the time I had a small 1" end cap with gas in it. I replaced it with a 4" end cap (that's all the room I had), set the loop constants back to safe values (some overshoot) and it hasn't been a problem since. I'm sure there are bubbles in the end cap now (it doesn't take much to boil gas), but you can imagine convective currents within the end cap carrying warm gas up and cool gas down where the pump inlet is. As long as there is enough heat dissipation to keep the gas liquid at the pump inlet, it's happy.

I analyzed a number of forced air heat sinks and concluded that even with 5 mph air flow, most of the heat will be dissipated efficiently. I've been monitoring pump temperature with no heat sink to determine the maximum temp rise above ambient (something I was reluctant to do in the summer). That way, I can quantitatively measure heat sink efficiency and achieve a solid safety margin.

Your setup has way more surface area and fuel volume as I do, so yours dissipates more heat. It looks like you have an inverted pump (suction), which also helps. If you think about it, you have the worst case scenario now: pump running wide open with the only cold fuel entering as required by the engine. So if it works well now, it should be fine with PWM. Does that sound right?
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
myk777
Master MS/Extra'er
Posts: 510
Joined: Tue Mar 27, 2007 9:12 pm
Location: Bellevue, WA

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by myk777 »

Yes, I think alot of that makes sense, the only thing that might be different is the fuel is recirculating right now inside the remote reservoir with the built in mechanical FPR which it won't be doing with the PWM setup but..it will be using alot less power too so maybe its a wash. But your right, I have absolutely no issues right now, in fact I've never even felt the tank get remotely warm, there's actually quite a bit of fuel in that thing and yes the pump is mounted with the pickup at the bottom.

I'm assuming to start out with I can just leave the mechanical FPR in place and set the pressure just below it, or would it be best to completely remove the mechanical FPR? I haven't looked at it in detail but I assume it would need some sort of a plug or replace a spring with something solid, I'll have to look into it. I just logged a ride last night and my duty cycle gets up to ~89% at 10,750 rpms so I don't want to back the pressure down much.

I'm surprised at how much variation I get in the fuel pressure with the setup I have now, it really bounces all over the place, there is a 20psi spread at times, hopefully this will improve. The fuel pressure sensor is close to the pump outlet then there is about 24" of hose to the injector. It's the AEM 0-100psi unit, link provide below. I've also attached the log from last night if your interested.

Mike

http://www.aemelectronics.com/100-psig- ... f7mfim7m83
msiddalingaiah
Helpful MS/Extra'er
Posts: 70
Joined: Sat Sep 18, 2010 6:43 am
Location: Maryland, US
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by msiddalingaiah »

myk777 wrote: I'm assuming to start out with I can just leave the mechanical FPR in place and set the pressure just below it, or would it be best to completely remove the mechanical FPR? I haven't looked at it in detail but I assume it would need some sort of a plug or replace a spring with something solid, I'll have to look into it. I just logged a ride last night and my duty cycle gets up to ~89% at 10,750 rpms so I don't want to back the pressure down much.

I'm surprised at how much variation I get in the fuel pressure with the setup I have now, it really bounces all over the place, there is a 20psi spread at times, hopefully this will improve. The fuel pressure sensor is close to the pump outlet then there is about 24" of hose to the injector. It's the AEM 0-100psi unit, link provide below. I've also attached the log from last night if your interested.

Mike

http://www.aemelectronics.com/100-psig- ... f7mfim7m83
Yes, you can set the pressure just below the set point of the mechanical regulator. That's how I initially tested the whole thing just in case something went seriously wrong :shock:
I set the one I sent you to 2.24 Volts, which is 43.5 PSI based on the voltage output chart for the AEM sensor. You can adjust it as needed. When it's not drawing fuel, the pump should not run. That's one way to determine if the electronic regulator is limiting pressure. You might have slight leaks that will cause the pump to wind up briefly, but it should not run continuously.

I downloaded your log, which field are you using for fuel pressure?
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
dontz125
Super MS/Extra'er
Posts: 4228
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by dontz125 »

I'm wondering if a small accumulator wouldn't help the low-speed overheating - once it's full, the engine can run off of it for a few seconds, allowing the pump to cool down.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
myk777
Master MS/Extra'er
Posts: 510
Joined: Tue Mar 27, 2007 9:12 pm
Location: Bellevue, WA

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by myk777 »

msiddalingaiah wrote:
I downloaded your log, which field are you using for fuel pressure?
The field is labeled "Fuel Pressure", it should show up in MLV as a menu pick, it does for me? if you open it in excel it is colum V
dontz125
Super MS/Extra'er
Posts: 4228
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by dontz125 »

The thing that jumped out at me was your BATT V reading - 11.5-12.2v?! Even at high revs?
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
myk777
Master MS/Extra'er
Posts: 510
Joined: Tue Mar 27, 2007 9:12 pm
Location: Bellevue, WA

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by myk777 »

dontz125 wrote:The thing that jumped out at me was your BATT V reading - 11.5-12.2v?! Even at high revs?
Yes, that was the first time I've logged it with the new LC-1 installed permanently, previous datalogging runs had been with a LM-1 running off of a seperate 3-cell Lipo battery. You can see why I need to reduce the fuel pump current draw.... In reality the voltage is about a half volt higher than that as the MS uses a voltage divider to scale the battery voltage down to something the processor can live with i.e. 0-5v range, depending on the accuracy of the two resistors involved the voltage readout in the MS can be off by a bit. I've contemplated fixing by tweaking the resistor values but never got around to it and just kept it as a mental note. Nonetheless the charging system isn't sufficient (keep in mind this is a motorcycle type application).

Mike
dontz125
Super MS/Extra'er
Posts: 4228
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: PWM Fuel Pump Control, Map Sampling, etc...

Post by dontz125 »

Oh, trust me - I'm well aware of the power budget of a small motorcycle... :lol:
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Post Reply