...Dwell and advance are two totally different things.
Still figuring this all out myself but I'm not really sure what you're trying to calculate.
Speculating, but if your sensor is at TDC you'll have to calculate how long to wait after TDC to start the dwell, and then how long to wait to stop it.
Start backwards from the advance.
If you want 10 degrees advance, you need to calculate the rpm, then calculate how long it will take for the crank to rotate 350 degrees at that rpm.
Coils fire when you stop charging them, so that's when you end the dwell time in order to have 10 degrees total ignition advance.
Dwell would have to start 5ms before then.
I think dwell and advance are more connected than we think, because they are both measured in time.
I should also mention that oil started pouring out of the engine side hole (where the pickup cover is, obviously I had it off). I have been cranking it on and off for weeks and it hasent leaked a drop. After I had the first pop, oil began pouring out. Dave, any idea why? I thought that perhaps that now that there was compression/ignition in the cylinder, some of that pressure would be translated to the crankcase and push oil to a higher level? It poured out, very similar to taking the drain plug out. Didnt spray or have pressure really.
I re read my post and it was sorta confusing. The main problem is that how do I calculate 350º? If I use time, that
should work reliably - once the engine is running, because the change in acceleration is relatively low. However, while cranking, its acceleration just too sporadic. I calculated 350º at 100 RPMs (thats how fast I guessed it was cranking). 100RPMs is 1º/1.7ms according to my calculations. That means that 4ms of dwell would spin the motor 2.3º. My calculation for 350º at 100 RPMs is 607ms. Theoretically, if you add 4ms (of dwell) to the 350º that would be 352º which is 611ms which is 8º BTDC, or 352º after the sensor trigger. I also tried 600ms. The manual calls for 10º+-, so while 8º isnt optimal - something should happen, right? Nothing.
My process was: carbs on, no airbox/filters, spray a little starting fluid in the spark plug hole, put spark plug in, then plug boot on - crank. Its worth mentioning that I dont have much oil in the engine. Probably a 1/4 of what should be in there.
The problem is even if something did happen, and it fired once. The engine would accelerate very fast, (way above 100 RPMs) and all of the timing (namely 607ms of delay or 350º) is now completely wack, because even at 300RPMs, (which is what im guessing it spins at
minimum after a single pop/ignition in the cylinder) 350º is only 194ms. Of course, the advance would still be coded in at 607ms, and would mean that the engine has turned almost 3 times (350º x 3 = 1050º) and the spark plug is firing at who knows where.
Im thinking what I could possibly do, is have a set of tables with values for specific RPMs that, depending on what RPM the sensor picked up (aka the actual engine speed), it would use that value and change the advance accordingly. I need to learn about interrupts to write something like that.
The probelm with that is that one pop will only accelerate the engine for so long. By the time it gets back to the sensor at TDC, it may have decelerated enough that whatever RPM the arduino senses, might not be the actual engine speed and then once agian, the advance values are inaccurate.
It seems that more sensors/different sensors are in order? Im not sure but Im very hesitant to do that.
Maybe the 2 sensors (left and right TDC) could be used in tandem to measure RPM during cranking. Arduino would know how long it is "supposed" to take to get 180º (aka the next sensor) and if it takes less time, viola - the sets timing accordingly. There would still be the point from 180º to 350º that it would be "blind" from acceleration.
Lets keep in mind that the Pamco ignition does this with just 2 hall sensors. What are we missing?
I was really hoping that the engine would at least pop when at TDC. If we could get it to pop/idle with zero advance (aka TDC) that would help, alot.
..And I'll bug you to add a MAP sensor for load compensation. That can be discussed later.
..
Dreams. I need those. I am committed to this - MY MOTORCYCLE WILL RIDE AGIAN.