I inserted the 'input = (float)' code that you provided. It worked just fine, I was not able to notice any difference in operation just with changing the code yet. Tomorrow I will reduce the PID values by your suggested 2.4 times and adjust accordingly to find the best values.
I saved your code in a new sketch to review & understand it to the best of my ability, but that didn't get me very far... I believe I have a good understanding of the prescale divisors and how they produce the final frequencies in either Fast PWM or Phase Corrected PWM. Looking at the PWM code snippet you provided is the line below the line that actually dictates the frequency result?
TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12));
If so, how would I read that to understand what my end result would be?
Is there any difference for my application which PWM mode I use? If I am understanding things correctly, if I use Phase Corrected PWM at a prescale of 8 I would end up with roughly 3900hz? This frequency is closest to my preferred frequency.
Here is another really short video of a test I ran yesterday:
Ive attached a photo of the manifold I made for the valve, pressure sensor and all the lines. The valve is the top device and as we call it the ICP or Injector Control Pressure sensor is on the bottom, just a typical automotive 5v reference sensor i believe.
And lastly the reason for all this hard and confusing work... This is one of the reasons we are building and testing these injectors for, this is a truck that I have been working on for a few years, at the time of the video it was pushing around 550-600HP. Looking to close to double that soon.
