At first, why refresh the whole screen? Just put the text on it at initialisation. Before writing rpm, put the cursor in place.. For measuring, measure the time between 5 pulses and calculate the rpm from there. Then you can refresh it multiple times per second. You will get a much higher refresh rate.. The only delay will be the refresh time + 5 pulses.
Wouter Annes awesome. I’m really not great when it comes to the writing of the code. If you want to re write it I’d be glad to use it and share it. Thanks for the info and the help. Hope all is well.
I am not an expert on this as well.... But you have to make it logical at first... Initiate with all stuf that will never change... I will have a look in this, since I do have some desk raise motors with build in hall sensors... Can take some time, but I have all the stuff laying around here. But first I have to finish my own project, building a metal mill from scrap that my customers discard...
Totally agree. If you count pulses in a second the fastest you can possibly refresh is once a second. You need to TIME between pulses rather than count pulses to improve refresh rate. If you put FOUR magnets around the circumference and have 4 pulses per rev your accuracy will improve as well as improving your refresh rate. The time period at 100 rpm is then 60/100 or 0.6 secs per revolution or 0.15 seconds between pulses (4 magnets). Using this method means that even as low as 25 rpm your accuracy is good and refresh rate still acceptable (0.6 secs per pulse) IF you REALLY want to read that low. To read as low as 1 rpm? You will HAVE to use some MANY additional pulses per rev to attain a good refresh rate. Try using a printer encoder disc with > 100 lines per revolution or better and opto reading. You COULD use BOTH opto reading (below) 100 rpm and magnetic above. The Arduino can decide when to switch over So in summary: Time between each pulse (use interrupt routine) Multiply that time by 4 (to get time for 1 revolution in seconds) Divide by 60 to get time in minutes Invert (take the reciprocal) to get a direct rpm reading.
Bob my spindle has 4 magnets, and my tachometer went to crap a couple weeks ago, so I built this one, I would like more accuracy, I tried to implement your method into the code but I failed m couldn't get it to work after multiple tries, any input would be 👍 thanks in advance
I've been debating whether to go with a hall effect sensor, or an LM393 sensor. I also plan to have the system calculate and display both rpm and surface feet per minute of material being turned, and feed rates for lathe tooling
Gotcha bud. You may want to look into an OPTO interrupter switch too. Uses an infrared light to make counts with an arduino. I use one in my pickup winder 2.0 video. It was giving a pretty accurate reading off of a 5500 rated rpm motor. I don’t know how fast it can count but it’s above 5500 😂
Jerico Tantoy make sure to have the correct libraries in your arduino ide. That include tells the code to pull the LCD.h library. If it’s not in your plugins on your ide it will throw an error. Hope this helps.
Hey bud sorry for the delay. Make sure the library version you download is the older version. Some are having issues with the newer updated library’s. Hope this helps.
y y aja I’m not sure if it will read at that rpm. You might want to look at an OPTO interrupter switch. Should be able to replace the Hall effect with the OPTO switch module.