PDA

View Full Version : Hall Effect Limit Switches



Sterob
25th Jul 2016, 01:55 AM
I finally got the router back in service today....yay! ( all 3 axis are as smooth as silk now )

I decided to start cutting out some acrylic housings for some Hall Effect Limit Switches.
I saw the thread on CNCZONE ( Electronic home switches made easy! (http://www.cnczone.com/forums/open-source-cnc-machine-designs/101878-cnc-forum.html) )
and was going to use the same IC but my machine uses a AKZ250 Motion Control Card and I can't get them to work in Mach3. They use Gekko drives. Can't imagine them being different, but I couldn't get them to work. I tested 44E's and the inbuilt SMD led DID work but the IC would not work with Mach3.

I did find that 49E's do work, but cant get a led to operate from it, so I'm just going to use the IC without any led indication.
I bought some 10 mm Acrylic off Ebay and drew up a simple housing. Its deep enough that I can rotate the IC 90°( if I need to ) and it will still fit. Bonus.
Going to fill the cavity with epoxy once I confirm the mounting point on the machine. I may need to adjust the position of the slots yet...will see.

363486

BaronJ
25th Jul 2016, 02:32 AM
Hi Steve,

Interesting use of plastic there. I need to make some limit switches for my camper electric step. It hadn't occurred to me to use a hall device. I've used ordinary single pole change over microswitches, switching the motor directly. However they are prone to damage from water, dirt and other road nasties thrown up by the front wheels. Hall devices and a relay would be the perfect solution here.

Thanks for the idea.

PS. Old computer fans are a good source for hall switches. ON/OFF types rather than variable resistance ones.

Sterob
25th Jul 2016, 11:44 PM
Thanks Baron,
yes, Hall Effect IC's are very handy. You have to use a magnet for the source though.
You might be able to use proximity switches instead, if your steps are steel. Save you messing with magnets.

Never thought of computer fans as a source.
I just buy them in lots of 10 or so from Ebay out of China. Cheap and have spares....

nadroj
3rd Aug 2016, 07:36 PM
As far as I know, all Hall Effect switches are binary - on/off - and can't do variable.
Another type of binary switch is optical emitter/receiver. Lots of those in printers and such.

Sterob
3rd Aug 2016, 09:26 PM
There are variable output Hall Effect IC's but I don't think that is important for this application. I don't know the requirements of my Motion Card but the 49E IC seems to work well.
I'm waiting for some more IC's to arrive and some magnets with a mounting hole, that will make fitting very easy.
Stay tuned...lol

BaronJ
5th Aug 2016, 03:56 AM
Hi Guys,

Jordan, there are many variants of both Hall Effect devices and Opto couplers that you referred to. Most often their use in electronic equipment is as a switch rather than a variable output device. Some of those that are specifically intended as a switch usually have a Schmitt Trigger output to ensure a logic high or low.

Steve, I have cheated a little on my limit switches :) I found some normally closed reed switches in a draw and have used a couple with magnets super glued to the moving part of the step. The reeds use a tiny magnet to keep them closed and the big magnet forces them to open. I placed them into some heat shrink tube and glued it to the stationary part of the frame.

Sterob
5th Aug 2016, 10:35 PM
Hi Guys,

Jordan, there are many variants of both Hall Effect devices and Opto couplers that you referred to. Most often their use in electronic equipment is as a switch rather than a variable output device. Some of those that are specifically intended as a switch usually have a Schmitt Trigger output to ensure a logic high or low.

Steve, I have cheated a little on my limit switches :) I found some normally closed reed switches in a draw and have used a couple with magnets super glued to the moving part of the step. The reeds use a tiny magnet to keep them closed and the big magnet forces them to open. I placed them into some heat shrink tube and glued it to the stationary part of the frame.


Reed switches are a nice solution. I considered them but thought I may use my limits for zeroing so didn't use them. They may introduce some very small variations of stopping point but that won't be a problem for you. Probably not for me either, but I've started down this road already...lol

I cut some modified housing to suit the X Axis....a bit smaller and shorter mounting slots so the cable can enter from the side, so its neater.

Steve

363673

Sterob
29th Aug 2016, 11:13 PM
I got some time to do a quick test today. The test Limit switch seems to work fine. The machine stops very quickly and I cannot see any variation in stopping position when changing the jogging speeds, which is good. ( I assume this IS but I can't see it with the naked eye...)

One thing I have look at is Mach 3 trips the machine when it hits the limit, but I then cannot back away from it. I have manually wind the stepper off the limit and then reset Mach 3. I would like to be able to drive the axis off the limit electrically. Anyone come across this?

Steve

364035 364036

BaronJ
30th Aug 2016, 03:01 AM
Hi Steve,

Nice work there. I like the setup.
I see two possibilities, (1) the magnet is saturating the hall device, unlikely but possible, (2) the software is not allowing the motor feed to be reversed. There should be two inputs for the limit switches, one for each direction, its maybe that you are feeding "Dead stop", particularly since you say you have to reset the software.

Disclaimer: I don't know Mach 3, only my experience with other CNC stuff.
HTH.

Sterob
30th Aug 2016, 08:17 PM
Hi Baron,
The limit does appear to switch later than in my earlier tests, but I hadn't used these particular magnets before. I suspect the magnets are mean't to be orientated 90° to the way I'm using them, but I can't help that. They work well enough.
I have the "driving off the limit" problem sorted. I found a setting in Mach3 that allows the machine to drive OFF the limit after the software is reset. Its called 'Auto Limit Override' and appears on the settings tab.
Unfortunately it also allow one to drive though the limit so one must be careful...lol

I'm using ONE input for all of the limits switches and wiring all the switches in parallel, as per someones recommendation on the Net.

Now to start fitting the switches and running the cables.

Steve


Hi Steve,

Nice work there. I like the setup.
I see two possibilities, (1) the magnet is saturating the hall device, unlikely but possible, (2) the software is not allowing the motor feed to be reversed. There should be two inputs for the limit switches, one for each direction, its maybe that you are feeding "Dead stop", particularly since you say you have to reset the software.

Disclaimer: I don't know Mach 3, only my experience with other CNC stuff.
HTH.

BaronJ
31st Aug 2016, 07:32 AM
Hi Steve,

I can envisage that the software knows which direction it was running when a limit was tripped and that it should be able to record that and prevent any further movement in that direction only allowing movement to take place in the opposite direction. But if you are resetting the software then it seems that you are loosing that information. To me that would not be acceptable.

Sterob
7th Sep 2016, 10:51 PM
After taking doing some re-work, I'm finally moving forward again....
I have the Y axis complete and the the Z Axis completed today. I had a brain fart with the Z Axis switches and mixed up the wiring at BOTH ends ( doh ) so that took some time to sort out.
I am not entirely happy with the sensing distance. I would like a couple more mm. I don't know why its so low. I experimented with the orientation of the neodymium magnets but nothing made any difference.
Maybe the thickness of the acrylic is affecting it. I tried to keep it to a minimum but its still about 1.5mm.
I tried packing the magnet away from the Aluminium frame but that did not affect it. I also tried overhanging the magnets...no go either.
I have ordered some thicker magnets so that is the last resort. If they do not give me more clearance, I will have to live with it.
I tried to find a way to mount he switches so the magnets travel across the front instead of travelling directly at the switch but could not work out a neat solution. Never mind....
Just the X Axis to go and they should be a lot simpler to fit.
Steve

364101 364100

PS Pics WERE orientated correctly when I uploaded them....sigh....

BaronJ
8th Sep 2016, 07:16 AM
Hi Steve,

364116
364114
364115

Attached are two data sheets and a copy of the Honeywell application notes.
The latter is a 1.6Mb file. I hope that these are useful to you.

I suspect that the device you are using is not suitable for use with Mach 3 since its output is a linear one rather than a logic switch.

Sterob
8th Sep 2016, 01:45 PM
Hi Baron,
Thanks for the info.
My approach to choosing a IC was not very scientific. I should have put more thought into it. I did know the device was linear. i just thought it would not be a problem, as long as the flux density was high enough.
I tested a few until I found one that worked with my motion card. I thought an analog device would be ok. It still might be...
I read though your first document and it confirms partially what I suspected. The flux strength increases with an increase in cross sectional area as well as length.
I have ordered thicker magnets to try. Longer magnets are feasible but not considered yet.... I can also try to reduce the distance between the sensor and the outer side of the enclosure.

If I could have used magnets passing across the sensor, then I would not have this problem....never mind...lol

it's all good fun.....

Steve

BaronJ
8th Sep 2016, 06:56 PM
Hi Steve,

I have some hall switches salvaged from computer fan motors, I can't remember off hand what the part No: is but I'll try and find out later.

Sterob
8th Sep 2016, 10:29 PM
Z axis is all done.
I added a second magnet to see if that increased the magnetic flux enough to give me earlier activation and it worked well.
When the new , thicker magnets arrive I'll swap them out.
I thought the 3mm thick ones would be heaps, but apparently not...lol The new ones are 6 mm thick. Other dimensions the same (20 x 10mm.)
364120

I started on the X axis today as well. Worked out how the mount the switches and fabricated 2 mounts. At least the wiring will be run alot easier for the last 2.

364121

Steve

BaronJ
9th Sep 2016, 05:48 AM
Hi Steve,

The devices that I have are marked A112 and E964 both are in TO92 packages. The only data that I could find was these :-

364122
364123

I did find another applications note from Infineon which I can attach if you want it.

HTH.

Sterob
9th Sep 2016, 01:19 PM
Hi Baron,
Thanks for that. I think these will be ok. Ive come too far to change now anyway...lol.
I'm getting about 3 mm clearance so that will work out well.
I didn't realise there were so many Hall Effect IC's around.
Steve

BaronJ
21st Sep 2016, 07:12 AM
Hi Steve,

I've been having a look at some info for Mach 4. I found it interesting and based on some things in there I went and found a couple of data sheets that you might find of interest.

It appears that Mach requires a digital signal, that is, a rapid transition from a 0 to a 1 and vice versa. The Hall devices that you are using are a linear output, which means that the change in output level will be quite slow. In fact only as fast as the mechanism can move the magnet over the Hall sensor.

Whilst you said that it seems to work just fine, there is the danger that the input to the Mach ends up in an indeterminate state which could cause other issues.

Unfortunately the Hall devices that I have of this type are tiny surface mount Sot23 size and will not fit into your holders otherwise I would send you some.

Anyway I've attached the two data sheets for the ones refered to in the Mach 4 handbook.

364293
364292

PS. Sorry for the delay in responding, things keep getting in the way.

Sterob
2nd Oct 2016, 10:41 PM
Last axis all done. Just have to tidy up the wiring...woo hoo.
The thicker magnets have't arrived yet, but that will on'y be a 5 minute job to swap them out, when they do.

It was a long job, but will stop me damaging anything if make a mistake.

Steve


364562