RPM using Hall effect sensor with 4 magnets

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
kb0mmr
Posts: 3
Joined: Sun Feb 21, 2021 3:38 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: E415F6F57684-0210214350
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

RPM using Hall effect sensor with 4 magnets

Post 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
cnckeith
Posts: 7164
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: RPM using Hall effect sensor with 4 magnets

Post 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!
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
kb0mmr
Posts: 3
Joined: Sun Feb 21, 2021 3:38 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: E415F6F57684-0210214350
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: RPM using Hall effect sensor with 4 magnets

Post 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
ShawnM
Posts: 2190
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

Re: RPM using Hall effect sensor with 4 magnets

Post 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
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: RPM using Hall effect sensor with 4 magnets

Post 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"
BM_Machining
Posts: 13
Joined: Mon Jan 09, 2023 6:16 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: E0623479EC91-0208225652
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: RPM using Hall effect sensor with 4 magnets

Post 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?
kb0mmr
Posts: 3
Joined: Sun Feb 21, 2021 3:38 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: E415F6F57684-0210214350
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: RPM using Hall effect sensor with 4 magnets

Post by kb0mmr »

Hi,

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

Franklin Salas
BM_Machining
Posts: 13
Joined: Mon Jan 09, 2023 6:16 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: E0623479EC91-0208225652
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: RPM using Hall effect sensor with 4 magnets

Post 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
Attachments
20230206_130143.jpg
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: RPM using Hall effect sensor with 4 magnets

Post 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
BM_Machining
Posts: 13
Joined: Mon Jan 09, 2023 6:16 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: E0623479EC91-0208225652
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: RPM using Hall effect sensor with 4 magnets

Post 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.
Post Reply