Hall effect limit switches for a 3D printer

hall-effect-limit-switches

We’re used to thinking of limit switches as a mechanical device that cuts the motor connection before physical damage can occur. [Anthony] decided to try a different route with this project. He built this set of no-contact limit switches using a hall effect sensor. The small black package sticking out past the end of the protoboard is the sensor. It is used to detect a magnetic field.

[Anthony] chose to use an Allegro A3144 sensor. Apparently it is no longer in production but was easy to find for a song and dance on eBay. When thinking about the design he decided to add two LED indicators, one lights when the switch is open and the other when it has been tripped. This would have been easy to do with just one LED, but he needed to add more parts to get both working. In the lower left corner of the protoboard you can see the configurable gate device (74LVC1G58) he added to monitor the hall effect sensor and switch the output and LEDs accordingly.

Comments

  1. Bill Jackson says:

    Get an old honeywell keyboard, the type with hall effect key switches, and you can open up the keyswicthes and remove the Hall element, and it works as mentioned here. The Honeywell keyboards were the best and most reliable. Killed of by the cheap membrane ones of course, but surplus stores have them.

  2. Dax says:

    The problem is the hysteresis. With a mechanical switch, you can create a very precise sensor that cuts in and out within fractions of a micrometer or better. With a hall sensor, everything around it affects the magnetic field and you need a large hysteresis for the switching, which means a large uncertainty in where the actuator really is when the limit is triggered.

    • aliveoneee says:

      if this is true then why do so many industrial automation and CNC builds use hall effect sensors for home switches/sensors?

    • Mike D says:

      Last page of the write-up addresses hysteresis. The sensor has built in hysteresis. The configurable logic gate also has schmitt trigger input but not necessary because of the sensor’s hysteresis.

    • John U says:

      Bang on, both in the original comment & the response. Hall effect or VR / proximity are not accurate enough for this sort of thing, you need mechanical or optical.

    • anthonyvhdotcom says:

      Hysteresis does not make the trigger point “random” or wander about like your comment seems to imply. The trigger point for a given sensor is always at the same Gauss level, although the level itself might be stated as a range in the datasheet, so the absolute trigger point might differ between sensors. Hysteresis just prevents oscillation around the trigger point. In order to repeat a measurement, just move back a few millimeter until the sensor turns off and then re-approach it. Note that mechanical switches also provide hysteresis if you push the button beyond the trigger point (which in fact you will always do). Some more technical hall sensor info here: http://www.akm.com/Brochures/HallSensorsTechnicalGuide.pdf.

      • Dax says:

        Indeed, but the variability of the magnetic field does. If you place some ferromagnetic metal anywhere near the sensor, it will affect how it senses the magnetic field.

        Mechanical switches have next to no uncertainty in where they switch off as you take the pressure away from the switch. The magnetic sensor however has to assume that the field can fluctuate even when everything stays still, so you’re never quite sure where the switching will actually happen.

        • anthonyvhdotcom says:

          Yes, you are correct. I wouldn’t use them for positional sensing in environments with ferromagnetic metals. Luckily, that’s not a problem in this use case (3D printer).

    • johnmeacham says:

      The mechanical switches have a large Hysteresis too. That is why the firmwares all go forward until the switch hits then back up until it turns off and use that as the set point, so the switch is always approached from the same direction. This also does the right thing for hall effect sensors.

      Though, if you are fixing the limit switches on the basic reprap design, moving the z switch from the bottom of the movement to the top is by far the biggest and simplest win for precision.

  3. Hmm, There are hall effect sensors for 3D printers on eBay, and they seem alot more complicated (more parts), Anyone know why?

    Not sure if this like will work. http://www.ebay.ca/itm/3-x-Hall-Endstops-react-on-magnetism-3D-printer-reprap-prusa-mendel-etc-/150872387181

  4. Why not reed switches? So much simpler, smaller, and cheaper.

  5. Whats wrong with slotted optical switches? :S

  6. James says:

    “for a song and dance on eBay”? huh?

    • Sven says:

      English proverb for “cheap”

      translation: “they’re very cheap on ebay”

      • not really:

        a song and dance (American)
        a long and complicated statement or story, especially one that is not true (usually + about ) She gave me some song and dance about her kids always being sick and not being able to get to the meetings.

        song and dance
        n Informal
        1. Brit a fuss, esp one that is unnecessary
        2. US and Canadian a long or elaborate story or explanation, esp one that is evasive

        • Blue Footed Booby says:

          Yeah, the phrase he was looking for is “for a song” which does indeed mean cheap. He got his sayings confused.

          • Ren says:

            Yes, “singing for your supper”, meaning giving a little of yourself (or wealth) to gain in return something you need.

  7. Ren says:

    When we built a robotic tape library (prototype) 23 years ago, we included both “hard” and “soft” limit switches to protect the axis motors from burning out. Optosensors were monitored by software to signal each end of travel, but just beyond those (about 1 cm) were mechanical limit switches that would cut the power to the motor if it went beyond the “soft” limit. This would require physically moving the motor carriage(?) back within the area of the soft limits, but it saved us from burning out expensive stepper motors.
    It was a “belt and suspenders” type of safety, We had experienced several times previously where the software failed to stop/reverse the motors.

  8. Mark says:

    Not in the spirit of hacking it yourself, but nice price>

    http://dx.com/p/diy-hall-switch-hall-sensor-module-for-smart-car-blue-141648

  9. Fritoeata says:

    I’m actually surprised that I’m the first to post this…
    The “Cheap-O Hall” for reprap:

    http://www.thingiverse.com/thing:24189

    http://www.thingiverse.com/thing:30506 <—upgraded

    …A few commented about the price of the hall-o, then others commented about those being analog. This thing comes in at around $3 using current production components from digikey (not incl pcb).

  10. quentinharley says:

    Reprap Morgan is using hall effect sensors at the moment, and I am not seeing any calibration or repeatability problems here. It could be because the sensors are located close to the centre of the machine, limiting external interference…

    I’ll have to see how it behaves long term.

    No song and dance here…

  11. johnmeacham says:

    I wrote about this a while ago here

    http://notanumber.net/archives/66/upgrading-my-reprap-with-cheap-hall-effect-sensors

    Hall effect sensors are completely the way to go. cheaper than limit switches, half the cost, no need for exact placement. You don’t even need a controller board if you have the 3 pin headers for limit switches, they actually exactly match the hall effect sensor pinout so all you need is a hobby servo cable!

  12. Do not forget that limit switches were always intended to be a “HARD WIRED” safety factor that would work when all else fails. Hall effect switches may be appealing in some ways, but when an irrestible force meets an immovable object – the world ends? or we find out that expensive things can be broken

  13. Tungsten says:

    Maybe it’s better to use ready-made inductive proximity sensors. They are easy to use, industrial solution, metal case, good price.

    Inductive Proximity Sensors detect metal objects without touching them. This technology is used in applications where the metal object to be detected is within few millimeters of the sensor face.

    Something like this one http://www.buyincoins.com/new_en/details/new-inductive-proximity-sensor-detection-switch-npn-dc-6-36v-lj12a3-4-z-bx-product-12325.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,401 other followers