Loading

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

jsc

SphereBot redrawn

by jsc May 23, 2015
Download All Files

Thing Apps Enabled

Please Login to Comment

Probably, but you'll have to put in the work to either adapt my firmware or figure out some other firmware to get it to work. It should be a fairly simple matter of adapting SingleStepper.h and SingleStepper.cpp to work with your driver, but you're going to have to figure out how to do that.

I'm not a programmer... :( And my understanding of programming languages is very low. And there is no a time now because Easter is coming soon...

Here is a hackaday article I just came across that is perfect for you. It is addressing the use of just the electronics setup that you are using. I hope that you find it helpful.

Thank You!

I love this, though the instructions are a bit unclear to a noob like me. So, first off, pardon my noobness. I don't get the commands part where I'm supposed to set the pen positions. "M303 Pxxx"? Is that the actual command, or am I supposed to swap the xxx for... one of the positions I feel comfortable with when I'm moving about with M300 S115 and such? So M303 P115 in that case, or? Is M301 for when the pen is down and drawing, M302 for when slightly lifting the pen and moving to the next position and M303 is the high lifted pen servo position after it's all done?

I tried some simple sketches with the pen servo loose, just to see how it went, but it seems like it was compressing/scaling down the whole image to the bottom left of the egg. Any tips, help and pointers would be highly appreciated! I reeeeee-heeeaally want this done before Easter. Cheers!

Pxxx: the xxx is to be replaced with the number you feel comfortable with.

The gcode generated will always use M300 to move the pen up and down, and will use the values that you specify in the gcode Inkscape plugin settings. The possible values are "clamped" to between 100 and 130 to reduce possibility of someone breaking something by entering radical values. If your setup requires higher or lower values, use M301 and M302 to adjust those (and then M500 to save the value in the firmware). M303 sets the default pen up position, the position that it takes when powered on.

If your drawings look like they are not using the full range of motion, go through the steps in my instructions to validate your setup. For example, G0 X1600 should rotate the object a full 180 degrees, and G1 Y480 and G1 Y-480 should swing the pen through a reasonably large range of travel. If not, perhaps your stepper motor is not using 200 steps per revolution. This can be changed towards the top of the Configuration.h file. Also, make sure your canvas is 3200x800.

Wooo! Almost there now. The scaling issue was in Inkscape. Below the box where you set the size, I just needed to make sure the scale was set to 1 instead of some default 0.2(why?)... something. Now I just need to figure out the servo part properly. I'll get back to you with beautiful images hopefully. Or more nooby questions.

Great! I don't think anybody really understands what the Document Properties Scale setting is all about. You'll notice it changes to different values depending on what you've selected for display units and size units. I've added a note to the instructions to make sure it is set to 1, thanks for the feedback.

Another question, how do you make it draw a solid filled shape and not just the outlines?

And yet again one more. The images turns out kinds squished on the eggs. Like I need to stretch their width to make them look proper. Any idea what's wrong?

And one more: How did you attach the servo arm to the spring? I'm about to drill a 2mm hole in both and use an M2 screw and nut.

Ugh, I wrote up a long response, and it got flagged for moderation. Just in case it doesn't go through, here's a short summary: check out the eggbot_presethatch extension (no link because I don't want to trip the moderation flag again, google for it) and http://www.thingiverse.com/thing:953035 for an example of mine. You have to squash images to get them to look right because it's being drawn on an egg. And thread a wire through a hole on the servo arm and the hole in the spring, and twist it together to keep it in place.

Crane and sun pattern for eggbot
by jsc

For solid shapes, you need to "color in" the shape. A good way to handle it is to use the "Hatches (rough)" path effect and the EggBot "preset hatch" extension, or the EggBot crosshatch extension. They will give you different effects. You can get those by installing the EggBot software, but that ends up installing a bunch of EggBot communications stuff as well, which you don't need or want; you can just get the extensions by downloading the eggbot_hatch.* and eggbot_presethatch.* files from here: https://github.com/evil-mad/EggBot/tree/master/inkscape_driver and placing them in your Inkscape extensions directory. Once you have them, refer to the documentation for how to use them: https://wiki.evilmadscientist.com/Hatch_fill and https://wiki.evilmadscientist.com/Preset_hatch_for_fills. They have some tutorials you can work through. Short version:

  • Draw a circle
  • Select it, go to Path, Path Effects, add a "Hatches (rough)" path effect using the + button in the path effects pane.
  • Go to Extensions, EggBot, Preset hatch for fills, run it.
  • Using the Edit path by nodes tool (second tool from the top), click on the hatching, then mess around with the four nodes until it looks reasonable.

Check out my crane pattern for an example: https://www.thingiverse.com/thing:953035

And yes, you're drawing on a curved surface, you will need to flatten out your drawing in order to get it to look "right".

And for the servo spring, I used one of the single arm "horns" and threaded a wire through one of the holes in it and the hole in the arm spring, then twisted it to keep it in place.

Crane and sun pattern for eggbot
by jsc

I put them in the extensions folder, but they're still not getting registered when starting Inkscape. Am I missing something obvious here?

Great looking egg, by the way!

Where did you put what files? For me, they went in ~/.config/inkscape/extensions/eggbot_presethatch.inx and eggbot_presethatch.py. You need both files, and they need to be in the top level of the extensions directory. Your location may differ.

Both went into C:\Program Files\Inkscape\share\extensions where I put your extension as well. Both eggbot_hatch.inx and .py and eggbot_presethatch.inx and ,py.

And when you say it does not get registered, what do you mean? It does not show up under Extensions/EggBot?

You do not actually need either extension. Just play around with the hatches live effect, there is a tutorial linked from my crane pattern that shows you the basics of how to use it. You can look in the file eggbot_presethatch.py to see what it is changing the hatch settings to and set those by hand if you like.

I also profited from Pepeu's feedback and had also to make sure that "Display units" AND "units" were set to px for pixel.
Thank you again for your quick help and well documented project

Thank you for your quick reply!
When I try the range of the stepper motors everything is fine. (G0 X1600 and G0 X0. G1 Y480 and G1 Y-480)

I reset it to its default values with M502 (since I'm still not sure how to properly adjust them. Though it works, position wise) and tried "drawing" a 3200x800px image/gcode, but nope. It draws it compressed/scaled down in the "bottom left" corner of the egg and then returns to center with a lifted pen. All parts are the exact same as you mentioned, apart from the pen servo which is an old sg90 I had lying around.

Any ideas why it's scaled down/compressed?

Thanks for your help! It's highly appreciated.

Thank you very much for the detailed instructions you gave and your work. I hope I can manage to draw on eggs before easter 2019.
1/ I have arduino uno and adafruit shield v2. With the arduino IDE over the serial console I can move the 2 motors and the servo
2/ From Inkscape I can generate a unikorn gcode file that I send with the ruby gcodesender.
3/ There I faced something wired : from my lxle (Ubuntu) laptop, I can only send once the gcode file, motors and servo are moving (without egg and pen for the moment).
4/ When I try a second time nothing moves.
5/ When I go back and open arduino ide, I can still move the motors over serial console commands

I'm blocked there for the moment, and I would be pleased if you could help
Greetings

After you send the file, does the script complete and exit? After you do move the motors over the serial console, does the script work again or is it still unresponsive?

I'm not at home, but I think the script didn't complete, I will check this evening. I can remember the script asked me to hit enter move a bit the motors and seemed to hang.
For sure after I move the motors over the serial console, the g-code-sender is unresponsive (when I close the serial console from Arduino IDE or not). The only way to get g-code-sender moving the motor was for me to boot the laptop and execute the script as first command before opening Arduino IDE or serial console

You can try an alternate gcode sender. I think people have used the Chrome extension (google Chrome gcode sender) successfully.

Dear Jsc,
I have now something working : I've built a wooden house for the eggbot and for the rest I'm using the arduino uno and the adafruit motorshield you recommended.

  • I first burnt an adafruit motorshield because I ordered Nema17 stepper motors without looking at the current. (I ordered 1.7A instead of 0.4A for each motor, I didn't know Nema17 was giving the size of the motor and not the torque). Because the adafruit card is done for other type of motor, it doesn't limit the current.
  • Then I bought a lab power supply so that I can limit the current, and it worked very well with the 400 mA Nema17 stepper motors
  • And yes the GCodeSender provided as chrome extension worked well on a Ubuntu distribution
  • Now I can produce gcode files from Inkscape that I can send and draw on the egg. There are very small, I perhaps made an error in the scale.
    Thank you again for your good explanations. (here attached 2 pictures of the eggbot I built help and inspired by yours)

Very nice. Make sure your drawings are done on a 3200x800 canvas, and if your stepper motors are not 200 steps per revolution, adjust the STEPS_PER_REVOLUTION at the top of Configuration.h.

Dear Jsc,
I controlled the setup of my pen with your instructions, I'm using a 3200x800 px canva in Inkscape, my motors are 200 steps per revolution. I also tried with a greater zoom factor in configuration.h but the pen hit the housing.
When I look in the inkscape generated gcode file, for a diagonale that is supposed to take all the space in the canva, I see that X values vary from -1500 to -700 and Y vary from 200 to 390. So I think there is a misuse of inkscape from my side, if I understand correctly the X amplitude should be approx 3200 and the Y amplitude 800. Also in the gcode-viewer screen of the google gcode sender I just see this diagonale taking 25% of the drawing surface instead of 100%. Any other idea? What could be wrong in inkscape?

Dear Jsc,
I have now something working : I've built a wooden house for the eggbot and for the rest I'm using the arduino uno and the adafruit motorshield you recommended.

  • I first burnt an adafruit motorshield because I ordered Nema17 stepper motors without looking at the current. (I ordered 1.7A instead of 0.4A for each motor, I didn't know Nema17 was giving the size of the motor and not the torque). Because the adafruit card is done for other type of motor, it doesn't limit the current.
  • Then I bought a lab power supply so that I can limit the current, and it worked very well with the 400 mA Nema17 stepper motors
  • And yes the GCodeSender provided as chrome extension worked well on a Ubuntu distribution
  • Now I can produce gcode files from Inkscape that I can send and draw on the egg. There are very small, I perhaps made an error in the scale.
    Thank you again for your good explanations.

Many thanks, I've just tried the Gcode-sender plugin of Chrome under Ubuntu. It works, I hope to finalize the mechanical parts in the next 2 weeks and post some photos

Здравствуйте . не может бы вы мне помочь с эгботом ... я распечатал и собрал механику, а вот с электроникой разобраться не могу, хочу использовать arduino uno + Cnc SHELD, ту прошивку, которую предлагает автор, мне она не подходит, так как я использую другую плату, не могли бы вы мне скинутиь настроенную прошивку для бота на kirillgribanov@mail.ru , буду вам весьма благодарен. Я еще не особо могу разобраться с програмированием, я только учусь. заранее спасибо за помощь!

Very nice and useful toy. I did it too, but the arm of the pen jumps
frustratingly, maybe you have an idea what could be the reason?
Your eggbot so smoothly writes after this egg that he only envy

Do you mean that the arm jumps up and down, or that the pen moves in large steps between moves? If the former, try adding weight to your pens. If the latter, it sounds like you do not have microstepping enabled. That depends on the electronics and software that you're using.

Of course, it is about movements along the axis. The number of steps per turn is equal (3200 to 800).
Actually it looks like it lost microcircles. I will change the motors from 12V to 2.3V, they will be more dynamic when powered from the 12V power supply. The sea rides the controllers. and if I do not help, I will make the driver follow the EBB scheme on the PIC. if you have any ideas, I will listen to you willingly. Thanks for answering previous questions.
greetings

Why can't I use eggbot extension in Inkscape to control directly?

You can if you are using the official eggbot electronics.

Hello, thank you for your answer. I use the Arduino uno board, and the firmware is provided by you. And firmware burn successfully, debugging with Arduino IDE serial port, when I input G code Arduino reply OK. I use Inkscape 0.91 + eggbot2.7.1. I use MakerBot Unicorn G-Code to generate G code files, but when I transmit G code, I seem to have problems and cannot transmit. When you use the gcode-sender.rb file provided by you, double click, flash back, can not run. According to your introduction, I downloaded Ruby + Devkit 2.4.4-2 (x64) in https://rubyinstaller.org/downloads/, and install it, but the following settings are different from you, I don't know how to set up. I have been doing it for 1 weeks or not, I'm not good at English, now G code transmission is in trouble, I hope to get your help Help, thank you.

You say "the following settings are different", but you don't say what is different. If you provide more information, I can help you to work through any issues you may have with my gcode-sender script. You can also try searching this page for "gcode" to see some issues other people have had and resolved. In particular, people have reported success using a Chrome extension (which I have never tried myself), you may wish to give it a go:

https://chrome.google.com/webstore/detail/gcode-sender/ngncibnakmabjlfpadjagnbdjbhoelom

thank you.
The above problem has been solved and new problems have been encountered.

  1. I run the following command in cmd: ruby C:\Ruby24-x64\devkit\gcode-sender.rb 009.gcode does not respond after running, just inside cmd A new line flashing "_". TinkeringT is the same as my question, but I use arduino UNO to help analyze the cause.
  2. I use CNC SHIELD V3 does not know which pin of the arduino UNO link, need to modify those firmware files, this is different from the situation of the definition pins I saw before, so ask.

The CNC Shield is a completely different system than the Adafruit motor shield my firmware targets. It would take some work to get GRBL to support the Gcode that the unicorn inkscape plugin generates.

My recommendation would be to use hardware that is known to work for eggbots, either the official EggBot electronics with their software stack, or the Adafruit motor shield with my software. Before you start trying to send gcode, use the Arduino console and send individual gcode commands to make sure all the motors and servos move correctly, as explained in the documentation.

Hello! The CNC shield is much lower price then Adafruit here... Can You explain how to make this system work with the Arduino Uno and CNC shield? I know, that it is possible and know how to connect, but do not know how to change the firmware code

The CNC shield gives you a full grbl system on an Arduino. It comes with its own firmware. Check the Synthetos site for information on getting it set up. Once you have it set up, it will be expecting to take in instructions through gcode. You can try using the gcode output by the MakerBot Unicorn g-code plugin as described in the instructions, but chances are good that there will be some minor changes required.

Thank you.
Now I switched to two 8825 stepper motor drivers. I wonder if this is compatible with your firmware?

It is not; the firmware was written to support the hardware that I bought without realizing that they weren't supported by any existing firmware. If you are comfortable with Arduino code, you may be able to easily adapt the firmware to work by modifying SingleStepper.cpp to support the step method of your particular driver.

Comments deleted.

Thanks very much for this. Quite cool! When I run G1 Y480 after centering the arm, it swings left but the pen arm hits the frame and the motor skips steps. Haven't had time to play extensively with it yet.

Hello
Good work. I build one and currently painting some eggs. But its not optimal. I will try to optimize it further and hope the next eggs will be better.
Your instructions are fine simple and straight. It was easy to build and setup. But the software (Inkscape and the plugin) is another thing.
Happy easter!!!

greetings rabenkind

ps. The next days i upload some photos.

Hi
This is my first arduino project. So here is first problem. I download your files, add Adafruit-Motor-Shield-library and Adafruit_Motor_Shield_V2_Library to arduino libraryes. In IDE I install adafruit motor shield v2 library. Upload program tu arduino. Serial monitor respond to my command. But this is all. When I enter G-code arduino respond with OK, but nothing happens. I attach my scope to motor board (power is OK - 9V) Well servo is moving, but at stepper is 0V on output all the time
I look with scope DIR_SER and DIR_CLK, but nothing is happend. Any idea, where I do wrong?

I find my mistake. I got motor board V1. Now motors are running. But with command G0 X1600 it turn only for 90 gr. There is no different if I change #define STEPS_PER_REVOLUTION from 200 to 400 why? stepper are 17hs2408 (NEMA 17)
Other way is to find out why driver become very hot during short use. "Y" is very nervous. Also if I change mikrostep by GrAndAG suggest is nothing better.
Also have problem with RUBY, huh I was thinking it will be easier to run this....

Hello. How are you powering your steppers? What voltage? Looks like your steppers are 8 Ohm resistance, so powered at 5V they would be pulling 625 mA, which is slightly higher than the motor shield is specified for.

I take it you changed the configuration file to select motor shield v1 library?

You say it rotates 90 degrees regardless of STEPS_PER_REVOLUTION setting? (Your steppers should be 200 steps/rev.) Does it reboot itself at all?

Did you recompile and reupload after any changes?

What issues are you having with the gcode sender, perhaps I can help.

I wouldn't say it's necessarily difficult to get it all running, but it's certainly not as plug and play as using Eggbot's own electronics and tool chain.

Hi JSC
Thanks for fast respond. I'd like to set it up to 1.april (Easter)
I do lower voltage supply to 4V and now drivers are not hot to much.
Take look video at https://youtu.be/Ci4mjMC1kQc
If I change STEPS_PER_REVOLUTION 200 to something else there is no effect. Always motor is turn for 180 gr.
axes 'Y' is not moving softly. How to fix this problem? GrAndAG solution with modification library have no effect.
I'm new with arduino. I do compile first icon (verify) then upload it. It is OK like this?
I note, that can upload code direct from Inkscape? How? I have huge problem with Ruby (now windows fan....)
thanks

I looked up your stepper motors. They should be 1.8 degree (200 steps/rev) motors, so don't change that. 1600 microsteps is 180 degrees, so you are seeing the correct behavior.

I don't have your steppers and your shield so I can't tell you what's wrong, but I can give some general hints. Try specifying a slower speed in the Y axis: G1 Y400 F50
See if that makes it any smoother. Default rate at the beginning is 160.

I have only ever run it using the ruby gcode sender script. If you search the comments, you can see people have tried other senders, including mention of a Chrome extension. Probably this one: https://chrome.google.com/webstore/detail/gcode-sender/. I have detailed instructions in how to get the gcode sender working under Windows, and people have gotten it working, so you may want to try that first.

In general, I would try to get the motor shield library working to your satisfaction first without involving the rest of the firmware. There are several example sketches in the motor shield library directory that should help you get started, such as: https://github.com/adafruit/Adafruit-Motor-Shield-library/blob/master/examples/StepperTest/StepperTest.pde

Try different speeds, stepping styles, etc., see if you can get it running more smoothly.

Do let me know if you have any specific issues you would like input on, but again, your motor shield is deprecated hardware which I don't own.

Thanks
Work with chrome gcode sender
Now I only need to tune motors!

thank again for all your help and project, that you share with us!

Should I be able to use anything else to send the gcode? I have been unable to get the ruby script to run without error. I tried a gcode sender chrome extension and it does cause the X and Y motors to move when executing the gcode from inkscape but I don't see the servo move. When I send M300 S115 manually through the chrome extension the servo does move.

I only ever use the script I wrote. What errors do you get with it? Did you edit it at the top to change the COM port or serial device to be correct? Did you check that your gcode contains M300 commands?

Thanks for the reply here is the error I am getting

gcode-sender.rb:35:in foreach': No such file or directory @ rb_sysopen - koala (Errno::ENOENT) from gcode-sender.rb:35:inblock in '
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/serialport-1.3.1/lib/serialport.rb:52:in open' from gcode-sender.rb:29:in'

My gcode I got from inkscape using the unicorn extension has M300 commands in there.

I got it to work now. Your instructions are very clear but I was in the directory so I didn't think I needed to enter the path to the gcode-sender.rb file but after I did the full path as you instructed it ran.

Now to actually try writing on something!

Hm, that is odd, not specifying the full path would have resulted, at most, in not being able to execute the script at all, not the error you reported. That looks more like it couldn't find the gcode file you specified. In any case, I'm glad you got it working. Try some of the Eggbot sample patterns: https://github.com/evil-mad/EggBot/tree/master/example%20files/Geometric%20Eggs or some of the ones I've shared.

Hello, do you know any websites with eggbot patterns? I have tried samples enclosed to gcode-sender package and I'm looking for the new one ;)

Thingiverse has some, search for eggbot. I put up these two:
https://www.thingiverse.com/thing:953035
https://www.thingiverse.com/thing:1446538

Here's a good source for SVG patterns: http://www.craftsmanspace.com/free-patterns

Crane and sun pattern for eggbot
by jsc
Eggbot minecraft pig pattern
by jsc

I just bought all the electrical parts and I'm printing right now but I just had a question about the motor shield. Does it matter where I connect the steppers and servo or can I just plug them in? Couldn't find anything about it in the instructrions.

Please read the Adafruit motor shield documentation to learn about how to hook up power and motors to your shield. Looking in the firmware, Configuration.h, I have:

/*

  • PINS definitions
  • Pen arm motor terminals : M1 & M2
  • Rotation motor terminals : M3 & M4
  • Arm servo port : SER1 (located closer to PCB corner
    */

So it would be easiest if you followed those conventions.

And a final question, what kind of power suply are you using.. my 1A didn't turn the motors at all so I'm thinking 3-4 Amps instead?

Depends on the stepper motors you are using. The adafruit ones I link to are 350 mA max, so my 9V 1A is plenty sufficient. Your problem may be voltage, try to have it match the voltage rating of your steppers.

Ah thanks, never thought of looking in the arduino code!

Hi, maybe someone had a same issue and can help. I was using Arduino Uno clone. I was using motor shield v2. I powered arduino with 12v adapter. I was able to move pen stepper correctly. Pen servo also moved according to commands. Rotation stepper was ok in - direction, but in + it rotated for a while and then arduino got stuck. It happpened always after moving rotation stepper in + direction. After some tries the chip CH340G burned out. Should I power the shield instead of arduino?

I have always powered the motor shield separately from the Arduino using the power terminal blocks. If you are using DC power to the Arduino, make sure the power jumper is installed. https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/powering-motors

Failure to rotate may indicate that your motors are drawing more current than your power adapter can supply. Make sure it is rated for at least enough amps to power both motors, servo, and Arduino. I don't know why the CH340G would burn out, that is the USB to serial chip.

Hi, it's me again. One last question(hopefully). I am having trouble setting the pen position. It goes to the top of travel with M300 S100 and I adjusted the max_pen_position to 145 in the configuration.h (that has it touching the egg). When I run gcode the pen pops up to the top of its travel and stays there the whole time. I dont understand how to save the up and down values with the M301 or M302 Pxxx, M500 commands. What does the "P" do?

M301 Pxxx sets the minimum pen position (highest position), M302 Pxxx sets the maximum (lowest). Those are just limits, so you don't go past those values on accident. M303 Pxxx sets the default up position, where the pen goes when it boots up. M500 saves any values you set into EEPROM so that they remain after reboot.

Actual pen movements during drawing are set by the gcode you send to it. When using the Inkscsape g-code exporter, in the first (Setup) tab, you should see Pen Up Angle and Pen Down Angle. You should set those to 100 and 145, or whatever you've determined is proper for you.

Okay, so does a value get entered in place of the xxx?

Yes, the value you want for the limit.

When I test the motors the G0 X1600 command only rotates the egg 90 degrees, the G1 Y480 seems to take the extreme end of the range and the M300 S100 lifts the pen servo instead of lowering it. Any advice on how to adjust this? Thanks

Are you using the same servo motor type for both axes? It sounds like you have a 400 steps/rev motor on at least the X axis. You can adjust for this with STEPS_PER_REVOLUTION in Configuration.h.

I don't understand what you mean regarding the Y axis. After centering, does G1 Y480 move in one direction to nearly the end of reasonable travel? That sounds like a 200 steps/rev motor, which is why I ask if you are using the same motors on both axis. If this is the case, then you need to use a different value of STEPS_PER_REVOLUTION for creating the yStepper in SphereBot.ino, line 66. Just plug in 200 if that is the case.

As for the pen servo, do higher values of M300 Sxxx lower or raise the pen? It should lower it. If it raises, your servo has the opposite direction of rotation than the one I used. You have a couple of options. You can fix it in hardware by printing the pen arm reversed and mounting the servo on the right side. Or if you're more comfortable with software, you can adjust the move_pen function in SphereBot.ino to reverse the action (move_pen tries to ease the pen down, and raise it quickly).

If it moves in the "correct" direction already (higher values lower, lower values raise), then you just need to set your desired pen location values following the procedure in the instructions.

I checked the motors and they are 1.8 degree motors. I changed line 50 in the configuration.h file from 1 to 2 and now I get the half rotation with G0 X1600 command. After thinking about it and reading the code a little closer, I don't think there is anything wrong with the Y axis. The test command is the full range of motion if I understand it correctly. Regarding the pen servo, after I reloaded the sketch from the change in the configuration.h file It seems to be behaving normally now. When in doubt, reboot. Thanks again for all the patient advice and the prompt answers.

Hm. The default setup is for 1.8 degree motors, so I still don't understand why you're only getting 90 degrees. Changing the zoom factor will work, but that zoom business was a holdover from the original code, where the original author had specified all the coordinates in mm and used an ad hoc zoom factor to convert to steps. I decided that the natural unit should be full steps, but left the zoom factor in the code.

G1 Y480 should give you half the full range, from centered at Y=0 to full left. G1 Y-480 should swing to full right.

Post a photo of your first egg :-)

Hello,
everything works properly for me, but I have a question regarding to temperature of motors - my motors (Nema JK42HS34-0404) are really hot after printing one egg. I use arduino uno clone and adafruit motorshield 2. Is it normal? My 3d printer motors don't reach such temperatures during work...

The specs that I find for that motor indicate temperature rise of 80C max. Starting at room temperature, that would seem to indicate that it may run as hot as 100C, or hot enough to boil water. Also hot enough to soften PLA. How many volts are you providing to the power block? You can try running it at lower voltage for lower temperature/reduced torque, but an egg doesn't require much torque anyway.

Hello,
First off, I think this is terrific. I have constructed the eggbot and tested the motors. I need a little help with adding the Unicorn plugin. I downloaded it and unzipped it into inkscape>share>extensions. I now have a file-folder inside that named inkscape-unicorn-master. Inside THAT file-folder I have another file-folder named "src" containing a file-folder named "unicorn", and files named .gitignore, unicorn.inx, and a python file called unicorn(no .py after it). I THINK that is where everything belongs but after I opened inkscape and adjusted the size, I dont have a spot to select "MakerBot Unicorn G-Code" and save. I hope this makes sense. I would really like to get this working for Easter. Thanks in advance for any advice.

Check out the Readme, it will tell you how to install it: https://github.com/jinschoi/inkscape-unicorn

In short, copy the contents of the src directory to the extensions directory. That is, the unicorn directory and the unicorn.inx and unicorn.py files (the .py extension may be getting hidden by your OS) should be placed directly into extensions/.

That solved it. Thank you again for sharing your work.

Hello,
I made a mistake and I bought engines for 2.8V instead of 12V. I use Arduino Uno and Adafruit Motor Shield 2. Can I connect these motors?

https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/powering-motors says most 1.5-3V motors will not work, so I'm guessing not. You can try providing an appropriate motor voltage to the shield through the motor shield power terminal block (remove power jumper), but I have not tried it myself. https://www.pololu.com/product/713 says the motor drive chip can be run down to 2.5V with lower performance.

You should ask the adafruit forums for an informed opinion.

12v motors work much better;)
Is there any more user-friendly program to send gcode to eggbot?

You can try zaggo's SpherebotSender, written in Processing. I have not tried it. http://pleasantsoftware.com/developer/3d/spherebot/

Comments deleted.

Hello there. I installed the hardware part. but when I send the file with inscape EggBot does not work. how do we print? Could you tell me some details?

You do not send the file with Inkscape, you have to use a separate gcode sender. Inkscape plugin is used only to generate gcode from a drawing. There are detailed software setup instructions in the Thing Details, please look them over and let me know at which step you are having issues.

Hello there. I made eggbot with adafruit shield. I created gcode with inkspace. I found 2 programs to send gcode. the motors are moving, but not as written in the gcode file. Could the settings used when creating the gcode file be wrong? file properties

When you say it is not working as expected, what is happening?

Have you gone through the manual checks of the gcode motion from the instructions, to make sure everything is connected properly? Did they give the expected motions? Did you do the calibrations to determine the proper pen up/pen down angles?

Please go through the instructions and follow the steps in order. When something occurs that is unexpected, tell me what you expected and what actually happens, then I can help you.

stepper motors turn right and left. I checked with the program.Will you tell me how to make pen calibration? I want to send you a video on how it works. mail address?

The instructions are in the Thing Details tab on this page. There are detailed steps that you need to carry out to verify that everything is set up correctly, by sending gcode commands through the Arduino serial console. Have you carried out those steps and verified that the firmware and hardware are behaving as expected? That should be step 1 in trying to figure it out. Please verify that you have read through and carried out all the instruction steps.

I realize English may not be your first language, so please try this link: https://translate.google.com/translate?hl=en&sl=en&tl=tr&u=https%3A%2F%2Fwww.thingiverse.com%2Fthing%3A844167

Hello there. I am grateful to you for your help. egbot worked. How to set up EggBot for fast writing. it writes very slowly

You can specify the speed rate when you save to gcode in Inkscape. Note that the maximum speed will be limited to about 775 steps/s using the Adafruit motorshield version 2.

Thank you! I had a hard time trying to find information on the Adafruit Motor Shield, gcode and Arduino code and how to get it all working together. I came across your instructions and I got it working! Thank you for putting together clear instructions!

I'm going to make some changes to the mechanical side of the sphere bot. It's currently printing but it's a little sloppy. I'll share my project once I get it printed and reassembled.

Once again... THANK YOU!
Gord

why does nobody help :(

Did you see my earlier response? Please provide more details of what is going wrong for you. "It doesn't work" isn't enough information to go by.

please help. I did everything but I do not recognize inscape eggbot. I use Adafruit shield, arduino nano. I do not want to throw away the project !!!
Failed to connect to EggBot. :( - inscape

You do not use the Inkscape Eggbot extension unless you are using Eggbot electronics. Please go through the instructions under Thing Details in order to use it with the Adafruit motor shield, and give me details as to what step you have trouble with and what error you are receiving.

merhaba. bağlantı şeması nasıl? hangi donanımı hangi pine takacağız? yardımcı olur musunuz?

Türkçe bilmiyorum, özür dilerim. Referans için modeli buradan görebilirsiniz: http://a360.co/2h5Du7P

Motor mafsallarının bir vidası dışındaki tümü için 7 M3x10 vida.
Dengeleme kollarındaki üst vida deliği için 2 adet M3x14 vida.
Kalem kolu bağlantı yayları için 1 adet M3x20 vida
Step motor şaftları için ayar vidaları olarak 2 adet M3x8 vida
3 adet M3x8, bir Arduino UNO'yu çubuklara monte etmek istiyorsanız (dört boşluk var, ancak bir tanesi boşluk sorunları nedeniyle kullanılamıyor)
3 M3 fındık
10 M3 pullar
Kalem kol mili kuplörüne kalem kol milini takmak için 2 adet M4x10 vida
Kalem kolu menteşesi olarak 1 adet M4x35 vida
1 kalem set vidası olarak M4x16
2 M4 pul
4 M4 somun
Her şeyi çubukların üzerine yerleştirmek için 22 M8 somun; İkisi, avara çubuğunun her iki ucuna geçerler
3 adet M8x300 dişli çubuk
1 M8x100 dişli çubuk için rölanti
Avara için 1 bahar, 8 mm'den biraz daha büyük ID
2 608ZZ rulman
2 adet NEMA 17 kademeli motor
1 9g mikro servo
2 silikon halka, 1/2 "ID 3/4" OD 1/8 "genişlik

Comments deleted.

c:/ruby22-x64/lib/ruby/gems/2.2.0/gems/serialport-1.3.1/lib/serialport.rb:43:
in 'create' :No such file or directory-.\/dev/cu.usbmodem145311
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/serialport-1.3.1/lib/serialport.rb:43: in 'open'
from C:/Users/Den/gcode-sender.rb:29:in ''

Good day to all.
What to do in such a case?

You have to edit the gcode-sender file to change the COM port to the one your Arduino shows up as. For windows, it will be something like "COM3" (with the quotes). You can also use a number; COM1 is 0, COM2 is 1, etc.

solved.
Thank you.

Hello,
I've made this project and it work very fine.. until i need to change my computer.
Now it works but every print is resized (about 50%) and it is not centered (it is printed in the upper left part of the egg)
In arduino ide - is ok (pen centered, half rotation, etc) but generated gcode is somehow wrong.
Do you have any ideas?

Update: Problem solved. It was an Inkscape problem. The 0.92 version is not supported by unicorn extension. Going back to 0.91 solved the problem

Hey there, I'm a bit baffled. I'm trying to send some gcode to the bot.
I changed the port in .rb file to the correct port. ( I had errors kicked back before changing it, but now I do't get errors)

I run the following in cmd:

ruby C:\Users\TT\Desktop\SphereBot\Utils\gcode-sender.rb test.gcode

After running that nothing happens, just a new line with a blinking "_" inside of cmd. Any ideas? I have also tried adding the full path to the gcode as well.

Thanks!

It should, at the very least, report "Ready" and pause before the first layer. Have you run through the tests in the instructions where you try to command it through the Arduino IDE console? What did you set the port to? Make sure you disconnect from the console before trying to run the g-code sender, only one process can have the port open at a time.

I followed the set up again on a new machine, and have the exact same results. I can verify that I have the correct COM port list, the Arduino console works fine. I've edited the .rb file to the correct COM and it just returns a blinking cursor. I tried doing it wile connected to the Arduino console and I get an COM errors message, which makes sense since it's already open.

I've tried using "COM20" as well as just the number 19 without "". Looking at the .rb it appears it should display "Read" once COM has been established.

I was able to get this working, I was using a newer Arduino Leonardo as my board, after some research I saw they have a slight difference in serial com protocols. I swapped to an Arduino Uno and all works well.

Thanks!

Great! What, exactly, was the issue with the Leonardo, do you know?

I have no idea, i was reading there was a difference in their serial connection hardware.

Yea, I'm baffled. I can send gcode commands via arduino IDE just fine. I changed the default COM value to what my device manager says which is also what the IDE used. I'm pretty sure i closed out the serial console from the ide. I changed the com to a port i know was incorrect and I get an error just to validate ruby was working. Ill try playinh with it some more today. Thanks

And again, good afternoon. I've been digging for 4 hours and I can not find this file "gcode-sender.rb"
In what folder is it located?

It is in the Utils directory in the firmware project.

You certainly excuse me, but what firmware? and how to send the gcode file using Utils/gcode-sender.rb ?

Please go through the steps in the Thing Details page. There are detailed instructions, including links, for all the software.

The firmware is the thing you were having trouble compiling earlier.

This was all in the eggbot-master folder. I find this folder utils. Where I just did not look for it))))))
Thank you for your patience.

