Z-axis sign incorrect

192 views
Skip to first unread message

Nicholas DeMarco

unread,
Feb 21, 2024, 5:57:02 AM2/21/24
to OpenPnP
I've followed Issues & Solutions (I&S) almost 100%, to the best I am able, coming from a LumenPnP configuration. I&S is amazing. Side note: I didn't follow it at first because most guided wizards promise a lot, but don't deliver. This one is, well, amazing. I'm left with one real issue.

My resulting Z-axis is not matching what OpenPnP I&S recommends. The Z-axis DRO reads ~5.5 mm when the nozzle tip is touching the board. I'm expecting the nozzle tip to be at 0 when touching the board.

I (believe I) followed I&S carefully and correctly, but I'm checking my own work ;-)

Some of the OpenPnP Machine Setup parameters sections aren't clear to me yet, like Axis Configuration | Home Coordinate and Nozzle | Coordinate System. This may be my problem, but I'm asking here before fiddling.

Fabian Kropp

unread,
Feb 21, 2024, 6:38:17 AM2/21/24
to OpenPnP
I got a V2 - V3 Frankenstein lumen here.

Things I did to make it finally work:

Updated the firmware to the sensorless homeing ( incl fiddling with the MoBo)
Update to V3 (without the changed height for the head) and linear rail mod.
Replaced the bottom camera with a HD USB3 one.

Then it has really been just a matter running I&S once from scratch and it works (besides the annoying reset of the controller)
The issue is known to opulo, they premised me a new MoBo ages ago.

I gave up asking them for an update on that one.

All in all, had I known what I know now, I would either grabbed a Lightplacer or just designed one myself….

Good luck getting yours to work.
One remark: your fiducial is on the same z height like you PCB? 
And of course the z position of the PCB must be set in the board properly as well ....

BR

Fabian 

mark maker

unread,
Feb 21, 2024, 10:41:02 AM2/21/24
to ope...@googlegroups.com

Fabian has already given good advice.

I'm not very familiar with the Lumen setup. If Z values are in the positive range, where they are normally in the negative range, then this might be coming from how the homing is done. Most dual nozzle machines home their nozzles in the balanced position, either by powering off the motors and letting springs pull them there, then powering motors back on an resetting the Z coordinate, or by using a homing switch that engages when the nozzles are (more or less) balanced. 

It seems Lumen does it differently: touches one nozzle down until it hits a defined surface using stepper driver stall sensing. That would give you positive coordinates. The second nozzle would then have to have an offset in a ReferenceMappedAxis to be at the same Z, numerically.

That positive Z setup is theoretically admissible in OpenPnP, but it has practical caveats:

https://github.com/openpnp/openpnp/wiki/Machine-Axes#a-word-about-z-coordinates

If you want to change that, you need to manually edit your HOME_COMMAND, so that after touch-homing it moves back up using G0 Z30 assuming for example it takes 30mm until the nozzles are balanced (you would have to measure or try&error that Z offset). Then use G92 Z0 to reset the Z coordinate to be 0 at that balanced position. Maybe you can also roll this into one command as some controllers allow you to home to a specific coordinate, something like G28 Z-30 this time you need to specify the negative offset, as it is at minus 30mm after homing.

Then you have to redo all the Z related I&S stuff. Maybe it is easier/safer to start from scratch (but backup your custom HOME_COMMAND).

If this works, please publish here, it will perhaps help the next guy.

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/e6d21c73-0718-47d0-9483-a36689226855n%40googlegroups.com.

Nicholas DeMarco

unread,
Feb 21, 2024, 11:00:02 AM2/21/24
to OpenPnP
@Fabian, thanks for the feedback. We're enduring the Lumen struggle to get two boards built faster than we could get them done outside🤞. I find (MOBO v4) homes incorrectly many times, unless you power cycle before homing. Yes, mine is sensorless homing for X & Y.

@_Mark, I'll give this a go again. The Lumens with dual nozzles are stepper + belt, with a home limit on the upper travel of N2. It homes to Zmax.
I'm going to try your solution and will report back today or tomorrow.

mark maker

unread,
Feb 21, 2024, 11:43:31 AM2/21/24
to ope...@googlegroups.com

It just occurred to me, when I said...

> The second nozzle would then have to have an offset in a ReferenceMappedAxis to be at the same Z

.. it was likely not done there, but simply as a nozzle Z offset on the nozzle itself.

Wherever it is: you need to remove that offset when you fix it at the HOME_COMMAND level.

_Mark

Nicholas DeMarco

unread,
Feb 23, 2024, 9:03:10 AM2/23/24
to OpenPnP
Convert your Opulo / LumenPnP-configured machine to follow OpenPnP guidelines - Z axis configuration

