My first Arduino project. A RPM counter for a slotted detection rim. I took an old mouse apart and used the IR detector with a few resistors. My goal is to make my Max NC 10 CNC spindle run accurately controlled by Mach3.
I recently built a tachometer like this. One thing I found is that for most cnc applications you want to have 4 or 8 slots rather than just 1, so that it’s accurate at low RPM. With just 1 it’ll run up to 200,000 rpm, but under 100 rpm it takes several seconds to get a good reading. Next is getting linuxcnc to interface with it (which requires building a PWM motor speed controller, as well.)
Thanks @John_Bump , but I don’t expect to run as low as 100 rpm or at 200000 rpm - haha. My spindle run with the help of a 1/10hp motor running between 300 and 8000 rpm. That’s just a guess until I get to measure it…The machine is a Max NC10.
I just got my new hardware running, so I can set the accuracy range with jumpers. It should be good from 10-240,000 rpm. Overkill is the best kind of kill!
Success implementing interrupted software measuring RPM. I dropped the mS and added an average RPM to the display. At the same time I was able to create a feedback output for Mach3 and make it respond to the feedback. The prototype needs adjustments but the entire loop is in place and works. I’ll post detailed info to my blog later today.