Capacitive Auto-Leveling on TAZ 5

I’m looking to implement this mod later next week. But, I wanted to keep my z-min endstop wired in as an emergency backup, or if I use an extruder without a probe. I put together this circuit which places the sensor output and endstop switch in parallel so both are useable, if either get triggered. I believe this should work, but wanted to check in to see if anyone sees any issues with this circuit.

I checked the latest marlin version from Sebastian https://forum.lulzbot.com/download/file.php?id=4486 and I believe no additional Marlin mods need to be made, since the pullup resistors are active.

Thanks!

I apologize for the crude sketch.

@mighty3d, what part number and manufacturer are you using for your optoisolator?
The Vcc notation doesn’t seem right to me. I’d expect collector and emitter. Vcc usually means “hook me to +5V”.

You probably don’t need the resistor you show on the out1 pin. You want it to yank that pin all the way to ground, not create a voltage divider through a 1K as you’ve drawn.

The 1K on the 24V supply will probably make the LED current in the opto about 22mA; can it handle that?

Can you point me to a datasheet for your sensor as well? Is “S” and open collector output? If so, you’re good on that side.


Edit:
I see that you are probably using a 4N28 opto, so your 20mA should be fine.
And the Omron E2K-X4ME1 sensor is open collector, so that’s good.
I would suggest not using a resistor on the out1 pin though.

Other than that it looks good to me.

@Rhoderman, thanks for reviewing the circuit.

I’m using this opto isolator http://www.amazon.com/gp/product/B00UWSGXEW . Unfortunately, the data sheet http://numato.com/productdoc/optocouplerbreakout/OptoIsolatorBreakout.pdf doesn’t have current specs but I see that it is using EL817 Phototransistor Couplers which has a max input current of 60mA http://www.everlight.com/file/ProductFile/EL817.pdf.

The 1k resistors on the input and output side are built into the optoisolator circuit board. I am also using the Omron E2K-X4ME1. I’m happy to hear there are no dangerous errors, that’s what I was most concerned about. Thanks again!

That part looks like it is designed to be a pull-up for four signals. It will work the way you are using it, maybe. Maybe because of that resistor on the output (Emitter).
It all depends on what value resistor they used in the Rambo as a pull-up. It is probably a 5K, and I don’t know what the threshold voltage is for a logic low or high.
Try it. If it works, great. If not, you can bypass (short across) that resistor and it will work.

The board you picked is common collector. You probably don’t want that. If you can find common emitter, with open collector outputs, you would be better off. It will work for one channel, and you may need to short out the emitter resistor to make it work.

Thanks. I’ll try it out and report back the findings.

I got the board from the thingiverse part list for this mod before figuring out the circuit. As you mentioned, I noticed how this circuit makes the other inputs/outputs not very useable. Luckily I’m just using it for this mod, so I only need 1 input/output.

@Rhoderman - I got a chance to implement the circuit and it works! Both the z-min endstop switch and the probe trigger and get registered. I added a 10k resistor to the input of the optoisolator from 24V to lower the input current, just in case. Thanks again for your help.

That’s good to hear! Good work!!

So I finally got this installed, I was just curious which firmware people are currently using? I tried to access your github fork but it’s currently down.

I have a copy of the FW on the thingiverse page

I’m looking to do this mod but I have little to no knowledge / experience in electronics, and I’m a little worried about trying this.
So I have a few questions before I start just to be 100% sure that I don’t screw anything up.

  • I have the Numato Lab Opto Isolator Breakout and the OMRON E2K-X4ME1, do I need anything else?

Do I need a voltage regulator or a voltage divider?

Why do we take the 24v to power the probe through the opto isolator and back onto the rambo board to the Z endstop?

What are my chances of blowing the rambo board?

You do not need a voltage regulator/divider, that is what the opto isolator is for

The 24V powers the prob and the signal that probe sends back is also roughly 24V so we use the opto isolator to send that signal to the RANBO board instead of surging it with full 24V.

If you wire everything up correctly you shouldn’t blow the board. However I do believe that one of the fuses will blow before you do anything damaging to the board but I could be wrong. Use a multimeter to measure your voltages before hooking it up to the RAMBO

I’m about ready to give this a try!
Is there no way around drilling a hole in the electronics box to fish the probe wires through?

Print the raspberry pi extension and run the wire through the hole. Also install octoprint on a pi and go wireless

I think that I would be more happy with the appearance of the machine and the location of the hole if I just drilled it and put a rubber grommet to protect the wire.

Right now I’m not really interested in going wireless anyways.

I put the wires through the existing holes with a connector

Using the firmware on your Thingiverse page makes my x-axis motor make some really bad noises…

Strangely enough, even with an extremely precise bed topography, Marlin does not seem to be generating a comprehensible “Bed Level Correction Matrix”. Since a better understanding of this behavior is needed, I have filed a bug report with the Marlin developers.

EDIT: This has now been answered. Should have recognized what the correction matrix was actually for, as well as tried the V4 flag for more information.

Hopefully, knowing more about how this is supposed to work will help users like Astek777 in the future.

https://github.com/MarlinFirmware/Marlin/issues/2997

After several days of installing / playing with firmware / 3 failed prints I’ve finally made some progress.

I measured the brim with a caliper and I got 3 - 3.1mm with my layer hight on cura being .22mm.
Should I adjust the z probe offset in the firmware to get my first layer closer to the layer hight in cura or is this an acceptable difference?

That turned out nice! Does the bracket need any additions to it? How does it seem from a stability perspective?

It seems pretty stable, it is quite far from the Hot end though and it will run into the back, right corner piece if I don’t watch what I’m doing.