Contactless digital tachometer using microcontroller

Received Nov 28, 2019 Revised Jun 17, 2020 Accepted Jun 29, 2020 Tachometer is a device that used for counting or for the measuring purpose of the number of revolutions (that is the total number rotations made by the device in unit of measuring time) of an object in unit time. It is expressed in the unit of RPS or RPM, the model uses a set of infrared transducer receiver to count the RPM pulses, and the Arduino microcontroller is used for the implementation of the project. The individual pulses are counted by the microcontroller to give the final output of the RPM.


INTRODUCTION
The basic operating principle of a mechanical tachometer is a movable magnet driven by the rotating input shaft that interacts closely with an eddy current sensor that generates the reading [1][2][3][4][5]. The rotating magnet within the sensor forces the indicator needle to show the proportional reading on the given output method as per the engine speed, whereas a countering spring acts against the sensors force to bring it to a stable stopping point (output reading on the dial) [6]. As compared to a digital tachometer, the traditional kind faces many issues like the probability of mechanical failure, wear of parts with age that might give errors [7][8][9][10][11].  The basic characteristics of an 8051 microcontroller are as mentioned, Flash Memory=8 kB, RAM=256 Bytes, Clock speed=12 Mhz, one operating cycle=12 clock cycles, 8051 operating voltage is generally between 5 V to 6.6 V and minimum current required is 25 m Amps [12][13][14].  Single instruction executed in 2 machine cycles General IDE and burner can used to write and compile code in assembly language for 8051. Programmer needs to know about the registers and pins and their specific operations by compiler along with the use of specific SFR,s and interrupt routines to write code for 8051 microcontroller. To code a 8051 controller we need a burner also known as an external programmer as it does not directly interact directly with a modern computer [15][16][17].  It is tough to program in Assembly language.  No EEPROM.  Arduino boards need a minimum of 5 V to operate and work upto a rage of 20V. It can b directly powered by the device being used to code it testing as it is connected using a basic USB cable that is easily available. They can also be powered using independent sources using an external adapter [18].  Arduino is present in logic 5 V and 3.3 V. That lets us use arduino more adaptably as compared to an 8051 and can interfaced with a 5 V logic input device and lower voltage sensors with minimum requirements that can be taken directly from the arduino board. That eliminates the need of a level converter [19][20][21].  Minimum required powering current is 25mAmps that is like 8051.  Its GPIO pins be used alongside 40mamps of current which is very advantageous when compared to an 8051's on board gpio [22].  Arduino uno Flash Memory is fixed at 32 kB, Arduino uno's RAM is pre-set to 2 kB, Arduino uno EEPROM at 1 kB, clock speed at 16 Mhz that can be increase upto 20 Mhz, here we consider it as: one operating cycle = 1 operating clocks cycle.  An instruction run for a single operation cycle [23].  It is easier to code in c programming language.  PIC needs more than a single clock cycle for every instruction. AVRC programming lets us execute most of the instructions in a single clock cycle [24].  PIC has a fixed memory stack that has very limited space, so it limits us from stacking them very deeply and hence subroutines are limited to a certain extent and C compiler cannot make big stack frames. Stack pointers are used to address all registers of RAM that are available in the given memory space [25,26].  PIC microcontroller can be used to directly address 256 bytes of memory that has to be used by changing the bank after every instruction cycle using extra instructions to change. AVR has an advantage over it as it can directly access 64k of the memory.  Crippleware is one of the few free pic compilers. AVR free compiler being developed and updated by a larger team [27,28].  PIC has a 'W' register whereas AVR has 32 registers that can be used for general purpose as well and includes multiple pairs which can be used as pointers.

PROPOSED SYSTEM CONCEPT
The basic concept includes an Arduino with the background of c programming from embedded systems that employs an IR sensor, an Arduino microcontroller, an LCD output screen and a source from generating the output to be measured, which is shown in Figure 1. The IR sensor module involves an IR transmitter LED and an IR photoreceiver, the microcontroller used is loaded with a C programmed code and is stored in its memory until it is reset, and the actuator is an LCD display device, displaying the real time speed being measured from the motor surface. The IR sensor detects the high pulses caused by reflection from the motors surface and the controller is used to calculate the speed of the motor without actually being connected to it, by the principle of reflection a result is generated from the signals, which is shown in Figure 2. This calculated output signal is sent as an electrical signal and fed into the actuator that is the LCD panel, which is programmed to show the speed in terms revolutions in one minute. This is the final output.

CONTROL STRATEGIES 3.1. Arduino
The Arduino Uno is a logic board based on the open source hardware provided by multiple manufacturers. It has an Atmega328 microcontroller embedded onto the board itself. The Arduino uno board in particular is part of the compact Arduino series that contains the Arduino nano and the Arduino mini. The Arduino board has a total of 28 pins, which is shown in Figure 3.   The clock speed of an Arduino Uno board is 16 MHz. It can be connected to a computer using the UART TTL serial communication link or via a USB port. The Arduino board can either draw power via USB or via an external supply which can be connected via the barrel plug connection provided on the board. It can take an input of 7V to 20V. The recommended operating voltage should be 5V. If there is power being drawn from the 5V output pin on the board, an input of 7V or greater must be provided to the board. However, the maximum permissible voltage for sustained use is 12V otherwise the voltage regulators overheat. There are two basic types of Pin functions:  General Pin functions  LED Pin: Pin 13 has a built in LED pin which is edge triggered and so in on when the pin is HIGH  Vin Pin: It can take input from and external source if it is not being powered by the USB port or via the Barrel plug  IOREF Pin: This pin on the Arduino board is used to select a voltage reference based on which an appropriate power source is selected.  Reset Pin: It is generally used to add a reset button to the circuit  Specialized Pin functions  RX Pin/ Pin 0: Used to receive serial data  TX Pin/Pin 1: Used to transmit serial data  Pins 2 and 3: Used to create hardware interrupts  PWM Pins: pins 3,5,6,9 and 20 can be used for 8 bit pulse width modulation. We utilise the analodWrite() function to achieve that result  SPI Pins: Pins 10, 11, 12 and 13 can be used for Serial Peripheral Interface. They use the SPI library to communicate with the Arduino IDE.  TWI Pins: A4 and A5 pins also known as the SDA and SCL pins respectively are used for two wire interface. This is enabled with the Wire library  AREF: This provided an analogue reference voltage to the input.

CONTROLLING THE SPEED OF MOTOR
For regulating the speed of the motor, a potentiometer is added to the circuit. For driving the motor, transistor Q1 is used. Through the limiting resistance R1, the base is connected to PWM pin 9 of the arduino. Analog pin A0 of the arduino is connected to the wiper of the speed control pot R4. Using the analog read function, the voltage at this pin is converted into a value between 0 and 1023. In order to fit the value between 0 to 255, this value is divided by 4. Using the analog Write function, the value is written to the PWM pin 9. Result is seen at pin 9. Its duty cycle is proportional to the value written using analog write function. For example, if the value is 127, the duty cycle will be 50% and if the value is 255, the duty cycle will be 100%.C1 is a noise by pass capacitor and D1 is a freewheeling diode. Using the standard liquid crystal library, the RPM and duty cycle are displayed.
Contact lessitachometer is a device used toimeasure speed of a motor by counting theinumber of rotations per secondiof a rotating shaft using microicontroller. As the nameiindicates, it can very accurately measureithe rotational speed of a shaftiwithout even touching it. This is interestingibecause making direct contactiwith the shaft is not anioption, and will reduce the speediof the shaft giving faultyireadings.

EXPERIMENTAL RESULT
This can also be employedito measure the speed of motorsiwhich are at unreachable places. This deviceiis built on a microcontroller -Atmega328, speed is detected using the IR transmitter and receiver pair, readings are displayed usingia LCD display andithe speed is controlled by aipot. It works on the principleithat the number of timesithe IR receiver-transmittericircuit is cut and re-established inia second gives the numberiof rotations per second. The value isidisplayed on the LCDidisplay.
The image showsithe tachometer circuit that hasibeen used as our test model for trackingithe RPM of a dcimotor that has been powerediindependently. The Figure 4 shows theiinitialization of the circuit when the there is no movementiand LCD reads 0 RPM. The Figure 5 shows an RPM of 273 that the IR module tracks from the motor rotational circuit that is being tested by us. The LCD displaying final RPM output as shown in Figure 6.

CONCLUSION
In this fast-growing world of technologies in the industrial enterprise, motor and generator are one of the essential parts of the industry. For a particular application in industries, the speed is needed to be fixed and for this reason it is necessary to know the speed in revolution per minute (RPM). Tachometer is a device that is used to count the revolution per minute (RPM) of a rotating machine. In our project that is (contact less digital tachometer), we've accomplished satisfactory results as per our motive to create an experimental setup that can be used to calculate the RPM of the machine.