Popular Post Ghostchips Posted November 5, 2019 Author Popular Post Share Posted November 5, 2019 Did you know those high voltage generator things they sell on ebay are actually really good for low revving engines as ignition parts? The increase in fuel economy is slightly better than the electronic ignition i am using currently. I suspect they burn away the spark plug electrodes over time though. I might explore better power supplies in the future & re-visit this idea. Do try it. 11 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted November 19, 2019 Author Share Posted November 19, 2019 Don't mind this, it's just a basic, primitive tune i spent the afternoon adjusting // constants won't change. Used here to set a pin number: const int coil1 = 3; const int coil2 = 5; const int coil3 = 7; const int coil4 = 9; const int sensorPin1 = A4; const int sensorPin2 = A1; const int sensorPin3 = A2; const int sensorPin4 = A3; int sensorValue = 0; int sensorThreshold = 200; int sensorMax = 0; // Variables will change: volatile int coilState = LOW; volatile int coilPin = LOW; volatile int sparkTriggerDelayActive = false; //added this to try & see if i can delay spark at low RPM. volatile int sparkTriggerDelay = 0; volatile unsigned long rpmCurrMicros= 0; volatile unsigned long rpmOldMicros = 0; volatile int sensor1TriggerCounter = 0; // counter for the number of button presses volatile int sensorTriggerState = false; // current state of the button volatile int lastsensorTriggerState = true; // previous state of the button/sensor in this case. // constants won't change: // Generally, you should use "unsigned long" for variables that hold time // The value will quickly become too large for an int to store const long dwell = 10; // but this is how long the "points" are open, open longer reduces duty cycle of coils. // constants won't change: const long coilCharge = 2; // interval at which to charge coil (milliseconds) void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(coil1, OUTPUT); pinMode(coil2, OUTPUT); pinMode(coil3, OUTPUT); pinMode(coil4, OUTPUT); pinMode(A4, INPUT_PULLUP); pinMode(A1, INPUT_PULLUP); pinMode(A2, INPUT_PULLUP); pinMode(A3, INPUT_PULLUP); } void activateCoilsIfLow(uint8_t inPin, uint8_t outPin) { volatile unsigned long timestamp = 0; sensorTriggerState = true; if (analogRead(inPin) <= sensorThreshold) { if (lastsensorTriggerState = (false)) { delay(sparkTriggerDelay); lastsensorTriggerState = true; } else { coilState = HIGH; coilPin = HIGH; digitalWrite(outPin, HIGH); timestamp = millis(); while (coilState == HIGH && coilPin == HIGH && (timestamp + coilCharge) > millis()); //Busy wait digitalWrite(outPin, LOW); coilPin = LOW; timestamp = millis(); while (coilState == HIGH && coilPin == LOW && (timestamp + dwell) > millis()); coilState = LOW; coilPin = LOW; } } else if (analogRead(inPin) >= sensorThreshold) { sensorTriggerState = false; if (sensorTriggerState != lastsensorTriggerState) { rpmOldMicros = rpmCurrMicros; rpmCurrMicros = micros(); lastsensorTriggerState = false; rpmConsultRatioTable(); } } } void loop() { activateCoilsIfLow(sensorPin1, coil1); activateCoilsIfLow(sensorPin3, coil3); activateCoilsIfLow(sensorPin2, coil4); activateCoilsIfLow(sensorPin4, coil2); } void rpmConsultRatioTable() { if (rpmCurrMicros - rpmOldMicros >= 497512) //sub250rpm { sparkTriggerDelay =0; } else if (rpmCurrMicros - rpmOldMicros <= 255024) //125rpm { sparkTriggerDelay =57; //prev'55 } else if (rpmCurrMicros - rpmOldMicros <= 169491) //177rpm { sparkTriggerDelay =39; //prev' 37 } else if (rpmCurrMicros - rpmOldMicros <= 127512) //250rpm { sparkTriggerDelay =27; //at 250 RPM and 45 degree sensor advance, this would be 30ms to TDC, subtract 2ms for coil charging and subtract more m.s. for advance } else if (rpmCurrMicros - rpmOldMicros <= 85008) //375rpm { sparkTriggerDelay =16; } else if (rpmCurrMicros - rpmOldMicros <= 61000) //500rpm { sparkTriggerDelay =11; } else if (rpmCurrMicros - rpmOldMicros <= 48000) //625rpm { sparkTriggerDelay =7; } else if (rpmCurrMicros - rpmOldMicros <= 41000) //750rpm { sparkTriggerDelay =2; } else if (rpmCurrMicros - rpmOldMicros <= 31500) //just under 1000rpm { sparkTriggerDelay =0; } } Posting this here so i can find it later if i'm not home. Side note: i am probably the only person using milliseconds to determine when to fire the plug compared to using actual degrees. 7 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted November 26, 2019 Author Share Posted November 26, 2019 Forget that one, the new tune is better. That one sounded like a series of tiny gearshifts, kind of like an early fast&furious movie. Eww why is there a digital thing on my dash? Oh, if i look closer it's an exhaust temp' sensor. But the gauge seems to have suffered damage from a 25 volt alternating current charging system. But it worked for a month so i guess i got enough data... 2 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted November 26, 2019 Author Share Posted November 26, 2019 /* i have no idea how this works * I gave up in frustration & just starting putting code anywhere, it works? Umm ok. * * There should be a second scale to test out for diagnostics, it's hidden * by the star slash symbos just like this text is, appers 'greyed out' in my uploader software * (arduino IDE i think it's called?) * Should be the same for you? */ // constants won't change. Used here to set a pin number: const int coil1 = 3; const int coil2 = 5; const int coil3 = 7; const int coil4 = 9; const int sensorPin1 = A4; const int sensorPin2 = A1; const int sensorPin3 = A2; const int sensorPin4 = A3; int sensorValue = 0; int starterDelay = 10000; int sensorThreshold = 200; int sensorMax = 0; // Variables will change: volatile int coilState = LOW; volatile int coilPin = LOW; volatile unsigned long startingDelayTimer = 0; volatile int startingDelay = false; volatile int sparkTriggerDelay = 0; //added this to try & see if i can delay spark at low RPM. volatile unsigned long timestamp = 0; volatile unsigned long rpmCurrMicros= 170000; volatile unsigned long rpmOldMicros = 0; volatile int sensorTriggerState = false; // current state of the button volatile int lastsensorTriggerState = true; // previous state of the button/sensor in this case. // Generally, you should use "unsigned long" for variables that hold time // The value will quickly become too large for an int to store const long dwell = 10; // but this is how long the "points" are open, open longer reduces duty cycle of coils. const long coilCharge = 2; // interval at which to charge coil (milliseconds) void setup() { // put your setup code here, to run once: pinMode(coil1, OUTPUT); pinMode(coil2, OUTPUT); pinMode(coil3, OUTPUT); pinMode(coil4, OUTPUT); pinMode(A4, INPUT_PULLUP); pinMode(A1, INPUT_PULLUP); pinMode(A2, INPUT_PULLUP); pinMode(A3, INPUT_PULLUP); Serial.begin(115200); } void activateCoilsIfLow(uint8_t inPin, uint8_t outPin) { if (analogRead(inPin) <= sensorThreshold) { sensorTriggerState = true; if (lastsensorTriggerState = false) { lastsensorTriggerState = true; } else if (lastsensorTriggerState = sensorTriggerState) //this isn't working with one equal sign. I'm so lost. { delayMicroseconds(sparkTriggerDelay); coilState = HIGH; coilPin = HIGH; digitalWrite(outPin, HIGH); timestamp = millis(); while (coilState == HIGH && coilPin == HIGH && (timestamp + coilCharge) > millis()); //Busy wait digitalWrite(outPin, LOW); coilPin = LOW; timestamp = millis(); while (coilState == HIGH && coilPin == LOW && (timestamp + dwell) > millis()); coilState = LOW; coilPin = LOW; } } if (analogRead(inPin) >= sensorThreshold) { sensorTriggerState = false; if (sensorTriggerState != lastsensorTriggerState) { rpmOldMicros = rpmCurrMicros; rpmCurrMicros = micros(); if (millis() >= (startingDelayTimer + 10000)) { if ((rpmCurrMicros - rpmOldMicros <= 169491)) //over approx' 177RPM { startingDelay = true; //no longer hold timing advance-retard at full advance, hope you moved the timing lever by now. } if ((rpmCurrMicros - rpmOldMicros >= 497512)) { startingDelay = false; //chances are you have to re-start the engine now. it'll take 10 seconds or more at over 200RPM to act normal again. startingDelayTimer = millis(); } } if (startingDelay == true) { rpmConsultRatioTable(); lastsensorTriggerState = false; } else { Serial.print ( " Starter delay period not ended " ); lastsensorTriggerState = false; } } } lastsensorTriggerState = false; //Why do i need to make that 'false' so many times to avoid it doing weird things? } void loop() { activateCoilsIfLow(sensorPin1, coil1); activateCoilsIfLow(sensorPin3, coil3); activateCoilsIfLow(sensorPin2, coil4); activateCoilsIfLow(sensorPin4, coil2); } void rpmConsultRatioTable() { if (rpmCurrMicros - rpmOldMicros >= 497512) //sub250rpm { sparkTriggerDelay =0; startingDelay = false; startingDelayTimer = millis(); } else if ((rpmCurrMicros - rpmOldMicros <= 255024) && (rpmCurrMicros - rpmOldMicros >= 169491)) //125rpm { sparkTriggerDelay =81000; //was 57, then 59 and i don't know what overflow is but i get an error for it here. Serial.print ( " RPM 125" ); } else if ((rpmCurrMicros - rpmOldMicros <= 169491) && (rpmCurrMicros - rpmOldMicros >= 127512)) //177rpm { sparkTriggerDelay =61000; Serial.print ( " RPM 177" ); } else if ((rpmCurrMicros - rpmOldMicros <= 127512) && (rpmCurrMicros - rpmOldMicros >= 85008)) //250rpm { sparkTriggerDelay =41000; //was 27 //at 250 RPM and 45 degree sensor advance, this would be 30ms to TDC, subtract 2ms for coil charging and subtract more m.s. for advance Serial.print ( " RPM 250" ); } else if ((rpmCurrMicros - rpmOldMicros <= 85008) && (rpmCurrMicros - rpmOldMicros >= 61000)) //375rpm { sparkTriggerDelay =31000; //was 16 Serial.print ( " RPM 375 " ); } else if ((rpmCurrMicros - rpmOldMicros <= 61000) && (rpmCurrMicros - rpmOldMicros >= 48000)) //500rpm { sparkTriggerDelay =23000; //was 11 Serial.print ( " RPM 500 " ); } else if ((rpmCurrMicros - rpmOldMicros <= 48000) && (rpmCurrMicros - rpmOldMicros >= 41000)) //625rpm { sparkTriggerDelay =7000; Serial.print ( " RPM 625 " ); } else if ((rpmCurrMicros - rpmOldMicros <= 41000) && (rpmCurrMicros - rpmOldMicros >= 30000)) //750rpm { sparkTriggerDelay =1670; Serial.print ( " RPM 750" ); } else if ((rpmCurrMicros - rpmOldMicros <= 30000) && (rpmCurrMicros - rpmOldMicros >= 25000)) //1000rpm { sparkTriggerDelay =1670; Serial.print ( " RPM 1000 " ); } else if ((rpmCurrMicros - rpmOldMicros <= 25000) && (rpmCurrMicros - rpmOldMicros >= 23076)) //1200rpm { sparkTriggerDelay =125; Serial.print ( "RPM 1200 " ); } else if ((rpmCurrMicros - rpmOldMicros <= 23076) && (rpmCurrMicros - rpmOldMicros >= 22222)) //just under 1300rpm { sparkTriggerDelay =20; Serial.print ( " RPM 1300 " ); } else if (rpmCurrMicros - rpmOldMicros <= 22222)//just over 1300rpm { sparkTriggerDelay =0; Serial.print ( "RPM over 1300" ); } } /* void rpmConsultRatioTable() //Very Retarded, for diagnostic purposes { if (rpmCurrMicros - rpmOldMicros >= 497512) //sub250rpm { sparkTriggerDelay =0; startingDelay = false; startingDelayTimer = millis(); Serial.print ( "RPM Zero" ); } else if ((rpmCurrMicros - rpmOldMicros <= 255024) && (rpmCurrMicros - rpmOldMicros >= 169491)) //125rpm { sparkTriggerDelay =162000; //was 57, then 59 Serial.print ( "RPM 125" ); } else if ((rpmCurrMicros - rpmOldMicros <= 169491) && (rpmCurrMicros - rpmOldMicros >= 127512)) //177rpm { sparkTriggerDelay =78000; Serial.print ( "RPM 177" ); } else if ((rpmCurrMicros - rpmOldMicros <= 127512) && (rpmCurrMicros - rpmOldMicros >= 85008)) //250rpm { sparkTriggerDelay =64000; //was 27 //at 250 RPM and 45 degree sensor advance, this would be 30ms to TDC, subtract 2ms for coil charging and subtract more m.s. for advance Serial.print ( "RPM 250" ); } else if ((rpmCurrMicros - rpmOldMicros <= 85008) && (rpmCurrMicros - rpmOldMicros >= 61000)) //375rpm { sparkTriggerDelay =32000; //was 16 Serial.print ( "RPM 375" ); } else if ((rpmCurrMicros - rpmOldMicros <= 61000) && (rpmCurrMicros - rpmOldMicros >= 48000)) //500rpm { sparkTriggerDelay =26000; //was 11 Serial.print ( "RPM 500" ); } else if ((rpmCurrMicros - rpmOldMicros <= 48000) && (rpmCurrMicros - rpmOldMicros >= 41000)) //625rpm { sparkTriggerDelay =14000; Serial.print ( "RPM 652" ); } else if ((rpmCurrMicros - rpmOldMicros <= 41000) && (rpmCurrMicros - rpmOldMicros >= 31500)) //750rpm { sparkTriggerDelay =2670; Serial.print ( "RPM 750" ); } else if (rpmCurrMicros - rpmOldMicros <= 31500) //just under 1000rpm { sparkTriggerDelay =0; Serial.print ( "RPM 1000" ); } }*/ 6 2 1 2 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted November 28, 2019 Author Share Posted November 28, 2019 Huh.... someone gave me rusty carb's. At first i couldn't find any, now i have spares. 4 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted December 3, 2019 Author Share Posted December 3, 2019 On 28/11/2019 at 20:57, SOHC said: I gave you like 7 carburetors and you lost them all, did you find the brass ones? Yes i found enough pieces of bronze ones to make about 80% of one, then faked the rest with bits from the rustiest one i could find. Not sure why i spent about...50 hours on it? It's a ...questionable? design, like, Victorian era "I just designed an engine that runs on gas & want to run it on liquid fuel & this is the best I have" design. Not horrible, just weird. They have a 'toilet lid' looking flapper in them and a bowl of gas, and tubes, and the flapper not only regulates how much air (yes air) gets sucked into the main jet but opens at speed as a kind of mixing valve? And doubles as a backfire arrestor. Weird, logical enough, but horridly old fashioned. 6 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted February 26, 2020 Author Share Posted February 26, 2020 Umm... People say strange things? https://youtu.be/VXRBjEnpMwY https://youtu.be/-MEn4SMv-4s 3 2 2 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted February 26, 2020 Author Popular Post Share Posted February 26, 2020 Most of the old pictures died but i'll see what i can do to replace them. So i learned you can use a pocket knife to carve totara & chewing gum to make a makeshift oil plug, or a frost plug. Just some pictures of some travels. 18 2 Quote Link to comment Share on other sites More sharing options...
Popular Post Ghostchips Posted March 5, 2020 Author Popular Post Share Posted March 5, 2020 I spent more money than i should have to acquire some plastic plugs. They were far more attractive than the copper & plastic, and less bulky. And they make this really satisfying noise when being unplugged, like stirring macaroni cheese or something. Found i could buy them for 1/4 the price direct from china. Or i could buy them for 400 times the china price at B.n.T. i recall seeing them in a workshop a long time ago and i wasn't even allowed to look at them because they were 'too good for my eyes' or something. I have since figured out the people at that workshop are dicks & need to be corporeally punished. So up yours NZ, i am good enough to see plugs. And if you don't like it, fuck you. https://youtu.be/u3GwSzpvNq0 A terrible video 9 1 Quote Link to comment Share on other sites More sharing options...
Ghostchips Posted March 12, 2020 Author Share Posted March 12, 2020 More video, but of playing around with an exhaust sensor. I still remember her voice after all these years & half expect her to tell me the time soon after the temp'. 4 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.