after 2 days search in google, finally, this is what i want. THANK YOU...
@benyaminnorouzi3314 жыл бұрын
the Video is very very good and that is exactly what I've looking for. This is the best video about arduino tachometers...
@leonardocardoso70995 жыл бұрын
Thanks for sharing, that is exactly what I've looking for. This is the best video about arduino tachometers I found on youtube.
@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 Жыл бұрын
I'm glad I could help. Cheers
@fatchickencatcher3 жыл бұрын
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.
@vantalane4 жыл бұрын
One of the cleanest code and greatest outputs I've seen so far. SUBBED!
@interlinkknight4 жыл бұрын
Aww. You are so nice. Thank you
@zzzxhrg4 жыл бұрын
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!!!!
@interlinkknight4 жыл бұрын
I am so happy to hear that. Thanks for the comment
@RendernStattGendern2 жыл бұрын
LOL i have to do the exact same on an 1993 Audi 100.
@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! :)
@interlinkknight4 жыл бұрын
That's awesome! I am really happy that I could help.
@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_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
@interlinkknight4 жыл бұрын
I understand. Don't worry. Good luck with your project.
@tnamen13074 жыл бұрын
@@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.
@ramkumarshanmugasundaram27533 жыл бұрын
This was the one the tachometer in arduino was searching Thankyou so much 🙏🏻🙏🏻🙏🏻🙏🏻
@interlinkknight3 жыл бұрын
:)
@randywetzler59764 жыл бұрын
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.
@Rattlegunner4 жыл бұрын
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.
@interlinkknight4 жыл бұрын
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.
@tnamen13074 жыл бұрын
@@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.
@cheezmartian2 жыл бұрын
@@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
@EdwinHwuHacks4Science4 жыл бұрын
Best RPM sensing video! Can't thank you more!!!
@nakamuraandy52313 жыл бұрын
Hi @InterlinkKnight by far your tutorial is the best video about RPM meter/tachometer with Arduino (DIY). Thank you very much!!!
@interlinkknight3 жыл бұрын
Thanks :)
@alainaubry56155 жыл бұрын
Very nice project and well documented. Thanks a lot!
@ElectricCruiser3 жыл бұрын
Thanks for the video! Helped me understand a few things about a hall sensor tach I bought for my old boat. Cheers!
@samwalter36464 жыл бұрын
Really good set-up mate love your work
@msmmaze5 жыл бұрын
Many thanks for the video. This was a real life saver for me. Keep up the good job bro.
@sonyseven7774 жыл бұрын
I love it! I will use in my car, your code looks so great! Thanks!!!
@interlinkknight4 жыл бұрын
Cool! It's always nice to know I could help. Good luck
@BrainTrance12 күн бұрын
Very kind of you to share the code both for arduino and nextion. Subscribed.
@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 Жыл бұрын
That's great. I'm glad I could help
@electronic79795 жыл бұрын
Excellent project. I like it 👍
@p8litehuawei8044 жыл бұрын
respect...!!! thanks for great tutorial & example codes...
@renmaru44855 жыл бұрын
best vid on youtube. thanks a lot.
@takedowntheccp.51672 жыл бұрын
very nice! thanks much
@TheLolilolou5 жыл бұрын
Great presentation ! Thx a lot
@bilalel-maraghy9974 жыл бұрын
Thank you man, appreciate your work soooo much
@leeharrington64385 жыл бұрын
Great work (as always) many thanks for sharing.
@andykhoi864910 ай бұрын
Hi! Thank you for this code. How did you determine the refresh rate RPM error at 3:10? Thanks
@interlinkknight10 ай бұрын
Trial and error. There's a part in the code that changes this depending on the speed.
@trobert1325 жыл бұрын
this is exactly what I need, thanks so much!
@interlinkknight5 жыл бұрын
No problem
@tnamen13074 жыл бұрын
@@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.
@McPcholkin5 жыл бұрын
Thanks for your examples, it perfect for my project.
@norkator3 жыл бұрын
This guy is playing waaaaaaaaaaaaaay too much with Arduinos. Great video!
@kronosg42795 жыл бұрын
Nice project as always. I was actually looking for a smoothing code. Cool!
@interlinkknight5 жыл бұрын
Great!
@lespaul123072 жыл бұрын
Thank you very much!! It worked perfectly for my application!
@interlinkknight2 жыл бұрын
I'm glad I could help :)
Жыл бұрын
Good article on tachometers -- thank you.
@maksimpomelilo5975 жыл бұрын
The best code and you too!!! Thank you very much!!!
@ottokueng42363 жыл бұрын
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.
@interlinkknight3 жыл бұрын
That's great! I'm glad you like it :)
@TheFlybyman3 жыл бұрын
very cool, thanks !
@kostashellas4 жыл бұрын
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!
@interlinkknight4 жыл бұрын
I'm glad I could help
@thecasildo13544 жыл бұрын
Hi sir can you help me for code for esp32 ?
@thecasildo13544 жыл бұрын
@@interlinkknight thanks for sharing really help me
@Wazaarbazaar3 жыл бұрын
Wow anyway u could share code?
@DavidPlass3 жыл бұрын
This code worked a treat. Thanks!
@interlinkknight3 жыл бұрын
I'm glad I could help
@muvahid19904 жыл бұрын
Damn your tutorial is very very good)), Thank You very much!!!
@chrischanx.7332 Жыл бұрын
Super vielen DANK! VIEL gelernt!!! Thanks a lot!
@kulaniscap2 жыл бұрын
You are great, love these
@oswevega29394 жыл бұрын
amazing info. congrats !
@jibaum Жыл бұрын
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 Жыл бұрын
I made another code for 2 sensors at the same time. Check it out in the description of the video
@jibaum Жыл бұрын
@@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 Жыл бұрын
You are right. Everything is duplicated with different names
@gsmith82345 жыл бұрын
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?
@interlinkknight5 жыл бұрын
I show that in the video
@gsmith82345 жыл бұрын
@@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
@interlinkknight5 жыл бұрын
You mean the display? The pins are listed on the sketch comments, on the top
@picopharade12722 жыл бұрын
@@interlinkknight we don't see any schematic for the sensor wiring
@michelebertoni2389 Жыл бұрын
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 Жыл бұрын
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
@multimargejta123 Жыл бұрын
Great tutorial! Can I trigger on falling edge instead of rising? Do I need to modify something else in the code?
@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
@militech92 жыл бұрын
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?
@interlinkknight2 жыл бұрын
Yes
@MoesKeckeEcke2 жыл бұрын
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
@militech92 жыл бұрын
@@MoesKeckeEcke thanks for the reply!
@giancarlodaravina2 жыл бұрын
excelent proyect!!
@LQhristian2 жыл бұрын
Excellent work!!
@elricho725 жыл бұрын
Nice project, thanks for share
@alejandroancajimamarquez87775 ай бұрын
excellent project; How could I obtain the schematic or the connection diagram?
@interlinkknight5 ай бұрын
I show in the video how to connect the hall effect sensor
@marceloestigarribia56692 жыл бұрын
Amazing. Thanks for sharing!
@lau48932 жыл бұрын
Do you have a suggestion for a new hall effect sensor now that the A3144 is no longer in production?
@lau48932 жыл бұрын
I think the A1101 to A1104 might work
@interlinkknight2 жыл бұрын
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
@krayzsnaps2482 жыл бұрын
Where can I find a copy of the code you used as well as the RPM application on the led?
@interlinkknight2 жыл бұрын
In the description of this video
@search4truth6164 жыл бұрын
Very clever. Thanks.
@Ken-oe3ch5 жыл бұрын
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.
@whizyp2 жыл бұрын
Was it?
@1ntotheunknown841 Жыл бұрын
where i can write it?
@qkidamon2 жыл бұрын
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.
@interlinkknight2 жыл бұрын
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
@niezwyciezony9039 Жыл бұрын
Hi, Great video. Question. Can you send a diagram of connecting elements with the Nextion 3.5" display. Thank you very much
@interlinkknight Жыл бұрын
I have several tutorial videos for the nextion display. On part 1 it shows the connection diagram
@NaiyimsGarage3 жыл бұрын
Thank you and I will start to do this Tacho for my E-Go kart
@interlinkknight3 жыл бұрын
That's cool!
@NaiyimsGarage3 жыл бұрын
@@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
@interlinkknight3 жыл бұрын
I'm glad. I'm happy to help :)
@NaiyimsGarage3 жыл бұрын
@@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
@interlinkknight3 жыл бұрын
Yes
@EmptyPocketProductions9 ай бұрын
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!
@interlinkknight9 ай бұрын
You can always do anything you want with the display
@EmptyPocketProductions9 ай бұрын
@interlinkknight Can you advise how you would shift it to the center ? Thanks
@interlinkknight9 ай бұрын
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.
@francescoranchi74152 жыл бұрын
where can i find wiring schematics for the "basic" setup with the serial monitor?
@interlinkknight2 жыл бұрын
In the video minute 1:25 The output signal goes to pin 2 in arduino. That's it
@francescoranchi74152 жыл бұрын
@@interlinkknight I'm having issues regarding the wiring of the hall effect sensor, where should the signal pin go to the arduino? pin 2 ? but isnt the sensor an input signal?
@shahzaibshamim65245 жыл бұрын
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?
@interlinkknight5 жыл бұрын
The smoothing takes multiple readings and average them
@k_m_atfs_official4 жыл бұрын
Superb, in-fact thanks a lot. Actually I was searching and got an idea from this project.
@interlinkknight4 жыл бұрын
I'm glad. What was your idea?
@k_m_atfs_official4 жыл бұрын
@@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_official4 жыл бұрын
@@interlinkknight please advise will it work or not
@interlinkknight4 жыл бұрын
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_official4 жыл бұрын
@@interlinkknight thanks dear
@javiso854 жыл бұрын
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!!
@interlinkknight4 жыл бұрын
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.
@javiso854 жыл бұрын
@@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!!
@interlinkknight4 жыл бұрын
I'm glad I could help :)
@massimoronchini2303 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
👌👌@@interlinkknight
@chrismartin64603 ай бұрын
I am trying to build a tachometer for model airplane racing engines that measures the propeller, but this in normally done outside usually in sunlight. What would be the best type sensor for this application. There was a tachometer hand made by an older gentlemen that was able to pic up the propeller from about 4 inches away that didn't require any tape or coloring to the propeller to pick it up.
@interlinkknight3 ай бұрын
I think a laser reflective sensor could work but I don't have experience using them. Also normal IR reflective could work but it needs to have a frequency and light filters. Not sure which one that can handle high speeds, but for sure there most be some that could work. No matter the sensor, the code is the same though.
@ærjacobs10 ай бұрын
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?
@interlinkknight10 ай бұрын
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
@Anisalenanis28 күн бұрын
So i want to use your code but does the code also work with ir distance sensor?
@interlinkknight28 күн бұрын
Yes. It works with any sensor. Arduino only needs a clean digital pulse of 5V. Arduino doesn't care where that pulse comes from.
@Anisalenanis27 күн бұрын
@@interlinkknight ok i got my sensor today but i need to find out how to connect the stuff so will take time to find out
@Anisalenanis27 күн бұрын
@@interlinkknight so I did connect the ir distance sensor to pin 2 on my uno r3 board because I dont have arsuino but the rpm is just like to fast for the motor that i used it was like 10k rpm and change a lot how could i fix that?
@interlinkknight27 күн бұрын
If the RPM is erratic and weird, it means your sensor is not sending a clean signal. I show in the video the importance of having a clean HIGH/LOW signal. If you have access to an oscilloscope you would see it. Basically, that sensor that you have doesn't work because it doesn't give clean pulses. Find one that does.
@solomoon673 жыл бұрын
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?
@interlinkknight3 жыл бұрын
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
@FabianHinterberger2 жыл бұрын
hi first of all genius code which you wrote rigt there. So im building a led speedometer for my motorcycle. i got one a3144 hall sensor and a magnet on my flywheel. A 10k pull up resistor is also in place. So the problem that i face is that with rpms over about 7500 i suddenly get readings reaching from 20 000 to 50 000 rpms, which is not realistic. I tried adjusting your code but with no luck. Suprisingly it works fine with "normal" rpm counting codes. It would be very kind of you if you could help in any way. Thanks!
@interlinkknight2 жыл бұрын
In the serial monitor, does it show a random period too? I need more details to be able to help you
@FabianHinterberger2 жыл бұрын
Thanks for replying! Yes in the serial monitor. The Period reading suddenly drops from 10 000-12 000 to about 1200-3000. The frequency drastically increases as well.
@FabianHinterberger2 жыл бұрын
I can provide you more details if needed
@interlinkknight2 жыл бұрын
I don't know what it could be. By any chance you can connect your sensor to an oscilloscope?
@FabianHinterberger2 жыл бұрын
No unfortunately not but with my previous code it worked fine. Can i try changing any of the parameters in your code? Maybe the amount of measurements?
@barry-e5d11 ай бұрын
It works brilliantly, is it possible to make it display to one decimal place? I’m measuring low rpm
@interlinkknight11 ай бұрын
Of course you can, but you need to separate the decimal numbers yourself with different objects
@zedthirteen3 жыл бұрын
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.
@interlinkknight3 жыл бұрын
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
@zedthirteen3 жыл бұрын
@@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
@interlinkknight3 жыл бұрын
I did it in Photoshop and PowerPoint
@maulanawahyudi71272 жыл бұрын
I like to see there are 2 magnets in a dish in your video sir, is it true? . If so, do I have to do that too if I use the program in the description ?
@interlinkknight2 жыл бұрын
There are two magnets, yes. In my code there is a configuration variable where you put the amount of pulses per revolution. If you use for example 1 magnet, change that variable to 1. As simple as that. Check the code and you'll see
@maulanawahyudi71272 жыл бұрын
@@interlinkknight So I have to replace only a variable in the program ? ie " const byte PulsesPerRevolution = 2 " to "1" , am I correct ? . What is the maximum rpm that can be measured using hall effect sir?
@interlinkknight2 жыл бұрын
You are correct. I'm not sure the maximum RPM that it can measure, but I heard people measuring values around 50,000 RPM without problems
@maulanawahyudi71272 жыл бұрын
@@interlinkknight I bought a tachometer with a light type(Infrared) and compared it with your program. and it all works very well, thank you very much sir !!😭
@maulanawahyudi71272 жыл бұрын
@@interlinkknight sir can i use 2 sensors for 1 arduino?
@fioulmaster8 ай бұрын
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?
@interlinkknight8 ай бұрын
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
@felipemartins95764 жыл бұрын
hi, this can be adapt on a car tachometer? thanks
@interlinkknight4 жыл бұрын
If you have access to a pulse signal, you can make it work.
@tnamen13074 жыл бұрын
@@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.
@francescoranchi74152 жыл бұрын
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
@interlinkknight2 жыл бұрын
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
@yusufegriboz90124 жыл бұрын
woow it is a great idea!
@tawfiknajeh62185 жыл бұрын
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
@interlinkknight5 жыл бұрын
I'm not using any unit there so don't pay attention to how many zeros does it have
@AliPasha2004 жыл бұрын
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)?
@AliPasha2004 жыл бұрын
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
@interlinkknight4 жыл бұрын
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.
@AliPasha2004 жыл бұрын
@@interlinkknight ok i will try sir
@raymondmarteene70474 жыл бұрын
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
@interlinkknight4 жыл бұрын
Of course you can. Using PWM. But those gauges are not always linear so you might need to add a asymmetrical remap
@raymondmarteene70474 жыл бұрын
InterlinkKnight many thanks, a bit more learning for me.
@per199634 жыл бұрын
Hello, thank you for the video. Would you mind explaining me why the hall effect sensor needs a resistor? Im quite new to electronics. Thank you
@interlinkknight4 жыл бұрын
Because the sensor sends a LOW (ground) signal when detects a magnetic field, and when there's no signal we need to put the pin HIGH (5V) so Arduino can see a full digital signal (HIGH-LOW). So the resistor is pulling up the pin when there's no signal. It's called pull up resistor. It's used in buttons and switches too.
@per199634 жыл бұрын
@@interlinkknight Ohhh that makes it more clear. But arduinos have an internal pullup resistor that I saw were used in buttons and switches with the pinMode(pin, INPUT_PULLUP). Sorry if it´s a dumb question but may I know why you didn´t use that resistor included on the arduino? Again, thank you very much for your time.
@interlinkknight4 жыл бұрын
Yes, you can use the internal pull-up resistor. I didn't use it just to be more clear about needing a resistor
@per199634 жыл бұрын
InterlinkKnight thanks for the answer!
@samuelvana2 жыл бұрын
@@per19963 Did you manage to integrate the pull-up resistor with a digital pin? I'm trying to go this route but stuck with the fact that either I can't attachInterrupt an analog pin, or I can't pinMode a digital pin...
@giyoharto1307 Жыл бұрын
Great video👍 could u make tutorial making the gauge with that tft screen please?
@interlinkknight Жыл бұрын
I already did a few video tutorials about that display. It's called nextion display
@giyoharto1307 Жыл бұрын
@@interlinkknight okey i will check it later, thanks😁
@mohamedkhalil82003 жыл бұрын
Hi , is it possible to know the direction of the wheel in the code? like giving a negative result if the speed is backwards
@interlinkknight3 жыл бұрын
yes. By using two hall effect sensors, and using a code for encoders
@ericksonhernandez20708 ай бұрын
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?
@interlinkknight8 ай бұрын
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
@PerchEagle4 жыл бұрын
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.
@interlinkknight4 жыл бұрын
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.
@jilakarahanumesh69325 жыл бұрын
Is the code ready to use for rpm measures.i think separate codes are given for modules.please clear me
@interlinkknight5 жыл бұрын
What? Just connect any type of pulse sensor and use my code. That's it.
@aidencullip62733 жыл бұрын
Is it possible to find a circuit diagram for the IR sensor anywhere?
@interlinkknight3 жыл бұрын
What? You only connect VCC to 5V, ground to ground and the output goes on pin 2 of arduino, if you are using my code.
@RavindraRaikar3 жыл бұрын
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
@interlinkknight3 жыл бұрын
I think you can just add a simple equation that converts RPM into speed
@hassannawaz4 жыл бұрын
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.
@interlinkknight4 жыл бұрын
I'm not sure you want to measure the belt instead of the roller
@jwiedmayer4 жыл бұрын
Have you ever experienced the nextion not updating unless the ide serial monitor was running on uno?
@interlinkknight4 жыл бұрын
No
@DPoly4 жыл бұрын
Wow , you are Boss!
@mustafagames68093 жыл бұрын
thank you man . you are nice man
@kieranpotter11823 жыл бұрын
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?
@interlinkknight3 жыл бұрын
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.
@kieranpotter11823 жыл бұрын
@@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?
@interlinkknight3 жыл бұрын
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
@francescoranchi74157 ай бұрын
Hello there! your code trurly does wonders! althought I'm facing an issue which is that I'm using a hall effect sensor to measure a wheel's rpm. The wheel is connected to an electric threephase 18kw motor, and when the motor's RPM are > 150 the arduino stops working showing random numbers on the serial screen. I've tried using shielded wire and that does help (connecting the shielded wire to the arduino's and sensor's GND). Now i want to use a pull up resistor, but the issue I'm facing is: When do i use pull up and when do i use pull down? I'm not sure if im gonna be using a NPN or PNP NO or /NC hall sensor. I think if it's a PNP then its a pull down resistor and viceversa? Or which sensor type should I use? many thanks! hope you could provide me with some help!
@interlinkknight7 ай бұрын
The question about when to use pull-up or pull-down resistors is very simple. If the device (in this case the hall effect) output gives a ground signal, then we should use a pull-up resistor. If the device outputs voltage when it send a signal, then we need to add a pull-down resistor. For this case, the A3144 output signal is ground so I added a pull-up resistor to keep it HIGH when there's no signal.
@francescoranchi74157 ай бұрын
@@interlinkknight ok I think I got it! So to give the arduino a steady signal while the sensor if “off” state, we use a resistor which pulls opposite to the sensor’s output signal type? So I guess the sensor’s signal is “stronger” than the voltage given into the arduino by the resistor therefore it is overcome by the sensor output signal?
@francescoranchi74157 ай бұрын
Also if I use pull up or pull down , do I need to change in the code the attachToInterrupt to be rising if I’m using pull down, and falling if I’m using pull up?
@interlinkknight7 ай бұрын
That's correct. The rising or falling is pretty much irrelevant
@francescoranchi74157 ай бұрын
@@interlinkknight Ok super! many thanks, one last question, If I use for example NPN with pull-up and "FALLING" it must be a NO, otherwise if it's NC i need to write "RISING", is that correct?
@callmezucc93182 жыл бұрын
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!
@interlinkknight2 жыл бұрын
Yes, that's exactly right
@race2winss5 жыл бұрын
subD!! awesome video!! Thanks for your hard work and very helpful video!
@mohamedkhalil82003 жыл бұрын
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.
@interlinkknight3 жыл бұрын
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?
@sergeyp92118 күн бұрын
Hi dude! My screen going completely wild due to the interferences from engine ingition? Is it handable/fixable?
@interlinkknight18 күн бұрын
Arduino needs a clean signal of pulses. Your job is feed that to your arduino board. How to get a clean signal? You can try the hall effect sensor I recommended, for example. If you have high voltage cables near that are causing inductance on your cable, maybe use shielded cables connected to ground, and put them as far as you can from those high voltage cables
@akhilvijay86705 жыл бұрын
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.
@interlinkknight5 жыл бұрын
No idea what sensors they have so I can't know for sure but it should work