Note this is a Opulo/LumenPnP Mobo v4, with sensorless homing (no X or Y limit switches. firmware string:

FIRMWARE_NAME:Marlin bugfix-2.1.x (Aug 31 2022 14:23:05) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:LumenPnP EXTRUDER_COUNT:0 AXIS_COUNT:6 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff

Opulo chose to make the placement height positive. This overrides that decision to use OpenPnP's preferred Z strategy, where a retracted nozzle is Z=0, and the board & placement height is in the negative.

When you are done, and have verified all values are correctly applied, home your machine. The two nozzles should be at the same level, and the green DRO should read Z:0 for nozzle 1 (N1), and nozzle 2 (N2). Switch between these on the Machine Controls panel top drop-down.

Using Machine Controls, jog N1 up and down. It will travel between 31.5 and -31.5, as indicated on the DRO.
Switch to N2. Jog N2 up and down. It should travel through the same limits.
At any nozzle position, switch between N1 and N2. The DRO will indicate the actual position of each nozzle.

If you crash the Z axis in any way, like pushing or pulling up or down on the nozzle tip, motor, etc., re-home the machine.

If you want to verify your Z is roughly homed, press the P between the Nozzle Up and Nozzle Down buttons in Machine Control. This will Park the nozzles so the motors and nozzles will be at the same level.

1. GcodeDriver | Default | HOME_COMMAND:
M204 T2000 ; Sets acceleration for homing
G28 X ; Initial X home for first boot
G28 ; Home all axes
G92 Z0 ; Establish new Z home position
G1 0 ; Move to new Z home (absolute move)

2. ReferenceControllerAxis Z1 ; use your primary Z axis name
Home Coordinate 0
Soft Limit Low: -31.500 | Enabled
Safe Zone Low: 0.000 | Enabled ; this is an initial value. Refine as you learn
Safe Zone High: 0.000 | Enabled ; this is an initial value. Refine as you learn
Soft Limit High: 31.5 | Enabled
Feed Rate [/s]: 200.000
Acceleration [/s2]: 1000.000
Jerk [/s3]: 0.000 ; open to comments and ideas on jerk and Marlin firmware

3. ReferenceMappedAxis Z2 ; use your mapped secondary Z axis name
Input Axis: Z1 ; use your primary Z axis name
Map Point A Input: -31.500 ; Enter these carefully. They are easily confused.
Map Point B Input: 31.500

Map Point A Output: 31.500
Map Point B Output: -31.500

mark maker

unread,
Feb 23, 2024, 10:05:20 AM2/23/24
to ope...@googlegroups.com

Hi Nicholas

thanks for documenting this!

Can you elaborate how this works now? 

If the last description of the machine hardware is still true (homing N2 to Z max), then I think this is not yet quite right. 

Logic would dictate it should read like this:

1. GcodeDriver | Default | HOME_COMMAND:

M204 T2000 ; Sets acceleration for homing
G28 X ; Initial X home for first boot

G28 Y ; Initial Y home for first boot
G28 ; Home all axes
G1 Z31.5 ; Move to new Z home (absolute move)
G92 Z0 ; Establish new Z home position as 0

I also suggest the green line for safety: if the machine is in-deed homing to N2 Z Max, then it would be dangerous before the head is in its corner, where the N2 can go up all the way and therefore the N1 all the way down without collision.

Or maybe I'm missing something?

_Mark

Nicholas DeMarco

unread,
Feb 23, 2024, 1:13:38 PM2/23/24
to OpenPnP
Let's see who is missing what.

G28 home: the two nozzles are level / same height.
M114: Z31.5

G28 is an involved finite state machine. The idea seems to be to move the head to very clear Z place, then run the Z to the limit switch, then to Z31.5.

G1 Z0 will move nozzle 1 below the PCBA level.

mark maker

unread,
Feb 23, 2024, 1:48:50 PM2/23/24
to ope...@googlegroups.com

Ah, so they configured Marlin for a Z retract of 31.5mm, that's another way to do it.

Note the proposed line (below) would still work, it would just not move (thanks to absolute coordinates).

G1 Z31.5 ; Move to new Z home (absolute move)

But I still recommend you add it, as it allows you to adjust the balance point without recompiling the Marlin firmware, so for instance if you set it to Z31.75 after having carefully balanced the nozzles, it would still be effective!

You also had this line, which is syntactically wrong, it is missing the axis letter:

G1 0 ; Move to new Z home (absolute move)

If Marlin were NC standards conformant  (ignoring whitespace between digits), this would even be interpreted as G10 "Retract filament" , which could have bad effects.

But even when you fix it like that...

G1 Z0 ; Move to new Z home (absolute move)

... it is not needed, the axis is already at the Z0 position! Remember, we just declared it to be Z0 using G92.

_Mark

Nicholas DeMarco

unread,
Feb 25, 2024, 1:20:49 PM2/25/24
to OpenPnP
Hello _Mark,

Your thinking makes sense, so yes, you are correct. My LumenPnP Mobo v4 is now

M204 T2000 ; Sets acceleration for homing
G28 X ; Initial X home for first boot
G28 ; Home all axes
G92 Z0 ; Establish new Z home position

The machine homes in X first, then homes, all axes. Next, the machine moves Z to 31.5. This puts N1 and N2 at approximately the same level.
The G92 Z0 re-establishes this 'level nozzles' Z position as Z0.

At this point, the nozzle pair is in the front left corner, with both nozzles at approximately the same height off the PCB. The DRO reads 0, 0, 0...

The machine is now able to be configured as OpenPnp recommends.
Reply all
Reply to author
Forward
0 new messages