Solved. Update the Arduino and all ok.
Thank you for your excellent work.

SphereBot.ino: In function 'void save_pen_configuration()':
SphereBot:108: error: 'class EEPROMClass' has no member named 'update'
SphereBot:109: error: 'class EEPROMClass' has no member named 'update'
SphereBot:110: error: 'class EEPROMClass' has no member named 'update'
SphereBot.ino: In function 'void clear_pen_configuration()':
SphereBot:117: error: 'class EEPROMClass' has no member named 'update'

Which version of the Arduino IDE are you using? Make sure it's the latest.

Hey. Can tell what to do about it ('class EEPROMclass' has no member named 'update')?

Comments deleted.

hey - nice project!
I read here something about the eggbot with the adafruit Motorshield.
I made the same eggbot with Motorshield V2 (own the V1,too), but I got some problems with the firmware.
Does your firmware works fine? I cant see the instructions in the Thing Details.
My actual firmware is these:
https://devhub.io/repos/jinschoi-SphereBot
but he swapped the axis - thats bad for the eggbot templates, i think.
Can you please help me?
thanks

Thingiverse seems to have destroyed all the existing Instructions tabs! Has anyone else noticed this? I had to recreate it from an archive.org snapshot. Great work, there, thingiverse.

If your axes are swapped, just change the wiring to your motors. X axis should be rotational, Y axis should control the pen arm. The instructions (which I just put back) give you a step by step procedure to verify that everything is working correctly.

Thank you, now all works fine!
Great instructions.

It's ok ! great project and fast support ! but I have problem at pen change... example : layer 1 ok but when I change pen,surely the penarm moves and the printing is wrong...
I'm wrong?
it is possible (firmware or unicorn plugin) reset each layer at a "home" position?
thanks

What do you mean by "the pen arm moves and the printing is wrong"? The egg shouldn't be moving anywhere as it is locked by the steppers. If you mean that the second layer is not registered perfectly over the first, make sure the pens you are using are all the same brand/size. Different size pens will contact the egg in different places.

Comments deleted.

i have everything running, but every command i try like the G0 X1600, the motor turns then the power led on the shield dies and i gear that the computer drops the usb connection.

Edit, i can now run all the commands in arduino, but when i try to, ruby gcode-sender.rb i get

Ready
Pausing: (Plotting layer 'Layer 1') Press Enter to continue.

gcode-sender.rb:53:in gets': Bad file descriptor @ io_fillbuf - fd:3 (Errno::EBADF) from gcode-sender.rb:53:inblock (2 levels) in '
from gcode-sender.rb:35:in foreach' from gcode-sender.rb:35:inblock in '
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/serialport-1.3.1/lib/serialport.rb:52:in open' from gcode-sender.rb:29:in'

what to do? i use an external power suply

Power dying, you're probably trying to power the motors from the Arduino. You need to set the jumpers and supply sufficient power directly to the shield through the DC jack.

Did you edit the gcode sender to use the correct serial port up towards the top?

yes, it starts up and everything, but. i can run the G0 x1600 code now in the arduino editor, and set the M500, but when i try to run the ruby, i frezzes and the power led pulses,and you can hear the servo and motors glitching. i run an external 12v 1a powersuply

Before, you were saying something about a ruby error, bad file descriptor. Did setting the serial port correct that?

The power requirements depend on which stepper motors and servos you are using. Look up their data sheet and see what amperage they expect to draw. The ones I have linked to in the BOM are 350 mA max so 1A power supply would work, but if you used a different one and they draw more power, then it would account for your power glitches.

Remember to remove the power jumper if you are using a separate DC power supply for the motor shield. https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/powering-motors

Hi, i have a problem with Inkscape, Eggbot extension...
this is a error message : Failed to connect to EggBot. :(

i use Arduino Uno

What firmware are you using? If you are using the EggBot extension, you must use the EggBot electronics. Several vendors sell the EBB driver boards. If you want to run my derivative firmware on an Arduino and an Adafruit motor shield, there are complete instructions under Instructions in Thing Details; you cannot use the EggBot extension in that case, and must use the Unicorn plugin (my modified version, linked in the instructions). If you are running an Arduino with a different motor shield, I cannot help you there and you will have to figure out what firmware are available for your setup.

That exact one? That is the Adafruit motor shield v1. Someone from the comments below helpfully added support for that shield to my firmware, so the instructions will work for that after editing the configuration file to tell it you're using v1. As for the rest of it, please try following the electronics and software instructions in my write up under Thing Details. In particular, the EggBot extension only works for the EggBot electronics.

Ok motors are ok but servo don't work

Try hooking up just the servo and running some servo test sketches, such as Knob and Sweep found here: https://www.arduino.cc/en/Reference/Servo. Which servo are you using?

SG90...it's work in other project and test

And when you say it doesn't work, what symptoms do you see? How are you powering your motor shield? It is recommended to power the motors separately, from the DC jack, rather than drawing power from the Arduino or you may see brown outs and restarts.

Ok I solved ! my fault !!
The servo strives because it could not climb over... thank you and sorry :)

"Climb over", what does that mean? Was it obstructed? Any issues you had, someone else may have someday, too.

Now...stepper motor are ok but whrn draw egg the pen arm is inverted.. look the video
http://www.videosprout.com/video?id=b14d4842-2b9f-4d25-865e-d219b5323a29

This is servo in normal position, it's correct hardware?
http://it.tinypic.com/view.php?pic=2dmed5z&s=9#.V7b2v_mLSUk

Different servos have different conventions for which direction they turn. I would have thought all the TowerPro SG9x servos would work in the same manner, but apparently not? For me, higher values turn the servo counterclockwise when you're looking at it from the front (lower the arm), and lower values turn clockwise (raise the arm). When you test it using the M300 commands, is that what you see, or the opposite?

If it is reversed, you can either print a mirrored version of the part that includes the servo mount, to mount the servo to the right, or go into the firmware and find every occurrence of servo.write() and edit it to be servo.write(180 - (whatever the old argument was))

when write M300 S100 arm pen go up quickly .. when write M300 S115 go down slow .. it's all correct... i have problem when print a gcode... could be a setup of unicorn plugin?

Yes! Double check the Unicorn plugin settings to make sure the pen up and pen down coordinates are correct. Down should be higher than up.

what is your configuration? Can you take a screenshot please?

Under the Setup tab, after you have selected Save As... MakerBot Unicorn G-Code, the first two fields are Pen Up Angle and Pen Down Angle. I currently have them set to 107 for pen up and 115 for pen down. Pen down should be > pen up because of the rotation direction. The correct numbers for you will depend on the size of the object you are printing on and the size of your pens, so do some tests with M300 to see what some good numbers are. Pen up should be high enough (low enough numerically) that the pen never touches the object through a full revolution. Pen down should be low enough that the pen remains firmly in contact through a whole revolution.

My other settings are: both delays 100, XY feedrate 300, Z axis stuff all irrelevant.

we are almost there...

now, the problem is that it starts and ends with the pen arm down..

look at video

http://www.videosprout.com/video?id=051f2b92-0f4c-4630-8b69-0863430e4df2

Did you set the default pen up position using M303, as detailed in the instructions?

Thank you JSC ! I have solved..now, I should improve egg block, occasionally does not run well, I will use the ninjaflex filament

how did you solved your problem with the servo when it didn't move?

yes, the problem was only position of bracket, it was just at limit

Did you install the o-rings?

Hi where does thje idler bearing plate go?

The idler bearing plate is from version 1 of the design, taken verbatim from nglasson's design. At that stage, both end plates were identical, you would mount a servo on one and the idler bearing plate on the outside of the other to hold the second idler bearing. In later revisions, I made the end plates asymmetric so you have to mount the servo on the left and use idler_end_plate_v2 on the right, which incorporates the ring for the second bearing.

Any ideas on what's causing this problem when trying to save Unicorn gcode file using Inksacape?
Thanks for any help.

Traceback (most recent call last):
File "unicorn.py", line 108, in
e.affect()
File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 268, in affect
self.effect()
File "unicorn.py", line 102, in effect
parser.parse()
File "C:\Program Files\Inkscape\share\extensions\unicorn\svg_parser.py", line 231, in parse
self.recursivelyTraverseSvg(self.svg, [[1.0, 0.0, -(self.svgWidth/2.0)], [0.0, -1, (self.svgHeight/2.0)]])
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

Ah, I see the problem. You specified your document dimensions in mm. It MUST be in px, as my writeup indicates. The unicorn gcode parser only understands px or %. That will fix you.

Some SVG object doesn't have a width or height. Please message me with a link to the file you're trying to convert and I can try to take a look at it. If you're using text objects, remember to convert them to a path before exporting using Path->Object to Path.

Have just made one of those miracles! Great design, software and instructions!
Everything looks fine but about at 90 degrees one of my motors starts loosing steps and all the picture shifts.
Will be extremely grateful if anyone can share their experience or comment on the issue.
Thank you in advance.

Send me a message with your email.

Comments deleted.

Hy , is there a chance to run this setup with L293D shield (adafruit v1) ?

Thanks to GrAndAG, my firmware now should work for both, with a simple change in the configuration file. Search for "GrAndAG" in the comments below.

Thanks for this nice project.

I have gone through all steps and everything works as expected except of the sending part. I always receive an error message like:
...in 'create': No such file or directory - .\/dev/cu.usbmodem145311 (Errno::ENOENT)...

So I am pretty lost and any help is highly appreciated

You need to edit the file to set the port, see step 5 in the instructions. It looks like you are running under Windows, so it will be something like "COM3" for you, but you can use the Arduino IDE to double check; the very bottom of the window, it should say something like "Arduino/Genuino Uno on xxx" where xxx is the port you're using.

"COM3" (or, you know, whatever) should have double quotes around it. On Windows, you can also use a number with no quotes. 0 is COM1, 1 is COM2, etc.

thanks for your reply, but I did this already. In my case it is COM17 and I edited already.

It seems that there is a problem with the file system or something like that. I spent already a bunch of hours on trying without success.

Any other idea?

If you've already edited it, how come your error message references /dev/cu.usbmodem145311, which is the original value?

ok, first of all a big thank you for your help :)

Definitions:
The Devkit was unpacked in: C:\devkit
The Ruby installation is in: C:\Ruby22-x64

I put the gcode-sender.rb and the test.gcode in the \devkit directory

Then in the command line:
cd\
cd devkit
ruby gcode-sender.rb test.gcode (I tried this also with the full path with the same result)

after hitting the enter key I receive the following error:

C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/serialport-1.3.1/lib/serialport.rb:43:in create': No such file or directory - \.\/dev/cu.usbmodem145311 (Errno::ENOENT) from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/serialport-1.3.1/lib/serialport.rb:43:inopen'
from gcode-sender.rb:29:in `'

You need to open gcode-sender.rb with a text editor and change the port variable to 16, or "COM17". You say you've done that, but your error message indicates that you haven't.

you were (almost) right: I double cheked it and there was a # in the line:

port = "COM17"

I forgot to remove the #

Now I did and it works :)

You made my day. Thank you very much.

Sweet. Show us some eggs.

I am having problems with the program disconnecting on the pen down command as/after it is executing the command. If I remove the pen down command from the gcode it prints fine but for some reason the servo wants to crash the program and I get errors similar to mewhalen below. I have tried changing the pen values but to no apparent avail. Does anyone have an idea what the problem could be? I noticed the same thing happening at times in the arduino monitor when I was trying to do the original setup. It seems like the pen rotator stepper has almost a violent hit now, very jerky.

your issue sounds a little different than mine. Turns out I had a bad usb cable. I found it by looking at device manager (windows), and noticed the comm port continually dropping then reconnecting. I changed the usb cable and all was well.

If you go to the serial monitor immediately after connecting and try to move the servo without testing the steppers first, does that work?

The servo runs off the USB 5V power. If you are attempting to power the steppers off the same line, you may be browning out the Arduino because the power draw is too much (steppers are always on even when not moving). Try plugging a DC power source of suitable voltage for your stepper motors into the barrel jack and removing the power jumper to give the steppers their own power source. That fixed mewhalen's issue.

Hmmm. I THINK that might have been on the correct track, however about 4 seconds after it was running (with a 12V DC source on the barrel jack) it seems as if I may have let the magic smoke out of the arduino.... I quickly shut it down and connected the 12v power source to the motor controller board via the terminals and pulled the jumper. Now it seems that when the stepper and the servo try to run at the same time the steppers lock up and are banging hard. I dont know if I have a bad servo, a bad stepper card or a bad arduino (or something else...) Not even sure how to trouble shoot it to be honest. It seemed like I was on the correct track prior to the steam locomotive chuffing under the board....

Sorry, not on the barrel jack, the terminal block. Please read https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/powering-motors

Comments deleted.

Everything is reversed for me...not a problem for the steppers from what I've read (and could swap 2 wires on each motor to fix).
But how do I reverse the servo direction?

If the steppers are both reversed, you're fine. Just treat "up" as towards the right instead of towards the left.

There is no set standard for servo rotation direction. The TowerPro micro servo I am using rotates counterclockwise (facing the servo) for higher values, and clockwise for lower. Mounted on the left, that translates to pen up for lower values, pen down for higher. If the one you are using works in the opposite fashion, you can fix it through one of two ways:

Hardware: mirror the pen arm pivot part left to right, and mount the servo on the right.
Software: find every occurrence of servo.write() and edit it to be servo.write(180 - (whatever the old argument was)).

Do you have the fusion file for the Arduino holder? I want to make the threaded rod part square so that it will print easier.

Thanks! This is a great project. Wont be ready for Easter...but I should have plenty of time to add an engraver and make some christmas ornaments.

Hm...
What's wrong here??

In file included from /DualStepper.h:21,
from DualStepper.cpp:18:
SingleStepper.h:25: error: expected `)' before 'sm'
SingleStepper.h:26: error: 'uint8_t' has not been declared
SingleStepper.h:33: error: ISO C++ forbids declaration of 'Adafruit_StepperMotor' with no type
SingleStepper.h:33: error: expected ';' before '' token
/SingleStepper.h: In member function 'void SingleStepper::release()':
SingleStepper.h:27: error: 'stepper' was not declared in this scope
In file included from DualStepper.cpp:18:
/DualStepper.h: At global scope:
DualStepper.h:43: error: 'uint8_t' has not been declared
DualStepper.h:43: error: 'uint8_t' has not been declared
DualStepper.cpp: In member function 'void DualStepper::travelTo(int, int, float)':
DualStepper.cpp:63: error: 'abs' was not declared in this scope
DualStepper.cpp: In member function 'void DualStepper::moveTo(int, int, float)':
DualStepper.cpp:84: error: 'min' was not declared in this scope
DualStepper.cpp:84: error: 'abs' was not declared in this scope
DualStepper.cpp:84: error: 'max' was not declared in this scope
DualStepper.cpp:84: error: 'sqrt' was not declared in this scope
DualStepper.cpp:88: error: 'FORWARD' was not declared in this scope
DualStepper.cpp:94: error: 'BACKWARD' was not declared in this scope
DualStepper.cpp: At global scope:
DualStepper.cpp:115: error: 'uint8_t' has not been declared
DualStepper.cpp:115: error: 'uint8_t' has not been declared
DualStepper.cpp: In member function 'void DualStepper::plotLine(SingleStepper
, SingleStepper*, int, int, unsigned int, unsigned int)':
DualStepper.cpp:142: error: 'delayMicroseconds' was not declared in this scope

Are you using the Arduino IDE?

Hm... I thougt I did.
Perhaps I have a wrong Version of arduino installed...
Just installed the IDE from your link and added the Adafruit-motor-V2 to the libary.
I have to ad the u8lib to! Why?
And when I will upload the Firmware to the uno, it's only possible with the motor-shield mounted!
Otherwise I got an error: out of sync...
But I'm Not able to send commands over the serial monitor.
No stepper will move... :'(

You need to get your electronics and motors working properly, which I can't really help with because I'm not there. An out of sync error usually indicates that there is a problem with your Arduino. Try following the steps in the first answer to this question: http://arduino.stackexchange.com/questions/17/some-dude-named-avr-wont-let-me-upload-my-program-aka-avrdude-stk500-getsync

The Adafruit Motor Shield V2 library does not require u8lib in any way. What do you mean when you say you had to install it? You should just be able to use the library manager under Sketch->Include Library.

When you connect to it using the serial monitor, do you see the text "Ready" as the first line?

Hello!
I've made some changes.
I've deleted and uninstalled everything from the arduinosoftware and installed the Software new from your link.
Added the adafruit-motorshield v1 (because I have it mounted).
Compiling and uploading was now succesfull!
But now I have an other Problem.
The y-stepper and the pen-servo are shaking very nervous and noisy while printing and the result looks very ugly.
And the motor-shield gets very hot.
Any ideas?

