You are on page 1of 18
instructables ( les make Explore (Ragiype-i) Contests (contest) Class iétassdamp , Puotsh Yabowreate sp) SRUPY!* BEBE besign Challange (contestbosobuils7utm_souree=featurebar!) A avtovesk. Backyard Projects (Ntaghyps-idicategory-oulside/channel-backyard/2utm_sourcesfeaturebar) Meat Class (/lass/Mest-Class/2utm_sourcs featurabar) About This Instructable © 305,100 views Posted Sep 17,2014 813 favoritos ° cen electro18 (memberietectro18), Vit my facebook profile | (ipsthmmctacebbox conT2e: (merberielebematiny | 342 Blo: Hey thee ! Im Tanay , a hobbyist interested in making robois and sharing ‘stuff, hope that my instructables help you in solving your problems .. More » (imomberilectot8)) OsI mu OU? wns rasmoMETER peice More by electrots: (da!Cotor-Sensing ‘Your usa-Lam) cater (isPYour-Oun-Color-Sansor-using-LEDs!) iMoasure-RPM. OT em eT Dv-Pertable-igtal-Tachomter) ‘Add instructable to: Measure RPM - DIY optical Tachometer 28 Grup Related DIY Digital RPM Tachometer [RPM Counter With Arduine (iaDl¥Digial REM. ‘Tachometer RPM-Counter. Motor speed tester using [Arduino & IR sensor {ialSimple-MotorSpeed- TostersTachometar) Contactioss Tachometer iasContactioss- Tachometer) 2y menusutns20°6 ‘Tris Instructable will show you how to make a Portable Digital Optical ‘Tachometer using an Arduino Uno. Infrared Tachometer using Arduino Vilntrared- Tachometer-using Arduine!) Instead of a slotted sensor , it has a reflection based sensor, So by pinodisco How to Make Arduino Based Digital Tachomstor Simplo DIY Tutorial (iHo-to-a ‘Arduino-Based-Digital 1. You don't have to worry about the thickness of the rotor 2. The number of blades won't change your readings 3. Itcan akso read the RPM of drum style rotors which slotted sensor can't What is a tachometer ? ‘A tachometer is a device used to measure the RPM or Revolutions Per Minute of any rotating body, Tachometers can be contact based or non-contact ones, The non-contact or contact-ess optical tachometers usually use laser or Infrared beam ‘to monitor the rotation of any body. This is done by calculating time taken for one rotation. FEATURES Itcan measure RPM over 20k ‘Sensor range extends upto 78 cm Displays Maximum RPM when left Idle ‘Automatically toggles modes from "Idle" to "reading" Can be adjusted to match the ambient fighting conditions Itis comparatively cheap and easy to build ‘Can work without an LCD Programmable and supports customization Connect an SD card to the Arduino to keep logs [HRRLTAGHEME LEB. comORIG/FHK/OXDLIIN7YMX7YIFHKOKDLIOTYMXTY.ino) (fitpsedn.inetvuctables.conORIGIFK/QKDL/17YNXTVIFHKQKOLIO7YMX7Y.no) Step 1: Part List : 9 Mag ahegoa eomus Electronics Arduino Resistors - 33k , 270 ohm , 10k potentiometer LED - blue IR LED and Photodiode 16x2LCD ‘74HC595 shift Register Ribbon cable (3 wire ) Perfboard and headers Tools and Hardware ‘Soldering Iron Sokier Pins Screws Motors and DC fan Step 2: Build the Sensor Scr) Show All tems. For the sensor youl need an IR LED and a Photodiode, 1, Start by sanding the LED and photodiode to make it flat ( do not sand it too much ‘oF you" destroy it) 2. Then fold strip of paper sheet as shown, Make two such Structures so thatthe LEED and Photodiode fit ighty int it. Joint these together by glue and paint them black 3. Insert your LED and Photodiode in them in such @ way that the postive (longer ) lead ofthe LED is right above the shorter lead of the photodiode. 4, Glue them into the cover using superglue and solder the positive ( longer ) lead of the LED to the shorter lead of the photodiode. 5. Soller the 3 wire ribbon cable to the remaining leads In my case : 1. Orange wire > LED's positive pin and photodiode’s shorter lead 2. Yellow wire --> photodiodes longer lead 3. Green Wire --> LED's ground pin ‘You're ready to make the board >> Step 3: Making the Sensor Board SENSOR BOARD mt 906 Sn || 6| [remeron ose gh eg mi WAG |?" prem =k” ‘Take a small piece of Perfboard and place the components according to the ‘schematics. ‘The resistor values may vary depending on what kind of photodiode are you using. ‘The potentiometer helps in reducing or increasing the sensitily of the sensor. Finally solder the sensor wires as shown and solder 3 headers. ‘The headers (in order ) are shown on the left side of the schematic. ‘make a cuboidal paper tube whose length is equal to the sensor wires. Step 4: The 3-pin LCD “is This method uses a 8-bit shift register 74HC595 with a 16 x2 LCD. Normally this LCD uses 6 pins but using a shift register reduces the pin requirement by 3. ‘The ful instruction guide and the library can be downloaded from THIS WEBSITE (tt:feparish blogepatrv2010/0 controling ted-dsplay-with-shit him)! ‘## Recent Update : The library provided on the website has a lot of errors. and conflicts. ve uploaded my version of enhanced ShiftLCD library. | recommend you to use the one attached below. ‘The only thing that t've changed is : Instead of going for (2, 4, 3) configuration I've used (8, 10, 9) So be sure to change the pin mapping accordingly | SRIBRAP Ri ca.nstructabies,con/ORIGIFHAPEKSI2KBPTAB/FHXPEKSL2KBPTA6,rar) (fips edn. nsvucables.conORIGIF HXIP8KEI2KBPTAS/F LXP8KSL-KBPT46.rar) Step 5: Make the Box G02 ARDOINO OF Q Pisgeg OF cae i ano You can use any type of case for this but 've used a piece of cardboard to make ‘enclosure. (Cut the cardboard as shown and cut appropriate sized sits for the USB port ower jack and the sensor board, Mount the Arduino on the platform using screws. ‘tach the sensor and push it through the hole ‘Connect the LCD to Arduino as shown, Close the box and paint Step 6: Finishing Touch tical es IMado it! @ Favorite te Sharoe Make a small ( Smm ) hole to fix the status LED. Solder a 270 ohm resistor to the LED and insert it nto pin 12 on Arduino. Fold the cardboard along the lines to complete the enclosure. Keep the folds in place by using pins. Cover the sensor with a cubical paper tube to give additional mechanical strength, Place the LCD module over the box. ‘Your device is ready for calibration and programming, Step 7: Program SiALCD 48.10, 9% /DERNELED PINS Step 8: Explanation and Calculation This program basically monitors the IR sensor's value constantly and with the highest priory using Interrupts. ‘The Arduino Uno has 3 interrupts and the Interrupt 0 is pin 2 on the arduino. This line attaches an interrupt to pin 2 on arduino in "RISING" mode, This means that whenever the sensor goes from LOW to HIGH,, the function RPMCount(); is invoked, This means that in one revolution , the function will be called twice ( REV+ ). ‘Therefore actualREV = REV/ 2. sym 1000. ‘To calculate the actual RPM, we need the time taken for one revolution. And (milis() - time) is the time taken for one full revolutions. In this case , let tbe the time taken for one full revolution , so the total number of revolutions RPM in 60sec ( 60*1000 millisecond ) is pm = 60*1000 / t* actualREV => rpm = 60°1000 / (milis() - time ) * REVI2 OR rpm = 30°1000 / (milis() - time) * REV; Step 9: Testing and Troubleshooting Testing: 1. Take a DC fan and stick a white tape to one of its blades. Place the sensor 2~7 ‘em from the blades 2. The readings will appear on the LCD 3, If the sensor gets no readings for § sec then it will automatically display the idle screen 4, The Idle screen will display the maximum RPM reached in that particular run. TROUBLESHOOTING ; 1. Ifthe stalus LED is not biking, ty to adjust the potentiometer until the sensor is able to get readings 2, Ambient light may sometimes interfere with the sensor, Decreasing the sensitivity would eliminate the chance of getting false readings, 3. Check the polarity of the photodiode properly. 4. If everything fails , check your sensor manually by using Serial.printin( digitalReadt2) ); if your sensor doesn't show" 1" when any object is placed in front of it then try increasing the value of 33k resistor. Step 10: Conclusion ‘Though there are many optical tachometers available in the market, this device is ‘comparatively cheap and works quite wel, Ive tested it above 20000 RPM and it ‘works every time ! Being open source and programmable , there arise infinite possibilities of customizing this project. Feel free to ask anything about this project. Suggestions , queries , corrections and “grammatical errors” are welcome ! Happy Tinkering :) Seuaccamtae yee 1ac tae +e sOmonths ago Rut zammykoo (/memberfzammykoo) made it bs Just finished breadboarding this, thanks for the guide! Ididrit have a mosfet to ‘connect between the shift ragister and led but seems to be working fina. Ile pin S (onthe sr floating but hopefully figure out what to do with i | wantto eventually convert ths into a speedometer to measure MPH, anyone know where to find the code for that? om 5 | 2 months ago You have to take the radius of the wheel and make a conversion: v=w xr, where w isthe angular rate and ris the radius of your wheel. W needs to be inradis so you have to know that take the product of the rpm and the factor pi30 (it means that 1 radian per 30 seconds). So you have: v = pixwxr/90. The rate is on mis JurIFA (Imember/JuriF1) > zammykoo (Imembedzammykoo) om months age hello! : 9 do youknow the maximum rpm itcan measure? Murals (mamberMuraK7 mont 360 am ‘ ? Hcan usuggest which ype of arduio un want buy Because several pes ae presentinonine ramyact(memberiramyact) ¥ Mati (mamberMuatk7) ooo 4 months ago i want applications fortis type of ardunio “ BennyM10 (ImemberiBennyM 10) ‘1 months ago sen ‘You thnk it would work in a low lighting situation ike under a car to measure rpm, then convert to speed? Fog Si PunitJ (/member/Punits) » BennyM10 (/member/Berny¥10) Bao ltwould work better. But only for a litle while before itcollects *™Mn* 29° dust ‘MuraliK37 (ImomberiMuraliK37) months ago es am How to programme this setep Indigdardy (Imemberiindigdardy) Smonths ago reo 'bitpossible to lag the RPM data from this overtime and, for example, make it into anexcel graph? larryacoates (Imomberllarryacoates) Tmonths ago ey | must have missed something because |am baffled by something that you stated instep & - Explanation and caleviation where you stated the following. “This ine attaches an interupt to pin 2 on arduino in "RISING" mode. This means that whenever the sensor goes from LOW to HIGH , the function RPMCount(): is invoked. ‘This means that in one revolution the function wll be called twice ( REV+) ‘Therefore actualREV = REV/2" e What confuses me is why there would be TWO rising edge interrupts for each revolution, if there is only one reflective area on the unit being measured. As the Led emitter hits the leading edge ofthe reflective surface, itwillcause the IR Photo Diode detector to become activated and cause the voltage to rise to slightly less than the VCC voltage, which in turn will rigger the interrupt of hi to fre and invole the RPMCount ISR as the RISNG edge is detected. That voltage level will remain at the active level until the IR LED emitter sno longer over the reflective surface and exciting the R Photo Diade and the signal evel will FALL to 0 but because the Ini interupt only reacts to the RISNG edge, the RPMCount ISR will NOT be Invoked. Itwould seem to me thal the RMPCount would orly be invoked two times pper revolution if the Intemupt mode was set to activate on the condition of "Logic Change" ‘Thus i believe that your RPM value is off bya factor of 2, because you divide the time in half to account for the "2 interupts” that are not actualy 2, but are rather only one, Fog NathanJ63 (/member/NathanJ63) > lanyacoates Imemberlaryacoates) ety 8 months ago agree dividing by two put reading off by a factor of 2. There will sill be some error because we can assume the first time itinterupts was not 2 full revolution and should be subtracted off but the time would need to be Updated to account fortis ofset as well and milis() carttbe called within RMPcount because its an interrupter 5 larryacoates (/momberliarryacoates) > NatharJ63 memborNathanJ53) Res 6 months ago “Thanks for the feedback. Having been a professional software developer for 35+ year and an electronics engineer for 10+ years before that itjust didnt add up. As for subtracting 1 from the count, it might just be better to set the inital count to -1 and then the frst interrupt wil set the counter to zero and then all calculations willbe based upon all complete revolutions, Irrespective to how much ofthe first revolution was completed when the interrupt occurred. iA ‘monusuthar2016 (Imember/monusuthar2016) Smonths ago Rey I made a youtube video tutorial onit please watch hitps:iyoutubelymZsEdAWVM smatt_shungoh (Imemberimatt_shungoh) Tmonths ago ey Can create a function suchitit exceeds a certain limit, the rpm data is sent via esp loa server Ey kvnnam (Imemberikvanam) ayearago Ruy ‘This tutorials really great! Ihad a question though and fm new to Arduino so hopeful tm not asking for the impossible. Could the tachometer record the number of revolutions overtime? Like actvally count the number of times that the \white tag passed by? Kind of tke a spin counter and then store that data? I guess ifitcan count the number of RPMs then it could also calculate how many revoluions actually occured? BrianG62 (/memberiBrianG62) > kunnam (mombsriwnnam) nom 9 months ago Instead of removing the ine to reset the variable REV, you could just create another variable to store total revaltions. Then you would be able to have curent RPM and total rovoluons, This would be my suggestion. tro18 (/momberlolectro18) (author) » kinnam (momborkwrmam) ety ai ‘Yes you can do that using the same cade by deleting just one line : °¥°3" 99° *REV=0;" (inloop()) which resets the value of REV to 0. The program will go on increasing the value of REV but then it wor't display proper RPM. JuriF4 (ImemberiJuriF4) months ago Ris hllo, reat project. ke it) \whats the maximum rpm it can measure? sayiaha (ImemberilisayiahA) Smonths ago ey bb the pota double gang or single gang? doors (Imemberidoer_1) sOmonths ago Rat Like your" ible"! However. When replacing the MOSFET, with a 10K pot, (prightness control?) ‘what do you do with the pin 5 connection ofthe shift register? Does it get grounded ? Ommited? Leftin Limbo??? Very unclear to me... and not an schematic. Thx. ‘zammykoo (/memberizammykoo) > dos 1 imembeidoe,_ 1) a ‘10 months age Hey did you ever figure this out? left my pin § floating and my led stil works. Iposted a pic above. Fl ‘omkar?1t(/memberlomkar711) 0 months ago Rat LL thank yout it was very helpful Fig Jepherc (Imemberiepherc) tO months ago Rey Fi. im tying to make this project. but alli can see with my work isthe status led at piint2.led not on also the photodiode and led. may i contact you thru fb? Fog Tariqitt (Imember/Tariqt1) ‘1 months ago ea ‘could i use my laptop instead of Arduino 117 by taking my sensor reding trough my audio jack and make a program via ct + !!? ‘and make itread the pulses as RPM !? ‘superonigma (/member/superenigma) ‘1 months ago Rea Ib itpossible to do this with a breadboard? * electrots (/member/electrot8) (autor) > superenigma (memberisuperengma) = 2 * = «| Havent tried ityet but cant expectitto be too accurate, 2 + months ago Aas ‘Yes, the project can be laid out ona breadboard as sage (Feo ‘well Just folow the schematics that 've uploaded, Fog ‘alan6383 (Imember/alan6383) ayoarago Rey [sit possible to convert Rpm to mmimin fone revolution = Smm travel MaxwellH2 (/member/MaxwellH2) ayearago many What isthe lowest RPM this setup will measure accurately? Thanks Fig tro18 (Imemberlelectro18) (author) » Maxwell2 YmemberMaxwell2) ayearago any For RPM < 1, youll need separate logic and a couple of ines to be added if ‘you decide to display it on the LCD. Finksrides (Imemberirinksrides) ayoarago Ree should not buy parts from ebay, use digikey or better, Mouser dot com. shollist (Imemberishollist) ayearago ran Hi, can rip out anirled from an old remote? eg MikeD11 (Imember/MikeD11) » sholis1 (membershalist) a year ago enw Well you need a sender and a receiver, The IR remote is a sender. So youd have half Ijust bought 10 each from eBay for $1.00 Of couse there is that 30 day wait. eg MikeD11 (Imember/MIkeD11) > MksO't /memberMikeDt) a y hitp:liwww ebay.convitm/1721596052337 _trksid=p2057872.m2749.12649&ssPageNam sTRK%3AMEBIOX%3AT tankman93 (/member/tankmand3) ayeerago spy Hi there. Nice work on the detailed and updated content. Ihave a querry though. How accurate is this sensor? lam interested in using this for my final year project to measure RPM of a spinning drum outdoors. tro18 (Imemberlelectrot8) (author) » tankmand3 (membertarkmanss) * 7 ayearago as «| | cannot guarantee 100% accuracy but yeah, the precision” ”°*"°9° “*" depends on what resolution you set ‘aj kmunnery (imember/kmunnery) ayearago may fi found this instructable by searching Google for an RPM controlled LED dimmer system will this setup work thanks. Fog x gq electro18 (/memberielectro18) (author) > kmunnery (/member/kmunnery) * How do youwishto uso anRPM value as adimmer? °¥"2" 9° So * kmunnery (mmemberikmunnery) > electota Vmantereectot8) soy as the RPMS increase past 1k the LED's willtun on and gradually °°" °9° increase intensity till my motoreyele reaches redline which willbe max intonsity Fag tro18 (Imemberlelectro18) (author) » kmumery (memberkmunnery) ayearago sy sectot8 Ymembertecto8) om ok makes some sense. probably more if | could program. ae where would | add the “map” function or could I pay uto make one or at least what my exact steps would be like where would Iget the rpm data, Fig trott (/member/electrot8) (autor) + kmunery (memberkmunnery) ayeerago any mai Sure, catch me on Facebook. Il give you detailed Instructions ther. eo [aj kmunnery (/memberykmunnery) > sectot8 Ymemnberletor8) soy (ok what should Isearch on facebook to find you? electro’ 77“ /8™" 99° a tr018 (Imember/electro18) (author) » kmunery (memberkmunnery) aye ‘Youll finda fink to my facebook profile onthe desktop. 290 ey version of my instructable profile. htt) ayearago aay fe Nilesh (/memberiN Can you help me with the code lke i want o take the feed back from the sensor assume it says 500 rpm can i set the rp of motor to 250 or any specific value. How can ido that ? Fig s a tro18 (Imember/electro18) (author) > NileshHt (ImemieriNlestHt) ey «| To control the speed of the motor youl probably need a dedicated °°" °9° ‘motor driver whose inputs shall be connected to the same micro controler. Feed a value to the MCU and a couple of logics to be added in the program ‘hich wil go on reducingfinereasing the speed of shaft as per the required RPM valu, = ‘Quy NgBnN (/member/Quy NgénN) made it ayeerago sy I made it. Your tutorials better than tis site: https:brainy-bits.comtutorials/speed-sensor-with-arduino/ (htpsedh.nstuctables.con/F 2M/EEZDINZ25.2CIF2MEEZDIN225.2C.LARGE jpg) * a 018 Imemberielectrot8) author) + Quy NainN UmemberiQy NateN) . Good to hear that! Thanks eee oe fe ‘CraigRSS (/member/CraigR55) ayearago Rash am unable to source the TNO604N, Willa BS170 BS170RLRAG MOSFET N- CHANNEL 60V 0.5A work as a substitute? Please excuse my lack of knowledge. Regards, CR & a tro18 (/memberlelectrot8) (author) + CraigRS5 Vmember/CraighS5) aes | AMOSFET in this case is not so necessary. the schematicit ° ¥°0" 99° serves as a brightness adjuster for the LCD BL. You could use a current limiting resistor instead, that shoud work just fine. hope this helps melarka99 (/memberimelark999) ayearago Ray Would your sketch work if lused a different sensor that was picking up a vollage spike (highfow) instead of using an IR sensor? Would Ineed to change the calculation? (titos ea. nstructables.convF OO/5MXC/NZBAINS/F OOSMICINZBSIN3.LARGE jpg) Fog # More Comments FEATURED CHANNELS. Woodworking Paper —‘Kichen Hacks «Puzzles «—=—Lasor Cutting’ «Space -—Homesteading 30 Pritng Sowing (agtype- —_{tagtype-—tagiype-——(agitype-—(agilype-—(Ragitype-—(aglype-——taglype-—_—(laglype: icategory- alcategory-idikeyword-_idleategory-_—idfeategony-——_—idlkeywrd-—idcategory- ——idleategory-__ileategory- \workshopichannetcratichannel- kitchen’420hacks/playichannel-workshopichannel-astronany/?hamelchannel- technologyichannabrafchannel- woodworking?) paper!) sor=FAVORITES) puzles!) __laser-cuttng!) sort=FAVORITES)nomestesding!) 30-Printngl) sewing!) Newsletter Lt your inbox help you discover ‘our best projects, classes, and contests. hstuctables wi help you learn how to make anything! enter ema Tm Find Us Facebook (http swmaufacebook cominstructabes) Youtube (hitp:shw.youtubs.conuserinstructabisty) Twiter (ntp:inwtvitercominstructables) Pinterest (hp sw pinteresLcominstructables) GGoogle*(hpsinus.google.com/tinstructables) 1 ‘About Us Who We Are (labouv) ‘Advertise adverse!) Contact (/aboutlcontactjsp) obs (/communityPostions-avalable-al-nstructablos/) Help (idInowto-wrte-s-great- instructable!) Resources For Teachers (teachers!) Residency Program (pieriresidency) Gift Premium Account (laccountgive?souree Forums (community) Answers (tagtype-question”'sor=RECENT) Stemap (/stemapi) “ams of Sone (pus. autodesk comiadsh'sonetiter siteI0=1251128 1959721) | Pésaey Statement (hlpilua autodesk conladskisendtiten?etelD=1251128i8=21292079) | Legal Notces & Trademarks (puss autodesk comfegabtices trademarks! Mobi Ste (htps:wmuinstctates com) a (itp use. autodesk convadsh/senlepeindox?e207815458sitlD=125112) (© 2018 Autodesk, he

You might also like