Rotary engine OMP Stepper control?

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

Moderators: jsmcortina, muythaibxr

shadowplane676
Helpful MS/Extra'er
Posts: 106
Joined: Thu Oct 27, 2005 10:29 am

Rotary engine OMP Stepper control?

Post by shadowplane676 »

I am looking to control the factory stepper motor Oil Metering Pump (OMP) on two 13b rotary engine installs. I did some searching but wasn't able to come up with a concrete answer as to the feasibility of doing this. It looks as though there have been murmurings of implementing this feature, but mainly on the MS3 code rather than the MSII.

Is there some way to enable the MSII to control a stepper motor based on two criteria (such as MAP and RPM) similar to a warmup or VE table of steps? In both installs, we will be using the PWM based Idle Air Controller motor, leaving the stepper function currently unused. Is this something that would have to be custom coded or just a custom .ini?
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Rotary engine OMP Stepper control?

Post by Matt Cramer »

This would need custom code.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
shadowplane676
Helpful MS/Extra'er
Posts: 106
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Post by shadowplane676 »

Bugger, I was afraid of that. The additional concern then is: if we were to work on custom code for an OMP stepper control subroutine, is there enough memory left on the MSII to facilitate adding said extra code?
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Rotary engine OMP Stepper control?

Post by dontz125 »

What about using the JBPerf TinyIOx with the new generic PWM outputs, and feed the PWM signal to a PWM-Stepper controller?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: Rotary engine OMP Stepper control?

Post by muythaibxr »

I'm in the process of adding generic PID code to MS3 that will be able to control the OMP. However, the stepper on the OMP draws a lot of current. Whether or not we could control it with the built-in stepper driver is borderline.

We could potentially backport some subset of that code to support specifically controlling the OMP, but you'd still run into the stepper driver problem.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
shadowplane676
Helpful MS/Extra'er
Posts: 106
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Post by shadowplane676 »

I haven't looked at a PWM -> stepper possibility yet. Would a 3rd party stepper driver such as this one from sparkfun run the OMP? I haven't found the spcs on what sort of current the OMP draws, but this board can handle 750mA/Phase and up to 30V from what I can tell. It also takes a 0v to 5v digital input, plus it is cheap at $15...

https://www.sparkfun.com/products/10267
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Rotary engine OMP Stepper control?

Post by racingmini_mtl »

shadowplane676 wrote:I haven't looked at a PWM -> stepper possibility yet. Would a 3rd party stepper driver such as this one from sparkfun run the OMP? I haven't found the spcs on what sort of current the OMP draws, but this board can handle 750mA/Phase and up to 30V from what I can tell. It also takes a 0v to 5v digital input, plus it is cheap at $15...

https://www.sparkfun.com/products/10267
What I told you about this board on my forum still applies. And based on what Ken says about the current needed to drive the OMP, it will likely not be able to do it.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
shadowplane676
Helpful MS/Extra'er
Posts: 106
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Post by shadowplane676 »

Thanks for the additional clarification Jean, I'm still working on putting it all together. I need to do more research on stepper motor controllers I think...

Ok, so we basically need a "stronger" stepper controller with an interface compatible with the output of the MS-II? Is a digital 0v-5v input workable provided the stepper controller can handle the OMP's power demands?

Ken, do we know what sort of power draw the stock OMP uses? This would help in the search for a suitable stepper hardware controller.
shadowplane676
Helpful MS/Extra'er
Posts: 106
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Post by shadowplane676 »

Ok, so after reading up on stepper motors a bit and looking up the coil resistance specs for a 3rd gen OMP (making an ASSUMPTION that the 2nd gen is similar), a lowest resistance was 16 ohms. At 14.8V, that is .925A per pole. I see now why the MSII and the first controller I looked at are inadequate.

I was able to find 2 different controllers rated at 2A and 3A per pole respectively. They also claim to be able to control bipolar stepper motors, which i think the OMP is, due to its 6-wire configuration. Is this at least up the right alley?

2A bipolar controller - https://www.sparkfun.com/products/11876

3A SPI interface bipolar controler - https://www.sparkfun.com/products/11611
slyrye
Experienced MS/Extra'er
Posts: 255
Joined: Sun Aug 12, 2007 2:41 pm
Location: Philippines
Contact:

Re: Rotary engine OMP Stepper control?

Post by slyrye »

muythaibxr wrote:I'm in the process of adding generic PID code to MS3 that will be able to control the OMP. However, the stepper on the OMP draws a lot of current. Whether or not we could control it with the built-in stepper driver is borderline.

We could potentially backport some subset of that code to support specifically controlling the OMP, but you'd still run into the stepper driver problem.

Ken
That would be very helpful for us needing PID implementation on diy Drive by wire...! please make it happen :D
MSnS'n'4G15
phoenix3d
Experienced MS/Extra'er
Posts: 183
Joined: Wed Mar 19, 2008 2:12 pm
Location: South Africa

Re: Rotary engine OMP Stepper control?

Post by phoenix3d »

Hi Ken...

I know it's been a long while now...

But has there been any news on the OMP setup for MS2 & MS3 ecu's?

Gordon.
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: Rotary engine OMP Stepper control?

Post by muythaibxr »

Stepper driver is still incapable of driving an OMP
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Rotary engine OMP Stepper control?

Post by Reverant »

When has the absence of a "stock" circuit inside the MS1/MS2/MS3 stopped us before?

Do the code, suggest a circuit, and we'll do it.
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Rotary engine OMP Stepper control?

Post by dontz125 »

Does anyone see anything terribly wrong with this circuit? DIP14 Schmitt trigger package to ensure no shoot-through, TO-92 1.2A N-channel MOSFETs with 300mOhm Rds(on) and 1.2W rating, all through-hole for easy home soldering. Obviously, you'd use two sets of MOSFETs (the Schmitt trigger package has 4 gates, so you're set there). This would need some sort of code mod to use the on-board MS2/3 stepper chip as the driver / signal generator.


If any MS2 users are interested, I could price up a Tiny IOx-based unit that would be pre-assembled and fully-stand-alone, allowing the use of the TIOx's generic PWM function to drive a PWM-stepper converter; a MS3 version (without the TIOx) would use the MS3's own generic PWM output.

edit - schematic updated below
Last edited by dontz125 on Sun Apr 19, 2015 5:44 pm, edited 1 time in total.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Rotary engine OMP Stepper control?

Post by Reverant »

Don't you need P-channel mosfets on the top?
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Rotary engine OMP Stepper control?

Post by dontz125 »

Reverant wrote:Don't you need P-channel mosfets on the top?
Good question - a LOT of H-bridges use just N-mos internal drivers, but I know what you mean, and I'm not comfortable in figuring out hat they're using as internal mosfet drivers. I've revised the schematic to replace the upper transistors with P-mosfets. I've replaced the Schmitt logic gate with a TC4427 Mosfet driver - it includes its own internal Schmitt triggers, and can sink or source a LOT more current than a typical logic gate. When I started pondering the use of P-channel Mosfets, I was a little concerned about getting them turned fully on.

All transistors are now TO-220, with Rsd(on) of 26mOhms (N-channel) and 22mOhms (P-channel). For 1-2A motors, these drivers will barely get above stone-cold.

NOTE: The IAC1A and IAC1B signals are REVERSED at the A and B inputs; the use of TC4426 or TC4428 drivers would avoid this, but from a few comments on the forum I get the impression that these are not commonly available at hobby shops in through-hole.
Stepper Booster r1.jpg
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
shadowplane676
Helpful MS/Extra'er
Posts: 106
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Post by shadowplane676 »

Dontz125 - Thanks for your work on designing the circuit (as that is beyond some of us, namely me :) ).

I do have a hypothetical question for the masses: Is there a way to possibly use the MSII's stepper outputs as inputs to a middle circuit that COULD handle the higher amps? This might allow the use of some currently coded sections and also reduce cost/complexity by removing the tinyIO from the equation....
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Rotary engine OMP Stepper control?

Post by dontz125 »

Thank you, thank you - I'm here all week, be sure to tip your waitress ... :lol:

You could use the open loop boost control table to drive IAC1 (or 2); obviously, this can't be done on a turbo install, and would likely need a LOT of tuning time to get the oil flow right under all circumstances.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Rotary engine OMP Stepper control?

Post by jsmcortina »

Does that circuit offer any shoot-through protection?

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".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Rotary engine OMP Stepper control?

Post by dontz125 »

Each 'stack' is driven by a common output pin on the TC4427, so only one FET can be on at a time (barring transition times, which are (IIRC) in the 40ns range).
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Post Reply