1. Arduino Fireware – github.com/FinucaneEngineeringLLC/SphereBot/tree/Arduino1.01
Things for you to update:
Double check your pins:
*/#define XAXIS_DIR_PIN 7
#define XAXIS_STEP_PIN 8
I updated the fireware so that a step of the motor is a pixel from the artwork in inkscape. A couple of issues make this confusing. First not all stepper motors have the same step size. Typically motors have 200 steps/rev or 400 steps/rev. For a 200 steps/rev (aka 1.8 degree) motor the steps per px (px are from inkscape) is one to one. But if you have a 400 steps/rev (aka 0.9 degree) motor then you need to take 2 steps per px. I set this in the firmware with the following line (It was originally used to set the number of steps per mm).
steps_per_mm = (int)(kStepsPerRevolution/200);
You can see that setting KstepsPerRevolution = 200 the steps_per_mm come out to = 1. Or set KstepsPerRevolution = 400 for a motor that takes 0.9 degree steps, so the steps size per px with match with both a 0.9 degree motor or 1.8 degree motor.
But after playing with it I found that for the aspect ratio on the image to work, I needed the px’s to be twice as wide as they were tall.
The printing area on the egg uses about a 1/4 turn of the pen motor and a complete turn of the egg motor. So for a 200 steps/rev motor that works out (with the 16x mircostepping) to a 800 steps tall and 3200 steps wide (around). I found that if you match 1 px to 1 step the image on the egg comes out tall and skinny. But if you use 2 steps for every pixel around the egg (the egg motor), then the image on the egg looks about right. But now your image needs to be 800 px by 1600 px, otherwise as you take 2 steps per px around the egg it will spin twice with a 3200 px wide image.
For my setup with one 400 steps/rev motor, I set both motors to 2 steps per px, by setting the steps per rev for both motors to 400. This isn’t a great way to do it. I will update this soon. This works because the pen motor in my step up really has 400 step/rev, and the egg motor is 200 steps/rev but steps twice per pixel.
StepperModel rotationStepper(XAXIS_DIR_PIN, XAXIS_STEP_PIN, XAXIS_ENABLE_PIN, XAXIS_ENDSTOP_PIN, XAXIS_MIN_STEPCOUNT, XAXIS_MAX_STEPCOUNT, 400.0, 16); StepperModel xAxisStepper(YAXIS_DIR_PIN, YAXIS_STEP_PIN, YAXIS_ENABLE_PIN, YAXIS_ENDSTOP_PIN, YAXIS_MIN_STEPCOUNT, YAXIS_MAX_STEPCOUNT, 400.0, 16);
2. Inkscape Gcode Exporter – github.com/FinucaneEngineeringLLC/inkscape-unicorn
(Updated to export gcode in px (use 800 x 1600 for best results))
3. Feeder.py –github.com/FinucaneEngineeringLLC/SphereBot/blob/Arduino1.01/Utils/feeder.py
(Updated for Com 4 and baudrate to match arduino firware)
You will need python to run the feeder.py file
I used pololu stepper drivers (like from a mendel). More information can be found here:pololu.com/catalog/product/1201
You can look in the firmware for the pin outs. Each driver gets three pins: step, direction, and enable. More information can be found here:pleasantsoftware.com/developer/3d/spherebot/. Note that I found that for 16x mircostepping the MS pins needed to be pulled high, not low.
Unlike other eggbots I found mine works better at 800 px by 1600 px, using two px in the X for every one px Y. X being the egg motor, and Y is the pen motor.