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.
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.
“Get an old honeywell keyboard” … when you wrote this in 2013, we were just recovering from a debt-fueled recession and I remember these things going for $10 then.
We’re now in the middle of another debt-fueled bubble, and these things are selling for $100+.
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.
if this is true then why do so many industrial automation and CNC builds use hall effect sensors for home switches/sensors?
They don’t rely on them to provide the calibration. They just need them to prevent crashes.
reliability – they still work after being soaked in oil
unlike mechanical or optical ones
as long as you are not covering your printer in oil you will be better off with super cheap mechanical, or super precise optical ones
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.
ehhh… n/m i see your point.
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.
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.
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.
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).
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.
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
That’s a Chinese clone of this: http://reprap.org/wiki/Hall-%CE%98
The design has more parts, but the functionality is exactly the same. They chose to use an Op-Amp to implement a Schmitt trigger, whereas Anthony’s design simply rely on the built-in hysteresis of the Allegro A3144 sensor. The Op-Amp design has the advantage of an adjustable sensitivity, I suppose, at the cost of a bigger board and more parts.
Probably uses an OP amp and a transistor buffered output.
Its actually using a similar circuit or even the same circuit. All the lines on the pc board make it look more complicated.
That circuit is called “Hall-Θ” and uses an analog hall sensor, which is why it needs all the extra components. Also, it’s output is an open collector (10k to Vdd), I much prefer the buffered one in my circuit, especially in noisy environments with motors. You can find more info about the eBay circuit here: http://reprap.org/wiki/Hall-%CE%98.
Why not reed switches? So much simpler, smaller, and cheaper.
Hall effect sensors are cheaper than reed switches. Hall effect sensors are about fifteen cents each, reed switches are almost a dollar. Also much more reliable as there are no moving parts.
Whats wrong with slotted optical switches? :S
I don’t know, please tell me what’s wrong with slotted optical switches :P
stray light will create missed steps while printing, if the endstops are validated also while printing and not only in the homeing routine.
you would obviously mount the sensor shrouded from strong light. Also those slots are pretty well shrouded from outside light anyway, it is very hard to get enough light in from the outside to get a reading.
Also, I’m pretty sure most photointerrupters use IR light. And some I think use a pulsed source and in-phase pulsed detection to reject false positives.
“for a song and dance on eBay”? huh?
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
Yeah, the phrase he was looking for is “for a song” which does indeed mean cheap. He got his sayings confused.
Yes, “singing for your supper”, meaning giving a little of yourself (or wealth) to gain in return something you need.
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.
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
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).
A raw A3144 can be plugged directly into the RAMPS controller board, the pins on the board exactly match the pinout of the chip so all you need is a 3 wire cable like hobby servos use. Cheaper and easier than limit switches.
see https://picasaweb.google.com/lh/photo/gO3XJQL8EWKuuEomDVMBf9MTjNZETYmyPJy0liipFm0?feat=embedwebsite
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…
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!
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
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
strange, noone really targets the issue.
the issue is the rise time of the switch and its synchronisation with the stepper driver and location.
hall effect suffers not from the sensor being the issue, but the magnetic field it senses itself being variable. stick a magnet next to an alloy rail and move it at high speed. guess what happens? oh. lenz law. the magnetic field is altered. aluminium is a conductor and forms eddy currents. mount your hall effect sensor close to the rail, what happens? the trigger point is altered by velocity!
use a mechanical switch… you have contact wear, bounce, false hits, inertia… they vary. theres a long pipeline of latency.
LATENCY is the issue.
use a photo interrupt?
most people get it utterly wrong and try sticking this little interrupter out in the air and get a blade to line up with it. often a plastic blade. fail to realise a lot of plastic is transparent in the IR range. and of course, its delicate. one misaligned blade or sensor and crunch… because so far, most designs for 3d printers are obviously made by people with no experience of industrial machinery. tear apart an inkjet and repurpose it, but when it comes to operating an actual milling machine day in day out… anyway, i digress….
when you check the specs on the photointerrupter, look at the FALL times on the transistor. thats the way most people set them up and never give it a second thought.
do yourself a favour. engage brain cells and look at the RISE time. about a 20:1 difference iirc last time i looked at a data sheet….
then look at your carriage and the sensor and contemplate how to REVERSE the mode of operation. keep the light blocked and trigger only when its open.
basically… if the rise time to the trigger threshold is lower than the pulse rate of the stepper… you have uncertainty. there is an indefinite number of pulses that may have occurred during that rise time. isnt that plainly obvious? get your head out of the damn box! the method of triggering doesnt matter,
its about trying to always trigger on the same angular position regards the stepper and the pulses driving it…
mechanical switches should be hardware overrides, final fallback safety. hard switches vs soft switches. they arent repeatable enough for accuracy.
nothing says OFF quite like a double pole breaker to the power supply…
photointerrupts are the only way. the only PRECISE method where you can reduce undesired variables to a bare minimum.