Hello ! Do you help write sketch based on crankshaft position sensor pulse information. The engine has crankshaft reluctor wheel with 58 teeth and two teeth missing ? Thanks in advance for your answer !
58The engine crankshaft reluctor wheel has 58 teeth or 58 pulses takes time around 80 milliseconds at the engine idle speed RPM750 but Arduino will not focusing on time rather focusing on counting 58 pulses. Two missing teeth gap is top dead centre TDC of the crankshaft zero degree. Output activation for 3 pulses takes 4.14 milliseconds. The pulse width modulation time should start before top dead centre TDC. At 330 degrees of the crankshaft position. Each tooth of 58 teeth equals to 6 degrees of the engine crankshaft. 6 degrees x 3 teeth = 18 degrees. Before top dead centre is 3 teeth equals to 18 degrees. 360 degrees - 18 degrees =342 degrees. If we take 58 pulses which is equal 342 degrees of the engine crankshaft position then each degree it takes 1.38msx58teeth=80.04ms. 3 pulses will takes time around 4.14 milliseconds just for pulse width modulation which should begin at 58teeth - 3teeth =55 teeth. The pulse width modulation for each injector bank should begin at 55th pulse which is equal to 330 degrees of the crankshaft position. So here is the formula when Arduino should activate one output pin for one injector bank then another output pin for another injector bank same way next engine revolution. The Arduino should activate each injector bank by each engine revolution at 55th pulse which is equal to 330 degrees of the engine crankshaft position. After 330 degrees begins two missing teeth is the gap. Two missing teeth gap is for to activate next injector bank and put it on hold for 55 pulses because 56-57-58 pulses is for pulse width modulation only. The Arduino has 2.76 milliseconds equals 12 degrees of the crankshaft for switch on another injector bank. That is not so much time for switching. After 55 pulses output pin ready to be activated for 3 pulses then turn off.
@andrew1q Your previous topic on this project Create code for Arduino was closed after 300 posts were made in it, many of which were you posting the output of ChatGPT but not answering questions put to you.
If this topic goes the same way then it too will be closed and you run the risk of being banned from the forum
Please answer any questions asked of you and do not simply post reams of ChatGPT output, most of which is irrelevant
What is hard to read for you ? Maybe you donβt understand something how and when output pins of the Arduino should be activated ? The one output pin should be activated just for 3 pulses or 3 teeth. 3 pulses and 3 teeth is the same thing. Output pin of the Arduino should be activated at 330 degrees of the crankshaft position then after that 2 missing teeth which is the gap of 12 degrees. After the gap first tooth is number 1.
I am trying to write a code to this point only for now.
I agree with @TomGeorge, your post is hard to read. It is a single slab of text rather than being split into logical paragraphs with blank lines between them
This makes reading it and keeping track of what is being said very difficult and you can easily glance back in the post to remind yourself what has been said
Switch Timing.
Do not mess with that ! No after the 55th pulse 330 degrees) the Arduino has 2.76 milliseconds 12 degrees of crankshaft rotation to switch to the next injector bank.
In order for users to understand what you are saying it needs to be presented in an easy to read form. Here is the text of your original post split into paragraphs. Can you see how much easier it is to read ?