Author Topic: Stumped about my Hall effect limit switches  (Read 2240 times)

0 Members and 1 Guest are viewing this topic.

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Stumped about my Hall effect limit switches
« on: April 30, 2020, 06:15:21 pm »
In an attempt to dump mechanical limit switches, I installed 3 Hall effect sensors as shown below. When a magnet is passed over the individual sensors, its relay indicator lights up and the normally closed relay breaks the circuit to kill the appropriate axis. This works, but...

Each limit switch works so that it stops the travel of that particular axis and requires a reset to continue with its travel.
If you fail to move that axis after resetting it, the other two axes will run passed their stops even though their individual relays are triggered.

This might make it easier to envision what happens:

Scenario 1:

Y hits a limit and stops. I reset it and move it again to make sure it was reset. Then I test X. It hits a stop, I reset it, test to make sure it travels. Ditto for Z.

Scenario 2:

Y hits a limit and stops. I reset it but I DON'T jog it to test for a reset. Then I test X. It passes its magnet, lights up its relay, but continues to travel without setting off an alarm, eventually crashes.

The breakout board and just about everything else is eBay components marketed as "Longs", Chinese stuff. I've tried for a couple of days to figure it out but I'm stumped. Any ideas? I appreciate any help. Diagram attached.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7527
  • Country: ca
  • Non-expert
Re: Stumped about my Hall effect limit switches
« Reply #1 on: April 30, 2020, 09:56:52 pm »
So there is 5V and Ground going to each limit switch, and an individual line coming back from each. Seems good.

With a multimeter test switch output signals when multiple are active, you may be able to do this on the PC as well depending on how the board is hooked up. Some hall sensors may not work at 5V, so we want to eliminate the possibility of supply being too low.

So whats left is the logic running on the PC or control board, to determine what happens when a limit is hit. Typically these are wired in series, and XYZ are all one limit switch. Is it possible the controller logic is seeing you "override" all limit switches? Therefor ignoring future input?

You should never be hitting a limit switch and continuing with it active, you'd generally tap it and move off for homing only.

edit: I don't think that relay board is necessary, usual probe will have NPN open collector output, so can go straight to the logic input (which would be pulled up on the board). That said it should not be causing any serious issues.
« Last Edit: April 30, 2020, 10:01:24 pm by thm_w »
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Stumped about my Hall effect limit switches
« Reply #2 on: April 30, 2020, 09:58:51 pm »

Where is the "reset" performed...  on that board, or somewhere else?

Does the board have any logic / CPU on it?

Maybe a picture of it would be good?
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4004
  • Country: nl
Re: Stumped about my Hall effect limit switches
« Reply #3 on: May 01, 2020, 01:06:48 pm »
Throw away the Longs board and use something like GRBL ?
GRBL has been ported to a lot of different uC's. The original "arduino" boards are maxed out on CPU capacity (both speed, peripherals and FLASH).
I've been using a port to the Blue Pill for some time, and it has plenty of room for some extensions.
It also uses hardware USB (CDC, none of that RS232 translator chip rubbish)
 

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #4 on: May 01, 2020, 02:40:33 pm »
I'm listening to each of you and using my pea sized brain to interpret what you ask and suggest. Last night I removed the relay pack and wired it up as shown in the attached pic. It was a total fail. When the Hall effect sensors are triggered (or when they're not) the axes jog as if the sensors weren't even there.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: Stumped about my Hall effect limit switches
« Reply #5 on: May 01, 2020, 03:21:38 pm »
Which specific sensors are you using, do you have part number?  Sounds like they aren't able to pull the inputs the the "Longs" board low enough for it to recognise a "zero" state.
 

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #6 on: May 01, 2020, 06:55:52 pm »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7527
  • Country: ca
  • Non-expert
Re: Stumped about my Hall effect limit switches
« Reply #7 on: May 01, 2020, 09:41:27 pm »
I'm listening to each of you and using my pea sized brain to interpret what you ask and suggest. Last night I removed the relay pack and wired it up as shown in the attached pic. It was a total fail. When the Hall effect sensors are triggered (or when they're not) the axes jog as if the sensors weren't even there.

I had assumed these were typical "3D printer inductive probe" type sensors, but these are slightly different: https://github.com/R2D2-2017/R2D2-2017/wiki/Keyes-44E402-Magnetic-Hall-Switch-Sensor
However, they still behave the same: 5V supply voltage ok, and open collector output, capable of 25mA. This should be more than enough for that board (optocoupler input would typically run at 10-20mA).

According to their documentation, the input pins are pulled up then go through an optocoupler diode (see attached image, or image on their website).

Can you note the voltage on the input pin when hall is not active? 3.5V sounds about right for not active (5V -> optocoupler LED).
Then what is the voltage when it is active? Near 0V is correct.

