DIY Tachometer using Hall sensor, Arduino and Simulink

This report will show how one can make a Tachometer using a Hall Effect Sensor Module, Arduino and Simulink. The Hall effect sensor module used here uses A3144 Hall sensor. Neodymium magnet is attached to the motor whose RPM(Revolution Per Minute) we want to measure. Arduino Uno is used to acquire signal from the sensor. Tachometer sensor block and display block in Simulink are used to display the rotational speed in RPM(Revolution Per Minute).

Tachometer are used in many engineering field and manufacturing industries. They are used to measure rotational speed in systems that have motors, wheels and shafts. They are important measurement instrument because it allows one to know the speed of the rotating parts in the system. The rotational speed information can then be processed for control of the system by controlling the speed of that motor. For example, tachometer are useful for designing cooling fan system, for designing and analyzing propellers for drones or RC planes and other have many other application examples.

Some of the advantage of using the tachometer reported here are as follows.

First we have used hall effect sensor which gives highly accurate counting. Tachometer can be made using many methods like using IR(Infrared sensor) but hall sensor are more effective and highly accurate. Both IR sensor and hall sensor based Tachometer uses magnet. Here we have used neodymium magnet which are very powerful given their size. Here we have used neodymium magnet from old CD/DVD driver, so you can get it easily if you have old CD/DVD driver at home.

The second advantage of using the reported DIY tachometer reported here is that you don't have to brother with programming and coding at all. The Tachometer sensor block found in Simulink > Simulink Support for Arduino Hardware library handles that all. By simply specifying the pin number to which the Tachometer sensor is connected we can get the RPM value. Usually, calculating RPM via program involves using timers, counters and interrupts. Although writing Arduino program for calculating RPM is not hard and though sketches for Tachometers can be found readily on the Internet, still comparatively it is bit faster and saver to use the Simulink Tachometer sensor block(it uses interrupt service routine(ISR)).

The Hall effect sensor module with A3144 sensor is as shown below.

Hall effect sensor module with A3144 sensor

This module has 4 pins, Vcc for +5V supply, GND for ground, D0 for digital output and A0 for analog output. Here we will connect the sensor module Vcc pin to the +5V, the GND to GND of the Arduino. The digital output D0 of the hall effect sensor module is connected to the pin 2 of the Arduino. This is as shown.

DIY Tachometer using Arduino

Now we need a motor whose RPM we want to measure. Here we have used a DC motor. The neodymium magnet is attached to the motor using a water tape as shown below.

DC motor with Neodmium Magnet

To power the DC motor we have used variable DC power supply which can supply maximum voltage upto 12V and maximum current upto 2A. The advantage of using such power supply is that we can know both current and voltage at which we are measuring RPM and therefore we can calculate other parameters of the motor. The setup with power supply, motor with magnet, sensor and Arduino is as shown below.

DIY Tachometer setup using Hall effect sensor

Simulink Model for Tachometer

Below picture shows the simulation model used here.

Tachometer using Arduino and Simulink

The Tachnometer sensor block can be found in the simulink library under the Simulink Support for Arduino Hardware > Sensor section. The display block can be found in the Simulink > Commonly used blocks > Sinks section.

We can configure the Tachnometer block properties by double clicking on it. There we can specify which pin to use as input and sample time. Here the default setting was used which is pin 2 for input and sample time of 0.1 second.

Before we start the simulation in real time we have to configure the hardware board we are going to use. In our case, we are using Arduino Uno. The hardware board can be selected from the Hardware tab then going to Hardware Settings and then to the Hardware Implementation. This is as shown below.

After configuring the hardware board, we can then deploy the code generated by Simulink and then run the simulation in real time. To do this click on the Monitor & Tune button as shown.

running tachometer in simulink

When the real time simulation on hardware is running turn on the motor and move the tachometer sensor near the rotating magnet. The RPM value calculated will be shown in the display block as shown below.

Tachometer displays RPM in Simulink

 As you can see the RPM value is 2400. This depends upon the voltage and current supplied to the motor. During the real time simulation we can change the voltage and current and observe the RPM of the DC motor.

Video Demonstration

Below is video that shows how the DIY tachometer using A4133 hall sensor, neodymium magnet, Arduino and Simulink works. 

Conclusion & Summary

In this report we have shown how one can make a DIY Tachometer using Hall sensor, neodymium magnet, Arduino and Simulink. The construction and operation of this tachometer is very simple. It requires no programming other than creating simulink model with tachometer sensor block. It is quite easy to assembly and get the RPM of a motor. Here we have illustrated this using a variable power supply to record current and voltage applied to a DC motor. 

Application of tachometer includes automatic control of DC motor, control of DHT11 Humidity and Temperature Sensor with Arduino if certain RPM threshold is detected and other similar applications.


Post a Comment

Previous Post Next Post