alfadriver
alfadriver MegaDork
8/1/18 7:00 p.m.

So this is kind of an odd question...

MS is a very established controller, and it works great.  

But instead of controlling an injector, and have it timed to matched the engine rotation, all I need is a simple servo controller output. 

The reason is that on late 60's to early 80's Alfas, they used a mechanical fuel injection pump, where there's a mechanical computer that basically controls an arm that moves a rail that changes the injection...

Anyway, in many vintage racing circuits, it's allowed to replace that mechanical computer with a digital one that moves the rail that controls the injection pump.  And my friend would like to try that.

In theory, one can make an arduino that can control that, but I was curious if a simple MS can be modified to control a servo instead of the injectors...

Thoughts?

Stefan
Stefan GRM+ Memberand MegaDork
8/1/18 7:35 p.m.

That are often modified to control stepper motor style air bypass solutions.  So I'd say its possible, though I don't think it would enjoy not having injectors connected.

NordicSaab
NordicSaab Dork
8/1/18 7:49 p.m.

Anything is possible... since you are only running one driver with one input, it seems like the arduino would be the way to go. 

alfadriver
alfadriver MegaDork
8/1/18 7:55 p.m.

In reply to NordicSaab :

It would be, but MS is already programed to work for the exact job- just driving injectors instead of a servo representing the same thing,.  And it can be calibrated on the fly- whereas I have to program the whole set up for an arduino (or any other microcontroller).  

Matthew Kennedy
Matthew Kennedy GRM+ Memberand Reader
8/1/18 8:38 p.m.

https://rusefi.com/wiki/index.php?title=Main_Page

This is what I'm running on my Volvo.  Considerably more flexible than Megasquirt, and open source to boot.

I'm already working on modularizing the ignition and fuel control, to decouple the per-injection fuel mass calculation from an injector opening period.  Something like your need could be simply swapped in instead of driving traditional PWM injectors.

Matthew Kennedy
Matthew Kennedy GRM+ Memberand Reader
8/1/18 8:41 p.m.

And here's my hack idea: build something with an Arduino that reads the fuel pulse width from the Megasquirt, then computes where it should move the servo on the linkage.  You can let the MS do all of the fuel/ignition logic it already has, but offload the "injectors" to an Arduino that's moving the mechanical bits.

Stefan
Stefan GRM+ Memberand MegaDork
8/1/18 9:07 p.m.

In reply to Matthew Kennedy :

I think you missed what they are trying to do:

They are wanting to drive the mechanical fuel injection pump solution with the MegaSquirt driving a stepper motor (servo) to control the fuel pump.

So it would be like the FrankenCIS solution that some of the Porsche, Mercedes, etc. are doing now using a MicroSquirt to drive a solenoid on the CIS fuel distributor.

AwesomeAuto
AwesomeAuto Reader
8/1/18 9:36 p.m.

How would the servo be controlled? On/Off, PWM, Square wave?

Robbie
Robbie GRM+ Memberand PowerDork
8/1/18 9:41 p.m.

In reply to AwesomeAuto :

Yeah, thats what I was thinking, can't you just get a servo motor that is pwm controlled? With a right sized capacitor, pwm is basically creating an average analog voltage somewhere between high and low.

Then it's like running Ms with just one injector.

 

Matthew Kennedy
Matthew Kennedy GRM+ Memberand Reader
8/1/18 11:01 p.m.

In reply to Stefan :

I understand the problem.  I've thought about doing this before to supply extra fuel to a challenge car engine, but that's another story...

For the non-hack, rusEfi approach: The modularity would let you replace the module that converts fuel mass -> pulse width with a module that converts fuel mass -> servo position, then drives the motor.

For the hack MS + Arduino approach: Let the MS think that it's driving injectors.  Connect the injector output(s) from the MS to an Arduino or something, which reads the pulse width, and drives the motor appropriately to set the CIS to dump the corresponding amount of fuel.  The MS doesn't know anything is different, and the only code/hardware that have to be developed are to convert pulse width to servo position.

alfadriver
alfadriver MegaDork
8/2/18 6:24 a.m.
Robbie said:

In reply to AwesomeAuto :

Yeah, thats what I was thinking, can't you just get a servo motor that is pwm controlled? With a right sized capacitor, pwm is basically creating an average analog voltage somewhere between high and low.

Then it's like running Ms with just one injector.

 

It is and it isn't.  One one hand, it 100% is, that servos run on a PWM, from what I can tell on a 1-2ms range (which asks a different question).  What I don't know if that frequency needs to be fixed or not- as the frequency of an injection pulse varies with engine speed.  If it doesn't matter, then an MS can work of the resolution of the output of the signal is that fine.  If it does, then that needs to be dealt with.  Heck, you can set MS to run batch fire so it's sending 2 pulses per rev onto a driver.  But I still wonder about the frequency of that.

If the input frequency doesn't matter, the "problem" that servos tend to run at 5V instead of 12 is also an easy solution- just supply 12V.  Injector drivers all ground the signal.

So if anyone can tell me if frequency matters or not, then an MS or the russefi would both be the easy solution.

 

edit: Frequency does matter.  Servos need a PWM every 20ms, or it's at a fixed 50 hz.  

alfadriver
alfadriver MegaDork
8/2/18 6:55 a.m.
Stefan said:

That are often modified to control stepper motor style air bypass solutions.  So I'd say its possible, though I don't think it would enjoy not having injectors connected.

Just thinking about that some more- do you know what that signal looks like, or any MS threads that describe that?

Kind of answering my own question, servos are driven via a fixed frequency signal, just 0-5V digital, in a pretty narrow ms range.  So of that stepper motor controller output is the right signal, then it can easily be used to drive a servo (again, almost all "control" for a engine computer just supply ground, so as long as the driver was a clean X volt signal, you can hook anything through the a driver).

AwesomeAuto
AwesomeAuto Reader
8/2/18 7:17 a.m.

Most versions of megasquirt have PWM outputs of some sort, whether it be for boost control or idle control.

MadScientistMatt
MadScientistMatt PowerDork
8/2/18 7:23 a.m.

These guys have modified the MicroSquirt code to work with CIS:

http://www.frankencis.com/

alfadriver
alfadriver MegaDork
8/2/18 7:25 a.m.

Looks like the boost control might work, although it's not exactly a large map. 

Better than nothing, though.

alfadriver
alfadriver MegaDork
8/2/18 7:29 a.m.
MadScientistMatt said:

These guys have modified the MicroSquirt code to work with CIS:

http://www.frankencis.com/

Now that is cool.  And may be exactly what we are looking for.

You'll need to log in to post.

Our Preferred Partners
yYAM0E1hxXO9tlYyJsb0LhydTvbWKvNtA3Yua3EHonWdRq44rtC5zzytKvMS7AZx