Тёмный
No video :(

Arduino Tutorial: Tachometer (RPM Counter) 

InterlinkKnight
Подписаться 30 тыс.
Просмотров 275 тыс.
50% 1

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 575   
@bagoes13
@bagoes13 3 года назад
after 2 days search in google, finally, this is what i want. THANK YOU...
@magwitch
@magwitch Год назад
Wow very interesting, I'd never considered measuring the time between pulses over number of pulses per time period before. Thanks for including links to your hard work, much appreciated from the UK.
@interlinkknight
@interlinkknight Год назад
I'm glad I could help. Cheers
@leonardocardoso7099
@leonardocardoso7099 5 лет назад
Thanks for sharing, that is exactly what I've looking for. This is the best video about arduino tachometers I found on youtube.
@averaldo_
@averaldo_ 4 года назад
Oh man thank you AGAIN. I've past the last 2 days trying to figure out why my tachometer wasn't working. Tried the number of pulses per time interval but had no success. But now you gave me a new way to look at the problem and it seems so much better! Thank you very much, I'll probably be able to retrofit my '69 car gauges with a more accurate one! :)
@interlinkknight
@interlinkknight 4 года назад
That's awesome! I am really happy that I could help.
@averaldo_
@averaldo_ 4 года назад
@@interlinkknight it worked like a charm! Now I need to refine it and include it in my full sketch. Thank you again!
@averaldo_
@averaldo_ 4 года назад
@@interlinkknight when I said refine I wasn't saying it's not good. I mean to Match the rest of my code! No misunderstood here, thanks again
@interlinkknight
@interlinkknight 4 года назад
I understand. Don't worry. Good luck with your project.
@tnamen1307
@tnamen1307 4 года назад
@@interlinkknight InterlinkKnight please show how to automatically lock a car when the car reached 40 kmph and AUTO unlock when engine is off from start. Awaiting with much appreciation. Thanks.
@benyaminnorouzi331
@benyaminnorouzi331 3 года назад
the Video is very very good and that is exactly what I've looking for. This is the best video about arduino tachometers...
@zzzxhrg
@zzzxhrg 4 года назад
SO great. This video is SO great. I'm in a project right now just that requires just this (except my output must be directed to an analog 0-10V pin). You just saved me an ETERNITY of trial and error. GREAT job, kudos!!!!
@interlinkknight
@interlinkknight 4 года назад
I am so happy to hear that. Thanks for the comment
@RendernStattGendern
@RendernStattGendern Год назад
LOL i have to do the exact same on an 1993 Audi 100.
@vantalane
@vantalane 3 года назад
One of the cleanest code and greatest outputs I've seen so far. SUBBED!
@interlinkknight
@interlinkknight 3 года назад
Aww. You are so nice. Thank you
@randywetzler5976
@randywetzler5976 4 года назад
Thanks for sharing! I was working with a hall effect sensor today and was frustrated by the inaccuracies and refresh rates. I will have to try your code.
@fatchickencatcher
@fatchickencatcher 3 года назад
Hi, fantastic stuff. Really helped me out. Your code comment " CurrentMicros should always be higher than LastTimeWeMeasured, but in rare occasions that's not true." Arduino documentation: "micros() This number will overflow (go back to zero), after approximately 70 minutes." Hope this helps.
@Rattlegunner
@Rattlegunner 4 года назад
Thanks so much for this awesome video and code. It's really well put together and the code is very well documented/commented. I'm really new to coding and Arduino, and just by reading your code and comments (and a lot of furious googling) I have learned so much. You have probably saved me months of work. Cheers.
@interlinkknight
@interlinkknight 4 года назад
Thanks for those words. You have no idea how happy I am knowing that I could help you in that way. Your comment makes me smile :) Good luck.
@tnamen1307
@tnamen1307 4 года назад
@@interlinkknight InterlinkKnight please show how to automatically lock a car when the car reached 40 kmph and AUTO unlock when engine is off from start. Awaiting with much appreciation. Thanks.
@cheezmartian
@cheezmartian 2 года назад
@@tnamen1307 You should be able to do that with a simple loop + function. When RPM > SETVALUE = Lock(1) and set lock to one on setup
@ramkumarshanmugasundaram2753
@ramkumarshanmugasundaram2753 2 года назад
This was the one the tachometer in arduino was searching Thankyou so much 🙏🏻🙏🏻🙏🏻🙏🏻
@interlinkknight
@interlinkknight 2 года назад
:)
@ElectricCruiser
@ElectricCruiser 3 года назад
Thanks for the video! Helped me understand a few things about a hall sensor tach I bought for my old boat. Cheers!
@nakamuraandy5231
@nakamuraandy5231 3 года назад
Hi @InterlinkKnight by far your tutorial is the best video about RPM meter/tachometer with Arduino (DIY). Thank you very much!!!
@interlinkknight
@interlinkknight 3 года назад
Thanks :)
@EdwinHwuHacks4Science
@EdwinHwuHacks4Science 3 года назад
Best RPM sensing video! Can't thank you more!!!
@kostashellas
@kostashellas 4 года назад
Interesting RPM implementation, I've combined it with ESP32 PCNT and the results are really impressive. To do test in noisy pulse environment by reading RPMs from my gocart 2-stroke engine from spark coil (via induction coil). Thank you for sharing!
@interlinkknight
@interlinkknight 4 года назад
I'm glad I could help
@thecasildo1354
@thecasildo1354 3 года назад
Hi sir can you help me for code for esp32 ?
@thecasildo1354
@thecasildo1354 3 года назад
@@interlinkknight thanks for sharing really help me
@Wazaarbazaar
@Wazaarbazaar 3 года назад
Wow anyway u could share code?
@alainaubry5615
@alainaubry5615 5 лет назад
Very nice project and well documented. Thanks a lot!
@ottokueng4236
@ottokueng4236 3 года назад
A really good Arduino program. Most of the Tachoprogram count the impulses per time. For a low rotation (city car) and for a use as speed control the reaction time they are to slow. And you thought on all situations. But even using a Hall Sensor Switch with Schmitt Trigger it was nescessairy to implement a RC Filter to avoid false interrupts. I use a disc with 36 magnets on a wheel with 60 cm diameter to measure and control up to 45 kph down to 2 kph until it shows Zero. Thank you verry much.
@interlinkknight
@interlinkknight 3 года назад
That's great! I'm glad you like it :)
@kennypicPSN
@kennypicPSN Год назад
Great video I haven't played with Arduino in a very long time and this was very useful I actually took this code and added in a function to activate a relay as a kill switch at a set RPM with a set delay to use as a Small engine rev limiter
@interlinkknight
@interlinkknight Год назад
That's great. I'm glad I could help
@sonyseven777
@sonyseven777 3 года назад
I love it! I will use in my car, your code looks so great! Thanks!!!
@interlinkknight
@interlinkknight 3 года назад
Cool! It's always nice to know I could help. Good luck
@samwalter3646
@samwalter3646 3 года назад
Really good set-up mate love your work
@msmmaze
@msmmaze 4 года назад
Many thanks for the video. This was a real life saver for me. Keep up the good job bro.
@tawfiknajeh6218
@tawfiknajeh6218 4 года назад
I hope it is ok to ask another question In your code - Simple tachometer (Serial)- you have: "FrequencyRaw = 10000000000/ PeriodAverage" to calculate the frequency using the period between pulses. but I think we need to use just 1000000 instead of 10000000000 If I am not mistaking the " PeriodAverage " in microseconds (1second = 1000000 microseconds). Thanks in advance
@interlinkknight
@interlinkknight 4 года назад
I'm not using any unit there so don't pay attention to how many zeros does it have
@Ken-oe3ch
@Ken-oe3ch 5 лет назад
Nice job. I am using a Pro Mini board connected to Pin 2. I did find it necessary to use pinMode(2, INPUT_PULLUP) to avoid extraneous signals resulting in unstable results at higher speeds.
@whizyp
@whizyp 2 года назад
Was it?
@1ntotheunknown841
@1ntotheunknown841 Год назад
where i can write it?
@p8litehuawei804
@p8litehuawei804 4 года назад
respect...!!! thanks for great tutorial & example codes...
@takedowntheccp.5167
@takedowntheccp.5167 2 года назад
very nice! thanks much
@renmaru4485
@renmaru4485 4 года назад
best vid on youtube. thanks a lot.
@McPcholkin
@McPcholkin 5 лет назад
Thanks for your examples, it perfect for my project.
@trobert132
@trobert132 4 года назад
this is exactly what I need, thanks so much!
@interlinkknight
@interlinkknight 4 года назад
No problem
@tnamen1307
@tnamen1307 4 года назад
@@interlinkknight I have a project to.auto lock and unlock car please show how to automatically lock a car when the car reached 40 kmph and AUTO unlock when engine is off from start. Awaiting with much appreciation. Thanks.
@kronosg4279
@kronosg4279 5 лет назад
Nice project as always. I was actually looking for a smoothing code. Cool!
@interlinkknight
@interlinkknight 5 лет назад
Great!
@TheLolilolou
@TheLolilolou 5 лет назад
Great presentation ! Thx a lot
@norkator
@norkator 3 года назад
This guy is playing waaaaaaaaaaaaaay too much with Arduinos. Great video!
@leeharrington6438
@leeharrington6438 5 лет назад
Great work (as always) many thanks for sharing.
@user-xs9wb8tj5r
@user-xs9wb8tj5r 5 месяцев назад
Thank you, this is a great project! The most comprehensive guide. I am running this succesfully with one sensor and 4 magnets, but my readings are only starting at 18-20 rpm. I was wondering if adding more magnets and a second sensor would get me lower readings between 1-18 rpm. Also should I place the second sensor on the opposite side of the 1st sensor?
@interlinkknight
@interlinkknight 5 месяцев назад
I don't recommend adding another sensor. To read low speed you just need more magnets in the wheel/shaft. The more pulses per revolution, the lower RPM you can measure
@bilalel-maraghy997
@bilalel-maraghy997 3 года назад
Thank you man, appreciate your work soooo much
@muvahid1990
@muvahid1990 4 года назад
Damn your tutorial is very very good)), Thank You very much!!!
@shahzaibshamim6524
@shahzaibshamim6524 4 года назад
I want to implement this in a control system for measuring rpm to find a transfer function of a motor using a bump test. For that, I need a transient as well as steady-state response. Does smoothing give me an accurate transfer function or it will filter out values?
@interlinkknight
@interlinkknight 4 года назад
The smoothing takes multiple readings and average them
@DavidPlass
@DavidPlass 2 года назад
This code worked a treat. Thanks!
@interlinkknight
@interlinkknight 2 года назад
I'm glad I could help
@electronic7979
@electronic7979 5 лет назад
Excellent project. I like it 👍
@maksimpomelilo597
@maksimpomelilo597 4 года назад
The best code and you too!!! Thank you very much!!!
@RavindraRaikar
@RavindraRaikar 3 года назад
Absolute Genius... Code Works fine... Could you suggest adding calibration factor according to diameter of wheel... I want to use it to monitor speed of flywheel
@interlinkknight
@interlinkknight 3 года назад
I think you can just add a simple equation that converts RPM into speed
@lespaul12307
@lespaul12307 Год назад
Thank you very much!! It worked perfectly for my application!
@interlinkknight
@interlinkknight Год назад
I'm glad I could help :)
@michelebertoni2389
@michelebertoni2389 9 месяцев назад
Nice video, thanls. BTW, what about display on the upper right corner? Did you buy it or did you made graphic interface in some way?
@interlinkknight
@interlinkknight 9 месяцев назад
It's called "Nextion display" and I designed the graphics using the Nexiton Editor. I made a few video tutorials about that display, so you can check it out
@NaiyimsGarage
@NaiyimsGarage 3 года назад
Thank you and I will start to do this Tacho for my E-Go kart
@interlinkknight
@interlinkknight 3 года назад
That's cool!
@NaiyimsGarage
@NaiyimsGarage 3 года назад
@@interlinkknight I already did build this set with Hall sensor and your program calculation quite accurate on Frequency reading compared with my Frequency Counter. Thank you.. Nice work
@interlinkknight
@interlinkknight 3 года назад
I'm glad. I'm happy to help :)
@NaiyimsGarage
@NaiyimsGarage 3 года назад
@@interlinkknight I have Question , Can I use the Basic NX4832TO35-011 instead of Enhanced version on this HMI file? because cost too expensive for the Enhanced version
@interlinkknight
@interlinkknight 3 года назад
Yes
@kulaniscap
@kulaniscap 2 года назад
You are great, love these
@oswevega2939
@oswevega2939 3 года назад
amazing info. congrats !
@LQhristian
@LQhristian Год назад
Excellent work!!
11 месяцев назад
Good article on tachometers -- thank you.
@elricho72
@elricho72 5 лет назад
Nice project, thanks for share
@bruno9451
@bruno9451 4 года назад
unlike others u did a grate work, keep it up. i m happy to see the code for different platform , which is nice, also u explained.
@interlinkknight
@interlinkknight 4 года назад
Thanks for your kind words. I'm glad I could help.
@k_m_atfs_official
@k_m_atfs_official 3 года назад
Superb, in-fact thanks a lot. Actually I was searching and got an idea from this project.
@interlinkknight
@interlinkknight 3 года назад
I'm glad. What was your idea?
@k_m_atfs_official
@k_m_atfs_official 3 года назад
@@interlinkknight actually I have a 3D printer and its filament sensor is only detecting filament either 0 or in 1 condition but I want to make a device which detect while filament is stucked ( non moving position ) for few seconds
@k_m_atfs_official
@k_m_atfs_official 3 года назад
@@interlinkknight please advise will it work or not
@interlinkknight
@interlinkknight 3 года назад
Yeah, that would work. Make a wheel spin with the filament and a few magnets on the wheel. With the hall effect sensor detecting the rotation, if for a while doesn't detect pulses, then create an action like an alert. Although it has to detect if it's printing or not, so that way doesn't alert you when you are not printing.
@k_m_atfs_official
@k_m_atfs_official 3 года назад
@@interlinkknight thanks dear
@gsmith8234
@gsmith8234 4 года назад
Thank you for your service to the rest of us. Please forgive me if I'm overlooking it, but do you have the schematic for the hall effect sensor and the nano in here somewhere?
@interlinkknight
@interlinkknight 4 года назад
I show that in the video
@gsmith8234
@gsmith8234 4 года назад
@@interlinkknight thanks for the reply. I do see the schematic showing the pull up resistor for the sensor, but what about the rest of the tachometer. I'm a little ignorant
@interlinkknight
@interlinkknight 4 года назад
You mean the display? The pins are listed on the sketch comments, on the top
@picopharade1272
@picopharade1272 2 года назад
@@interlinkknight we don't see any schematic for the sensor wiring
@cutejellosisters9453
@cutejellosisters9453 2 года назад
Glad to see the solution I was trying to find, I am having no knowledge of electronics if you plz can help me build this.
@interlinkknight
@interlinkknight 2 года назад
Not sure what do you want me to do. I already show the connection and i provided the code
@AliPasha200
@AliPasha200 4 года назад
Dear i have a question i want to measure the rpm using sensor such as magnetic pick up or inductive pick up which kind of sensor i should use to measure the rpm by sensing engine ignition coil hight tenshion cable side (i.e. electro megnation induction)?
@AliPasha200
@AliPasha200 4 года назад
Also could i just use hall effect switch A3144 for measuring magnatic lines of force in ignition coil directly? I am using arduino and in past i use pick up coil signal to measure rpm but now i want to measure it from ignition spark plug coil as most of market meters do in workshops
@interlinkknight
@interlinkknight 4 года назад
There's only one way to find out if the magnetic field created by the ignition coil is enough for the hall effect to detect the pulses. Try it! You can also try with a coil. I never tried any of this so I can't help you. But you don't loose anything by trying. Let me know how it goes.
@AliPasha200
@AliPasha200 4 года назад
@@interlinkknight ok i will try sir
@chrischanx.7332
@chrischanx.7332 Год назад
Super vielen DANK! VIEL gelernt!!! Thanks a lot!
@search4truth616
@search4truth616 4 года назад
Very clever. Thanks.
@militech9
@militech9 2 года назад
Great video thanks for the info! I am looking to measure the shaft deceleration. When applying a brake, I would be interested in taking a speed measurement every fraction of a second (maybe every tenth?) and seeing how quickly it came to a stop on a graph. I'm assuming I would have to increase the number of magnets to get this kind of accuracy. Do you think these components in your video would be capable of achieving this?
@interlinkknight
@interlinkknight 2 года назад
Yes
@MoesKeckeEcke
@MoesKeckeEcke 2 года назад
You use a 3D printed disc with 36 magnets, every 10° and run the hall sensor to the first interrupt pint of an arduino uno.. Then you use the library "elapsed Millis" which also features a elapsed micros time.. You setup the interrupt and a big variable You start the timer You enable the interrupt and set the time to 0.... When interrupt hits you store the time in an array or whatever you want... You get declaration by declining timer events, arduino uno is very much fast for this if your code is efficient
@militech9
@militech9 2 года назад
@@MoesKeckeEcke thanks for the reply!
@fioulmaster
@fioulmaster 3 месяца назад
Thanks a lot for this tutorial! I have few questions: I would like to make a "shifter" for my motorcycle. The system would work like this: when I press the speed selector pedal, via a micro-contact I cut the ignition for xx ms depending on the engine speed while I shift into gear. The micro-contact would be connected to an input of the Arduino and an output of the Arduino would control a Mosfet to cut off the ignition. Would these inputs/outputs prevent your program from functioning correctly? Can you help me?
@interlinkknight
@interlinkknight 3 месяца назад
You could run that program without affecting the tachometer code because the tachometer counts the pulses using interrupts that are not affected by the main loop
@race2winss
@race2winss 4 года назад
subD!! awesome video!! Thanks for your hard work and very helpful video!
@solomoon67
@solomoon67 3 года назад
Ur video is really awesome and Helpfull and very smart coding process. I have just one question , if I need to add another interrupt so i can calculate the rpm for two wheels , Is all i need is to replicate the same code with different variables ofc ? is that going to slow the calculation process?
@interlinkknight
@interlinkknight 3 года назад
Someone told me they tried it and worked. The arduino uno/nano has 2 interrupt pins (pin 2 and pin 3) so just use those. Let me know if works
@marceloestigarribia5669
@marceloestigarribia5669 Год назад
Amazing. Thanks for sharing!
@yusufegriboz9012
@yusufegriboz9012 4 года назад
woow it is a great idea!
@qkidamon
@qkidamon 2 года назад
Hi. Great Job. What kind of electrical/signal protection/filtering circuit do you use for the entries of pulses signals from sensors to arduino pins ? Do you think any kind of this protection/filtering circuit will be a must when tacho signal comes from a 12V PWM fan mainly used for Computer Liquid coolers ? Should i be confident about signal comes correctly filtered and protected from the origin at fan circuitry ? Thanks in advance and again, great, great job.
@interlinkknight
@interlinkknight 2 года назад
What you need is a schmitt trigger to filter noise, but I prefer using sensors with included filters, like that ones I mention in the video. As far I know, those computer fans already have a filtered sensor. Only one way to find out (trying). I guess you don't have an oscilloscope? That would help to see if the signal is clean. Basically if works, it's fine. If you see weird readings, then you need to add the schmitt trigger. I hope it helps. Good luck
@TheFlybyman
@TheFlybyman 2 года назад
very cool, thanks !
@bringithard6721
@bringithard6721 3 года назад
that got a sub
@giancarlodaravina
@giancarlodaravina 2 года назад
excelent proyect!!
@niezwyciezony9039
@niezwyciezony9039 8 месяцев назад
Hi, Great video. Question. Can you send a diagram of connecting elements with the Nextion 3.5" display. Thank you very much ​
@interlinkknight
@interlinkknight 8 месяцев назад
I have several tutorial videos for the nextion display. On part 1 it shows the connection diagram
@multimargejta123
@multimargejta123 Год назад
Great tutorial! Can I trigger on falling edge instead of rising? Do I need to modify something else in the code?
@interlinkknight
@interlinkknight Год назад
Of course you can change the trigger type. The only thing you might want to change is the pulses per revolution. By default it's 2 pulses per revolution, but each person put different amount of magnets in their wheel/shaft
@TheBlaine85
@TheBlaine85 2 года назад
Thanks for this! I want to try to build this system on a motorbike (but I'm not quite sure if it will be enough with a small magnet). Will try to update this comment in the future with my results, in case it can help someone!
@cicizhao2118
@cicizhao2118 2 года назад
Hi Alejandro, maybe does your project requires a tft lcd module?
@javiso85
@javiso85 4 года назад
Many thanks for sharing this proyect, I am trying to put a 7 segment display to show the rpm value with ledcontrol library but it enter in conflict with the code. Maybe the problems is the clock? also trying to do a shift light with some ws2812 leds via fastled library and I have the same problem. Do you know how to solve the problem to use this libraries? Thanks!!
@interlinkknight
@interlinkknight 4 года назад
No idea what could be the problem. But since you also have a problem with a library, the cause might be on the code for the 7 segment display. What I do in those cases is to copy parts of the code, one a the time and see when stops working.
@javiso85
@javiso85 4 года назад
@@interlinkknight Many thanks for the answer! the problem where on the fastled library, I changed it to Adafruit_NeoPixel.h. Now I have woking the RGB led Strip as a shift light and the 7 segment display showing the rpm. Your code is the best with diference because you have real time rpm. Congrats and thanks for sharing!!
@interlinkknight
@interlinkknight 4 года назад
I'm glad I could help :)
@DPoly
@DPoly 4 года назад
Wow , you are Boss!
@cdiperformanceparts4364
@cdiperformanceparts4364 11 месяцев назад
Cool stuff
@user-sx8kv9xe5i
@user-sx8kv9xe5i 6 месяцев назад
It works brilliantly, is it possible to make it display to one decimal place? I’m measuring low rpm
@interlinkknight
@interlinkknight 6 месяцев назад
Of course you can, but you need to separate the decimal numbers yourself with different objects
@JosephLorentzen
@JosephLorentzen 3 года назад
I am attempting to repurpose a treadmill motor. It has 2 leads for 0 to 90 vcd and two for the feedback sensor. Since that motor was given to me, I have no idea as to brand. I figure that leads just go to a magnetic coil rather than a hall effect transistor. Do you think a simple op-amp would bring up the signal enough for the ardiuno?
@interlinkknight
@interlinkknight 3 года назад
An op-amps can send a signal to arduino. The real question is: can you really get a clean signal from that setup?
@TheTravisReese
@TheTravisReese 5 лет назад
I haven't fully gone through all your code on this to understand it, but I went ahead and gave it a quick run. Seems to work great from around 300 RPM on up to 2000 RPM. But it's basically giving me very weird results below that. Sometimes it just shows 0 and sometimes it will start off showing an rpm over 49,000. In increased your zerotimeout to 1,000,000 but even this doesn't seem to fix it.
@interlinkknight
@interlinkknight 5 лет назад
I'm pretty sure the problem is your sensor. If you have an oscilloscope you can check the signal to see if is clean. What kind of sensor do you have?
@TheTravisReese
@TheTravisReese 5 лет назад
@@interlinkknight It's this sensor... www.amazon.com/gp/product/B07P1GKQRM/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1 I've used this and an IR sensor. Both work fine using my own code. Only seems to be a problem at low RPM with your code. Your code definitely has some nice features in it however.
@TheTravisReese
@TheTravisReese 5 лет назад
I'd copy and paste my serial console but a little long for a youtube comment.
@interlinkknight
@interlinkknight 5 лет назад
You can email me more details
@TheTravisReese
@TheTravisReese 5 лет назад
InterlinkKnight what’s your email?
@nickspace6230
@nickspace6230 2 года назад
I've been messing with your code for 2 days with no luck. First I tried adapting it to a digispark attiny85 and a 16x2 lcd screen I had laying around but not sure i have the interrupt pin changed correctly to pb3 (I can send code if interested). Switched to a nano and a KY-024 hall effect sensor module (same module I used with the digispark) and am getting readings all over the place. They are mostly very high (100,000+), the module has a potentiometer to adjust sensitivity and I can sometimes adjust it just right to get a fairly consistent reading but as soon as I adjust motor speed slightly up or down (15% +or-) the numbers go all over the place again and I have to re-adjust the sensitivity which involved moving the module all around and getting it realigned... Sometimes I am unable to get a consistant reading at all, also I DO have a 10k pullup on the digital, and yes I was connected to the digital line and not the analog output of the module. Could it be this type of module? Is this normal behavior? I thought that the code would automatically adjust based on the motor speed? I do have a 10k pullup on the data line. I ordered some bare A3144's to try but this should still work shouldn't it? (here's the module I was using arduinomodules.info/ky-024-linear-magnetic-hall-module/)
@interlinkknight
@interlinkknight 2 года назад
That's a very common mistake. Like I mentioned on the video, it's very important to have a very clean signal with a schmitt trigger. Your module is a Linear Hall-Effect Sensor, which that can't work. Think of it this way: the sensor has to be LOW or HIGH, and be sure to not send false pulses between the states (bouncing). How we do that? With a hall effect switch with an included schmitt trigger. The A3144 is exactly that. When you get to test with that, it's going to work. Arduino only counts when go from HIGH to LOW. There's nothing to adjust about that regarding speed. If you would see the signal in an oscilloscope, you would understand better why your sensor is not the proper sensor for this. Actually, I show this on the video too. Best of luck :)
@hassannawaz
@hassannawaz 3 года назад
I'm thinking of building a digital meter for my manual treadmill. So i can use "hall effect" chip with your code and multiple the rpm with distance the belt will cover when roller complete a rotation. Should work right? I never did any projects with arduino.
@interlinkknight
@interlinkknight 3 года назад
I'm not sure you want to measure the belt instead of the roller
@pony8030
@pony8030 2 года назад
Thanks for knowledge. But i have a qusetion at 3.06 why 31Hz = 930 rpm. It should be 1860 rpm.
@interlinkknight
@interlinkknight 2 года назад
That's because in my wheel I have two magnets, so I have two pulses per revolution
@krystiank4237
@krystiank4237 4 года назад
Work Amazing :D
@kieranpotter1182
@kieranpotter1182 3 года назад
Thanks - this was very informative and easy to set up. Now I am trying to add onto your code to have it calculate rotational acceleration from changes in RPM over time. Do you have any suggestions on the best way to implement this - where to add this within your code and what variables would make the most sense to use?
@interlinkknight
@interlinkknight 3 года назад
That's interesting. I never done that but what comes to my mind is something similar with what I do with smoothing the RPM, which it stores several values in an array of variables. You just have to do simple math between the current reading and the old reading.
@kieranpotter1182
@kieranpotter1182 3 года назад
@@interlinkknight thanks a lot for your reply. I realized the current and previous recorded RPM values are saved in the array in your smoothing code, like you said. Now, to get the time that has passed between the instant those two RPM measurements were taken, would that be equal to your "PeriodBetweenPulses" value, or would I need to set up a new array with the timestamps corresponding to the RPM values?
@interlinkknight
@interlinkknight 3 года назад
I would do a new array, so the values are smoothed already. To get the time that has passed, you need to record the time in a variable using the micros function
@mohamedkhalil8200
@mohamedkhalil8200 2 года назад
Hallo , thank you for replying for a lot of my questions before ur projects are amazing. I just have one more question , i am working on two hall effect sensors that are integrated on the two wheel and i use your code to calculate the speed of each one then i calculate the median of the two wheel to get the speed in middle rear axle wheel. I am getting a lot of noise or more of non constant value of the speed , i solved that by increasing the value of numreadings which helps in stabalizing the value but uses a lot of dynamique memory of the arduino. Do you have any advices of what i can change to get more of a stable result value? , Thank you.
@interlinkknight
@interlinkknight 2 года назад
I'm glad you like my projects. About your problem, I'm guessing you are using a different hall effect part than mine? You put the pullup resistor in the output?
@callmezucc9318
@callmezucc9318 2 года назад
Could you theoretically add many magnets to 'take up' the gap between pulses for low RPMs? Then specify in the code how many pulses per rev? I'm new to Arduino and I'd like to expand my knowledge. Thanks!
@interlinkknight
@interlinkknight 2 года назад
Yes, that's exactly right
@francescoranchi7415
@francescoranchi7415 2 года назад
Hello I've build it myself and it works amazingly!! But I'm facing an issue, how can I change the sensor PIN which is number 2? is it the part of the code where it's written " attachInterrupt(digitalPinToInterrupt(2), Pulse_Event, RISING); // Enable interruption pin 2 when going from LOW to HIGH." or how can i change hall effect sensor pin input signal? thanks
@interlinkknight
@interlinkknight 2 года назад
Yes, that's the lone that selects the pin. But you most use a pin that has an interrupt. In the Arduino uno and nano it's only pin 2 and pin 3. This means you can't use pins 4, 5, 6, etc. Why? We need to use a pin with interrupt because that's the only way to be sure it never miss a pulse, no matter how quick is the pulse
@ericksonhernandez2070
@ericksonhernandez2070 3 месяца назад
is there any way to potentially do this but instead measure the current through the spark plug to determine rpm? it's just 12v right?
@interlinkknight
@interlinkknight 3 месяца назад
You would have to convert that high voltage of the spark plug to 5V. Also check that the signal is clean (no spikes or multiple HIGH/LOW on a single pulse). Then, it should work
@massimoronchini2303
@massimoronchini2303 10 месяцев назад
Hi, congratulations for the excellent video. I would like to make a tachometer that reads 23/24,000 rpm. Do you have information on the maximum readable frequency with the Hall sensor? Thanks
@interlinkknight
@interlinkknight 10 месяцев назад
100% you are not going to have problems with that speed. I've seen it measuring above 50,000 RPM with 2 pulses per revolution.
@massimoronchini2303
@massimoronchini2303 10 месяцев назад
👌👌@@interlinkknight
@needlessdestruction
@needlessdestruction 3 года назад
What would be involed to change the measurement unit from RPM to Meters per minute? When knowing the circumference of the wheel of course..
@interlinkknight
@interlinkknight 3 года назад
It's math. Multiply RPM with circumference
@giyoharto1307
@giyoharto1307 9 месяцев назад
Great video👍 could u make tutorial making the gauge with that tft screen please?
@interlinkknight
@interlinkknight 9 месяцев назад
I already did a few video tutorials about that display. It's called nextion display
@giyoharto1307
@giyoharto1307 9 месяцев назад
@@interlinkknight okey i will check it later, thanks😁
@mustafagames6809
@mustafagames6809 3 года назад
thank you man . you are nice man
@user-mt6bc1ji7l
@user-mt6bc1ji7l 4 года назад
that`s cool! thx!
@joescopo8933
@joescopo8933 4 года назад
This great and the codes works very well. Is there a way I can also display miles per hour?
@interlinkknight
@interlinkknight 4 года назад
Of course. Remap the rpm to whatever you calculate the mph is. I mean, to really say how many mph is in rpm depends on you setup. You can't say the speed of a disc in mph, for example. You would have to convert the motion in to linear.
@tnamen1307
@tnamen1307 4 года назад
@@interlinkknight please help how to AUTO lock and unlock car after reaching some speed. Thanks.
@ibnuazuka
@ibnuazuka Год назад
Thanks so much for this awesome code.. I have some problem, i use d1mini and connect sensor to pin D6 (GPIO12).. and the problem is when first start to count rpm my d1mini always reset and go running to counting rpm, do you have idea?
@interlinkknight
@interlinkknight Год назад
I don't know, but I would disconnect the sensor and see if stop happening. Also, try with an arduino uno or nano to test the code and the sensor. Is the sensor output 3.3V?
@johnrobinson1140
@johnrobinson1140 2 года назад
I have a small tracked tank chassis with 2 Hall Effect sensors on each motor I may have to add tachs
@interlinkknight
@interlinkknight 2 года назад
Cool! Share a video, if you get it working
@EmptyPocketProductions
@EmptyPocketProductions 4 месяца назад
Outstanding, Just subbed! Any way to shift the "RPM" to the center of the oled and have the actual rpm digits centers too? Thanks again!
@interlinkknight
@interlinkknight 4 месяца назад
You can always do anything you want with the display
@EmptyPocketProductions
@EmptyPocketProductions 4 месяца назад
@interlinkknight Can you advise how you would shift it to the center ? Thanks
@interlinkknight
@interlinkknight 4 месяца назад
Do you mean the OLED display? You would have to put a few if statements that if RPM is between 0 and 9 the text x position is a value in the center. If RPM is between 10 and 99 the text x position is a value in the center. If RPM is between 100 and 999 the text x position is a value in the center. Etc.
@Football-Prediction
@Football-Prediction 4 года назад
Thank you very nice project, I want to get a warning light with a led below 500 rpm, please help me I don't know how to do it
@interlinkknight
@interlinkknight 4 года назад
Search on google for "Arduino if function"
@PerchEagle
@PerchEagle 4 года назад
That's really nice. But what if I need to work with the IR sensor ! What to do then ? Like the one used in car speed capture system. That I must record the signal very fast without any bouncing.
@interlinkknight
@interlinkknight 4 года назад
If you need to use an IR sensor, just keep it enclosed so it doesn't get external light. And if you have to use a sensor that is very noisy, you need to add a schmitt trigger which will filter the noise. You can make one with an op-amp and a few resistors. This would only work if the output of the sensor is analog, not digital.
@landyandy
@landyandy 3 года назад
Hello. Do you think I can use your project to read the speed of a turntable? The speeds are extremely low: 33, 45, 78 revolutions per minute. I want to use an IR sensor (like the one you showed in the video). I tried to increase the calibration period to 1 second (1000000 uS), but I have false readings. Thanks
@interlinkknight
@interlinkknight 3 года назад
What's the name of the variable you are changing? For slow speeds, I recommend having a lot of pulses per revolution
@noahtroy17
@noahtroy17 7 месяцев назад
Do you think a rotary encoder disc with 100 gaps and a photoelectric sensor would work to measure rpm with a range of 0.00-10.00. I’m trying to make a precise tachometer for a very slow rotating machine. I’m planning to use the arduino uno and a 16x2 I2C display. Yours thoughts would be greatly appreciated. I’m very new to arduino and programming. Thanks
@interlinkknight
@interlinkknight 7 месяцев назад
Yes, that would work great. The more pulses per second, the slower RPM you can measure accurately and in real time. Just remember to add the number of gaps in the code so it can calculate the RPM. Also, make sure the photo sensor gives a clean ON/OFF signal. without noise in the transitions. Good luck
@noahtroy17
@noahtroy17 7 месяцев назад
Thank you for your response. I appreciate it. I’ve got some research to do now.
@akhilvijay8670
@akhilvijay8670 5 лет назад
I am also doing some similar automation.Thanks for the information.I have a question. Is it possible to take signals from any two wheeler to arduino and also the working of fuel gauges. Please share if you have any ideas.Thanks in advance.
@interlinkknight
@interlinkknight 5 лет назад
No idea what sensors they have so I can't know for sure but it should work
@user-gd3iu5ww2c
@user-gd3iu5ww2c Год назад
Thanks for sharing your code. When I run your code, the rpm value is fixed even if i changed the speed. sometimes the values that appear seems like actual rpm (1000rpm) come out, but usually stays at 400~ 500 rpm. I only changed the ppr value in the code, is this a sensor issue?
@interlinkknight
@interlinkknight Год назад
The problem is always the signal of the sensor. If you have an oscilloscope, check the signal. You need to get a clean pulse from below 1v to above 4v.
@alejandroads123
@alejandroads123 4 года назад
Hi!, Thank you for share!, There any chance you can help me with my project ? trying to make a tachometer for car but planning to use TM1638 display and leds, Leds for tachometer and display digit for speed, also the leds are bicolor. Thank you in advance
@interlinkknight
@interlinkknight 4 года назад
I wish I could but I'm very busy with my projects already.
@tadejsmole3469
@tadejsmole3469 2 года назад
Hello I am trying to connect it to Arduino mega but I already have connected a LCD from pin 0-13 and on other pins doesn't read the signals. do you have any suggestion
@interlinkknight
@interlinkknight 2 года назад
It only works using interrupt pins, which in UNO and nano is only pin 2 and pin 3
Далее
Sensors - which one to use
17:06
Просмотров 1,3 млн
Simple Tachometer/ RPM counter using proximity sensor
3:57
I made this Tachometer using IR sensor!
2:04
Просмотров 21 тыс.
DIY Arduino Tutorial: Tachometer RPM Counter
3:57
Просмотров 2 тыс.
DIY ARDUINO RPM REV TACHO SIM HUB DASH
10:11
Просмотров 845 тыс.
You can learn Arduino in 15 minutes.
16:34
Просмотров 10 млн