Sei sulla pagina 1di 12

28/02/2018 Digital tachometer using arduino plus motor speed control.

Circuit diagram and program

Looking for Latest Electronics Project Kits? CLICK HERE (http://www.store.circuitstoday.com/)


(http://www.circuitstoday.com)

Ads by Google

How to Make a Tachometer with Arduino Contactless Tachometer Using Arduino Arduino Based Digital Tachometer

RPM Counter Using Arduino Coding for Beginners Circuits

Tachometer using arduino


(http://www.circuitstoday.com/tachometer-using-
arduino)
 praveen  January 13, 2015  10 Comments

5 Sec. Instant Measurement.


Measurement Systems Learn More, Download a Catalog
KEYENCE Now!

Digital tachometer using arduino plus speed control.

Tachometer is a device used for measuring the number of revolutions of an object in a given interval of time. Usually it is expressed in revolutions per minute or RPM.
Earlier tachometers purely mechanical where the revolution is transferred to the tachometer through mechanical coupling (cable or shaft) , the rpm is determined
using a gear mechanism and it is displayed on a dial. With the advent of modern electronics, the tachometers have changed a lot. This article is about a contactless
digital tachometer using arduino. The speed of the motor can be also controlled using the same circuit. The RPM and all the other informations are displayed on a
16×2 LCD screen. The circuit diagram of the digital tachometer using arduino is shown below.

Circuit diagram.

(http://www.circuitstoday.com/wp-content/uploads/2014/07/tachometer-using-arduino.png)RPM Sensor.

http://www.circuitstoday.com/tachometer-using-arduino 1/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

 An IR photo transistor and IR LED forms the sensor. IR photo transistor is a type of photo transistor which responds to infra-red waves only. The use of IR
phototransistor avoids other light interferences from the environment. The photo transistor and IR diode are aligned side by side. Resistor R2 limits the current
through the IR diode. A re ective strip is glued on the rotating object (shaft, disc or fan) in line with the sensor. I used a 9V/100mA cooling fan. The clearence between
the sensor and re ective strip has to be less than 1cm. When the re ective strip passes in front of the sensor, IR waves are re ected back to the photo transistor. The
photo transistor conducts more at this moment and as a result the voltage across R3(68K resistor) shoots up at this moment. The result will be a waveform like what
shown below at the emitter of the photo transistor. RPM can be determined by counting the number of upward shoots in a given interval of time.

(http://www.circuitstoday.com/wp-content/uploads/2014/07/tachometer-waveform.jpg)Counting the RPM.

Arduino is used for counting the RPM and displaying it on the LCD screen. Emitter of the photo transistor is connected to the Interrupt 0 (digital pin 2) of the arduino.
The arduino interrupt is con gured to be rising edge triggered. As a result the will be an interrupt for every upward shoot in the emitter waveform. The number of
interrupts occurred in a given time is counted by incrementing a varible using the interrupt service routine. The time elapsed during te counting cycle is determined
using the millis() function. The millis() function returns the number of milli seconds passed since the arduino board is switched ON. Calling the millis() function before
and after the counting cycle and the taking their difference gives the times passed during the counting cycle. The (number of interrupts/time in milliseconds)*60000
will give the revolutions per minute (RPM).

Controlling the speed of motor.

A provision for controlling the motor speed using a potentiometer is also included in the circuit. Transistor Q1 is used for driving the motor. Its base is connected to
pwm pin 9 of the arduino through the current limiting resistor R1. Wiper of the speed control POT R4 is connected to anlog pin A0 of the arduino. The voltage at this
pin is converted into a value between 0 and 1023 using the anlogRead function. Then this value is divided by four to t it into the 0 to 255 range. Then this value is
written to the PWM pin 9 using the anlogWrite function. The result will be a square wave at pin 9 whose duty cycle is proportional to the value written using the
analogWrite function. For example if the value is 255, the duty cycle will be 100% and if the value is 127, the duty cycle will be around 50%. D1 is  a free wheeling
diode and C1 is a noise by-pass capacitor(de coupler).  The rpm and duty cycle are displayed on the LCD screen using the standard LiquidCrystal library. Read this
article: Interfacing LCD to Arduino (http://www.circuitstoday.com/interfacing-lcd-to-arduino). Full program for the digital tachometer using arduino is shown below.

Program.
time=millis()-oldtime; //finds the time
rpm=(rev/time)*60000; //calculates rpm
oldtime=millis(); //saves the current time
rev=0;
value=analogRead(pot); //reads the speed control POT
value=value/4;
analogWrite(pwm,value); //sets the desired speed
percent=(value/255)*100; //finds the duty cycle %
lcd.clear();
lcd.setCursor(0,0);
lcd.print("___TACHOMETER___");
lcd.setCursor(0,1);
lcd.print(rpm);
lcd.print(" RPM");
lcd.print(" ");
lcd.print(percent);
lcd.print("%");
attachInterrupt(0,isr,RISING);

http://www.circuitstoday.com/tachometer-using-arduino 2/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

Notes.

The arduino board can be powered using a 9V supply through the external power jack.
The 5V needed at some parts of the circuit can be tapped from the 5V source on the arduino board.
The fan I used was rated 9V/100mA. The transistor 2N2222 can handle only upto 800mA. Keep this in mind while selecting the load.
The LCD module used was JHD162A.
POT R5 can be used to adjust the contrast of the LCD display. When connected rst, the LCD may not show up anything. Adjust the R5 until you get the display. The
optimum voltage at the wiper of R5 is between 0.4 to 1V.
The IR photo transistor and the IR diode both were taken from an LTH-1550 photo interrupter module.
The lateral surface of the photo transistor must be masked using a tape.
The sensor arrangement is shown in the gure below.

(http://www.circuitstoday.com/wp-content/uploads/2014/07/tachometer-sensor.jpg)

Ads by Google

How to Make a Tachometer with Arduino Contactless Tachometer Using Arduino

Arduino Based Digital Tachometer RPM Counter Using Arduino

Tags: arduino speed control (http://www.circuitstoday.com/tag/arduino-speed-control), arduino tachometer (http://www.circuitstoday.com/tag/arduino-tachometer)


Categories: Arduino (http://www.circuitstoday.com/category/arduino)

 Previous post (( Next post 


hh

tt
5 Sec. Instant Measurement.
Measurement Systems tt
Learn More, Download a Catalog
KEYENCE Now!
pp

::

//
You may also like: //

ww
8 Best Arduino Starter Kit for Beginners (http://www.circuitstoday.com/best-arduino-starter-kit-beginner)
w
w
Arduino Nano Tutorial – Pinout & Schematics (http://www.circuitstoday.com/arduino-nano-tutorial-pinout-
schematics) w
w

..
Arduino Mega Tutorial – Pinout & Schematics (http://www.circuitstoday.com/arduino-mega-pinout-schematics)
cc
Project: Home Automation Using IR Remote Control (http://www.circuitstoday.com/home-automation-ir-remote-
control) ii

rr
Project: Auto Intensity Control Of Street Light Using Arduino (http://www.circuitstoday.com/auto-intensity-control-
street-light-arduino) cc

uu

ii

tt

We recommend: ss

tt
Field strength meter (http://www.circuitstoday.com/ eld-strength-meter)
oo

http://www.circuitstoday.com/tachometer-using-arduino 3/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program
dd
Interfacing RFID with Arduino - How to Read RFID Cards using Arduino (http://www.circuitstoday.com/interfacing-
r d-with-arduino) aa

yy
Voltage Regulator Circuit-The Big List (http://www.circuitstoday.com/voltage-regulator-circuit-list)
..
Voltage follower circuit (http://www.circuitstoday.com/voltage-follower-circuit)
cc
Water Sensor Circuit with Alarm (http://www.circuitstoday.com/water-sensor-circuit)
oo

m
m

//
COMMENTS di

in
hari
yt
July 19, 2016
-e

dr
left or right this is fantastic
if

 ga

ic
karan patel (http://2655) ti
July 24, 2015
an

lg
it a very gud knowlege foe the ardiuno un --

cl

lc

chrsman63 od
May 6, 2015 c-

kt

Your project is amazing and it works ne. -o

t-
Now i want to remove the potentiometer and i want to add a “ramp” option.
ea
I replace the value “value=analogRead(pot); //reads the speed control POT” with “value=50” delay(3000); and the code is ok.
Now i can add another value (for example=250) and another delay time (i.e 6000) the
r compiler passes the code but the rpm indicator does not read the interrupts.
m

Can you help me? pd

eu
 ri

an
narendran (http://h4ckr-naren.blogspot.in)
to
March 19, 2015
u)

r
i made the connections and had a serial output..!!but had some wierd values(negative nd positive)..!!
e

 -

d
ken carmean i
March 15, 2015
s

p
hey thanks anyway I gured out the code appreciate the help!!!
l

a

y

ken carmean )
March 7, 2015

http://www.circuitstoday.com/tachometer-using-arduino 4/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

I like this tachometer circuit but don’t need motor drive ,just the tachometer I know how to eliminate the hardware but not sure what to eliminate on the code
..don’t want percent displayed on lcd ,,can I just eliminate lcd.print(percent) at the end of code?

amit
January 29, 2015

what does this arduino means??


and which microcontroller, how much pin is used and of how much of k?


Shiharan Choudhury
November 28, 2016

The arduino has ATmel Atmega 8/16/32P-PU depends on the model used. These days arduino boards comes with atmega 328P-PU

Sanjay Kumar (http://circuitstoday.com)


October 9, 2014

Is this thing really working?


Did any other person try this?
What is the cost of the whole circuit?


praveen
January 13, 2015

sure it is working.i post this circuit after testing. in fact all 8051 / arduino projects here are tested

LEAVE A REPLY

Your email address will not be published. Required elds are marked *

Comment

Name *

http://www.circuitstoday.com/tachometer-using-arduino 5/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

Email *

Website

POST COMMENT

Replay
*T&C apply.

SORT BY TYPE

101-Announcements (http://www.circuitstoday.com/category/announcements) (28)

555 Timer IC (http://www.circuitstoday.com/category/555-timer-ic) (16)

8051 (http://www.circuitstoday.com/category/8051) (26)

8051 projects (http://www.circuitstoday.com/category/8051-projects) (21)

Ampli er Circuits (http://www.circuitstoday.com/category/ampli er-circuits) (39)

Arduino (http://www.circuitstoday.com/category/arduino) (70)

ARM (http://www.circuitstoday.com/category/arm) (3)

Audio Circuits (http://www.circuitstoday.com/category/audio-circuits) (104)

Automotive Circuits (http://www.circuitstoday.com/category/automotive-circuits) (28)

AVR (http://www.circuitstoday.com/category/avr) (23)

Basic Electricity (http://www.circuitstoday.com/category/basic-electricity) (1)

Basic Electronics (http://www.circuitstoday.com/category/basic-electronics) (17)

Battery Circuits (http://www.circuitstoday.com/category/battery-related) (23)

C plus plus (http://www.circuitstoday.com/category/cpluplus) (7)

C Programming (http://www.circuitstoday.com/category/c-programming) (14)

Cable TV Circuits (http://www.circuitstoday.com/category/cable-tv) (1)

Camera Technology (http://www.circuitstoday.com/category/camera) (5)

Clipping and Clamping Circuits (http://www.circuitstoday.com/category/clipping-and-clamping-circuits) (7)

Clocking & Timer Circuits (http://www.circuitstoday.com/category/clocking-timer-circuits) (2)

Conversion Circuits (http://www.circuitstoday.com/category/conversion-circuits) (10)

Counter Circuits (http://www.circuitstoday.com/category/counter-circuits) (2)

Counters (http://www.circuitstoday.com/category/counters) (2)

Digital Electronics (http://www.circuitstoday.com/category/digital-electronics) (11)

http://www.circuitstoday.com/tachometer-using-arduino 6/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

Drones (http://www.circuitstoday.com/category/drones) (1)

Education & Training (http://www.circuitstoday.com/category/education-training) (6)

Electronic Components (http://www.circuitstoday.com/category/components) (31)

Electronic Keys & Locks (http://www.circuitstoday.com/category/electronic-keys-locks) (3)

Electronics Books (http://www.circuitstoday.com/category/electronics-books) (10)

Electronics Jobs (http://www.circuitstoday.com/category/electronics-jobs) (4)

Embedded Systems (http://www.circuitstoday.com/category/embedded-systems) (7)

Equipment Reviews (http://www.circuitstoday.com/category/equipment-reviews) (1)

Events (http://www.circuitstoday.com/category/events) (3)

Fan Circuits (http://www.circuitstoday.com/category/fan-circuits) (1)

Filter Circuits (http://www.circuitstoday.com/category/ lter-circuits) (16)

Fire Alarm (http://www.circuitstoday.com/category/ re-alarm) (3)

Fun & Game Circuits (http://www.circuitstoday.com/category/fun-game) (14)

Gadget Reviews (http://www.circuitstoday.com/category/gadget-reviews) (6)

Guides (http://www.circuitstoday.com/category/guides) (2)

Ham Radio Circuits (http://www.circuitstoday.com/category/ham-radio-circuits) (2)

High Voltage Circuits (http://www.circuitstoday.com/category/high-voltage-circuits) (1)

History (http://www.circuitstoday.com/category/history) (26)

Home Circuits (http://www.circuitstoday.com/category/home-circuits) (35)

Industrial Circuits (http://www.circuitstoday.com/category/industrial-circuits) (15)

Infographics (http://www.circuitstoday.com/category/infographics) (1)

Instruments (http://www.circuitstoday.com/category/instruments) (13)

Integrated Circuits (http://www.circuitstoday.com/category/integrated-circuits) (20)

Inverters (http://www.circuitstoday.com/category/inverter) (5)

Lab Manuals (http://www.circuitstoday.com/category/lab-manual) (20)

LED related (http://www.circuitstoday.com/category/led-related) (3)

Light Related (http://www.circuitstoday.com/category/light-related) (14)

Lighting Circuits (http://www.circuitstoday.com/category/lighting-circuits) (44)

MATLAB (http://www.circuitstoday.com/category/matlab) (3)

Microcontrollers (http://www.circuitstoday.com/category/microcontrollers) (12)

Mobile Phone Related (http://www.circuitstoday.com/category/mobile-phone-related) (3)

Motor Related (http://www.circuitstoday.com/category/motor-related) (14)

Nanotechnology (http://www.circuitstoday.com/category/nanotechnology) (14)

Oscillators (http://www.circuitstoday.com/category/oscillators) (25)

PCB (http://www.circuitstoday.com/category/pcb) (2)

Peripheral Interface Controller (PIC) (http://www.circuitstoday.com/category/peripheral-interface-controller-pic) (29)

Power Controller Circuits (http://www.circuitstoday.com/category/power-controller-circuits) (8)

Power Electronics (http://www.circuitstoday.com/category/power-electronics) (3)

Power Supplies (http://www.circuitstoday.com/category/power-supplies) (72)

Product Reviews (http://www.circuitstoday.com/category/product-reviews) (12)

Project Ideas (http://www.circuitstoday.com/category/project-ideas) (1)

Projects (http://www.circuitstoday.com/category/projects) (7)

Proteus (http://www.circuitstoday.com/category/proteus) (16)

Proximity Detectors (http://www.circuitstoday.com/category/proximity-detectors) (3)

Radio Circuits (http://www.circuitstoday.com/category/radio-circuits) (30)

Radio Transmitters (http://www.circuitstoday.com/category/radio-transmitters) (19)

Raspberry Pi (http://www.circuitstoday.com/category/raspberry-pi) (3)

http://www.circuitstoday.com/tachometer-using-arduino 7/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

Relays (http://www.circuitstoday.com/category/relays) (3)

Remote Circuits (http://www.circuitstoday.com/category/remote-circuits) (12)

Reviews (http://www.circuitstoday.com/category/reviews) (5)

Robotics (http://www.circuitstoday.com/category/robotics) (6)

RTOS (http://www.circuitstoday.com/category/rtos) (2)

Security & Saftey (http://www.circuitstoday.com/category/security-saftey) (17)

Sensor Circuits (http://www.circuitstoday.com/category/sensor-circuits) (16)

Signal Conditioners (http://www.circuitstoday.com/category/signal-conditioners) (11)

Signal Generators (http://www.circuitstoday.com/category/signal-generators) (13)

Speed Controller Circuits (http://www.circuitstoday.com/category/speed-controller-circuits) (1)

State space analysis (http://www.circuitstoday.com/category/state-space-analysis) (2)

Switching Circuits (http://www.circuitstoday.com/category/switching-circuits) (6)

Tech News (http://www.circuitstoday.com/category/tech-news) (87)

Telephone Related (http://www.circuitstoday.com/category/telephone-related) (9)

Television Related (http://www.circuitstoday.com/category/television-related) (4)

Temperature Related (http://www.circuitstoday.com/category/temperature-related) (3)

Test & Measurement Circuits (http://www.circuitstoday.com/category/test-measurement-gadgets) (38)

Testing Components (http://www.circuitstoday.com/category/testing-components) (9)

Three phase circuits (http://www.circuitstoday.com/category/three-phase-circuits) (1)

Timer Circuits (http://www.circuitstoday.com/category/timer-circuits) (3)

Tone generator circuits (http://www.circuitstoday.com/category/tone-generator-circuits) (20)

Tools and Softwares (http://www.circuitstoday.com/category/tools-and-softwares) (6)

Transmitters (http://www.circuitstoday.com/category/transmitters) (7)

Tutorials (http://www.circuitstoday.com/category/tutorials) (163)

UPS (http://www.circuitstoday.com/category/ups) (2)

USB Circuits (http://www.circuitstoday.com/category/usb-circuits) (3)

Videos (http://www.circuitstoday.com/category/videos) (5)

VLSI (http://www.circuitstoday.com/category/vlsi) (36)

Voltage Regulators (http://www.circuitstoday.com/category/voltage-regulators) (15)

http://www.circuitstoday.com/tachometer-using-arduino 8/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

Instant Quote

Dimensions
Length x Width mm

Quantity

Choose Num (pcs)

Layers

2 Layers

Thickness
1.6mm

Get a $5.00 coupons Bonus

Quote Now

(https://www.wellpcb.com/)

OTHER LINKS

About (http://www.circuitstoday.com/about)

Advertise With Us (http://www.circuitstoday.com/advertise-with-us)

Authors (http://www.circuitstoday.com/authors)

Datasheets (http://www.circuitstoday.com/datasheets)

Disclaimer (http://www.circuitstoday.com/disclaimer)

Electronic Circuit Symbols (http://www.circuitstoday.com/electronic-circuit-symbols)

Electronic Project Kits (http://www.circuitstoday.com/project-kits)

Lab Manuals (http://www.circuitstoday.com/lab-manuals)

Electronic Circuits Lab (http://www.circuitstoday.com/lab-manuals/electronic-circuits-lab)

Microcontroller lab (http://www.circuitstoday.com/lab-manuals/microcontroller-lab)

Microprocessor Lab (http://www.circuitstoday.com/lab-manuals/microprocessor-lab)

Privacy Policy (http://www.circuitstoday.com/privacy-policy)

Resistor Color Code Calculator (http://www.circuitstoday.com/resistor-color-code-calculator)

Testing Components (http://www.circuitstoday.com/testing-components)

Write For Us (http://www.circuitstoday.com/write-for-us)

http://www.circuitstoday.com/tachometer-using-arduino 9/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program
PCBFOX

PCB Manufacturers (http://pcbfox.com/)

© 2015 CircuitsToday. All rights reserved.

About (http://www.circuitstoday.com/about) | Privacy Policy (http://www.circuitstoday.com/privacy-policy) |


Write For Us|Earn Money (http://www.circuitstoday.com/write-for-us)

Latest Electronic Circuits

http://www.circuitstoday.com/tachometer-using-arduino 10/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

http://www.circuitstoday.com/tachometer-using-arduino 11/12
28/02/2018 Digital tachometer using arduino plus motor speed control. Circuit diagram and program

acebook.com/sharer.php)

http://www.circuitstoday.com/tachometer-using-arduino 12/12

Potrebbero piacerti anche