Page 1 of 2

Z AXIS Home Switch Upgrade

Posted: Tue Mar 24, 2015 9:38 pm
by uslimey
It struck me that homing the Z axis (the bed) is the most critical homing operation... I have has some inconsistency so I wanted to replace the switch with a opto... What I need to know however, is how to change the firmware to allow it to recognize a Normally Closed contact as oppose to the Normally Open one... Can this be done with G-Code or do I have to update firmware?... If I have to update firmware, where do I get it, what compiler do I need, and what should I set the optional settings to?

Any help would be appreciated.

Re: Z AXIS Home Switch Upgrade

Posted: Tue Mar 24, 2015 10:41 pm
by insta
What's your goal here? There may be a better solution with the same endstop setup you have already.

Re: Z AXIS Home Switch Upgrade

Posted: Wed Mar 25, 2015 3:47 am
by uslimey
Well, the goal here is to improve the repeatability of z-axis homing. The micro switch that was supplied with the machine has repeatability issues... If you extrude too close to the table on the first layer, the results can be less than desirable. Worst case, you can block the extruder... Anyway sometimes my prints are ok, and sometimes they fail - I believe is because the z-axis homing was bad...

Anyway, I looked at other machines and found that most use optical limits... I bought a decent optical limit with a very narrow aperture, designed to give precise, repeatable results... Anyway, the only problem I have now, it that my optical switch is equivalent to normally closed switch, whereas the M2 uses normally open, so I either need to add parts to invert the output, or reconfigure the firmware.

Re: Z AXIS Home Switch Upgrade

Posted: Wed Mar 25, 2015 4:43 am
by jimc
i cant really help on the firmware side of things but the repeatability of the switch should be right on the money. you are the first person i have heard in 2 years to say the switch doesnt repeat and you get a variable z-home. if this is happening then its more likely there is something wrong with your switch. i would change that first since i dont think there will be anything gained by optical. if you still wish to go optical i guess there is nothing wrong with that. i just dont know anything about setting that up. i have never looked into it. could the clamp that holds the switch onto the rod be loose or moving?

Re: Z AXIS Home Switch Upgrade

Posted: Wed Mar 25, 2015 6:00 am
by Jules
It might not be the might be differences in the filament.

I've seen some slight variances in how different kinds of filaments extrude - I've tried about half a dozen spools, different manufacturers, and in each one, the first layer height is off by a slightly different amount - sometimes it's a little high, sometimes a bit low. (It's been driving me nuts.)

At first i thought it was the Z-stop, (and I reset that thing more times than I can count), but now I really think it's just the filaments. Maybe it's the different textures/dyes impacting the plastic. I've yet to see one that isn't different from the others.

I created a separate profile for each spool, and adjusted the starting layer height by moving the bed using the G-code Offsets in S3D. After i have it adjusted so that it's extruding exactly a 2mm high calibration square, I can fine tune the extrusion multiplier. I'm getting much better results from all of the prints after compensating for those variances. And no more smushed layers or loose threads.

(The reason that I think it is the filament (at least in my case) and not the Z-stop, is that the variances are consistent for a particular spool, although not across different spools.)

Other than that, the only times I've had the bed too close, it was because I had not seated it correctly and one edge was a little high. (Easy to do if you are not paying attention.)

Re: Z AXIS Home Switch Upgrade

Posted: Wed Mar 25, 2015 3:29 pm
by insta
When you're setting Z height / levelling the bed, only do it with the bed and hotend at the temperature you plan to print at, and with several minutes of heat-soak to ensure everything is at operating temperature. It actually matters.

Re: Z AXIS Home Switch Upgrade

Posted: Wed Mar 25, 2015 6:18 pm
by benavery
What kind of first-layer-height settings do you typically use ? I'm wondering if you are homing it super-close to the nozzle, and running razor thin first layers, and so extremely tiny differences in homing puts you between a proper first layer, and no first layer. Whereas I think most of us probably err on the size of a taller first layer (when setting z-height) and running increased extrusion for the first layer - so any super tiny change in homing has no noticeable impact.

Re: Z AXIS Home Switch Upgrade

Posted: Wed Mar 25, 2015 8:57 pm
by insta
Yeah, with little exception my first layer is 0.3mm tall & 200% wide. I have huge fat beads of plastic coming out, just because I don't care to meticulously tune and calibrate the bed. Everything after the 1st layer is 0.1/0.2 and normal widths.

Re: Z AXIS Home Switch Upgrade

Posted: Sun Mar 29, 2015 2:49 am
by uslimey
So in my case, I had repeatability issues using the same spool of ABS, the same settings,etc... My Z limit snap switch maybe worse than others... Although snap switches really aren't designed for precise positioning. Anyway, regardless I think that replacing it is not an unreasonable upgrade.

My new limit design uses a Sharp GP1S56TJ000F opto sensor, with a 2mm slot and a 0.15mm aperture. This should provide repeatable homing to within a couple of thousandths of an inch.

I printed a housing. The housing consists of two identical halves that capture the opto and provide an egress for the wiring... I tapped the holes in one half with 4-40 threads. II drilled the holes in the other half for clearance. It is designed to mount on the 10mm guide (in the same place as the snap switch)... In addition to the opto, you need a couple of extra components - a 200 ohm resistor to bias the IR emitter, and if you decide to invert the signal instead of modifying the firmware (which I did), you also need an NPN transistor (any general purpose transistor should do) with a 10k resistor on the base... This essentially inverts the switch logic to making it compatible with the current firmware settings.

The last thing you need to do is to replace the old limit adjustment bolt with a flag (thin metal strip) to trip the opto.

Here's a picture of the housing... By the way total cost for the modification was less than $2... Not bad for thousandths precision!
limit.png (238.32 KiB) Viewed 6987 times

Re: Z AXIS Home Switch Upgrade

Posted: Sun Mar 29, 2015 4:04 am
by PcS
Let us know how it works ?An upgrade is an upgrade ! :D