Arduino Tutorial: Tachometer (RPM Counter)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ค. 2024
  • Making a tachometer with arduino has never been so easy. I am not only going to show how you can make your own, but also will mention the pros and cons of a few types of RPM sensors, mainly the IR proximity sensor and the hall effect sensor.
    Arduino sketches:
    - Simple tachometer (Serial): drive.google.com/open?id=1fF-...
    - Simple tachometer (Serial) with 2 sensors: drive.google.com/file/d/1k9AA...
    - Tachometer with 0.96” OLED display: drive.google.com/open?id=1oll...
    - Tachometer with Nextion display: drive.google.com/open?id=1KU-...
    Nextion display tachometer gauge (3.5” enhanced): drive.google.com/open?id=1HcQ...
    Components:
    - Hall Effect Sensor A3144: amzn.to/2zjmkx3
    - IR Sensor: amzn.to/2Fgm3AG
    - Arduino nano: amzn.to/3iru0op
    - Nextion 3.5" Enhanced: amzn.to/3qMfjTd
    - OLED 0.96" I2C: amzn.to/2UNDCLO
    Recommended Tools:
    - Electronic Parts Tester (ESR LCR-T4): amzn.to/2QvQJlP
    - Breadboard (good quality): amzn.to/2QsyY3C
    - Storage Case for Jumper Wire: www.walmart.com/ip/The-Hillma...
    - Multimeter (Fluke 17B+): amzn.to/2L3PNQk
    - Rigol DS1054Z Digital Oscilloscope: amzn.to/2C5ZwD7
    Note: As an Amazon Associate I earn from qualifying purchases.
    Website: www.interlinkknight.com/
    Patreon: / interlinkknight
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 572

  • @leonardocardoso7099
    @leonardocardoso7099 4 ปีที่แล้ว +15

    Thanks for sharing, that is exactly what I've looking for. This is the best video about arduino tachometers I found on youtube.

  • @randywetzler5976
    @randywetzler5976 4 ปีที่แล้ว +5

    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.

  • @benyaminnorouzi331
    @benyaminnorouzi331 3 ปีที่แล้ว +7

    the Video is very very good and that is exactly what I've looking for. This is the best video about arduino tachometers...

  • @bagoesdaihatsu
    @bagoesdaihatsu 3 ปีที่แล้ว +5

    after 2 days search in google, finally, this is what i want. THANK YOU...

  • @ElectricCruiser
    @ElectricCruiser 3 ปีที่แล้ว +1

    Thanks for the video! Helped me understand a few things about a hall sensor tach I bought for my old boat. Cheers!

  • @magwitch
    @magwitch ปีที่แล้ว +2

    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.

  • @vantalane
    @vantalane 3 ปีที่แล้ว +5

    One of the cleanest code and greatest outputs I've seen so far. SUBBED!

  • @zzzxhrg
    @zzzxhrg 3 ปีที่แล้ว +5

    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  3 ปีที่แล้ว +1

      I am so happy to hear that. Thanks for the comment

    • @RendernStattGendern
      @RendernStattGendern ปีที่แล้ว +1

      LOL i have to do the exact same on an 1993 Audi 100.

  • @Rattlegunner
    @Rattlegunner 4 ปีที่แล้ว +8

    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 ปีที่แล้ว +3

      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

  • @alainaubry5615
    @alainaubry5615 5 ปีที่แล้ว +4

    Very nice project and well documented. Thanks a lot!

  • @msmmaze
    @msmmaze 4 ปีที่แล้ว +2

    Many thanks for the video. This was a real life saver for me. Keep up the good job bro.

  • @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.

  • @EdwinHwuHacks4Science
    @EdwinHwuHacks4Science 3 ปีที่แล้ว +2

    Best RPM sensing video! Can't thank you more!!!

  • @averaldo_
    @averaldo_ 4 ปีที่แล้ว +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 ปีที่แล้ว +2

      That's awesome! I am really happy that I could help.

    • @averaldo_
      @averaldo_ 4 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      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.

  • @samwalter3646
    @samwalter3646 3 ปีที่แล้ว +1

    Really good set-up mate love your work

  • @nakamuraandy5231
    @nakamuraandy5231 2 ปีที่แล้ว +1

    Hi @InterlinkKnight by far your tutorial is the best video about RPM meter/tachometer with Arduino (DIY). Thank you very much!!!

  • @ramkumarshanmugasundaram2753
    @ramkumarshanmugasundaram2753 2 ปีที่แล้ว +3

    This was the one the tachometer in arduino was searching Thankyou so much 🙏🏻🙏🏻🙏🏻🙏🏻

  • @McPcholkin
    @McPcholkin 4 ปีที่แล้ว +1

    Thanks for your examples, it perfect for my project.

  • @kronosg4279
    @kronosg4279 5 ปีที่แล้ว

    Nice project as always. I was actually looking for a smoothing code. Cool!

  • @sonyseven777
    @sonyseven777 3 ปีที่แล้ว +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

  • @leeharrington6438
    @leeharrington6438 5 ปีที่แล้ว +1

    Great work (as always) many thanks for sharing.

  • @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

  • @ottokueng4236
    @ottokueng4236 2 ปีที่แล้ว

    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  2 ปีที่แล้ว

      That's great! I'm glad you like it :)

  • @p8litehuawei804
    @p8litehuawei804 3 ปีที่แล้ว +3

    respect...!!! thanks for great tutorial & example codes...

  • @muvahid1990
    @muvahid1990 4 ปีที่แล้ว +4

    Damn your tutorial is very very good)),
    Thank You very much!!!

  • @renmaru4485
    @renmaru4485 4 ปีที่แล้ว +3

    best vid on youtube. thanks a lot.

  • @TheLolilolou
    @TheLolilolou 5 ปีที่แล้ว +3

    Great presentation !
    Thx a lot

  • @Ken-oe3ch
    @Ken-oe3ch 4 ปีที่แล้ว +1

    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 ปีที่แล้ว

      Was it?

    • @1ntotheunknown841
      @1ntotheunknown841 11 หลายเดือนก่อน

      where i can write it?

  • @bilalel-maraghy997
    @bilalel-maraghy997 3 ปีที่แล้ว +1

    Thank you man, appreciate your work soooo much

  • @maksimpomelilo597
    @maksimpomelilo597 4 ปีที่แล้ว +1

    The best code and you too!!! Thank you very much!!!

  • @trobert132
    @trobert132 4 ปีที่แล้ว +2

    this is exactly what I need, thanks so much!

    • @interlinkknight
      @interlinkknight  4 ปีที่แล้ว +1

      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.

  • @electronic7979
    @electronic7979 5 ปีที่แล้ว +1

    Excellent project. I like it 👍

  • @lespaul12307
    @lespaul12307 ปีที่แล้ว

    Thank you very much!! It worked perfectly for my application!

  •  8 หลายเดือนก่อน

    Good article on tachometers -- thank you.

  • @race2winss
    @race2winss 4 ปีที่แล้ว +1

    subD!! awesome video!! Thanks for your hard work and very helpful video!

  • @elricho72
    @elricho72 5 ปีที่แล้ว +2

    Nice project, thanks for share

  • @oswevega2939
    @oswevega2939 3 ปีที่แล้ว +1

    amazing info. congrats !

  • @chrischanx.7332
    @chrischanx.7332 ปีที่แล้ว

    Super vielen DANK! VIEL gelernt!!! Thanks a lot!

  • @LQhristian
    @LQhristian ปีที่แล้ว

    Excellent work!!

  • @kulaniscap
    @kulaniscap ปีที่แล้ว

    You are great, love these

  • @giancarlodaravina
    @giancarlodaravina ปีที่แล้ว

    excelent proyect!!

  • @takedowntheccp.5167
    @takedowntheccp.5167 ปีที่แล้ว +1

    very nice! thanks much

  • @marceloestigarribia5669
    @marceloestigarribia5669 ปีที่แล้ว

    Amazing. Thanks for sharing!

  • @DavidPlass
    @DavidPlass 2 ปีที่แล้ว

    This code worked a treat. Thanks!

  • @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

  • @search4truth616
    @search4truth616 4 ปีที่แล้ว +1

    Very clever. Thanks.

  • @user-xs9wb8tj5r
    @user-xs9wb8tj5r 2 หลายเดือนก่อน

    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  2 หลายเดือนก่อน +1

      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

  • @yusufegriboz9012
    @yusufegriboz9012 3 ปีที่แล้ว +1

    woow it is a great idea!

  • @kostashellas
    @kostashellas 4 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

      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 2 ปีที่แล้ว

      Wow anyway u could share code?

  • @norkator
    @norkator 3 ปีที่แล้ว

    This guy is playing waaaaaaaaaaaaaay too much with Arduinos. Great video!

  • @krystiank4237
    @krystiank4237 4 ปีที่แล้ว +1

    Work Amazing :D

  • @shahzaibshamim6524
    @shahzaibshamim6524 4 ปีที่แล้ว +2

    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

  • @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

  • @militech9
    @militech9 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      Yes

    • @MoesKeckeEcke
      @MoesKeckeEcke 2 ปีที่แล้ว +1

      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 ปีที่แล้ว

      @@MoesKeckeEcke thanks for the reply!

  • @tawfiknajeh6218
    @tawfiknajeh6218 4 ปีที่แล้ว +1

    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 ปีที่แล้ว +2

      I'm not using any unit there so don't pay attention to how many zeros does it have

  • @shongjianfong9000
    @shongjianfong9000 3 ปีที่แล้ว

    @InterlinkKnight Thank you so much for this insightful video! It helped a lot on my current project. However regarding this "map(PeriodBetweenPulses, 40000, 5000, 1, 10);", how do you determine the values of 40000, 5000, 1, and 10? Are the values of 40000 and 5000 through the calibration? And are the values of 1 and 10 for the purpose of calculation? Appreciate if you can explain it, thank you so much.

    • @interlinkknight
      @interlinkknight  3 ปีที่แล้ว

      I have a lot of comments around that line in the sketch explaining what it does.
      Line 238:
      // Change the amount of readings depending on the period between pulses.
      // To be very responsive, ideally we should read every pulse. The problem is that at higher speeds the period gets
      // too low decreasing the accuracy. To get more accurate readings at higher speeds we should get multiple pulses and
      // average the period, but if we do that at lower speeds then we would have readings too far apart (laggy or sluggish).
      // To have both advantages at different speeds, we will change the amount of readings depending on the period between pulses.
      // Remap period to the amount of readings:
      int RemapedAmountOfReadings = map(PeriodBetweenPulses, 40000, 5000, 1, 10); // Remap the period range to the reading range.
      // 1st value is what are we going to remap. In this case is the PeriodBetweenPulses.
      // 2nd value is the period value when we are going to have only 1 reading. The higher it is, the lower RPM has to be to reach 1 reading.
      // 3rd value is the period value when we are going to have 10 readings. The higher it is, the lower RPM has to be to reach 10 readings.
      // 4th and 5th values are the amount of readings range.

  • @TheFlybyman
    @TheFlybyman 2 ปีที่แล้ว

    very cool, thanks !

  • @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

  • @fioulmaster
    @fioulmaster 15 วันที่ผ่านมา

    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  14 วันที่ผ่านมา

      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

  • @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

  • @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?

  • @cdiperformanceparts4364
    @cdiperformanceparts4364 8 หลายเดือนก่อน

    Cool stuff

  • @michelebertoni2389
    @michelebertoni2389 6 หลายเดือนก่อน

    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  6 หลายเดือนก่อน

      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

  • @user-mt6bc1ji7l
    @user-mt6bc1ji7l 4 ปีที่แล้ว +1

    that`s cool! thx!

  • @raymondmarteene7047
    @raymondmarteene7047 3 ปีที่แล้ว

    Hi,
    thanks for this video and the information.
    I have a question if I may, is there a way to use a panel meter etc for the display, like a vintage amp meter or volt meter with a modified face panel to display RPM.
    Many thanks

    • @interlinkknight
      @interlinkknight  3 ปีที่แล้ว

      Of course you can. Using PWM. But those gauges are not always linear so you might need to add a asymmetrical remap

    • @raymondmarteene7047
      @raymondmarteene7047 3 ปีที่แล้ว

      InterlinkKnight many thanks, a bit more learning for me.

  • @javiso85
    @javiso85 4 ปีที่แล้ว +1

    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 :)

  • @mustafagames6809
    @mustafagames6809 3 ปีที่แล้ว

    thank you man . you are nice man

  • @NaiyimsGarage
    @NaiyimsGarage 2 ปีที่แล้ว +1

    Thank you and I will start to do this Tacho for my E-Go kart

    • @interlinkknight
      @interlinkknight  2 ปีที่แล้ว +1

      That's cool!

    • @NaiyimsGarage
      @NaiyimsGarage 2 ปีที่แล้ว

      @@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  2 ปีที่แล้ว +1

      I'm glad. I'm happy to help :)

    • @NaiyimsGarage
      @NaiyimsGarage 2 ปีที่แล้ว

      @@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  2 ปีที่แล้ว +1

      Yes

  • @DPoly
    @DPoly 4 ปีที่แล้ว +1

    Wow , you are Boss!

  • @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

  • @massimoronchini2303
    @massimoronchini2303 8 หลายเดือนก่อน

    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  8 หลายเดือนก่อน

      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 7 หลายเดือนก่อน

      👌👌@@interlinkknight

  • @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 ปีที่แล้ว +1

      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.

  • @gsmith8234
    @gsmith8234 4 ปีที่แล้ว +2

    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 ปีที่แล้ว

      @@interlinkknight we don't see any schematic for the sensor wiring

  • @akhilvijay8670
    @akhilvijay8670 4 ปีที่แล้ว

    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  4 ปีที่แล้ว

      No idea what sensors they have so I can't know for sure but it should work

  • @andykhoi8649
    @andykhoi8649 2 หลายเดือนก่อน

    Hi! Thank you for this code. How did you determine the refresh rate RPM error at 3:10? Thanks

    • @interlinkknight
      @interlinkknight  2 หลายเดือนก่อน

      Trial and error. There's a part in the code that changes this depending on the speed.

  • @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

  • @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?

  • @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

  • @tawfiknajeh6218
    @tawfiknajeh6218 4 ปีที่แล้ว

    Hi, Could you tell me how many magnets do you have in your set up? and if the variable "PulsesPerRevolution" is equal to the number of magnets or to the number of magnets + 1?
    Thanks

    • @interlinkknight
      @interlinkknight  4 ปีที่แล้ว +1

      You can clearly see it in the video. It's only 2 magnets. And yes, "PulsesPerRevolution" is equal to the number of magnets. In my example you can clearly see that by default is 2.

  • @niezwyciezony9039
    @niezwyciezony9039 5 หลายเดือนก่อน

    Hi,
    Great video. Question. Can you send a diagram of connecting elements with the Nextion 3.5" display.
    Thank you very much

    • @interlinkknight
      @interlinkknight  5 หลายเดือนก่อน

      I have several tutorial videos for the nextion display. On part 1 it shows the connection diagram

  • @erickvanpatten673
    @erickvanpatten673 4 ปีที่แล้ว

    Hi! By any chance do you know why when using an IR sensor I'm getting reading way above the right RPMs I have? I have tried with different IR sensors for the same result
    thanks!

    • @interlinkknight
      @interlinkknight  4 ปีที่แล้ว

      Like I mentioned on the video, you need to add a schmitt trigger to remove the noise of the signal. Or use a sensor that already has it included.

  • @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

  • @noahtroy17
    @noahtroy17 4 หลายเดือนก่อน

    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  4 หลายเดือนก่อน

      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 4 หลายเดือนก่อน

      Thank you for your response. I appreciate it. I’ve got some research to do now.

  • @zedthirteen
    @zedthirteen 2 ปีที่แล้ว

    Thanks for sharing. Just what I need. I tried the hall transistor and oled and now have the nextion display. Can you tell me how you made the 208 gauge images? I would like to do the same but up to 11000 rpm and red line at 8000.

    • @interlinkknight
      @interlinkknight  2 ปีที่แล้ว

      It's a bunch of images. I explain that on one of the video tutorials about the nextion display. Also, the file is in the description so you can open it and see

    • @zedthirteen
      @zedthirteen 2 ปีที่แล้ว

      @@interlinkknight thanks, I know it’s a bunch of images and have found the images in the file. I was wondering if the images were generated with some kind of scripting tool. I don’t fancy doing 208 images by hand in MS paint

    • @interlinkknight
      @interlinkknight  2 ปีที่แล้ว

      I did it in Photoshop and PowerPoint

  • @user-gd3iu5ww2c
    @user-gd3iu5ww2c 10 หลายเดือนก่อน

    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  10 หลายเดือนก่อน

      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.

  • @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

  • @jibaum
    @jibaum 11 หลายเดือนก่อน

    Very nice. Is there a way to use your code for two sensors on different positions showing the rpm at the same time on the display?

    • @interlinkknight
      @interlinkknight  11 หลายเดือนก่อน

      I made another code for 2 sensors at the same time. Check it out in the description of the video

    • @jibaum
      @jibaum 11 หลายเดือนก่อน

      @@interlinkknight Thank you, I will check to see how you did it.
      What I did to use 2 sensors was to duplicate the code with different names, including two different loops to use with two attachinterrupt from two different pins.

    • @interlinkknight
      @interlinkknight  11 หลายเดือนก่อน +1

      You are right. Everything is duplicated with different names

  • @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

  • @ibnuazuka
    @ibnuazuka 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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?

  • @thomasstagsforge5227
    @thomasstagsforge5227 3 ปีที่แล้ว

    Hi, thanks for this video, and code. I'm currently trying to use it with ESP32 to build a Wifi SpeedGauge. I'm having some trouble using "attachInterrupt" with ESP32 that make it to Reboot ... Do you have any clue ?

    • @interlinkknight
      @interlinkknight  3 ปีที่แล้ว

      I'm sorry but I don't know anything about converting Arduino code to esp32

  • @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!

  • @lau4893
    @lau4893 2 ปีที่แล้ว

    Do you have a suggestion for a new hall effect sensor now that the A3144 is no longer in production?

    • @lau4893
      @lau4893 2 ปีที่แล้ว

      I think the A1101 to A1104 might work

    • @interlinkknight
      @interlinkknight  2 ปีที่แล้ว +1

      The A3144 still is available so I still suggest that one, but from what understand the replacement is the A1104 although I haven't test it

  • @EmptyPocketProductions
    @EmptyPocketProductions หลายเดือนก่อน

    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  หลายเดือนก่อน

      You can always do anything you want with the display

    • @EmptyPocketProductions
      @EmptyPocketProductions หลายเดือนก่อน

      @interlinkknight Can you advise how you would shift it to the center ?
      Thanks

    • @interlinkknight
      @interlinkknight  หลายเดือนก่อน +1

      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.

  • @XMA92
    @XMA92 3 ปีที่แล้ว

    Is there a way to clean up the signal of the first photoelectric sensor? I'm stuck with these sensors (I use 4 at the same time) and their readings are way off. Also adding a 1 µF capacitor between DO and GND does only help up to a certain rpm. Do you have any idea on how to use these, despite the noisy output?

    • @interlinkknight
      @interlinkknight  3 ปีที่แล้ว

      Using Schmitt Triggers

    • @XMA92
      @XMA92 3 ปีที่แล้ว

      @@interlinkknight Thank you very much for your suggestion! I will try that.

  • @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?

  • @user-sx8kv9xe5i
    @user-sx8kv9xe5i 3 หลายเดือนก่อน

    It works brilliantly, is it possible to make it display to one decimal place? I’m measuring low rpm

    • @interlinkknight
      @interlinkknight  3 หลายเดือนก่อน

      Of course you can, but you need to separate the decimal numbers yourself with different objects

  • @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

  • @DW11111
    @DW11111 2 ปีที่แล้ว

    This was a possible solution to my problem. One question I have:
    If my brushless motor is controlled by hall sensors, can I piggyback onto one of those sensors and then adjust the pulse parameter so i dont have to add any additional sensors?

    • @interlinkknight
      @interlinkknight  2 ปีที่แล้ว +1

      I've never done that but it could work. Only one way to find out: trying

  • @grumpybum999
    @grumpybum999 3 ปีที่แล้ว

    Hi, am at the very early stages of teaching myself arduino and have a very limited knowledge of electronics but I was able to get your code working on a single 3144 input. 2 questions if I may ...
    1. when I added a second motor and a second sensor, even before duplicating the code, the cross feed from pin 2 to pin 3 caused erratic signals. I added diodes to stop the pulses being fed back through the pullup rail, this worked when only one motor was running but still had a problem with both motors running. and
    2. how much of the code do I need to duplicate to run dual tachometers from the one arduino.

    • @interlinkknight
      @interlinkknight  3 ปีที่แล้ว

      I never tried to use two signals on the same Arduino. I'm not sure how you connected everything, but if I were to try I would duplicate everything, changing the name of the variables and using pin 2 and 3. Not sure how Arduino handles having both interrupts at the same time.

    • @grumpybum999
      @grumpybum999 3 ปีที่แล้ว

      @@interlinkknight Well, it worked. Duplicated everything except a few common constants, included interrupts on D2 and D3 and bingo. The back story is that the project uses 2 dc motors to run a spinning wheel. A set split between the RPMs creates a pull to wind the wool onto the bobbin. I needed to add PID control. to keep the RPMs consistent under varying loads. Your code helped me break the back of the project, down hill from here. Thanks. Paul.

    • @grumpybum999
      @grumpybum999 3 ปีที่แล้ว

      Oh, and the cross-talking was a rookie mistake by using a common pull up resistor instead of two separate ones.

  • @KBillmusic
    @KBillmusic 10 หลายเดือนก่อน

    Hi! Im doing this project and id like to know if the project of hall sensors can read 40k rpm above? Thanks!

    • @interlinkknight
      @interlinkknight  10 หลายเดือนก่อน

      I haven't test at such high speed, but it should work