Page 1 of 1

RPM resolution?

Posted: Thu Aug 29, 2019 3:32 am
by chimchim
Well, I've been lurking here for a couple weeks studying up on how to create an RPM and Temp sensor unit. I have successfully created a working module using a 5V pro mini and some left over 3D printer heat bed 100k NTC Thermistors. I also picked up a hall sensor that will mount to the hub on my DA170.
All sensors are functioning as expected and I can see readings on my FrSky X9D+ running OpenTx2.?. I also have the new(er) glider 6 channel Rx with the built in altimeter, and a 40A FrSky current sensor. All sensors are playing nice together and all available on the menu telemetry page.
Now, my question of the day can I get more granular RPM display than in units of 60? It appears that the Hz value being sent from the sensor module to the Rx is only in integer format rather than decimal.

Thanks for any help you can provide in addressing that question.

Re: RPM resolution?

Posted: Thu Aug 29, 2019 9:44 pm
by chimchim
Well, I might have resolved this myself. I edited the oXs_general.cpp file and altered the line that calculates the RpmValue. I added in a multiply by 60 there to switch from Hz to cycles per minute. That should get rid of the coarse RPM steps and still have rapid sampling. One strange thing I noticed, both before and after my code change is that the OpenTx display of RPM bounces from zero to some value regardless of how well I manually swing a magnet in front of the hall sensor. Perhaps that will go away with actual use on the engine, so not too concerned about it yet.