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

Rotary engine OMP Stepper control?

Postby shadowplane676 » Tue Dec 03, 2013 8:04 am

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?
shadowplane676
Helpful MS/Extra'er
 
Posts: 92
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Postby Matt Cramer » Tue Dec 03, 2013 9:29 am

This would need custom code.
Matt Cramer
Super MS/Extra'er
 
Posts: 13769
Joined: Thu Apr 16, 2009 8:08 pm

Re: Rotary engine OMP Stepper control?

Postby shadowplane676 » Tue Dec 03, 2013 9:36 am

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?
shadowplane676
Helpful MS/Extra'er
 
Posts: 92
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Postby dontz125 » Tue Dec 03, 2013 8:46 pm

What about using the JBPerf TinyIOx with the new generic PWM outputs, and feed the PWM signal to a PWM-Stepper controller?
dontz125
Super MS/Extra'er
 
Posts: 3539
Joined: Mon May 11, 2009 7:14 pm
Location: Scarborough, ON

Re: Rotary engine OMP Stepper control?

Postby muythaibxr » Tue Dec 03, 2013 11:23 pm

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.

:msq:
muythaibxr
Site Admin
 
Posts: 8096
Joined: Thu Oct 14, 2004 12:48 pm

Re: Rotary engine OMP Stepper control?

Postby shadowplane676 » Wed Dec 04, 2013 6:08 am

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
shadowplane676
Helpful MS/Extra'er
 
Posts: 92
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Postby racingmini_mtl » Wed Dec 04, 2013 10:02 am

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
racingmini_mtl
Super MS/Extra'er
 
Posts: 8041
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: Rotary engine OMP Stepper control?

Postby shadowplane676 » Wed Dec 04, 2013 10:26 am

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: 92
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Postby shadowplane676 » Thu Dec 05, 2013 8:20 am

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
shadowplane676
Helpful MS/Extra'er
 
Posts: 92
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Postby slyrye » Sat Dec 14, 2013 6:17 pm

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
slyrye
Experienced MS/Extra'er
 
Posts: 207
Joined: Sun Aug 12, 2007 2:41 pm
Location: Philippines

Re: Rotary engine OMP Stepper control?

Postby phoenix3d » Sat Apr 18, 2015 2:57 am

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.
phoenix3d
Experienced MS/Extra'er
 
Posts: 176
Joined: Wed Mar 19, 2008 2:12 pm
Location: South Africa

Re: Rotary engine OMP Stepper control?

Postby muythaibxr » Sat Apr 18, 2015 4:00 am

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.

:msq:
muythaibxr
Site Admin
 
Posts: 8096
Joined: Thu Oct 14, 2004 12:48 pm

Re: Rotary engine OMP Stepper control?

Postby Reverant » Sat Apr 18, 2015 5:03 am

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
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost - InCar PC
User avatar
Reverant
Super MS/Extra'er
 
Posts: 994
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Rotary engine OMP Stepper control?

Postby dontz125 » Sat Apr 18, 2015 7:26 pm

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

Re: Rotary engine OMP Stepper control?

Postby Reverant » Sun Apr 19, 2015 2:30 pm

Don't you need P-channel mosfets on the top?
The man behind MS Labs
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost - InCar PC
User avatar
Reverant
Super MS/Extra'er
 
Posts: 994
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Rotary engine OMP Stepper control?

Postby dontz125 » Sun Apr 19, 2015 5:58 pm

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
dontz125
Super MS/Extra'er
 
Posts: 3539
Joined: Mon May 11, 2009 7:14 pm
Location: Scarborough, ON

Re: Rotary engine OMP Stepper control?

Postby shadowplane676 » Fri Jul 24, 2015 7:49 am

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....
shadowplane676
Helpful MS/Extra'er
 
Posts: 92
Joined: Thu Oct 27, 2005 10:29 am

Re: Rotary engine OMP Stepper control?

Postby dontz125 » Fri Jul 24, 2015 10:27 am

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

Re: Rotary engine OMP Stepper control?

Postby jsmcortina » Fri Jul 24, 2015 10:33 am

Does that circuit offer any shoot-through protection?

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

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 34077
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Rotary engine OMP Stepper control?

Postby dontz125 » Fri Jul 24, 2015 6:33 pm

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

Next

Return to MS2/Extra Development

Who is online

Users browsing this forum: MaroonMonsterLS1 and 2 guests