Hello Guest it is March 29, 2024, 02:57:21 AM

Author Topic: Spindle Index Setup With Hall Sensor??  (Read 1326 times)

0 Members and 1 Guest are viewing this topic.

Spindle Index Setup With Hall Sensor??
« on: March 27, 2020, 06:01:39 PM »
Hi All,
I've been working on getting spindle control working through Mach4 for the last couple weeks and I think I have everything hardware wise in place or on order.

I'm running Mach4 and using an ESS connected to a C25 BoB.
These are controlling Clearpath Servos for X, Y, Z movements.
The spindle is belt drive at a 2.2:1 ratio. 1 rotation of motor = 2.2 rotations of spindle.
Motor is a 1.5Kw 3 phase induction motor wired for delta and is run by a Teco VFD.
I have a C41S-PWM Variable Speed Control Board on order to connect the VFD to the ESS.

Now to my problem... I'm not getting and feed back on Mach4.
I have a hall sensor pulsing off 4 magnets mounted equally around the spindle shaft.
This is connected to Port 2 Pin 3 input, +5v and ground.
When tested with multi meter, a LOW on the C25 BoB reads 2.5v and HIGH read 4.8v. And the indicator LED on pin 3 glows accordingly (not so bright to bright) as a magnet passes the hall sensor.

I'm not sure if it should behave like this and if this is the cause of the problem. I would have thought LOW should measure 0v and HIGH (as a magnet passes over) should measure around 5v.

I've gone through various setting in Mach, including pin setup and activating Spindle Encoder Phase A, trying Spindle Index option and more. I'm still not getting any response from Mach to acknowledge the presents of a spindle index or encoder.

 I've been toiling with this for a couple weeks now and am open to any and all suggestions/ideas. I don't know if I've got Mach4 set up right or if the Hall sensor is faulty?

 Initially the hall sensor was setup on an Arduino and reading the RPM of a small lego motor and it worked perfectly, but once it was setup on the mill spindle via the Arduino and display the readout went crazy.

Hall sensor Data sheet.
https://www.jaycar.co.nz/medias/sys_master/images/images/9369043927070/ZD1902-dataSheetMain.pdf

Basically all I want is a real time actual RPM count of the spindle.
If I issue an M3 S1000 command how does Mach know the spindle is geared 2.2:1?



Re: Spindle Index Setup With Hall Sensor??
« Reply #1 on: March 27, 2020, 08:28:43 PM »
TTL levels are defined as Low = 0 to 0.8 Volts, High 2 to 5 volts (all with respect to ground). Clearly you are not getting to Low values.
Your hall sensor may not be sufficient by itself to pull the voltage down to low. you may need to add some additional components like a Schmitt trigger.
With the feedback pulses driven by the spindle itself, the pully ratio does not come into it. You should setup your spindle speeds under the control configuration/spindle tab. There you will find up to 20 available pulley ratios available. Simply set the Min/Max speeds etc required. Your controller should then supply a Voltage to your VSD in proportional to your commanded speed v's max speed.

Hope this helps.

Offline MN300

*
  •  297 297
    • View Profile
Re: Spindle Index Setup With Hall Sensor??
« Reply #2 on: March 28, 2020, 08:27:15 AM »
Your sensor is doing exactly what it should do. It is an analog sensor, away from a magnet it puts out 2.5 volts. The voltage goes higher or lower depending on the strength and polarity of the magnetic field sensed.

These sensors detect south poles passing by and put out a digital signal.

https://www.digikey.com/product-detail/en/melexis-technologies-nv/US2882LUA-AAA-000-BU/US2882LUA-AAA-000-BU-ND/431872
https://www.digikey.com/product-detail/en/littelfuse-inc/55140-3H-02-A/55140-3H-02-A-ND/565513

There are other options for the sensing action. Some look for alternating north and south poles. Others have a built in magnet and sense ferrous material, like gear teeth.
Re: Spindle Index Setup With Hall Sensor??
« Reply #3 on: March 29, 2020, 02:11:33 AM »
Ok, so found in my past attempts, if the Hall sensor is flipped over then it will pull the pin LOW (0v) as the magnet passes and rest at about 2.5v without the presents of a magnet. If 2.5v is classed as a HIGH it should work.
I'll go try it out and see what happens.

With the feedback pulses driven by the spindle itself, the pully ratio does not come into it.
Ah yes, I did over look that one. Lol. Thank for pointing that out, It may have left me scratching my head for a while.
Re: Spindle Index Setup With Hall Sensor??
« Reply #4 on: March 29, 2020, 02:34:08 AM »
Hi gyrojeremy,
I notice your link to your hall sensor was to a NZ Jaycar site....are you Kiwi?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Spindle Index Setup With Hall Sensor??
« Reply #5 on: March 29, 2020, 02:56:32 AM »
That did it. I'm getting a true spindle speed now, albeit fairly choppy. I wonder if I take out 2 or 3 of the 4 magnets if that would help reduce the choppiness?

I notice your link to your hall sensor was to a NZ Jaycar site....are you Kiwi?
Yip Kiwi, living in the BOP. Unfortunately I still have to go to work. I would much rather spend lock down locked in my shed tinkering.
Re: Spindle Index Setup With Hall Sensor??
« Reply #6 on: March 29, 2020, 03:43:55 AM »
Hi,
Canterbury here, be careful what you wish for...you may get locked down and its not that much fun either.
The fact that you are working suggests you are in good health...and thats good news.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Spindle Index Setup With Hall Sensor??
« Reply #7 on: April 15, 2020, 04:29:21 AM »
Hey Craig.
Health is good. Personally I think there's much more going on in the back ground than just the flu smoke screen, so not to worried about it.
Are you part of Artsoft or Newfangled. I see you posting in many topics I've researched.
Re: Spindle Index Setup With Hall Sensor??
« Reply #8 on: April 15, 2020, 12:38:59 PM »
Hi,

Quote
Are you part of Artsoft or Newfangled. I see you posting in many topics I've researched.

No, I am not, just an amateur.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'