Welcome! Log In Create A New Profile

Advanced

Edit Marlin for Polar Coordinates

Posted by dexrod 
Edit Marlin for Polar Coordinates
October 03, 2022 05:51PM
Hey all!

I'm building a cantilevered 3d printer, similar to the one in the attached picture. However, I'm not sure how to adapt Marlin to account for this. I need rotation of the arm around the z axis, change of the length of the arm, and the linear motion along the z axis (up-down) shouldn't need any changes since I'll just be using threaded rods for that.
Thanks!
Attachments:
open | download - ApisCor_febr_02-1024x410-1.jpeg (48.2 KB)
Re: Edit Marlin for Polar Coordinates
October 04, 2022 01:49PM
Marlin is not the only firmware. RepRapFirmware supports polar printers natively. You don't even need to recompile it. It runs on 32-bit boards such as a Duet and good STM-based boards.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Edit Marlin for Polar Coordinates
October 04, 2022 05:35PM
Probably easiest to modify the SCARA code, since that's already got angular coordinates involved. The forward and inverse kinematics for polar are much simpler than for SCARA.

void forward_kinematics(const_float_t a, const_float_t b) {
    cartes.x = scara_offset.x + cos(RADIANS(a)) * b;
    cartes.y = scara_offset.y + sin(RADIANS(a)) * b;
}

void inverse_kinematics(const xyz_pos_t &raw) {
    const float x = raw.x - scara_offset.x, y = raw.y - scara_offset.y;
    delta.set(DEGREES(ATAN2(y, x)), HYPOT2(x, y));
}

The "axis steps per mm" for X will be in steps per degree, and Y in steps per mm.

scara_offset is the location of the rotary axis relative to the bed zero (center or bottom left corner depending on BED_CENTER_AT_0_0). But in your case you may just set it to 0,0 and avoid placing any models close to the origin.
Re: Edit Marlin for Polar Coordinates
September 18, 2023 02:32PM
dekutree64, It is Marlin or RRF??
Do you khnow manipulate polar printer with SKR2 and RRF? I'm trying it but I can't give it.
Sorry, only registered users may post in this forum.

Click here to login