For anything you'd like to see added to Speeduino
By klotzy_550
#39252
Hi everyone,

I think this topic came up a few years ago, but I couldn't find anything relevant on it when searching the forum. I want to setup a phase detection using the Map sensor on a single cylinder engine. I am sure that I could achieve this purely in software, but in the meantime I was planning on adding in a little architecture within the read map cycle minimum code that generated a pulse that was proportional to current speed. This pulse would happen just after the minimum had been recorded. My only real concern with this method is subtle variation in where this cycle minimum lies on a crank angle basis.

What are people's general consensus on this? What other methodologies are available minus the physical cam sensor?

Thanks,


klotzy_550
By klotzy_550
#39253
Something along these lines:
Code: Select all
case 2:
  //Minimum reading in a cycle
  if (currentStatus.RPM > 0 ) //If the engine isn't running, fall back to instantaneous reads
  {
	if( (MAPcurRev == currentStatus.startRevolutions) || ((MAPcurRev+1) == currentStatus.startRevolutions) ) //2 revolutions are looked at for 4 stroke. 2 stroke not currently catered for.
	{
	  #if defined(ANALOG_ISR_MAP)
		tempReading = AnChannel[pinMAP-A0];
	  #else
		tempReading = analogRead(pinMAP);
		tempReading = analogRead(pinMAP);
	  #endif
	  //Error check
	  if( (tempReading < VALID_MAP_MAX) && (tempReading > VALID_MAP_MIN) )
	  {
		if( (unsigned long)tempReading < MAPrunningValue )
		{ 
		  MAPrunningValue = (unsigned long)tempReading; //Check whether the current reading is lower than the running minimum
		  digitalWrite(pinTrigger2, LOW);	// generate falling edge for trigger 2 once the INT Valve starts to open until the minimum value
		} 
	  }
	  else { mapErrorCount += 1; }
	}
	else
	{
	  //Reaching here means that the last cylce has completed and the MAP value should be calculated

	  //Update the calculation times and last value. These are used by the MAP based Accel enrich
	  MAPlast = currentStatus.MAP;
	  MAPlast_time = MAP_time;
	  MAP_time = micros();

	  currentStatus.mapADC = MAPrunningValue;
	  currentStatus.MAP = fastMap10Bit(currentStatus.mapADC, configPage2.mapMin, configPage2.mapMax); //Get the current MAP value
	  if(currentStatus.MAP < 0) { currentStatus.MAP = 0; } //Sanity check
	  MAPcurRev = currentStatus.startRevolutions; //Reset the current rev count
	  MAPrunningValue = 1023; //Reset the latest value so the next reading will always be lower
	  digitalWrite(pinTrigger2, HIGH);	// reset the pulse for Trigger 2
	}
  }
  else { instanteneousMAPReading(); }
  break;
User avatar
By PSIG
#39257
Are you simply looking to establish a known stroke event within roughly 180°, e.g., which stroke is "intake" ±90°? Or more info than that?

As Speeduino already knows the crank angle at any moment, this could be referenced to the minimum or maximum MAP signal and output as the cycle signal, or cycle signal crank position + or - x° if required, perhaps as a TA value. BTW, an alternative I have used before is a pressure sensor reading the throttle bore at the butterfly or bore venturi. While there is lots of noise, there is also one strong primary signal that accompanies airflow (not manifold vacuum) at that restricted point.

For others: Cycle signals are fun to brainstorm because they can be any consistently repetitive signal every 720° on a 4-stroke, so rocker arm position, valve position, spring compression (transducer/others), timing gear, cam lobe, chain link, intake pulse, exhaust pulse (watch harmonics), idler gear pulse, proximity sensor pulse, cylinder pressure (multiple methods), crankcase pressure, spark discharge voltage (higher on compression), compression release valve position, oil pump position, fuel pressure pulses, and so on. Each has its pros and cons, and applicability, specific to the application of course. All of these can be a variety of sensing methods, from Hall to VR, magneto-resitive, IR, laser, transducer, sonic, proximity, density, and so on.
8-)
David
By klotzy_550
#39259
Yes, just trying to establish a known stroke event within a semi defined window. Using this information I would like to run sequential fueling / Spark if possible. Ultimately if I cannot get it to work as desired I can resort to batch fueling and wasted spark.

I already have an encoder on the crankshaft, but no cam encoder. The OEM ecu runs sequential fuel / ignition and detects phase with the map sensor signal.

Does this seem feasible?
User avatar
By PSIG
#39261
I don't see why not, and @jama is working on the multiple-MAP stuff right now, including a cycle-sense routine. Most of it is on Slack in the #dev channel. I have heard of others using it. The venturi/blade signal I used was not for cycle sensing, but the intake airflow pulse was unmistakable on a crude vacuum gauge, and why I think it might be an option for your purposes. This was discussed here a long time ago I'm pretty sure. :? Any way to help?

David
By klotzy_550
#39270
Thanks for the input David, much appreciated.

I have been reading through the Speedy Manual lately, trying to catch back up with where Speeduino is currently at. One thing I cannot definitively determine is if it simultaneously supports Cam and Crank, both with missing teeth. For example: Crank: 36-1, Cam: +1. If I run Speeduino without a cam signal, will it inject fuel every revolution? Half the desired fuel quantity every 360°?

-Klotzy_550
User avatar
By PSIG
#39273
klotzy_550 wrote: Tue Nov 26, 2019 3:46 pm… One thing I cannot definitively determine is if it simultaneously supports Cam and Crank, both with missing teeth. For example: Crank: 36-1, Cam: +1.
If you mean a simple 36-1/1, then yes it does, e.g., many Fords are 36-1 crank with a single pulse per-cycle from the "cam" sensor. Speeduino can use missing-tooth crank-only, or missing and either a 1-pulse cam or 4-1 pulse cam. If it has cam signal, it doesn't need missing teeth on the crank (Dual Wheel). Other wonky combinations with specific decoders.
klotzy_550 wrote: Tue Nov 26, 2019 3:46 pmIf I run Speeduino without a cam signal, will it inject fuel every revolution? Half the desired fuel quantity every 360°?
If you set it that way, which is effectively "double-shot sequential", commonly used by the OEMs today such as Daimler-Chrysler. Conversely, it can fire once per-cycle, though it's not timed for which cycle it's using.

David
By klotzy_550
#39278
Awesome, great to hear! Thanks again for the input.

I rewired a few grounds and tested the TPS and rel[…]

Thanks, car runs great now !!! Going to drift even[…]

sauver moteur v8

bonsoir je m appel jean marie et j habite en Franc[…]

Ignition Angle doubled?

I just erased the flash, went back to 2023-10, cre[…]

Still can't find what you're looking for?