Page 1 of 1

RPM using Hall effect sensor with 4 magnets

Posted: Thu Jan 26, 2023 9:56 pm
by kb0mmr
I am trying to change the code for the RPM sensor using the Hall effect sensor from 1 pulse per resolution to 4 pulse per resolution. Currently, I have converted a Grizzly G0752 lathe. I am currently using the 4 installed magnets that came with the lathe along with a hall effect sensor. The problem I am having, is that the rpm is currently reading 4 times as faster than the true speed. At this time, removing the 3 magnets is not an option to correct the RPM different. If someone can direct me to the code location for the RPM Sensor, so I can change it from 1 pulse per resolution to 4 pulse per resolution.

Thank-you
Franklin Salas

Re: RPM using Hall effect sensor with 4 magnets

Posted: Thu Jan 26, 2023 10:02 pm
by cnckeith
hello. the canned RPM sensor logic that comes with Acorn is for one pulse per revolution. This RPM sensor logic is in the PLC program.
so a PLC program change is needed. once that is done be sure to set the wizard to custom PLC program in use so it doesn't overwrite the changes made. I'll ask Chris to chime in here on how to do it.

better yet, why don't you install a spindle encoder, then you could tap and thread with the Lathe! and get accurate spindle speed display without having to use the hall effect sensor!

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Jan 30, 2023 7:11 pm
by kb0mmr
CNCKeith,

Installing the spindle encoder is a future upgrade, I would love to do it now. But currently, I have to work with what I have on-hand. Updating the PLC program from 1PPR to 4PPR is currently the best option at this time.

Thank-you
Franklin Salas

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Jan 30, 2023 7:45 pm
by ShawnM
Not sure if this will work for you or not but I have a used encoder I pulled from a working Holz-Her CNC router and I have it listed on ebay currently. Here's a link to the auction and there's a link to the data sheet for the encoder. I have no idea if it'll work with Acorn or not as I've never hooked an encoder to Acorn. I'm sure those that know can tell you if it will work of not. It's listed for $60 and I can send you the shielded cable for it as well. You can install a 10mm shaft in it and put what ever size pulley on it you need or direct drive it. Maybe it'll help you.

https://www.ebay.com/itm/144604228723

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Jan 30, 2023 10:48 pm
by cncsnw
It looks like all you need to do in the PLC program is locate the "SpinSensorTimer_FW" calculations in the vicinity of lines 4226-4227, and change "60000" to "15000".

This is the conversion factor between "milliseconds between sensor triggers" and "revolutions per minute"

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Feb 06, 2023 4:33 am
by BM_Machining
Hey there sorry to revive a dead thread, but I was trying this workaround on my machine last night and changing those values didn't seem to have any effect on the spindle speed in the program. Is there something Im missing?

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Feb 06, 2023 8:50 am
by kb0mmr
Hi,

I was able to get it to work. Crazy question, did you compile your code after making the changes?

Franklin Salas

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Feb 06, 2023 2:24 pm
by BM_Machining
kb0mmr wrote: Mon Feb 06, 2023 8:50 am Hi,

I was able to get it to work. Crazy question, did you compile your code after making the changes?

Franklin Salas
I have, I ran mpucomp.exe on mill_acorn_plc.src in cmd after editing and saving, but it doesn't seem to be having any effect. My RPM is still reading 4x fast. Below is a screen cap of the changed value

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Feb 06, 2023 2:29 pm
by cncsnw
When you ran mpucomp, did you specify the name of the output file, as mpu.plc?

Presuming that you saved your modified file under the name "mill_acorn_plc.src", then the compile command would be:

Code: Select all

mpucomp  mill_acorn_plc.src  mpu.plc

Re: RPM using Hall effect sensor with 4 magnets

Posted: Mon Feb 06, 2023 2:33 pm
by BM_Machining
cncsnw wrote: Mon Feb 06, 2023 2:29 pm When you ran mpucomp, did you specify the name of the output file, as mpu.plc?

Presuming that you saved your modified file under the name "mill_acorn_plc.src", then the compile command would be:

Code: Select all

mpucomp  mill_acorn_plc.src  mpu.plc
There it is! I knew there was something small I was missing. :lol: Thank you for the help. This is my first time editing the PLC.