Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:52 03 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: 1021
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: 384
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: 2967
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.
Multiply 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.
Edited 2026-02-01 17:08 by phil99
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5656
Posted: 11:18am 01 Feb 2026
Copy link to clipboard 
Print this post

Hi OA47,

remember...

https://www.thebackshed.com/forum/ViewTopic.php?TID=16669&P=2#217359

Volhout
PicomiteVGA PETSCII ROBOTS
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1021
Posted: 11:33pm 01 Feb 2026
Copy link to clipboard 
Print this post

Volhout, thankyou for bringing that to my attention. Obviously my static brain ram backup battery has faded and I have been down this road before.


OA47
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5656
Posted: 08:05am 02 Feb 2026
Copy link to clipboard 
Print this post

Hi OA,

You simply picked up again where you left of last time.

Volhout
PicomiteVGA PETSCII ROBOTS
 
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