I feel like the would needs a python based firmware for 3d printers, so I’m building just that.

Of the printers I have at home, I have my Marlin partners and a Sailfish printer. To stick to a theme, I’m calling my new firmware chihuahuaFish, because ponty snout fish seem to be what devs call their firmware.

To control the steppers, I’m using these Adafruit TB6612 1.2A DC Breakout Board. We have 2 steppers on the side controlling the Z access. When Z-access moves the entire X,Y assembly up and down.

For the Brain of the printer, I’m trying out a Raspberry pi Pico running circuitpython.

I think I have it calculating the number of steps needed for X,Y,Z, and the delay between those steps.
So for example, if I want it to move the X access 10MM and the Y 20mm. The X access needs to step 941every 0.0019125s and the Y needs to step every 1882 0.00095625s

While this feels like Python in just about every way, threading is not as easy as in normal Python, which leads me to want to step all my accesses with a single thread and loop. To do so, I needed to combine multiple frequencies (made up of the number of steps and time between steps). I came up with a program that takes that data and builds a massive with timestamps. Then to get my order and about times, I simply combined and ordered the list. While that works fine on a desktop, it too slow and memory intensive for the PI PICO.
Next, I came up with this live version that keeps track of current times and calculates the next wait. As this yields each which mother to step and also sends across wait times between steps.

With that sorted, we can now process the humble G1 command!
This still needs a lot of work, and as of now, chihuahuaFish is only able to process the G1 commands, but as always, the source is GPL.

Source: https://git.sr.ht/~hamner/chihuahuaFish


Leave a Reply

Your email address will not be published.