dalathegreat / Arduino-Coil-On-Plug

Source code for converting distributor based Nissan engines to more modern coil on plug ignition
MIT License
20 stars 13 forks source link

Add rpm measurement #3

Open dalathegreat opened 7 years ago

dalathegreat commented 7 years ago

RPM measurement is needed for smart activation/de-activation of optional wasted spark operation. Before this can be implemented, the other issue with disturbances from running wasted spark needs to be resolved.

dalathegreat commented 7 years ago

Branch 'dalathegreat-rpm-test' contains prototype rpm measurement. Before this can be even considered for merging with main branch wasted spark needs to be stable.

rektbink commented 7 years ago

You may want to consider using sequential ignition during cranking due to the ECU using batch injection during cranking. It may be the reason you have a fail to start sometimes when using wasted spark.

dalathegreat commented 7 years ago

Well spotted ๐Ÿ‘ You are correct!

I will revise it for the next version

majdimohammad commented 5 years ago

Hello, any update with RPM measurement? I tested, and detect the sequence in fine. But it will be problem if car switch on ig 2, not totally off the arduino. The program stuck in syncAchieved. After resume crank, it will fire at wrong position. If any how we can reset the loop without switch off the arduino, these will solve the issue.

Since it using interrupt, Pulsein no longer available, it will interupt the firing sequence...

rektbink commented 5 years ago

Are you using wasted spark or sequential ignition mode?

majdimohammad commented 5 years ago

Im using sequential mode.. but using waste spark also same i believed. If any way we can reset the syncAchieved back to Zero 0 after running without pressing reset button or turn off the arduino?

dalathegreat commented 5 years ago

Yes, very easy to do! Just add a timer that starts counting if we haven't had any interrupts trigger for a time (say 2-5second), and if we haven't gotten any interrupts, set syncAchieved == 0

majdimohammad commented 5 years ago

Nice thank you, it work now. I used long press button code. When no pulse, CK signal will go direct HIGH for 2-3 second, and it will reset the syncAchieved. So far tested on engine simulation no random firing. It will reset and start new ignition firing when only after CP detect. Will test on real engine next week. I will update again.

majdimohammad commented 5 years ago

If these work, we can start convert 4G63 batch injector and waste spark to sequential system ;)

dalathegreat commented 5 years ago

@majdimohammad Cool! Do post the code if you want to! ๐Ÿ‘ Good luck with the project!

majdimohammad commented 5 years ago

Yes i will post the code after the test. Is anyone have sr20 waveform fullcycle.. so i can compare and count the trigger between CK and CP?

rektbink commented 5 years ago

I'll dig out a waveform, unless Daniel has one handy. Basically cylinder 4 has a large window, and cly 1-3 has small windows. The large window is 12 pulses low to high, and the small window is 4 pulses low to high. There is appx 90 pulses between windows. The ECU decides where in the cyl windows to fire the ignition.

An oscilloscope is really helpful in this situation.

akilamarquiel commented 5 years ago

Hi guys. Is it possible to run this on different engine? Like honda d15y. Thank you

rektbink commented 5 years ago

No, the sr20 and the d15 use different methods of engine position tracking. A majority of the Honda's use a hall sensor on the crank to track engine position. The issue being is a variable reluctance sensor is needed to convert the hall signal to a logic signal.

akilamarquiel commented 5 years ago

Oh i see. How sad. ๐Ÿ˜ฅ anyways thanks for your fast reply.. maybe i should try speeduino instead. Thnx again. Cheers๐Ÿ‘

majdimohammad commented 5 years ago

I'll dig out a waveform, unless Daniel has one handy. Basically cylinder 4 has a large window, and cly 1-3 has small windows. The large window is 12 pulses low to high, and the small window is 4 pulses low to high. There is appx 90 pulses between windows. The ECU decides where in the cyl windows to fire the ignition.

An oscilloscope is really helpful in this situation.

Yes, i used 8 channel hantek oscilloscope ;) without these tool, it we will never know what happen in there.

If u have a full picture of trigger disk also will help..

majdimohammad commented 5 years ago

645195 Nissan Trigger