Instrumentation error with Propeller on Spin code.
yarisboy
Posts: 245
I just finished my error check on the tachometer that I'm writing a story on. On the left I have a Propeller giving me a frequency. On the right I have my Propeller tachometer. For an input frequency that would yield a theoretically perfect 600 RPM I get 597. All the way up the scale to 8000 RPM my value coming back is 3 RPM low. I did not expect a decreasing percent error up the scale. A fixed offset error seems unlikely. Could it be that gain errors in the Props are canceling each other out. If I were to believe my (moron level) math skills I might jump to the conclusion that I have a -0.1% error at idle and a -0.04% error at 7000 RPM when my ECM starts retarding the timing. Any thought from the old gray beards and code warriors?
My ebay 20 MHz scope just doesn't have enough resolution on the time base to make any judgments with. According to the results I'm getting now both the commercial tachometer in my auto shop and the BS2 tachometer I built are way off by comparison.
My ebay 20 MHz scope just doesn't have enough resolution on the time base to make any judgments with. According to the results I'm getting now both the commercial tachometer in my auto shop and the BS2 tachometer I built are way off by comparison.
Comments
Just for clarification: is the Propeller on the left giving you a frequency output signal that goes straight into the signal input of the Propeller (tachometer) on the right? or is the left Prop generating a frequency that drives a mechanical system that the right Prop tachometer is reading?
Also, it might help if you post the code. If you have delays in a Repeat loop caused by outputting to LCDs or something or calling up other methods, maybe it's causing some kind of discrepancy?
I'm also seeing a small drift related to how long the system has been running. I looked at the curve for the xtals and at 25 C it is essentially flat. I'm not sure how much integer math truncation has to do with it. In the real (motor vehicle) world the errors are silly small. Resetting the ECM simulator wipes out the small time dependent drift.
So I take it that the ECM simulator is the Prop on the left?
The "prop-tach" is the Prop on the right?
And your optocouplers are what connect these two Props?
And your code is...?