I build Stirling model engines and installing a hall effect sensor to measure the RPM of the flywheel and also an LM335 temperature sensor (it's a heat engine), and would like to add more temp sensors once I can get my head around the first problem.
Sorry if this has been asked before, but could not find the answer on the forum, to my needs.
I have connected the hall effect sensor output too pin17 (input 0) with the following code to my 18X:
main:
count 0, 5000, w1 ‘ count pulses in 2 seconds
debug w1 ‘ display value
goto main ‘ else loop back to start
This worked ok for a test when I passed the magnet in front of the sensor. The confusing part is whether to use the count or pules commands. The engine runs anywhere from 60 to 1000 RPM depending on the amount of heat applied and other variables. Can anyone suggest the best code to use, and the maths involved?
I would also be interested in any program that can display the results on the screen in a nice looking format, RPM and Temp gauges if any available,
Thank in advance for any help,
Kind regards
Smuttley (Steve)
Sorry if this has been asked before, but could not find the answer on the forum, to my needs.
I have connected the hall effect sensor output too pin17 (input 0) with the following code to my 18X:
main:
count 0, 5000, w1 ‘ count pulses in 2 seconds
debug w1 ‘ display value
goto main ‘ else loop back to start
This worked ok for a test when I passed the magnet in front of the sensor. The confusing part is whether to use the count or pules commands. The engine runs anywhere from 60 to 1000 RPM depending on the amount of heat applied and other variables. Can anyone suggest the best code to use, and the maths involved?
I would also be interested in any program that can display the results on the screen in a nice looking format, RPM and Temp gauges if any available,
Thank in advance for any help,
Kind regards
Smuttley (Steve)