Digital Tachometer Using Arduino Plus Speed Control

Embed Size (px)

Citation preview

  • 8/10/2019 Digital Tachometer Using Arduino Plus Speed Control.

    1/3

    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 tim

    Usually it is expressed in revolutions per minute or RPM. Earlier tachometers purely mechanical where th

    revolution is transferred to the tachometer through mechanical coupling cable or shaft! " the rpm is determine

    using a gear mechanism and it is displayed on a dial. #ith the advent of modern electronics" the tachometers hav

    changed a lot. This article is about a contactless digital tachometer using arduino. The speed of the motor can b

    also controlled using the same circuit. The RPM and all the other informations are displayed on a $%&' ()*screen. The circuit diagram of the digital tachometer using arduino is shown below.

    Circuit diagram.

    RPM Sensor.

    +n ,R photo transistor and ,R (E* forms the sensor. ,R photo transistor is a type of photo transistor whic

    responds to infra-red waves only. The use of ,R phototransistor avoids other light interferences from th

    environment. The photo transistor and ,R diode are aligned side by side. Resistor R' limits the current through th

    ,R diode. + reflective strip is glued on the rotating object shaft" disc or fan! in line with the sensor. , used

    /0$11m+ cooling fan. The clearence between the sensor and reflective strip has to be less than $cm. #hen th

    reflective strip passes in front of the sensor" ,R waves are reflected bac2 to the photo transistor. The photo transistoconducts more at this moment and as a result the voltage across R3%45 resistor! shoots up at this moment. Th

    result will be a waveform li2e what shown below at the emitter of the photo transistor. RPM can be determined b

    counting the number of upward shoots in a given interval of time.

    http://www.circuitstoday.com/wp-content/uploads/2014/07/tachometer-using-arduino.png
  • 8/10/2019 Digital Tachometer Using Arduino Plus Speed Control.

    2/3

    Counting the RPM.+rduino is used for counting the RPM and displaying it on the ()* screen. Emitter of the photo transistor

    connected to the ,nterrupt 1 digital pin '! of the arduino. The arduino interrupt is configured to be rising edg

    triggered. +s a result the will be an interrupt for every upward shoot in the emitter waveform. The number o

    interrupts occured in a given time is counted by incrementing a variale using the interrupt service routine. The tim

    elapsed during te counting cycle is determined using the millis! function. The millis! function returns the numbe

    of milli seconds passed since the arduino board is switched 67. )alling the millis! function before and after th

    counting cycle and the ta2ing their difference gives the times passed during the counting cycle. The number

    interrupts0time in milliseconds!8%1111 will give the revolutions per minute RPM!.

    Controlling the speed of motor.

    + provision for controlling the motor speed using a potentiometer is also included in the circuit. Transistor 9$

    used for driving the motor. ,ts base is connected to pwm pin of the arduino through the current limiting resisto

    R$. #iper of the speed control P6T R: is connected to anlog pin +1 of the arduino. The voltage at this pin

    converted into a value between 1 and $1'3 using the anlogRead function. Then this value is divided by four to fit

    into the 1 to ';; range. Then this value is written to the P#M pin using the anlog#rite function. The result wi

    be a s

  • 8/10/2019 Digital Tachometer Using Arduino Plus Speed Control.

    3/3

    %id l%%()+delay(1''');detachnterrut('); **detaches the interrutti"e"illis()7%ldti"e; **inds the ti"er"(re*ti"e)86''''; **calculates r"%ldti"e"illis(); **saes the current ti"ere';alueanal%/ead(%t); **reads the seed c%ntr%l 9:aluealue*4;anal%/rite(!",alue); **sets the desired seedercent(alue*255)81''; **inds the duty cycle =lcd.clear();lcd.setCurs%r(',');lcd.rint(???&C@:ABB???);lcd.setCurs%r(',1);lcd.rint(r");lcd.rint( 9A);lcd.rint( );lcd.rint(ercent);lcd.rint(=);attachnterrut(',isr,);

    -

    Notes.

    The arduino board can be powered using a / supply through the external power jac2.

    The ;/ needed at some parts of the circuit can be tapped from the ;/ source on the arduino board.

    The fan , used was rated /0$11m+. The transistor '7'''' can handle only upto 411m+. 5eep this in

    mind while selecting the load.

    The ()* module used was AB*$%'+.

    P6T R; can be used to adjust the contrast of the ()* display. #hen connected first" the ()* may not

    show up anything. +djust the R; until you get the display. The optimum voltage at the wiper of R; isbetween 1.: to $/.

    The ,R photo transistor and the ,R diode both were ta2en from an (TB-$;;1 photo interruptor module.

    The lateral surface of the photo transistor must be mas2ed using a tape.

    The sensor arrangement is shown in the figure below.

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