587,997 active members*
2,043 visitors online*
Register for free
Login
Page 58 of 63 8485657585960
Results 1,141 to 1,160 of 1243
  1. #1141
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    did you have the stripe (cathode) of them going the correct way according to the drawing?
    X²Design&Fabrication
    www.x2df.com

  2. #1142
    Join Date
    Jul 2014
    Posts
    18

    Re: Electronic home switches made easy!

    The silver on diode is on the sensor side, right? The other end goes to pin 13?

  3. #1143
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    yes, the stripe goes toward sensor.

    I am not sure what is going on, whether it is a setting in Mach3 (doubtful, seems like a hardware problem) or if the sensors you have are not working correctly. It's hard to tell without seeing a wiring schematic for your particular sensor. The Sensor takes the signal from the G540 pin 13 and grounds it when the sensor activates, when the magnet gets close. Why it is staying that way when the magnet is removed I am not sure.

    What make/model is that sensor? I will try and search for a schematic of it.
    X²Design&Fabrication
    www.x2df.com

  4. #1144
    Join Date
    Jul 2014
    Posts
    18

    Re: Electronic home switches made easy!

    The sensor is KY-024, it's module type.

    http://g02.a.alicdn.com/kf/HTB1He.zI...-Detecting.jpg

  5. #1145
    Join Date
    Jul 2014
    Posts
    18

    Re: Electronic home switches made easy!

    Quote Originally Posted by x2df View Post

    I am not sure what is going on, whether it is a setting in Mach3 (doubtful, seems like a hardware problem) or if the sensors you have are not working correctly. It's hard to tell without seeing a wiring schematic for your particular sensor. The Sensor takes the signal from the G540 pin 13 and grounds it when the sensor activates, when the magnet gets close. Why it is staying that way when the magnet is removed I am not sure.
    The sensor actually works, if the magnet near it and off if I put away. Not working properly if I add diode.

    And when reach X++, the sensor keep activated. I can't Reset unless I remove the sensor.

  6. #1146
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    having trouble finding a schematic for that sensor.

    I have a feeling that the comparator (LM393) has something to do with the signal to the G540 is not turning off. It is possible that the diode is creating too much of a voltage drop (~0.7 volts), that is messing with the comparator's output.

    Do you have some Optocouplers handy? Perhaps some cheap 4N25?
    X²Design&Fabrication
    www.x2df.com

  7. #1147
    Join Date
    Jul 2014
    Posts
    18

    Re: Electronic home switches made easy!

    hmm...when I use the module I wired like this..If not it wont work. In the pic with 10kohm but I used 1kohm.
    Attached Thumbnails Attached Thumbnails Hall-Effect-Sensor-AH34-700x700.jpg   IMG_20160314_114747.jpg  

  8. #1148
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    Try This.



    That 1k resistor may or may not be needed, since the G540 already has a 2K2 resistor internal.

    The internal LED's should stay on inside the 4N25, thus allowing the G540's pin 13 to sink to ground (lighting the internal optocoupler of the G540). When any of the switches are activated by the magnet, it will should off it's 4N25's LED, shutting off the internal transistor of that 4N25 and thus creating the open circuit pin 13 sees, in turn activates the software telling it a limit had been switched.
    Attached Thumbnails Attached Thumbnails G540 and Optocouplers.JPG  
    X²Design&Fabrication
    www.x2df.com

  9. #1149
    Join Date
    Jul 2014
    Posts
    18

    Re: Electronic home switches made easy!

    Thank for the diagram.
    I don't have AN25 for now. And without 1kohm resistor the sensor won't turn on (notice from sensor's LED will lit on the Hall sensor module).

    So in the diagram above, that is for the 3 axis (x++, y++ and z++)?

    Btw, did you run limit switches with soft limit enabled?

  10. #1150
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    Yes, it is for the limits for the axis.

    hmm, i don't understand what you mean. in the picture, theres no vcc or grnd connected. just putting a resistor across those pins won't do anything, but if you hook up vcc and gnd, and apply that resistor as you have shown, it may fry the comparotor as well as the sensor. The sensor is designed to sink to ground on the output. putting a voltage on the output, i believe may destroy that sensor.

    4n25 optocouplers can be bought off ebay very cheap.
    X²Design&Fabrication
    www.x2df.com

  11. #1151
    Join Date
    Jul 2014
    Posts
    18

    Re: Electronic home switches made easy!

    Picture like I shown above, the 1kohm resistor connected between VCC and AO. Maybe if I'm not wrong it works like a pull up.

    On my Hall sensor module, the sensor will work if sensor's LED and Power's LED lit. If I don't connect the 1kohm between VCC and Ao, Hall sensor won't work (indicate by Sensor's LED not lit).
    Attached Thumbnails Attached Thumbnails leds.jpg  

  12. #1152
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    that's because it is feeding a voltage through the comparator pin it is hooked to (that would normally see negative voltage until the sensor is triggered, if I'm not mistaken), changing it's output state.

    I think the only way you can hook several of these switches up together, is buy using the optocouplers. The comparator (LM393) is preventing a properly operating switch if several of them wired in parallel or series. (Series won't work with this switch I don't think)

    Order up those 4N25 and see if the circuit will work for you.
    X²Design&Fabrication
    www.x2df.com

  13. #1153
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    I drew that wrong. I will fix the drawing tomorrow. The way it is drawn wont supply any power to light the led inside the 4n25. It would need power to goto each led....then that led grounds through the hall sensor, lighting the led.

    Drawing above should be fixed now. That configuration should work.
    X²Design&Fabrication
    www.x2df.com

  14. #1154
    Join Date
    Apr 2009
    Posts
    87

    Re: Electronic home switches made easy!

    I wonder if any of you guys out there use these hall effect sensors on a dual drive axis? Would you be so kind to share your experience on installing them, calibrating and squaring your machine.

    If I interpret correctly the following from the Mach3 mill 1.84 manual page 37 on slaving.

    "When a Reference operation is performed then the axes will
    run together until the final part of referencing which is moving just off the home switches.
    Here they will move so that each stops the same distance off its own switch."


    I don't see how this can work because it's practically impossible to physically install the sensors to a level of accuracy that these sensor would allow. Maybe I missed something.

    Thanks,
    Yves

  15. #1155
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    Mach 3 calculates that into the squaring process I believe. I didn't do the coding, or inspect it, maybe someone who did do it for Mach3 can chime in. I would suspect that the Pythagorean Theory is coded into the program for squaring two axis. A² = C² - B2.......but it would see across the Y axis from one X to the other side to other X as the Hypoteneuse (C² in the formula) So, since it would know the distance of C and the distance of A, it would calculate the offset to get the correct distance for B, thus creating a right triangle and squaring the machine, making adjustments within the software as the software prepares the G-Code for the machine that routes the part.

    This, of course, is an exaggeration, but should demonstrate what I am talking about..... Obviously your two X-Axis won't be that far off.

    Attached Thumbnails Attached Thumbnails Pythagorean.JPG  
    X²Design&Fabrication
    www.x2df.com

  16. #1156
    Join Date
    Apr 2009
    Posts
    87

    Re: Electronic home switches made easy!

    Hum! I found this on the Mach3 forum:


    Ger21 says:
    You probably need to edit your homing script to use RefCombination().
    If you have one switch for each side, make sure Home Slave with Master in General Config is NOT checked.
    You really have to move the switches for this to work properly. Mach3 does not have the ability to move the gantry to a square position by offsetting one side.

    If it's true then the only way is to move the sensor/switch in the proper position. But I'm still hoping there is a better way. I know I can physically disconnect a stepper and turn it by hand but I would prefer by far using a script to do this in a controlled fashion via some VB functions.

    I forgot to mention there is a vb function called CoupleSlave(0 or 1) which is use to couple (1) or to uncouple(0) the slave to its master during homing.

    To be clear, I'd like to be able to control each stepper motor individually, as simple as that and of course to be able to restore master/slave relation after I'm done.

    Is there someone that could give us the final word on this? It would be very helpful to know for sure.

    Thanks,
    Yves

  17. #1157
    Join Date
    Mar 2015
    Posts
    30

    Re: Electronic home switches made easy!

    mach3 will home both sides separately from each other, then it calculates the offset and squares the 'software' to adapt to the un-squareness of your machine. I know it can be done, I've read several others doing it, though I can't remember the thread or what they did.

    I have a 3D printer, though it doesn't run MACH3, it has a feature for leveling the table automatically. It's funny to see. You can deliberately make the table out of level like 15 degrees (for example) and it will print the part as if it was sitting flat on it.

    Here's one video on it with a quick youtube search.

    3D Printing on a "really" Uneven Bed - YouTube


    FOUND IT!

    This might be what you need...

    https://www.machsupport.com/forum/in...?topic=13524.0

    They say in configuration under formula, is where you enter formula so that if you're out of square on your x and y axis, you can enter in the amount and when you move for the x-axis, mach 3 will actually do a 2 axis move to that point to square up both axis. But, it will still be far better to adjust and fix your machine so it works properly.

    Also, as you have already figured out, you can simply adjust/move the homing switch as well until the part you are cutting is square (after homing of course).
    X²Design&Fabrication
    www.x2df.com

  18. #1158
    Join Date
    Apr 2009
    Posts
    87

    Re: Electronic home switches made easy!

    It seems like your 3Dprinter is correcting the "level" mathematically, just as in the thread you referred me to (13524)

    I have just enough knowledge to know it will be very difficult to adjust my master slave sensors to give me a "perfectly" square gantry. But you probably know my friend Murphy, if something can fail, it will inevitably do so.

    If I could spare a few hundred dollars I could buy a KFlop motion controller and adapt the code I downloaded minute ago and be a happy man. But as my friend Murphy says above and since my machine orthogonality can be off and that I know it already is. I've plenty of fixing as it is.

    Maybe someone as an ingenious way I setup my sensor such that I can "micro" adjust them as easily as possible considering these hall effect sensors sensitivity is tree-dimensional. In other words, just loosening the support to move the sensor will change the trigger position. I'm open to suggestion(s)...

    Thanks,
    Yves

  19. #1159
    Join Date
    Apr 2009
    Posts
    87

    Re: Electronic home switches made easy!

    I got up this morning and realized I don't care about homing per say. Want I want is simply to be able to control the master and its slave independently preferably via a script.

    I have Mach3 running on this computer and it is no connected to a machine so I don't risk braking anything. Here what I did and it works fine.

    I opened the general config and I unchecked the A is angular check box and I also changed the Slave axis to none. My first try didn't seem to work because the A axis DRO didn't changed after a command like g1 x1 a1 f20. So I saved every thing and restarted Mach3 to see the X and A DRO now showing both 1.000 . I tried another command like g1 a2 and Voila! The DRO shows the A axis is moving independently from its Master.

    Unfortunately, the CoupleSlave() function is not really decoupling the master and slave as I did above, it's just as if I checked or unchecked the home slave with master check box.

    Sub Function CoupleSlave(State As Integer)
    This function causes any slaved axis to be coupled to, or decoupled from, its master axis
    during homing.


    It' like the folks at Mach3 want to prevent us from doing stupid thing and I can understand that.

    Here is what I would do if I could drive the master and its slave independently.

    Click image for larger version. 

Name:	Squaring the gantry.jpg 
Views:	0 
Size:	39.9 KB 
ID:	312502

    1-- using a setup something like above I would bring the gantry (2 axis coupled) so I can set the indicator near the green face (machined parallel to X) to zero move the indicator near the end of the square, now I would unslave my axis make the correction very slowly and reslave the axis. Now I would repeat this process as many times as necessary with the square like this and with the square flipped over The result of all this would be a very square gantry and I would also find out how repeatable all this is in the same process.

    2-- Ounce confident my gantry is "perfectly" square, I would use the gantry and its sensors to measure how out of square my sensor are installed. To do this I would use the same method used by many for zeroing the Z axis, a dual touch or trigger in this case. I would repeat the process, I think its 40 times to result in a 97.5% confidence interval to have a pretty accurate measure of the offset value of my sensors out of squareness.

    Now I know I can't do that but suppose it was possible, I would write a script to essentially verify and correct (if necessary) the gantry squareness. The sensors offset or the out of square value I've measured would be the calibration reference used to square the gantry and since the hall effect sensor provide a very high positioning repeatability, I would be a happy man :banana:


    Before anyone says it, yes, I know, all this is futile anyway, if you take into account all the possible things that can and will go wrong, temperature change, wear and say a bang just to name a few, there are dozen more for sure. It's a full time job even on a million dollar machine with a constant laser monitoring system to maintain a very high degree of accuracy. I can only be fooling myself if I think for a minute I can do the same with pocket change on my 5K machine.

    Thanks every one,
    Yves

  20. #1160
    Join Date
    Mar 2003
    Posts
    35538

    Re: Electronic home switches made easy!

    mach3 will home both sides separately from each other, then it calculates the offset and squares the 'software' to adapt to the un-squareness of your machine. I know it can be done, I've read several others doing it, though I can't remember the thread or what they did.
    When using the parallel port, and homing a slaved axis, each side homes to the switch. To square the gantry, the switches must be moved to the correct location for this to occur. Mach3 has no ability to change the amount that it backs off the switch.

    If you use a motion controller, things may be a little different. This is because the motion controllers handle the homing, not Mach3. I believe that some motion controllers allow you to independently set the amount that the master and slave back off the switch, to square the machine.

    I don't think any motion controller uses a formula or calculation to square a gantry. It just moves the gantry sides to the positions that you tell it.


    As for Formulas. Yes, a formula can be used to compensate for an out of square gantry. But there's a good chance that you'll run into a situation where the machine is moving without using the formula. This is due to bugs in Mach3. I've posted the exact situation somewhere a few years ago I think, but don't recall the exact circumstances. What happens is that the formula is ignored in some situations. When the formula starts working again, Mach3 enables the formula, and the axis tries to "jump" into the correct position required by the formula, and you'll lose steps.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

Page 58 of 63 8485657585960

Similar Threads

  1. Replies: 3
    Last Post: 11-05-2013, 02:54 AM
  2. Home made electronic for Spindle control
    By dinko in forum CNC Machine Related Electronics
    Replies: 1
    Last Post: 05-31-2012, 02:52 PM
  3. Auto backlash sensing with electronic home switches!
    By RomanLini in forum Open Source CNC Machine Designs
    Replies: 8
    Last Post: 11-14-2011, 02:36 PM
  4. The relationship of limit switches to home switches.
    By MikeAber in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 11-04-2004, 08:28 PM
  5. Home made CNC mill (and some products made by it)
    By gcamlibel in forum DIY CNC Router Table Machines
    Replies: 23
    Last Post: 04-05-2004, 11:54 PM

Tags for this Thread

Posting Permissions

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