Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:08 01 Feb 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite IR TACHOMETER

Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1018
Posted: 05:47am 01 Feb 2026
Copy link to clipboard 
Print this post

Just going through some of the unfinished projects and came across a handheld IR TACHO that I built many years ago. I have very simple code to run this unit but I feel it can be made much more accurate and reliable. Here is the code currently:

' IR TACHOMETER PROGRAM FOR MICROMITE
' IR LED POWERED ON
' IR RECEIVER CONNECTED TO PIN 16

' INITIALISE PINS FOR 2 LINE LCD
LCD INIT 2,3,4,5,23,24

SetPin 16,FIN            'IR RECEIVER
Dim Spin,I

LCD 1,3,"IR TACHOMETER"
LCD 2,10,"  RPM"
Do
 Spin=0
 For I = 1 To 10
   Spin = Spin + Pin(16)
 Next I

 Print Spin/10;" Hz"

 LCD 2,1,Str$(Spin*6)
 Pause 500
 LCD 2,1,"      "
Loop


Has anyone any suggestions to improve this program?

OA47
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 382
Posted: 06:44am 01 Feb 2026
Copy link to clipboard 
Print this post

Tbh, I don't get the program logic at all...
                                                                 
73 de OE1HGA, Gerald
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2962
Posted: 07:06am 01 Feb 2026
Copy link to clipboard 
Print this post

  MM 5.05.05 manual said  Counting Inputs
The pins marked as COUNT can be configured as counting inputs to measure frequency, period or just count
pulses on the input.
For example, the following will print the frequency of the signal on pin 15:
> SETPIN 15, FIN
> PRINT PIN(15)
110374
>
In this case the frequency is 110.374 kHz.
Divide by 60 for RPM.

The one I built uses an IR remote control receiver and the IR LED is fed with a 38kHz 50% PWM output.
This gives it a much better tolerance for high ambient light and works at a greater distance due to the narrow bandwidth, high gain and excellent AGC of the IR receiver.
Tested to 30,000 RPM.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026