M2 Auto-Leveling Kit (Beta)

The place to discuss your hardware and software/firmware modifications...
User avatar
ryaneb85
Posts: 92
Joined: Mon Oct 19, 2015 2:03 pm
Location: Singapore

Re: M2 Auto-Leveling Kit (Beta)

Post by ryaneb85 » Wed Jan 20, 2016 5:52 am

Well I just tried a second sensor on 5V and it still wouldn't trigger. Bumped it up to 6V and it triggers fine, so the input range tolerance on the sensors I have is pretty tight. It looks like I'll need to go off the 24V, so I'll likely take your advice and protect it with an NPN transistor and a 2.5k resistor only if the sensor has the 10k built in.

I thus go back to one of my original questions - where is the easiest/most convenient place to pull 24V from?

User avatar
ryaneb85
Posts: 92
Joined: Mon Oct 19, 2015 2:03 pm
Location: Singapore

Re: M2 Auto-Leveling Kit (Beta)

Post by ryaneb85 » Wed Jan 20, 2016 1:54 pm

I've well and truly exceeded my electronics knowledge and I can't get the transistor circuit to work. I've dropped the voltage to 4.6V at the base of the transistor, but with E connected to ground and C connected to Zmin, nothing is triggering. I'm using Tim's wiring diagram found here viewtopic.php?f=13&t=2610&start=10, but without the 27k resistor (as the sensor has an inbuilt 10k) and a 2.4k instead of the 6.8k.

The divider works fine and when connected up to Zmin directly, it opens and triggers as expected. However, I would prefer not to leave it set up like this as Tim's horror story has scared me.

Any ideas? I always thought the collector had to be connected to a positive source, then the "load" tapped off either the collector or the emitter.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: M2 Auto-Leveling Kit (Beta)

Post by Tim » Wed Jan 20, 2016 6:35 pm

My circuit drawing assumes that there is an internal pullup on the electronics board from Zmin to +5V. That's something that is internal to the Atmel chip and enabled in firmware ("#define ENDSTOPPULLUP_ZMIN" in Configuration.h). If not, the value at Zmin will always be close to ground, and you'll get either a 0 or a 1 reading depending on whether Zmin is defined as normal or inverted in the firmware ("const bool Z_MIN_ENDSTOP_INVERTING = true;" in Configuration.h). If you don't want to mess with the firmware, then you can put a resistor (1 to 10k) between Zmin and +5V at the connector. However, note that I have the BY version of the sensor, which is PNP, which means that the black wire goes up when it senses metal and down to ground when it doesn't---opposite of yours. The NPN between the sensor and the connector is inverting, so for me that changes the polarity back to inverting and so it matches the default firmware value with Z_MIN_ENDSTOP_INVERTING = true. You would then need to set Z_MIN_ENDSTOP_INVERTING to false in the firmware or else the firmware will think your Z stage is at home when it isn't. If you're comfortable with editing the configuration file and re-flashing the firmware, then it's pretty easy to do. Otherwise, a 3906 PNP or similar instead of the 3904 NPN would keep the polarity of the sensor output, which would be in keeping with Z_MIN_ENDSTOP_INVERTING = true.

User avatar
ryaneb85
Posts: 92
Joined: Mon Oct 19, 2015 2:03 pm
Location: Singapore

Re: M2 Auto-Leveling Kit (Beta)

Post by ryaneb85 » Thu Jan 21, 2016 2:11 pm

Thanks for all of your help, Tim. I've got it plumbed in and printing beautifully on a zebra plate as we speak. I ended up leaving the transistor out for the time being as I just could't get the signal output to be lower than 0.7 once pulled low, which was keeping the transistor on.

Now for another silly question of the day. The extruder and bed are heating up to the designated temperature prior to the starting script sequence running, which means that I am getting leakage from the extruder being deposited all over the bed during the G29 leveling process. Is there a way to run G29 before the extruder heats up? If not, is there a way I can stop my nozzle leaking and creating spider webs on the build plate during the process?

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: M2 Auto-Leveling Kit (Beta)

Post by Tim » Fri Jan 22, 2016 2:13 am

