587,047 active members*
2,695 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Benchtop Machines > Trying to get Index sensor working
Page 1 of 2 12
Results 1 to 20 of 32
  1. #1
    Join Date
    Jan 2011
    Posts
    141

    Trying to get Index sensor working

    Need some help!
    Am trying to get my sensor working so I can get accurate RPM reading on my spindle. I bought this sensor:

    Invalid Request

    I have it mounted as so:

    Attachment 211292

    The magnets are rare-earth magnets which I figured would provide a strong signal.

    Right now, I'm running 12v to it from a DC power supply in my control box. I am running it into Location 1/Pin 10 in my G540. I have verified I'm getting 12v to the sensor.

    When I connect my multi-meter to the sensor, I am getting readings all over the place. It bounces around from 0vdc to 4, to 8, and seems to be no rhyme or reason why, the proximity of the magnet seems to make no difference either.

    I'm probably doing something stupid here, but hopefully its obvious to someone else, as it's not to me. I figure I need to start getting my 0-4v output from the sensor before I start figuring out how to set it up properly in Mach3.

    Thanks,
    Carl

  2. #2
    Join Date
    Feb 2006
    Posts
    7063
    Duo you have a pullup resistor on the output?

    Regards,
    Ray L.

  3. #3
    Join Date
    Jan 2011
    Posts
    141
    I do not. However, that wouldn't explain the odd bouncing voltage would it?

    Sent from my SGH-I337M using Tapatalk

  4. #4
    Join Date
    Aug 2012
    Posts
    621
    If you remove the magnets from the vicinity, do the readings still bounce around? Rare earth magnets have a very strong flux, and Hall Effect sensors can be really, really sensitive...

    Luke
    "All I'm trying to find out is the fellow's name on first base" -- Lou Costello

  5. #5
    Join Date
    Jan 2011
    Posts
    141
    Yeah was getting the odd readings without any magnets and regular magnets too.

    Sent from my SGH-I337M using Tapatalk

  6. #6
    Join Date
    Sep 2013
    Posts
    88
    Hi,
    You will need a pull-up resistor, as this is an open collector sensor.
    It's possible that the board input already has this (but not sure, so check by measuring the voltage on the board pin without anything connected to it (it should be at the board system voltage).

    I would first test the sensor without the board connected.
    Just appy a resistor (10k - 100k range) between +ve and the output.

    Also, test away from the machine, and remember that the sensor need the flux direction to be oriented a certain way to work.

    good luck.

  7. #7
    Join Date
    Dec 2003
    Posts
    24223
    The sensor requires a magnetic south pole to operate, is this how you have it?
    The minimum pull up resistance should be 600 ohms, no lower in total.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  8. #8
    Join Date
    Jan 2011
    Posts
    141
    I'm not sure how to define which was is South or North. It's been a long time since science class. I did try both directions though.

    I'm guessing based on your comments regarding pull up resistors, the g540 is expecting a different range than the sensor is putting out. The resistor needs to go between the signal wire and ground or just in line with the signal wire?

    Sent from my SGH-I337M using Tapatalk

  9. #9
    Join Date
    Feb 2006
    Posts
    7063
    The pullup resistor needs to go between the red and green wires of the sensor, preferably where they connect to the G540. I'd suggest a resistor no larger than 1K. Lower resistance will provide better noise immunity, but under no circumstances under 330 ohms.

    With the pullup resistor in place, you'll know immediately if you've got the magnet oriented incorrectly - the output will be stuck high, regardless of the presence of the magnet.

    Regards,
    Ray L.

  10. #10
    Join Date
    Sep 2013
    Posts
    88
    Quote Originally Posted by zer0fighter View Post
    I'm not sure how to define which was is South or North. It's been a long time since science class. I did try both directions though.

    I'm guessing based on your comments regarding pull up resistors, the g540 is expecting a different range than the sensor is putting out. The resistor needs to go between the signal wire and ground or just in line with the signal wire?

    Sent from my SGH-I337M using Tapatalk
    I think the g540 will have pullups already based on the data sheet.

    The pullup sets the upper voltage, so it matchesv
    that which the board needs. The sensor will ground this out to provide the low signal. This way the sensor provides no current to the board.

    I would personaly test the sensor in isolation from the board. Pay particular attention to the correct connection order.

    Sent from my GT-I9100T using Tapatalk

  11. #11
    Join Date
    Sep 2013
    Posts
    88
    Quote Originally Posted by SCzEngrgGroup View Post
    The pullup resistor needs to go between the red and green wires of the sensor
    Be careful, this could bias the input to a higher voltage than it can handle.....
    The pull up should attach to the logic level supply


    Sent from my GT-I9100T using Tapatalk

  12. #12
    Join Date
    Dec 2003
    Posts
    24223
    Quote Originally Posted by zer0fighter View Post
    I'm not sure how to define which was is South or North. It's been a long time since science class. I did try both directions though.

    I'm guessing based on your comments regarding pull up resistors, the g540 is expecting a different range than the sensor is putting out. The resistor needs to go between the signal wire and ground or just in line with the signal wire?
    `I would remove the sensor from the bracket and try it in free air, this way you can check for the magnet polarity and also see if any magnetic field in the pulley is causing a fluctuation, as it may be too close to the rest of the steel.
    The output is rated at 20ma so the total pullup resistor whould be no less than 600ohms on 12v, as mentioned a 1k would be fine if no other resistor is present.
    It goes between the open collector output and 12+v.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  13. #13
    Join Date
    Feb 2006
    Posts
    7063
    Quote Originally Posted by Al_The_Man View Post
    `I would remove the sensor from the bracket and try it in free air, this way you can check for the magnet polarity and also see if any magnetic field in the pulley is causing a fluctuation, as it may be too close to the rest of the steel.
    The output is rated at 20ma so the total pullup resistor whould be no less than 600ohms on 12v, as mentioned a 1k would be fine if no other resistor is present.
    It goes between the open collector output and 12+v.
    Al.
    Al,

    The G540 has only logic-level inputs, so he can't use 12V, without damaging the G540. There is also nothing in the G540 manual that would suggest it has internal pull-ups, and certainly his experience to date tends to bear this out.

    Regards,
    Ray L.

  14. #14
    Join Date
    Dec 2003
    Posts
    24223
    Quote Originally Posted by SCzEngrgGroup View Post
    Al,

    The G540 has only logic-level inputs, so he can't use 12V, without damaging the G540. There is also nothing in the G540 manual that would suggest it has internal pull-ups, and certainly his experience to date tends to bear this out.

    Regards,
    Ray L.
    I have never used the G540, but according to the schematic of it that I have, the inputs are 12v sourced, (the OP mentions this in the first post).
    The inputs show Opto's with a 12v+ source and a 2.2k series resistor.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  15. #15
    Join Date
    Feb 2006
    Posts
    7063
    Quote Originally Posted by Al_The_Man View Post
    I have never used the G540, but according to the schematic of it that I have, the inputs are 12v sourced, (the OP mentions this in the first post).
    The inputs show Opto's with a 12v+ source and a 2.2k series resistor.
    Al.
    I've never seen a schematic, but the manual indicates "signal level" (the only spec they give.....) as 3.3-5V.

    Regards,
    Ray L.

  16. #16
    Join Date
    Sep 2013
    Posts
    88
    I think we are all getting somewhere,,,,, I also haven't used this drive myself.

    If the input is an optocoupler, then there should be no need for an external bias resistor.
    The manual expects the user to connect a SPST switch to ground for this input.
    The N chanel transistor of the sensor is essentualy acting as a switch to ground.

    Biasing of the chanel is performed by the 2.2K resistor (via the optos internal LED).

    Addind another paralel resistor in this case would just draw additional current through the sensor, with no other benefit.

    So in addition to testing the sensor seperatly, I would also test the input with a short pin.

  17. #17
    Join Date
    Dec 2003
    Posts
    24223
    This is what I have.
    Al.
    Attached Thumbnails Attached Thumbnails G540 SCHEMATIC.pdf  
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  18. #18
    Join Date
    Jan 2011
    Posts
    141
    I'll pull the sensor off tonight and test outside of that. Will make sure I get the poles correct too. Might just have some odd magnetic field happening inside my lathe, who knows.

    Sent from my SGH-I337M using Tapatalk

  19. #19
    Join Date
    Dec 2003
    Posts
    24223
    Quote Originally Posted by zer0fighter View Post
    I'll pull the sensor off tonight and test outside of that. Will make sure I get the poles correct too. Might just have some odd magnetic field happening inside my lathe, who knows.
    You could have some magnetic field in the rotary mass the magnet is on, what you have to watch however, is you don't add too much to the magnet mount and start putting it out of balance.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  20. #20
    Join Date
    Feb 2008
    Posts
    521
    Won't a Hall effect just work with a ferrous toothed rotor, easily tested with just a screwdriver - the magnets may just be overpowering the sensor?
    I'll admit that is the limit of my knowledge LOL!

Page 1 of 2 12

Similar Threads

  1. Cheap and easy spindle index sensor for G540 and Mach 3
    By grizzlymog in forum Gecko Drives
    Replies: 16
    Last Post: 06-10-2012, 01:16 AM
  2. VMC840 Axes index not working
    By Todd Hunsche in forum Tree
    Replies: 2
    Last Post: 10-12-2010, 01:04 PM
  3. lathe index mark sensor
    By Karl_T in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 6
    Last Post: 05-28-2007, 04:39 PM
  4. Taig / Digispeed XL spindle index sensor
    By Dfennell in forum Taig Mills / Lathes
    Replies: 1
    Last Post: 01-02-2007, 06:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •