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

SphereBot

by Zaggo, published

SphereBot by Zaggo Apr 8, 2011

Featured Thing!

Description

Eastern is coming and I'll be visited by dear friends and their children.
So I need some Easter attraction for them :)

The SphereBot can plot images on spherical objects like table tennis balls, golf balls, eggs etc.
It is inspired by the original EggBot by EvilMadScientist, but built from 2 old stepper motors and some steel rods (all cannibalized from old flatbed scanners), some MDF and plywood and a few 3d printed parts (printed with my MakerBot Cupcake).

The electronics are simply an Arduino and two Polulu A4983 stepper motor drivers (on the bread board).

The custom Arduino firmware directly interprets GCode sent over the serial port. So it’s no problem to print GCode from MakerBot Unicorn designs directly on the SphereBot.
Thanks to the excellent Inkscape plugin from Marty McGuire (http://www.thingiverse.com/thing:5986), it’s easily possible to convert all kinds of vector drawings (eps, svg, etc) to printable GCode.

The firmware is open source and can be found here:
pleasantsoftware.com/developer/3d/spherebot/

A video of the SphereBot in action is available on YouTube:
youtube.com/watch?v=v8KnW9AQ10E

[Update 04/09/2011]
Meanwhile I drew plans for the wooden parts (left & right side and the X-axis stepper motor retainer plate). See
SphereBotWoodenParts.pdf below.

[Update 04/10/2011]
I just uploaded STL and SCad files for the printed parts.

[Update 04/11/2011]
The SphereBotSender GUI is now also available in a Processing implementation, i.e. it runs on Mac OS X, Windows and Linux.
See 'SphereBotSenderBinaries.zip' below.

The Sources are available on GitHub,
see pleasantsoftware.com/developer/3d/spherebot/ for the links.

Recent Comments

view all
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.thankyou
hai

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 have he same issue. I have not solved it yet.

Makes

Liked By

view all
Caiman

License

GNU - GPL
SphereBot by Zaggo is licensed under the GNU - GPL license.

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

I'm currently still working on the drawings for the non-printed parts. Please stay tuned.

The sources for the Arduino firmware and the Mac OS X (Snow Leopard) application are available on GitHub. You find the links to the repositories here:


pleasantsoftware.com/developer/3d/spherebot/
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.thankyou
hai

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
hi,

i printed and build the spherebot.
bought and build the electonics like pleasantsoftware.com/developer/3d/spherebot/
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?

thanks,
alex

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
hi,

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?

THX

Holger
Hi,

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?

THX

Holger
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?
Zaggo - in reply to ivano
GND is correct.
ivano - in reply to Zaggo
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.

ideas?

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?

Feeder.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 feeder.py to send more than one line of code. Foud someone with a simmilar problem here ( forums.reprap.org/read.php?1,132149,132149 ). Tried their suggestions but still having problems.

Managed to get the ruby feeder ( thingiverse.com/thing:21177 ) 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.
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 feeder.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 feeder.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...

-----------------------------------------

#!/usr/bin/python

import sys
import serial
import re

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

print "About to send some hardcoded Gcode"

sphereBot.write('G1X0Y0n')
print "Sent: G1X0Y0n"

#sphereBot.write('n')
#print "Sent: linefeed"

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

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

----------------------------------------

Outputs:

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.

Feeder.py stops at 0.4% waiting for a reply from the Arduino Uno.

Any suggestions?
After hacking about the feeder.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 feeder.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 feeder.py to take this into account.

github.com/MarkJB/SphereBot/tree/master/Utils
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.
Zaggo - in reply to ljyang
Are you sure you connected the stepper motor wires in the correct order?
ljyang - in reply to Zaggo
I'm using these motors: sparkfun.com/products/9238 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).
Here's my spherebot in action. Thanks for the hard work!

youtube.com/watch?v=2wkPQ_RhJWQ
I have written two little scripts to feed the SphereBot: thingiverse.com/thing:9941
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 XAXIS_ENABLE_PIN 24

#define XAXIS_ENDSTOP_PIN -1

#define YAXIS_DIR_PIN 40

#define YAXIS_STEP_PIN 38

#define YAXIS_ENABLE_PIN 36

#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?

//xAxisStepper.autoHoming();

//xAxisStepper.setTargetPosition(0.);

A little tricky to get it all lined up, but it's working nicely now. Thanks for the project!
Zaggo - in reply to Guest
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? code.google.com/p/eggbotcode/downloads/detail?name=examples.zip
&
amp;can=2
&
amp;q=label%3AEggbot

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?
Zaggo - in reply to mrbug
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...
mrbug - in reply to Zaggo
I have the steppers and servos now. Are the stepper drivers really required? My steppers are controllable straight from my arduino...
Zaggo - in reply to mrbug
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...
mrbug - in reply to Zaggo
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.
Top