Motor Speed Measurement Using Arduino : 6 Steps - leehaturat
Introduction: Motor Speed Measurement Victimisation Arduino
Is it difficult to measure revolutions per minute of motor ???
I preceptor't think so. Here is one simple solution.
Just one IR sensor and Arduino in your kit can do so.
In this post i will give a simple tutorial explaining how to measure RPM of any motor victimization IR sensor and Arduino UNO/nano
Supplies:
1. Arduion uno( Amazon ) / Arduion nano( Amazon )
2. Iridium Sensor( Amazon )
3. DC motor any ( Amazon )
4. LCD 16*2 ( Amazon )
Tools Utilised
1. Soldering Iron ( Amazon )
2. Conducting wire Stripper ( Amazon )
Footfall 1: Step: 1 Guarantee Working Condition of Sensors and Devices
What is an IR Sensor?
IR sensor is an lepton device, that emits the light in order to good sense some object of the surroundings. An IR sensor can measuring the heat of an object as comfortably as detects the motion. Usually, in the infrared spectrum, all the objects shine some form of thermal radiation. These types of radiations are undetectable to our eyes, but infrared sensing element can detect these radiations.
What is a DC Motive?
A direct current (DC) causative is a type of electric machine that converts physical phenomenon energy into mechanical energy. DC motors take wattage through direct current, and convert this vitality into mechanical rotation.
D.C. motors use magnetic fields that occur from the electrical currents generated, which powers the movement of a rotor fixed within the output shaft. The output torque and speed depends upon both the electrical input and the intent of the causative.
What is Arduino?
Arduino is an open-source electronics political platform based on easy-to-employ hardware and software package. Arduino boards are able to read inputs - light happening a sensor, a feel along a push, or a Twitter subject matter - and turn information technology into an output - energizing a motor, turn on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do soh you consumption the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
Download ARDUINO IDE
Step 2: How It Works?
So what is the logic behind this ??
It works very much similar to encoder. Encoders are step down hard to understand for beginners. All you need to know is the IR sensor generates pulsate and we are determination out the time interval betwixt to each one pulse.
In this case the Inland Revenue sensing element will send a pulse to Arduino when ever its IR beam is intercepted with motors propellers. Normally we manipulation propellers with two blades just I have used propeller with terzetto blades as shown in the figure. depending connected the figure of propeller blades we want to modify some values spell calculative RPM.
let's consider we have a propeller which has two blades. For every revolution motor the blade will intercept the IR ray double. Thus the Inland Revenue sensor volition produce pulses when ever the intercepts.
Now we have to pen a program which could measure the issue pulses produced by IR sensor at a item time interval.
There are more than one shipway to solve a problem but we must choose which one is best in that codes i have measured the duration between the interrupts (IR sensor)
I used micros() functions to measure the duration of pulses in small seconds.
you can use this Formula to bar the Revolutions per minute
RPM = ((1/duration)*1000*1000*60)/blades
where,
duration - clip interval betwixt pulses.
60 - seconds to transactions
1000 - James Mill to sec
1000 - micro to mill
blades - no of wings in the propeller.
LCD Display - The Arduino updates the command and data registers of LCD display. Which displays the ASCII characters on the LCD show.
Step 3: Program Your Arduino Using Arduino IDE
#let in <LiquidCrystal.h> LiquidCrystal lcd(9,8,7,6,5,4); const int IR_IN = 2; //IR sensor INPUT unsigned long prevmicros; // To store time unsigned long duration; // To store sentence difference unsigned long lcdrefresh; // To store metre for lcd to refresh int rpm; // RPM value boolean currentstate; // Current United States Department of State of IR input scan boolean prevstate; // State of IR sensor in previous scan nullity setup() { pinMode(IR_IN,INPUT); lcd.lead off(16,2); prevmicros = 0; prevstate = LOW; } void loop() { ///////////////////////////////////////////////////////////////////////////////// RPM Measurement currentstate = digitalRead(IR_IN); // Read IR detector state if( prevstate != currentstate) // If thither is change in input { if( currentstate == LOW ) // If input lone changes from HIGH to LOW { continuance = ( micros() - prevmicros ); // Clip difference between revolution in microsecond rpm = ((60000000/duration)/3); // rpm = (1/ clock millis)*1000*1000*60; prevmicros = micros(); // storehouse metre for nect revolution calculation } } prevstate = currentstate; // store this scan (prev scan) data for future scan //////////////////////////////////////////////////////////////////////////////////// Liquid crystal display Display if( ( millis()-lcdrefresh ) >= 100 ) { LCD.clear(); lcd.setCursor(0,0); lcd.print("Quicken of Motor"); lcd.setCursor(0,1); lcd.print("Rev = "); lcd.print(rpm); lcdrefresh = millis(); } } Step 4: Pretending Using Proteus
This project worked absolutely fine when I tested simulating this with the help of Proteus.
Instead of using IR sensor I victimized DC pulse generator
Which will simulated the IR pulse similar to one generated when the IR rays hits the propellers blades.
you have to make changes to your program depending on the detector you use
IR sensor with LM358 must use this command.
if( currentstate == HIGH ) // If input just changes from Nether to HIGH
IR sensor with LM359 must economic consumption this command.
if( currentstate == Scurvy ) // If input only changes from Alto to LOW
Footstep 5: Hardware Execution
For schematic use the simulation pictures or the refer the program codes and make the connections accordingly.
Upload the program code to Arduino and valu the RPM of any motor.
Stay adjusted for my next post and watch my YouTube television channel.
Ill-trea 6:
Be the First to Share
Recommendations
-
Anything Goes Repugn 2022
Source: https://www.instructables.com/Motor-Speed-Measurement-Using-Arduino/
Posted by: leehaturat.blogspot.com

0 Response to "Motor Speed Measurement Using Arduino : 6 Steps - leehaturat"
Post a Comment