Z-Axis loosing steps?

This is for general discussions. Also FAQ can be found here.

Moderator: speedake95

Post Reply
seaton
Posts: 291
Joined: Tue May 14, 2013 9:04 am
Location: Bunbury, Western Australia
Contact:

Re: Z-Axis loosing steps?

Post by seaton »

Also check that the Z Axis is consistently homing at the same height, I had problems when I updated to the latest Repieter firmware from Marlin. I found that the endstops were more sensitive to noise than Marlin. Reruting cables helped, but I also found I had a opto sensor board that while it worked, seemed to have a voltage offset that was causing Repieter to falsley trigger
Stephen...

Felix 2.0 -> Felix 3.0 dual
Simplify3D Slicer, Kisslicer
Have you added your Felix to the Map? http://goo.gl/maps/HajnZ

http://blog.strobotics.com.au

Legion 2.3
Posts: 84
Joined: Sun Apr 20, 2014 6:23 pm

Post by Legion 2.3 »

- I can turn the z-axis spindle without effort.
- wires were reconnected before 1 time ( i did it now again)
- noddling at the wires has no effect
- found 2 small conductive debris, but they were far away from the Z-motor-driver and other conductive parts of the pcb

I have the feeling that the optical end stops are the right track.
I´ve measured the voltages at the pcb:

X - endstop: not triggered: VCC=1.16V; sig=1.80V,
triggered: VCC=1.16V; sig=3.08V,

Y - endstop: not triggered: VCC=1.16V; sig=1.56V,
triggered: VCC=1.16V; sig=3.08V,

Z - endstop: not triggered: VCC=1.16V; sig=1.73V,
triggered: VCC=1.16V; sig=3.08V,
The voltages don´t change if I heat the bed and the extruders.

Triggered means if the limit vane (blue plastic) fully enters the limit switch. The voltage goes even higher if i put something less translucent in the limit switch.
BUT the Z-axis already stops at a sig - voltage of 2.26 V.

Is it possible to set the limit voltage higher?

Another thing I discovered: When i turn the Z-axis manually (with Repetier host OR the LCD-Panel) in negative-Z-direction and trigger the Z-Endstop (with a piece of paper), the axis stops but the value of the Z-axis-postion is set to the target postion, not to the real postion.
For example: Z is at 150 mm. Now i tell Repetier to move Z to 0mm (not homing). If i trigger the endstop now, Repetier tells me Z=0mm, but in fact it´s somewhere between 0mm and 150 mm.

I think this is a major bug of the firmware. I´m sure this happens during a print when Z is lifting while retracting. Anybody has an idea how to get around that?

(I know that setting the rectraction z-lift to 0 can solve the problem but it can´t be the only solution)

Dreide
Posts: 176
Joined: Sun Sep 29, 2013 12:32 am
Location: Lausanne, Switzerland

Post by Dreide »

Legion 2.3 wrote:I have the feeling that the optical end stops are the right track. ...
First I thought this is nonsense, but I was assuming that if the end position is checked at all during a print (at least in the Repetier firmware there is a switch for that, ALWAYS_CHECK_ENDSTOPS) and if it is hit, it will abort the print immediately for safety reasons. But this seems not to be the case as the firmware (Repetier) just marks the current move for the respective axis as being finished. Anyway, in the Felix Configuration.h ALWAYS_CHECK_ENDSTOPS is set to 0 - but see below.
Your VCC=1.16V measurement is very odd, given that the signal can go higher. And given the measurements of "sig", everything seems fine.
Legion 2.3 wrote:BUT the Z-axis already stops at a sig - voltage of 2.26 V.
This is fine. The trigger voltage is supposed to be somewhere between 0 and max.
Legion 2.3 wrote:I think this is a major bug of the firmware. I´m sure this happens during a print when Z is lifting while retracting. Anybody has an idea how to get around that?
Well, bug? The end stop is the only reference the firmware can use to infer the "true" Z position, so the end stop signal overrides whatever the calculated values are. However, I think the firmware should rather take an unexpected end stop signal as evidence that something had gone terribly wrong and stop the print. But your test indicates that the firmware is testing the end stops, so ALWAYS_CHECK_ENDSTOPS=1? But then the firmware does not even reset to Z=0 but to whatever the target value was, which does not make sense at all - so yes, bug.
So lets assume ALWAYS_CHECK_ENDSTOPS=1 and I am correct with what I said before regarding the meaning of ALWAYS_CHECK_ENDSTOPS, then spurious end stop signal could indeed cause the effects you are observing.
So the first thing would be to make sure that ALWAYS_CHECK_ENDSTOPS=0 in Configuration.h and that this firmware is up to date. If that helps, you know at least what caused the problem.
Legion 2.3 wrote:(I know that setting the rectraction z-lift to 0 can solve the problem but it can´t be the only solution)
I am not even sure if that would solve the problem. If it really is the end stop issue (and I am still skeptical), the problem could also occur during the normal Z lift.
Felix 2.0->3.0dual * Repetier (host+firmware) * KISSlicer Pro, Simplify3D * Cubify Design

Legion 2.3
Posts: 84
Joined: Sun Apr 20, 2014 6:23 pm

Post by Legion 2.3 »

I´m using this firmware: 20140107 - FIRMWARE - Repetier 0.91 - FELIX_3_0_DUAL extrusion.

My PCB is v2.1.

"ALWAYS_CHECK_ENDSTOPS" is set to 0 by default and i didn´t change anything.

I should add that i had Z-homing-issues a while ago(sporadically, not repeatable), sometimes, i had to home Z 2 or 3 times until it really got home :roll:

Could it help to add a pull-down-resistor between "sig" and "gnd" of the Z-endstop? If i could pull the signal down by 0.3 - 0.5 V, it would be still triggered safely without being so susceptible to interference as it seems to be now.

Dreide
Posts: 176
Joined: Sun Sep 29, 2013 12:32 am
Location: Lausanne, Switzerland

Post by Dreide »

Legion 2.3 wrote:"ALWAYS_CHECK_ENDSTOPS" is set to 0 by default and i didn´t change anything.
I had a look at the firmware again and found that for moving Z via the LCD the firmware ignores the ALWAYS_CHECK_ENDSTOPS flag and assumes it to be 1. But for the standard G1 command it really looks like ALWAYS_CHECK_ENDSTOPS is obeyed. But maybe I am wrong.
Legion 2.3 wrote:I should add that i had Z-homing-issues a while ago(sporadically, not repeatable), sometimes, i had to home Z 2 or 3 times until it really got home :roll:
Could it help to add a pull-down-resistor between "sig" and "gnd" of the Z-endstop? If i could pull the signal down by 0.3 - 0.5 V, it would be still triggered safely without being so susceptible to interference as it seems to be now.
I still wonder about your VCC measurements. Right now I cannot check, but VCC should be 5V. However, read this: http://forum.felixprinters.com/viewtopi ... 5290#p5290.
Possibly disconnect all sensors from the PCB, then measure VCC, then connect just the X sensor, then measure VCC again...
In configuration.h, there are the constants ENDSTOP_PULLUP_X_MIN, ENDSTOP_PULLUP_Y_MIN, ENDSTOP_PULLUP_Z_MIN, which are all set to true. You could set them to false and see what happens - try trigger manually with a piece of cardboard before risking to run a home command.
Felix 2.0->3.0dual * Repetier (host+firmware) * KISSlicer Pro, Simplify3D * Cubify Design

Legion 2.3
Posts: 84
Joined: Sun Apr 20, 2014 6:23 pm

Post by Legion 2.3 »

I checked the voltage after disconecting the sensors:
The pins without sensors have VCC=12,2V and sig = 4,79 V (pull-up).
After i connected a sensor, the VCC of the connected sensor goes down to 1,17V, the other VCCs stay at 12,2V. That´s the same at the other 2 sensors.

The only thing that changed is that now I have only sig = 1.29V at the non-triggered X-endstop. (maybe i just noted this voltage wrong the last time)

The sig-voltage has to be pulled up because the photoresistor inside the endstop is pulling it down if it gets light from the sensor-LED (less resistance, that´s why the voltage is lower) and pulling it less down if it doesn´t get light (more resistance, higher voltage).
Without this pulled-up voltage, sig will stay at 0 V.

I discovered something else in another forum: http://forums.reprap.org/read.php?267,228499
repetier
Re: Calibration Problems with Repitier firmware and repitier host.
July 21, 2013 07:58AM

Please check the end stops with M119 not with moving. Depending on

#define ALWAYS_CHECK_ENDSTOPS true


the end stops are only tested during homing or always. Only z end stop is always tested.
That means that "ALWAYS_CHECK_ENDSTOPS" doesnt affect the z-endstop :evil:
Do you know how to change the code in a way that this doesn´t happen?
I still wonder about your VCC measurements. Right now I cannot check, but VCC should be 5V. However, read this: viewtopic.php?f=5&t=532&p=5290#p5290.
I´ve read this thread already but i don´t dare to put the red wires to 5V, I don´t think that smoking opto-sensors will solve my problem. :?
VCC only supplies the (infrared?) LED inside the sensors, maybe 1.17 V are already enough for them. 5 V would just kill them (as mentioned in the other thread). The 5 V could have been correct for the older PCB-mounted sensors, but the 3.0-sensors are different.

EDIT: Here´s the datasheet:
Opto-sensor.JPG
Maybe it would help to add or increase a delay for the z-endstop , but a can´t find a setting for that in the firmware.

Dreide
Posts: 176
Joined: Sun Sep 29, 2013 12:32 am
Location: Lausanne, Switzerland

Post by Dreide »

Legion 2.3 wrote:VCC only supplies the (infrared?) LED inside the sensors, maybe 1.17 V are already enough for them. 5 V would just kill them (as mentioned in the other thread). The 5 V could have been correct for the older PCB-mounted sensors, but the 3.0-sensors are different.
Ahh, I was not aware that the photosensors were basically passive. Well, that is asking for trouble in such a noisy environment - what a shame! But, at least, that explains a few things.
Legion 2.3 wrote:Maybe it would help to add or increase a delay for the z-endstop , but a can´t find a setting for that in the firmware.
I wouldn't take chances. Rather consider getting the hardware fixed by reducing the series resistor in the supply for the opto sensors (VCC) and/or by using external pull-ups instead of internal ones (which have quite a wide tolerance range of 20-50kOhm).

Oh, and regarding the firmware and Z end stop, I was wrong :( - sorry! I must have been confused by all the #if's, but, yes, Z end stop is indeed always checked (motion.h, line 314) - how could I miss this? :oops:
Felix 2.0->3.0dual * Repetier (host+firmware) * KISSlicer Pro, Simplify3D * Cubify Design

Dreide
Posts: 176
Joined: Sun Sep 29, 2013 12:32 am
Location: Lausanne, Switzerland

Post by Dreide »

Legion 2.3 wrote:EDIT: Here´s the datasheet:
Opto-sensor.JPG
So this data sheet is for a ZD1901 sensor. Does your Felix actually have such sensors? Because mine uses TCST2103 sensors (datasheet), which happen to be more efficient (min. 2mA output current instead of just min. 0.5mA at 20mA forward current). However, I measure similar signal voltages as you did.

Anyway, the series resistance for the 12V supply is 1kOhm, which results in a forward current of just 11mA (at VCC=1.2V). On the PCB, the signal line (opto output) is actually pulled up to 4.85V (Vcc of the µControler) by 10kOhm and to 5V (standby voltage) by the LED in series with 270Ohm. I measured up to 1.394V across this 270Ohm resistor, i.e. about 5mA - pretty much, given that the typical output current of the opto sensor at 20mA forward current is specified as 4mA, and we just have a forward current of 11mA and have not even counted in the current over the other pull-up resistors (10k || internal). When I measure the output current directly, I get 5.6mA!
Given these data, I am surprised that not more people have problems with these end stops.
I am not sure about the best way of how to get this fixed. Switching off the internal pull-ups wouldn't help much as almost all current is carried by the LED branch. Moreover, this would create problems at the other end, i.e. when the sensor is closed. Just increasing the forward current, say by a factor of two, would also increase the output current and help somewhat with the signal's low level, but the LED might not be up for so much current. And more importantly, what does this do to the high level of the signal which is already weak (with around 3V)? The problem is that the blue plastic does not fully close the sensor, and whatever current the residual light might induce, this current will scale up with the forward current and, thus, further decrease the high level of the signal. Not good!
So I guess it will be only a combination of modifications that can make the end stops reliable.
Felix 2.0->3.0dual * Repetier (host+firmware) * KISSlicer Pro, Simplify3D * Cubify Design

Legion 2.3
Posts: 84
Joined: Sun Apr 20, 2014 6:23 pm

Post by Legion 2.3 »

I don´t know exactly which type of sensor i got, it just looked similar ;) .

I´m impressed by your deep investigation of the sensor elektronics. I found out a few things by myself, but far less then you did. But it seems to work somehow, otherwise there would be many more customers reporting problems.

However, I asked the Felix-support for help, they think i got a defective board (seems like i got a one of a bad batch), and they will send me a new one. I hope this really solves the problem.

In endstops we trust :mrgreen:

Legion 2.3
Posts: 84
Joined: Sun Apr 20, 2014 6:23 pm

Post by Legion 2.3 »

Now i got the new board (V3 instead of V2.1) and it seems to work now, now horizontal gaps anymore :D

I hope it stays like this.

Did you know that when you print from an SD-card, the print cancels immediately when you connect it to a computer? Just noticed it after 1 h of printing ...

Post Reply