MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now

Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!


by Zaggo Apr 8, 2011
Download All Files

Thing Apps Enabled

Please Login to Comment

hello experts, I need your help. How to set all MS1,MS2,MS3 to be HIGH in order to get 16 microsteps? I used Arduino CNC shield V3.

/* MS1 | MS2 | MS3 Microstepping Resolution

  L    |  L    |  L     ->  Full Step
  H    |  L    |  L     ->  Half Step 
  L    |  H    |  L     ->  Quarter Step
  H    |  H    |  L     ->  Eighth Step
  H    |  H    |  H     ->  Sixteenth Step


I finally built this, got everything working really well, except I cant seem to figure out how to generate a gcode using inkscape that is compatible with the gcode required for spherebot. I'm using the same electronics you are, A4988 Arduino uno some jumper wires, 12V psu and breadboard. I can use spherebot GUI and can control the Egg stepper and the Pin stepper as well as the servo. I just cant get code generated. Any help would greatly be appreciated.

Hi! I am in between building a spherebot/eggbot thingy and I am having troubles with my servo.
It is a 9g servo tower pro sg92r and normaly works fine. However I see a lot of twitching, especially when the steppers are working.
I can rule out the power issue since I am powering my servo from a (more than capable) battery pack.

Could it be an issue with the SoftwareServo library and timers? Any help would be appreciated!

I built one with the Uno and 4988 drivers, I have it working great but it seems to slow down printing about 1/4 through so the print looks bad half way through, I think it is the Spherebot_Ui program, is there any other software that will run the spherebot? 2.0 does not work for some reason.

I recently built an eggbot using the files and links provided in this thing. For a couple of days, it worked outstanding. It moved with precision and accuracy, and I was able to create some impressive egg prints.
Now however, the pen stepper motor that controls left/right movements has began acting strangely. It moves inconsistently and often doesn't have enough power to move back and forth. I have tried replacing the motor, driver, and arduino- still weird motor activity. Does anyone have any suggestions?

hai dear master,
i have a sherebot printed and i practice the tutorial.
but the first motor cant moved clearly, and when i want to sent the G-code, processing can't respon. but i try with serial monitor i can be moved just step by step.


I have Spherebot printed and made ??with my Prusa Mendel

Now I have a question, I use Spherebot ui.exe, everything works perfectly manually
but now I would like to have a calibrate test file in Gcode

Who give a calibrating Gcode file that I can use to work as it should (something like a circle or square or text .....??)
Full step and quarter step as it can be
Micro Step Resolution = Full step or and quarter step
Egg = 6cm long and 42mm diameter

The final stop should be to the left or right are ( i think left ???)
Kind Regards


i printed and build the spherebot.
bought and build the electonics like http://pleasantsoftware.com/developer/3d/spherebot/http://pleasantsoftware.com/de...
but when i tried to install the firmware on the arduino leonardo
i did not work. i installed both libs (timer1 and software servo, renamed to Arduino.h) but
still errors - see below.

any suggestions?


error output (arduino 1.0.5 and leonardo)

SoftwareServo.cpp: In member function 'uint8_t SoftwareServo::attach(int)':
SoftwareServo.cpp:28: error: 'digitalWrite' was not declared in this scope
SoftwareServo.cpp:29: error: 'OUTPUT' was not declared in this scope
SoftwareServo.cpp:29: error: 'pinMode' was not declared in this scope
SoftwareServo.cpp: In member function 'void SoftwareServo::write(int)':
SoftwareServo.cpp:52: error: 'clockCyclesPerMicrosecond' was not declared in this scope
SoftwareServo.cpp: In static member function 'static void SoftwareServo::refresh()':
SoftwareServo.cpp:74: error: 'millis' was not declared in this scope
SoftwareServo.cpp:107: error: 'digitalWrite' was not declared in this scope
SoftwareServo.cpp:109: error: 'TCNT0' was not declared in this scope
SoftwareServo.cpp:124: error: 'digitalWrite' was not declared in this scope


found it:

include <wprogram.h>

changed to

include <arduino.h>

so - now i hope to get it run in the next days ;)</arduino.h></wprogram.h>

I have he same issue. I have not solved it yet.

Hi Zaggo! have you finished the drawings for the non-printed parts??

i need the wooden part of the pen holder! :)

Hi again,

i built one, but it draws mirror inverted (spiegelverkehrt). What change(s) are neccessary?




i need a little help about various stepper driver:
For some experiments i used driver SN754410NE. Is it possible to use this driver with your code? The SN754410NE needs four input pins. Nevertheless, is it possible to adapt?



The SN754410NE is a simple H-Bridge driver, not a dedicated stepper motor driver. Of course, it's possible to adapt the driver code to do the Stepper logic inside the Arduino in software.

I've tried to export some Eggbot SVG Files with the Unicorn Gcord exporter from within inkscape which always endet with an error (AttributeError: SvgPath instance has no attribute 'segments').
In the end I've relaized that I have to combine the Paths (Path-> combine or STRG+K) to be able to create a gcode file.
Hope that helps someone struggeling with the same issue.

Did you use current limiting resistors or were your nema 17 stepper 12v per phase? I have some 3.4v, 1.7A steppers, but from what I've read on the internet... even if I ran a 9v motor supply, I would need 3.3ohm 10watt resistors for each motor. I suck at electronics so any advice would be welcome.

I'm actually not sure what voltage rating my steppers had (they were salvaged from old scanners). However, the nice thing with the Polulu A4983 stepper motor drivers is, that they have current limiting build-in. You can adjust the maximum current with the tiny potentiometer. Just start with the lowest setting and increase the current until your steppers work reliably (and the A4983 doesn't overheat). With the low torque needed for the SphereBot, this shouldn't any problem at all.

Thanks Zaggo. I have some A4988's on order!

In the schematics on your website on the Fritzing sketch the microstepping jumpers of the Pololu are +5V (1/16 step), while on the sketch just below they are GND. Which is the correct setting? I'm using 1/16 of step and I'm quite happy with it.

Anyone have a final cost of the finished unit?

GND is correct.

Thanks! So I will have to change my settings ;)

I'm getting better results out of the hardware and the steppers move to the right coordinates and positions by hand. However, when i try to feed the spherebot with the sender code (OSX Lion), I get errors often - usually in the first few lines. The most common is Error at line 0: o: (a little o with a colon). Interesting, i get the same result with the ruby sender code. I've also tried slower baud rates (down to 19200, the default is 115200). I'm using the default firmware from the spherebot project.

Anyone else seen this or have some idea how to fix this?
thanks, rrhb

my steppers are moving smoothly when given individual commands to move along one axis. However, if a series of gcode commands indicate that both steppers must move, the pen holder axis starts to move jerkily - still in the right direction, but no longer smoothly. I can't see anything in the code that ties the two steppers together, and I believe I have plenty of power.


It's preventing nice drawings.

Hi, I built one but can't get the software to respond to any commands.

I have a bit of test code that will contol the stepper motors and servo (just moving them for a bit and then reversing direction) so I know everything works. It just seems like the Arduino is ignoring comms. I should be able to manually send Gcodes via the serial monitor right?

http://Feeder.pyFeeder.py gets stu
ck at 0.4%.

I'm using a revision 2 uno, would that have any relavance to the problem?

Tried again and it is responding to Gcodes from the serial monitor now... making progress...

Still can't get http://feeder.pyfeeder.py to send more than one line of code. Foud someone with a simmilar problem here ( http://forums.reprap.org/read.php?1,132149,132149http://forums.reprap.org/read.... ). Tried their suggestions but still having problems.

Managed to get the ruby feeder ( http://www.thingiverse.com/thing:21177http://www.thingiverse.com/thi... ) to send the gcode to the arduino but there is a delay of about 20 secs (give or take) between motor/servo movements and it looks like the movements are happening one at a time (i.e. one motor moves, then the other rather tha
n both at the same time).

This looks like the arudino isn't sending anything back to the feeder programs to say 'ok done that, hit me up with some more gcode" but I'm not sure where to go from here... any help would be appreciated.

Send GCODE to SphereBot - ruby script

The only thing left I could think of to try was hook the arduino up to a linux box but I am still seeing the same thing. The http://feeder.pyfeeder.py script fires out some gcode and then sits there as the arduino isn't answering back.

I then tried a separate USB to serial lead to talk directly to the arduino but the same thing happens.

I wanted to check that python is actually sending something so tried stripping out the bits of http://feeder.pyfeeder.py that are doing the serial comms and hardcoded it to send some Gcode (I've tried various ideas, the latest listed below).

Nothing I do gets a response from the arduino. Yet I can happily send commands with the Arduino serial monitor as long as 'Newline' is selected.

I must be missing something obvious...


import sys
import serial
import re

sphereBot = se
rial.Serial('COM3', 115200, timeout=1)

print "About to send some hardcoded Gcode"

print "Sent: G1X0Y0\n"


print "Sent: linefeed"

print "Waiting for a response"
response = sphereBot.readline()

print "Arduino sent " + response[:] + " and nothing


About to send some hardcoded Gcode
Sent: G1X0Y0

Waiting for a response
Arduino sent and nothing else

A rev3 Uno just turned up but still have the same problem.

http://Feeder.pyFeeder.py stops at 0.4% waiting for a reply from the Arduino Uno.

Any suggestions?

After hacking about the http://feeder.pyfeeder.py to not wait for an ':ok' I managed to get the eggbot to draw recognisable text. It's pretty clunky right now (pen wobbles and jumps around, steppers move one after the other rather than at the same time) and due to the hack things can get out of sequence but it is some more progress.

I figured out what was going on.

The http://feeder.pyfeeder.py resets the Arduino Uno (rev2/rev3) boards when it creates a serial connection and starts sending data before the Arduino is ready.

I've modified http://feeder.pyfeeder.py to take this into account.


I keep getting the following error when trying to print a gcode with feeder.py

C:\Users\Anders>python C:\Users\Anders\Documents\Utils\feeder.py C:\Users\Anders\Downloads\traditional3.gcode
Creating serial connection, timeout set to  10  seconds
Traceback (most recent call last):
  File "C:\Users\Anders\Documents\Utils\feeder.py", line 105, in <module>
    sphereBot = serial.Serial(DEVICE, BAUDRATE, timeout=TIMEOUT)
AttributeError: 'module' object has no attribute 'Serial'

Any idea how to fix it?

Do you have the Python pyserial module installed? (pip install pyserial)

So I built one and loaded up the firmware, but the diagonals are coming out stairstep/wavey like in this photo. any idea what could be causing this? seems like the step resolution isn't quite right. I grabbed the latest from github, but still have this problem. even with I send direct gcode from the serial to do a diagonal move it does this so I don't think it's a problem with the sender (I've been using the processing sketch to send gcode generated from inkscape with the unicorn plug defaults). even straight X axis moves are jerky. I've set both pololu drivers to 1/16th stepping. thoughts? easter's coming up fast and I fear the bot won't be quite ready in time.

Are you sure you connected the stepper motor wires in the correct order?

I'm using these motors: http://www.sparkfun.com/products/9238http://www.sparkfun.com/produc... and have the pairs set red/green and yellow/blue. I'll try swapping a pair around and see if that helps, but that usually just reverses direction of travel.

I've swapped the motor wires and it does the same thing. I swapped out the duemilanove for a dcboarduino in case it was a bad 328 chip or something, and no change. I swapped around the pins used and same thing. I moved all the motor pins to pwm pins and it does the same thing. I swapped the motor drivers (pololu modules) around and same thing. I'll take a video of ir and post it up in a bit, it really looks like its not microstepping or something. or the steps/mm are set wrong or something.

So If figured out the problem. I went through the source and was mucking with the calculations for the intervals and got it working. but working through the calculations, it turned out that the default unicorn plugin for inkscape set the speed for the XY too high for the spherebot firmware. turning down the unicorn settings for the XY speed to 300mm/min smoothed things out. Just in time for Easter. Thanks for the great thing

Has anyone gotten SphereBotSender to work in Windows 7 64 bit? I get the main screen to come up, when I click "Send" I get a dialog box that's titled "Open" but it is just an empty white box, no controls. It doesn't respond to any keystrokes, I have to use task manager to kill it.

I couldn't get it to work on either Windows (Vista) or Ubuntu. I ended up using the Ruby sender.

Is there a schematic? All I can find for wiring is the drawing of the rats nest of wires. It'd be much easier to read a schematic. Also, what's the component running between ground on the breadboard and the pin next to where the servo is plugged in?

There is. I added it to the project page on my blog.

The component is a switch. It's the optional endswitch for the x axis (see firmware sources).

I have written two little scripts to feed the SphereBot: http://www.thingiverse.com/thing:9941http://www.thingiverse.com/thi...

Upload GCode to SpereBot

sorry about the dup posts on submit - please delete the extra ones. thingiverse hiccup.

It was easy enough to make them "eggbot" compatible by flipping tempX and tempY in the SphereBot.pde code just before it's sent the steppers - a more systematic fix would include the offsets and the arc drawing. Is there any code actually using the arc drawing? The inkscape/unicorn output doesn't output the arcs, as far as I can tell.

I just finished building one of these. My reprap had a broken hotend, so I repurposed the reprap motor and RAMPs to drive a SphereBot and cobbled together the reprapped parts from other materials. Basically I followed your design. Some more detail on how you constructed the rotation mounts against the sphere would be good.

On the firmware end, I added code to 'flip' the xaxis so I didn't have to rewire my reprap x motor. I wired the servo the "max Z" which wasn't being used.

I changed all the motor setting for the Arduino Mega.

define XAXIS_DIR_PIN 28

define XAXIS_STEP_PIN 26



define YAXIS_DIR_PIN 40

define YAXIS_STEP_PIN 38


define YAXIS_ENDSTOP_PIN -1 //

lt;0 0
gt; No Endstop!

I commented out (temporarily?) the autohoming because I didn't have any endstops installed in the eggbot - neither do you, so it's puzzling it's in the code?



A little tricky to get it all lined up, but it's working nicely now. Thanks for the project!

Thanks for the feedback.

Although I DID have installed an opto endstop at the x axis. You can see the little PCB rig behind thhe Y stepper motor on the pictures above. How ever, it isn't really necessary (or particulary helpful) so I barely used it...

I believe that confirms that Y is the 'rotation' axis, and X is the motor behind holding the pen? I was not 100% sure and tried both ways a few times.

The xmin/xmax - is that object dependent or fixed by the structure of the spherebot?

Should I be able to use the example files for eggbot directly? http://code.google.com/p/eggbotcode/downloads/detail?name=examples.ziphttp://code.google.com/p/eggbo...

I find I had to add flipping to Y AND then rotate the drawings/document in Inkscape to use them. It works but it's a kluge. It would nice to find a setup in firmware that allow these to be directly compatible.

About how much do you think the parts would cost?

Not much. As I wrote in the above description, I used mostly used parts (stepper motors, rods), scrap wood, some custom printed objects and a few screws.

Even if you'd need to buy the wood and the rods, it shouldn't cost more than a few bucks.

However, you should be able to cut the wood into shape and to drill the holes. So you'd need some kind of saw and a drill...

Of course, you'd need an Arduino (about $30) and two stepper driver circuits (about $13 each). A micro servo like the one I used costs about 3 bucks on the web.

I was in the lucky position to have lying around all of the above in my workshop, so the whole SphereBot didn't cost me anything but ab
out a weekend of construction, building and programming...

I have the steppers and servos now. Are the stepper drivers really required? My steppers are controllable straight from my arduino...

Atmega pins can source (provide positive current) or sink (provide negative current) up to 40 mA (milliamps) of current to other devices. Also they provide only 5V.

A stepper motor driver like the A4983 provides up to 1A (without a heat sink) or up to 2A (with heat sink) @ up to 35V.

At least you won't get much torque (if any) out of your steppers when driving them directly from the Arduino pins.
I would be more concerned about the possibility to burn out th
e ATMega chip when driving inductive loads like a stepper motor coil directly on the pins. But I'm no expert with this...

Ah, okay... I'll post on the arduino forums to see what they say about the load! The increased current is a good reason to get the drivers, though!

Great idea! i wanted to do this but can never find the time.