ryaneb85 wrote:Thanks for all of your help, Tim. I've got it plumbed in and printing beautifully on a zebra plate as we speak. I ended up leaving the transistor out for the time being as I just could't get the signal output to be lower than 0.7 once pulled low, which was keeping the transistor on.
I had come to the conclusion that the internal wiring of the BX version must be different than what I thought it was. I think it has to do with the inductor itself; it allows a small current to run through the base of the NPN inside the sensor. That's not enough to raise the voltage much if it's just running through a resistor, but if it's driving an NPN, it's enough current to forward bias the base-to-emitter junction, which makes the 0.7V sound about right. In that case, the 3906 PNP is a better choice. I have seen schematics of how the internal 10k resistor is wired up, but nothing that shows how the inductor is connected. I was treating it more like a phototransistor, which it's not.
Now for another silly question of the day. The extruder and bed are heating up to the designated temperature prior to the starting script sequence running, which means that I am getting leakage from the extruder being deposited all over the bed during the G29 leveling process. Is there a way to run G29 before the extruder heats up? If not, is there a way I can stop my nozzle leaking and creating spider webs on the build plate during the process?
It's not a silly question, and I'm not sure about the answer because I'm using Smoothieware for a controller, not Marlin, and it has an entirely different set of codes to run the Z-probe. I'm not sure how Marlin does it. In Smoothieware, there's a code for initiating a 3-point probe. That probing can be done (and should be done) with the extruder cold. After it's finished, the firmware calculates the plane fit to the 3 points, saves the plane equation, and after that, the Z motor automatically tracks whenever you move the X and Y positions, regardless of whether it's a manual move or part of a g-code stream. The Z motor will keep tracking until the Z probe results get wiped out by a power cycle on the controller board. I think that the Marlin version works something like that. You shouldn't have to do the probing on every print, so it shouldn't have to be in the startup code for the print. Definitely you should run it after removing and reinstalling the Zebra plate, especially if you flexed the plate to get a print off, since that will definitely change the leveling parameters.

I'm sure somebody who is using the Z-probe with Marlin can give you a better answer.

goopyplastic
Posts: 17
Joined: Fri Aug 07, 2015 10:37 pm

Re: M2 Auto-Leveling Kit (Beta)

Post by goopyplastic » Wed Jan 27, 2016 10:15 pm

Anyone using the new metal motor mount plus auto leveling sensor?

Bratag
Posts: 438
Joined: Wed Jan 14, 2015 5:33 am

Re: M2 Auto-Leveling Kit (Beta)

Post by Bratag » Thu Jan 28, 2016 4:35 am

goopyplastic wrote:Anyone using the new metal motor mount plus auto leveling sensor?
Yep

User avatar
ryaneb85
Posts: 92
Joined: Mon Oct 19, 2015 2:03 pm
Location: Singapore

Re: M2 Auto-Leveling Kit (Beta)

Post by ryaneb85 » Thu Jan 28, 2016 4:38 am

Does it come with the mounting holes for the sensor pre-drilled?

Bratag
Posts: 438
Joined: Wed Jan 14, 2015 5:33 am

Re: M2 Auto-Leveling Kit (Beta)

Post by Bratag » Thu Jan 28, 2016 5:49 am

ryaneb85 wrote:Does it come with the mounting holes for the sensor pre-drilled?

I dont believe so - but then I am using the E3D so I had to custom make a mount anyway - I just kept that

User avatar
ryaneb85
Posts: 92
Joined: Mon Oct 19, 2015 2:03 pm
Location: Singapore

Re: M2 Auto-Leveling Kit (Beta)

Post by ryaneb85 » Sat Jan 30, 2016 4:06 am

So I've come to the conclusion that the Zebra plate paired with the auto-leveler is not ideal when trying to print objects that occupy most of the build plate. It seems that the copper layer is not buried at the same depth across the plate, so if I adjust the position of the sensor so as the nozzle is just touching the centre of the bed, at the front right of the bed it does not trigger and rams in to the bed. If I set the position off the front right of the bed (the deepest point), the nozzle is very high in the centre. This means that I either end up with a perfect centre and very squished extremities on the first layer, or perfect extremities and a very high centre. None are ideal when you need to ensure the first layer is good across the complete build.

Anybody else seeing similar? Looks like I'll have to move to a MIC6 plate sooner that I thought!

Post Reply