If you have access to a "monitor" program where you can simply monitor the pin status (in Mach3 CNC this is the Diagnostics page), this will help you avoid any software logic issues. Simply trigger the hall sensor, check the input pin on the screen, does it go from de-active to active?


I assume JN1 and JN2 jumpers are fitted as noted below.

https://www.longs-motor.com/breakout-board.html
https://openbuilds.com/attachments/breakout-board-manual-pdf.10855/
« Last Edit: May 01, 2020, 09:49:54 pm by thm_w »
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #8 on: May 02, 2020, 01:16:48 am »
Lest anyone thinks I'm not doing everything I can to help myself-- see attached pic where individual relays were used to replace the 8-pack. I thought it was worth a try. No luck of course. I hadn't yet read the post from thm_w. I'll try his suggestions next.
 
The following users thanked this post: thm_w

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #9 on: May 03, 2020, 03:14:44 pm »
Per advice from various respondents, I removed the relays altogether and wired it as they recommended. Pics with values attached. As the magnets passed the sensors, the lights in the sensors came on and the voltage changed from 3.75v to 0.08v but no alarms were triggered, like the sensors weren't even there. As far as I could tell, there was nothing happening on the diagnostics screen with or without the sensor activated. The saga continues.
 

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #10 on: May 03, 2020, 04:34:52 pm »
Instead of 12v I went ahead and used the 36v from my main power supply. Made the sensor lights much brighter of course. But still no trigger action. So far, the closest I've come to success was the 8 relay block. But it does have that one problem mentioned in my original post. And, of course, the primitive mechanical micro switches that I used for several years worked. But they were so crappy looking. I really would like to get this to work. No moving parts, nice clean look.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7527
  • Country: ca
  • Non-expert
Re: Stumped about my Hall effect limit switches
« Reply #11 on: May 04, 2020, 08:59:15 pm »
Really good diagrams  :-+

So you are measuring the voltage on the Y connector of the breakout board, with the hall connected to that input, and when it switches it drops to 0.08V. And no signal status change is seen in Mach3 diagnostics screen?
Now if you instead take Y input and short it to ground with a wire or switch, the input does change in Mach3? Or still doesn't work.

If it still does not change, then we need to diagnose other parts of the system:
- opto output
- parallel port input to PC
- etc

Since these were working before, it makes it hard to think they stopped working.
Although, I have had to change the parallel port address a few times in mach settings. If no input pins at all are triggering this could be the case.

Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #12 on: May 05, 2020, 12:56:46 am »
I got so angry today, I just laid down my tools and walked away. I'm 74y/o yet, I feel like a four year old trying to figure out how to put a couple of D batteries in a flashlight. So I'm going to replace all the sensors with mechanical micro switches just to make sure I even know how to set up home and limit switches on the most primitive level. Then I'll come at it again one axis at a time with sensors. I do appreciate all the advice.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: Stumped about my Hall effect limit switches
« Reply #13 on: May 05, 2020, 07:06:05 am »
Per advice from various respondents, I removed the relays altogether and wired it as they recommended. Pics with values attached. As the magnets passed the sensors, the lights in the sensors came on and the voltage changed from 3.75v to 0.08v but no alarms were triggered, like the sensors weren't even there. As far as I could tell, there was nothing happening on the diagnostics screen with or without the sensor activated. The saga continues.

In this scenario when you measured 3.75volts, was the output of the hall sensor (i.e. green wire) also connected to one of the limit switch inputs rather than just the volt meter?  The Halls sensors have open collector outputs, so they need something to pull them up when not active.

If they sensor are pulling the X/Y/Z limit inputs down to zero volts and you still aren't seeing anything then it sounds like the problem lies elsewhere.  If you connect the limit inputs to ground with a piece of wire do you see the alarm?
 

Offline billbyrd1945Topic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: Stumped about my Hall effect limit switches
« Reply #14 on: May 05, 2020, 05:00:58 pm »
"...was the output of the hall sensor (i.e. green wire) also connected to one of the limit switch inputs..."
Yes. I back-probed the connector with the sensors connected to the breakout board.

I put together a playlist consisting of 5 very short videos to show what's going on. Maybe this will help:

 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7527
  • Country: ca
  • Non-expert
Re: Stumped about my Hall effect limit switches
« Reply #15 on: May 05, 2020, 08:44:20 pm »
From the video Y axis endstop seems to be working properly. Seems like progress. Nice cnc router setup.

All three trigger as you have all three in settings set to the same input pin (11?).
The software does not know Y-- or Y++ has triggered, it just knows pin 11 has gone low so whatever is linked to pin 11 is now marked as triggered (Y--, Y++, Yhome).

In a more complex machine, you might have an individual switch for Y--. Y++, and Yhome, each going to a separate input. But for a hobby machine its simpler to have less, you just want to know if you've hit any limit at all.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf