Close

Steppers - "Doing it the Hard Way."

A project log for Cricut Hacking

Putting Marlin 2.x on the Cricut Expression because, well, why not? Also, some reverse engineering on CRV001

jc-nelsonJ.C. Nelson 09/29/2022 at 02:440 Comments

The Cricut steppers are attached to direct transistors. I mean, you can see them on the motherboard, where you'd expect a stepper driver to be. Why do they do this? I have no idea. But Marlin doesn't support such drivers.

Solution: Virtual steppers.

Using the same model as the TMC steppers, I created a new driver type (TRANSISTOR) and added a TransStepper class for X and Y, assigned to appropriate ports and using a variant of the same code that FreeExpression used to move the steppers.

The X axis worked pretty much perfectly once I put in a delay. The Y axis did not because I had a stupid bug I didn't find until much later.

I could load an Arduino sketch with the TransSteppers and smoothly roll both axis.

https://github.com/MarlinFirmware/Marlin/tree/46674d0b29d2c11068aba50251b27d0c129f0eb6

Shows adding a driver type, although it didn't work right until much later, because...fastio.

Marlin has one FASTIO definition for this class of MCU, and the fastio pins are NOT the same in the 64pin version as the 100 pin. I'm guessing the previous boards were a 100 pin package.

So I wound up looking at MegaCore's definitions and producing a 64 pin fastio.h defnition.

This allowed endstop to work, and a bunch of tweaks to make the X axis home in the right direction.

This machine doesn't have a Y min, but I picked a pin that wouldn't do something evil and defined it as Y min because Marlin doesn't like machines without Y endstops.

I'll have to look at belt printers, which wouldn't have one, and see what those do.

Discussions