I also have noticed that microstepping on v1 is jerky and noisy (especial at low speeds). Maybe it's motor I.m using (in my case it's 12V 0.4A 42SHD0001) Or maybe it's due to driver, which is used in v1 motor shield. It uses voltage(not current)-based control. Although Adafruit library contains correct microsteps-PWM mapping array (it uses sin/cos algorithm), it looks like the actual microsteps positions are not uniform. From my testing, microsteps are closer to each other when they positions are near full step (i.e. if full step is 0-180 degrees range, microsteps are at 0, 4, 9, 15, 22, 30, 40, 52, 70, 90, 110, 128, 140, 150, 158, 165, 171, 176, 180, or if represent the same graphically: |-|--|---|-----|----------|----------------|----------...----------|----------------|----------|-----|---|--|-| ). Unfortunately, I do not have v2 around for comparison.

I think, It can be fixed by measurement of motor positions on large set of microsteps (say, 64 or more) and select from them the positions which are spread uniformly between full steps.
But for now, quickly using the "educated guess" method, I modified PWM-map in Adafruit motor shield v1 library with the following numbers, that work for me still not perfect, but a way less jerky
(AFMotor.cpp): uint8_t microstepcurve[] = {0, 50, 98, 142, 180, 212, 236, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255};

As for temperature of drivers and motors - they are hot, but still touchable by fingers. And such kind of temperature is still far from they limitations.

Well, the fact that you are using a v1 shield accounts for the fact that it wasn't working for you earlier, since support for v1 was just added a few days ago.

As for running hot and jittering, check the data sheets for your stepper motors and make sure they are appropriate for the motor shield, including what voltage and power requirements they are expecting.

Sorry if someone has already asked this:

Does this work with the older Adafruit Motor Shield v1.2 ? The instructions says to use the v2 shield but I have a v1.2 that I have laying around so I want to use it instead.

Thanks!

Not as is, but the changes necessary are not difficult. See the comments below from scv36 (search for AF_Stepper). A few lines changed in SphereBot.ino and SingleStepper.h/cpp should be enough. I don't have one, so I can't do it, but let me know if you get it running (I would test the firmware with your electronics before starting the build).

Thanks jsc! I will do that and check those out.
I also happened to be looking at one of the remixes for your design. It is just a different enclosure for the electronics by GrAndAG:

http://www.thingiverse.com/thing:1361509

But he also included modified firmware files that are compatible with the Arduino Uno + Adafruit Motor Shield v1
So it seems there are a couple of alternatives to try. I will try and see which one works better.

Thanks!

Egg-Bot - Enclosure for electronics
by GrAndAG

His included firmware is just mine with more or less the changes I outlined to make it work with the v1 shield. So I guess it does work.

Yes, that firmware is just jsc's one, but slightly modified to use Motor Shield v1 library instead of v2. Also I've added support "N##" g-code directives (line numbering), so It's possible to "print" on EggBot using some standard 3D-Printer software (I successfully tried Pronterface for now).
(Also I've noticed that in my case steppers work faster. For me the single (micro)step takes 0.17ms (instead of 1.29ms in jsc;s firmware). I suppose that v1 shield operates faster than v2.)

Actually, they both could be merged in single firmware under some DEFINE directive (I can do it if jsc's interested) to support both versions of Adafruit Motor Shields and could be included into jsc's git repo.

Yes, I'm pretty sure the v1 can step faster because the v2 talks over i2C and I believe that is the limiting step.

Are you fluent with github? You can fork the project and submit patches. If not, make your changes and send them to me and I'll incorporate them and credit you.

Actually, I never worked with git nor with github in particular. But created an account there, made fork, branch, did commits and filled pull request (as far as I understood github flow).

I've merged GrAndAG's update, so it should be possible to use the firmware with both shield versions. Thanks for the edits.

any thoughts on what might be causing this error?

"gcode-sender.rb:53:in `gets': Bad file descriptor @ io_fillbuf - fd:3 (Errno::EBADF)"

Thank you

It's not reading from the USB serial port properly. Are you sure you're connecting to the proper COM port?

I am using the same com port that I use to upload the firmware to the Arduino. the pen arm drops, and moves to the left, stops and the error appears. I thought maybe it was an issue with my Arduino so I just switched it out with another and am getting this...

C:\egg\Eggbot_Nutrition_Label>ruby c:\egg\spherebot-master\utils\gcode-sender.rb nutrition2.gcode
Ready
Pausing: (Plotting layer '2 - drawing') Press Enter to continue.

c:/egg/spherebot-master/utils/gcode-sender.rb:53:in gets': Permission denied @ io_fillbuf - fd:3 (Errno::EACCES) from c:/egg/spherebot-master/utils/gcode-sender.rb:53:inblock (2 levels) in '
from c:/egg/spherebot-master/utils/gcode-sender.rb:35:in foreach' from c:/egg/spherebot-master/utils/gcode-sender.rb:35:inblock in '
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/serialport-1.3.1/lib/serialport.rb:52:in open' from c:/egg/spherebot-master/utils/gcode-sender.rb:29:in'

I am opening the command prompt as an administrator to run it.

I am so close I can taste it... Unfortunately my kids are hovering, waiting to see it in action...

I am getting this error too, have you figured this out? It seems to cutout on pendrop for me. I tried an experiment and deleted the pen up/pen down commands and it prints successfully. It appears that the unit is disconnecting after the pen down command. For some reason if my pen down command gets to its endpoint, it disconnects the arduino, but not if it has a constant pull on the servo (may be an intermittent problem and that is my read on it). Does this mean anything to anyone? The pen up and down angle on the gcode compiler are not the same as the points on the eggbot, wondering if that is the issue or if they do not translate.

For me it turned out to be a bad usb cable. I swapped it out and it now works fine.

I am also having trouble with the Ruby piece. I am on Windows 10 x64, ran rubyinstaller-2.2.4-x64.exe, then extracted DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe to c:\users\eric\documents\devkit. I ran "devkitvars.bat", which returned "Adding the DevKit to PATH..." I then ran "gem install serialport" which returned "'gem' is not recognized as an internal or external command, operable program or batch file." Any guidance would be greatly appreciated, as the build came out great and I am anxious to put it to work...

Ok, so I solved that problem with the help of this article on the ruby download site https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting.
For gem to work, you need to check the box "Add Ruby executables to your PATH" during the install. Now, where do I find "gcode-sender.rb"?

I'm glad you figured it out! I'm rarely on Windows and just ran through my process once to see that it worked. I must have had that box checked. gcode-sender.rb is in the Utils directory in the firmware directory. You will have to edit it to use the correct COM port.

have same problem on win 7 to

Thank you for sharing your work and taking the time to write detailed instructions!

Saw your make and the modifications, pretty neat. Did it all end up working for you?

Comments deleted.

"explicit instructions" ok!
Thank you!!!

can some one made a video have to set it up form the start have program with Arduino come up bug so think make set up right and send gcode ant got a clue cos i cant find gem install serialport or Edit the gcode-sender.rb file

Ok , The alternavie Software Printrun and Inkscape MakerBot Unicorn G-Code Output ,run Linux Mint.

The next problem is to :

On my test laptop is a fresh Installed WinXp .

Run "gem install SerialPort" - run command does not exist.

I have the program installed Spherebot Control 2.0 that goes Com compound Commandos as G1 Y480 etc. will not run .
Under Arduino IDE works .
Can the software be adapted ?

Did you follow all the instructions for Windows? Including the part where you install ruby? Also, it is not clear from your comment what exactly is going wrong. Is it not finding "gem", or not finding "run"? You don't type "run", you type the part between the quotation marks. And it is important that you type it exactly as written (that is, "gem install serialport", not "gem install Serial Port").

I have tested the instructions on a Windows machine and can verify that it works.

Comments deleted.

Did you follow all the instructions, including installing ruby from the rubyinstaller package, which should provide you with the "gem" command, and running devkitvars.bat once? Also, don't capitalize Serialport once you get it installed.

running everything devkitvars.bat supplied know etc. etc.

You've run the Rubyinstaller? And DevKit-mingw? There are two separate packages. One must be installed. The other just unpacked.

DevKit-mingw64-32-4.7.2-20130224-1151-sfx
rubyinstaller-2.2.4

ok - found gem error, the folder must be devkit !!

But crazy now the next error:

Ruby.exe

the procedure entry "_gmtime64_s" was not found in the dll "msvcrt.dll"

I think there may be issues running Ruby on XP without compiling it yourself: https://github.com/oneclick/rubyinstaller/issues/271
Windows XP has been end-of-lifed for some time now, so I don't know if anybody will be working on fixing it.

Hello

I try all adapt here , unfortunately, I have problems with it .

Thanks for the help, now it is running.

best regards

That is because the AFMotor library does not name its classes "Adafruit_StepperMotor" but AF_Stepper. It also initializes them differently. Please read the AFMotor documentation: https://learn.adafruit.com/afmotor-library-reference/af-stepper-class

You need to change, in SphereBot.ino, where the steppers are initialized:
SingleStepper *xStepper = new SingleStepper(new AF_Stepper(200, ROTATION_AXIS_PORT));
and similarly for yStepper.

Then in SingleStepper.h and SingleStepper.cpp, change every mention of Adafruit_StepperMotor to be AF_Stepper.

Hi

I have the following motor nameplate here:

http://arduinolearning.com/code/motor-shield-and-micro-servo-motor-example.php

Is this Compatible Adafruit Motor Shield

No, that is not an Adafruit Motor Shield v2. You can probably get my firmware to work fairly easily if you are familiar with the Arduino Stepper library. All the stepper handling takes place in SingleStepper.cpp and only requires the ability to make a single step. However, you will lose microstepping and 16x resolution.

ar as I know there is a Adafruit Motor Shield V1.0 Clone .

I get this Lib to run?

Adafruit Motor Shield -library -master

It certainly looks similar. I would try to get it running the steppers and servo first with that library. You won't be able to run my firmware without modification, but because of the V1 and V2 libraries are similar, it shouldn't be too difficult to figure out where to make the changes. Just a few lines.

Which PSU for shield and steppers ?

I really have very little ability to help you with your hardware that I do not have. Since it does appear to be an adafruit shield clone, perhaps you could try their documentation for their shield? They usually have pretty good tutorials for their hardware. Stepper motors all have different voltage and power requirements. You will want one to power the motors separately from the Arduino.

Hello, after installing the unicorn plugin I have this problem, when I try to plot to an egg from inkscape I have this error message:

Traceback (most recent call last):

File "eggbot.py", line 1406, in

e.affect()

File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 268, in affect

self.effect()

File "eggbot.py", line 281, in effect

self.EggbotOpenSerial()

File "eggbot.py", line 1299, in EggbotOpenSerial

self.serialPort = self.getSerialPort()

File "eggbot.py", line 1356, in getSerialPort

for strComPort in eggbot_scan.findEiBotBoards():

File "C:\Program Files\Inkscape\share\extensions\eggbot_scanwin32.py", line 6, in findEiBotBoards

hKey = _winreg.OpenKey( hReg, r"SYSTEM\CurrentControlSet\Enum\USB\VID_04D8&PID_FD92" )

WindowsError: [Error 2] The system cannot find the file specified

Can you help me?

You are using the eggbot software, and presumably their electronics as well. I have no experience with that hardware, sorry.

Nice nice, is it possible for you to upload a close up of the pen arm with the spring on?
I would use it as a reference to see if I have assembled it correctly

Close up of pen arm spring added. Let me know if you get it working!

nice i got make for my self ty

and i ask some thing can make pic like over egg bots with yours

Hi. Don't understand your question, sorry. Are you asking me for more pictures, or what?

i make picture like this http://www.thingiverse.com/thing:5864/#files on the egg or just text

Monochrome geometric Eggbot plot
by dnewman

Yes! Any graphics you want. You will need to get some electronics hardware, though, and load it up with firmware. The easiest is probably just to get an EBB Driver Board from evilmadscientist.com. The links in the Instructions are if you want to use an Arduino and a motor shield.

What are the modifications necessary to use the EBB Driver Board since the instructions were written for an Arduino and motor shield?

If you're using the EBB, the proper steps are: ignore all my instructions completely and follow the instructions for the EBB electronics. You won't be needing the Arduino mount, so you can skip printing that one.

ok have a Arduino and a motor shield all ready for me have order the rest of part

the SphereBot.ino got to Arduino but wher i put the gcode-sender.rb and what software to print out the egg

i know i am noob with this good makeing this bad with softwere thing i gone is GPS Time Cock and Digital Temperature with sample codeing here i what look http://stepbystepprojects.co.uk/gps_time_clock.htm

thanks for the help

gcode-sender is a ruby script, and is suitable for Linux and OS X. You may have some more difficulty getting it to run under Windows, I am not sure.

I would begin by making sure everything is running properly! In the Arduino serial window, try sending it commands like "G0 X160 Y160" and "M300 S0" and "M300 "S180" (the actual values sent will be clamped to the min and max values defined in the code). You should make sure those limits are appropriate for your setup. Then you can worry about sending a gcode file. You could try this one: http://www.shapeoko.com/wiki/index.php/Universal-G-Code-Sender

ok im on window 7 so i get part and see ty

Yes! I'm so glad someone rebuilt the firmware for the Adafruit shield. I went with the shield thinking it would simplify my project, but I was not up to it. My poor bot could only scribble and draw beautiful waves. Can't wait to check out the new software and these modifications. I heard about this from the 3D Hangouts video.

I just realized I hadn't pushed my latest changes, so if you looked at the firmware before now, have another look. I've simplified it somewhat (all units are now in terms of 16x microsteps on a 200 step/rev motor, and it's handling the line drawing on its own instead of trying to coordinate two steppers based on timing).

Cool, I was about to ask, but it might be a couple of weeks before I get to try it out anyway. I'll make sure to report back in if I get it all working. I had tried using code from https://github.com/MarginallyClever/GcodeCNCDemo, but it was not specifically for Spherebot, and I couldn't make it work other than for some really simple gCode. I was surprised that Adafruit didn't have any CNC type projects for this shield since that seems like an obvious application. The AccelStepper library just doesn't seem to be made for CNC.

That MarginallyClever code is pretty good, and I wish I'd known about it before I started in on my own firmware modifications. I ended up at more or less the same place, but only after much fussing around with dead ends.

I've been there. After hours of frustrating work you finally get it working only to realize that someone else already had come up with the same solution. Still, the MarginallyClever stuff wasn't complete and I couldn't finish it. So I've loaded up your code and it seems to work, but I'm having trouble sending gcode files over serial. I've never used a ruby script and I can't seem to make it work. I have tried other gcode sender apps, but nothing seems to be working. Could you expand on the process for sending a gcode file?

EDIT: I did get the Sender for Mac by zaggo working. Now to test it on a real egg!

Did you ever get it all working? I've just updated my firmware to make pen servo setting more configurable. Now you can use M301, M302 and M303 to set min and max limits and default pen up position using a P parameter. M301 P90 sets the minimum servo angle to 90, for example. M500 saves to EEPROM, M501 loads EEPROM values (in case you have been mucking about and want to flush your changes) and M502 resets everything back to compiled firmware defaults. Also, I've put in a heuristic optimization: if the pen is set to the pen up value and a move would travel over half a full rotation, it takes the short way around.

Yes I did! I've been having fun figuring out the "tool chain." GIMP to InkScape to Unicorn to SenderForMac to Arduino with your firmware. There's a lot to mess with. My images were coming out reversed. Rather than track down the actual problem, I've just been reversing my image in InkScape as a final step.

Those seem like good features. Thanks again for putting this out there. I don't know how much work you put into it, but it would have taken me a LOT of time to do something like this. Hopefully, it is gratifying for you to know someone else is benefitting from it. When my first image came out properly I had that feeling like a mad scientist that just brought his creation to life. I ran around the house announcing it to my wife and kids.

Adafruit should post this as a project on their site. It increases the value of their motorshield greatly in my opinion. If they didn't want to compete directly with the Eggbots that they sell they could adapt it to other CNC-type projects.

Just updated the firmware with a small change that allows the motor shield to step ~3x faster.

Just swap the two pairs of wires on the motor for the reversed axis, OR swap two wires of a single pair. That will reverse that axis and you can skip the mirroring step in your workflow.

I'm gratified that my firmware is being used by at least one other person.

The first thing is to check that the servo limits are correct for your setup. You can try sending G1 and M300 commands manually using the Arduino terminal window. Make sure line ending is set to line feed.

Whatever gcode sender you use, it should strip out blank lines and comments if it is going to wait for "ok" responses before continuing. The other thing I implemented in my version is to trap M01 and pause to allow for pen changes. That seems to be what the Unicorn Inkscape gcode generator puts out for pauses.

It should be easy to get my script working on OS X as that is what I'm using. Edit the script to specify the correct serial device. Run "sudo gem install serialport" to install a required library. Run "chmod a+x gcode-sender.rb" to make it executable, then run "./gcode-sender.rb file.gcode" to send the file.

I just watched the hangouts video segment. I realize it's a 3D printing video, so they mainly concentrated on the modeling aspects, but I'm glad they mentioned the motor shield work; that's the largest part of my contribution, I think. I've ditched AccelStepper in the latest version in order to coordinate the two steppers more precisely using Bresenham's line algorithm. I've also done some testing and determined that the fastest it can go is 265 microsteps/s, or about 16 full steps/s, which seems fast enough. Anyway, now it will never skip steps or give janky movement at higher speeds. The 3D stuff is mainly minor tweaks of the work of others, although I hope having a full BOM will make it easier for people to build their own.

Regarding the Arduino firmware...Something changed with the last Arduino update (or further back maybe). I had to replace
#include "utility/Adafruit_PWMServoDriver.h"
With
#include <Adafruit_PWMServoDriver.h>