4xiDraw: Another pen plotter

After watching a video of a new pen plotter made by Evil Mad Scientist we wanted to have a similar device.



And having a 3D printer at hand plus some CAD software like Onshape or Fusion 360 it was a good exercise to design the whole thing.



As usual the process was not completely straightforward, as initially it was more about copying the model we saw but as things were coming together some new ideas were explored. So while the first mock-up was based entirely on laser-cut parts (some of them glued together to make them thicker as the crappy laser I have access to is really depth limited as it is low-power).  Why laser-cut? Well because it was faster (or so it was supposed, but don't get me started on that).


Once the first model was put together several ideas pop up: First, motors are in the way of carriage motion and reduce a bit carriage travel along smooth rods. Second, motors require another part that could be fused with the machine feet and rods support. Third, the initial belt path created non-parallel belt runs that will cause poor accuracy and variable belt tension, so central carriage needs to be revised.

Eventually, the model became more and more made of printed parts and once published there have been more ideas pouring in from some of the readers, like an easier to orient pen holder that already replaced the original one.

Controller firmware

My initial approach was to try to imitate the design and tools of AxiDraw but then I learned they use a PIC-based board that I do not have around and that it will take a while till I get one, but I had Arduinos laying around instead, so it was settled my plotter would be operated by Arduino. A CNCshield a friend gave me away (thanks Ernes) could hold a couple of stepper drivers to control the machine. 

A logical choice was to use GRBL firmware but a few details needed to be solved: this contraption is not a regular cartesian design but it uses a single belt configuration called H-bot. From the math point of view h-bot and corexy work the same so I was happy to learn the latest versions of GRBL do in fact support corexy. That was one thing solved. The next one was that I needed to control a servo por pen-up and pen-down movements. For doing that I learned that robottini's version of GRBL could do that too. So another need was solved too and firmware was settled. You can use mine. Servo is controlled by M3 and M5 commands.

Software workflow

So my drawing machine will receive drawing commands as g-code but, how is that drawing code being created. I looked around and what was designed for AxiDraw was an Inkscape plugin  that would create code suitable for the board they sell which is nothing similar to the g-code mine uses, so I had to use something else. 

I learned about several projects for outputting g-code for laser cutters from Inkscape. I settled with one plugin that seemed very powerful not only cutting but doing raster images too, but intended for a laser cutter. The good thing was that output was g-code, so I had to hack my way to adapt it to draw with a pen. After some struggle I manage to get a stable response. 

The problems I faced were that pen up and pen down commands took time and I needed to add an extra delay so drawing would be ok. Where original plugin controlled the laser output power I just needed to set the pen down so lines would be printed. It took a while but now it is working nicely.


If you wonder why there is a 608 bearing on the pen carriage which is not present in the CAD files it is because it adds a bit more weight so the ball-pen will draw a more consistent line.

Another project  I tested was LaserWeb, which uses your browser to convert SVG or DXF files into GCODE and can stream the file directly to you machine's serial port. It is based on javascript and I installed the server side on Cloud9, but I had to replace the 8000 port to 8080 to get it working on that platform. 

Once the g-code files are obtained, in my case using the Inkscape plugin, another tool is needed to send the file to the drawing machine. I am using a Java-based program called Universal Serial Sender that does the job brilliantly and it includes a preview and a live view of the print too. 

That makes the whole workflow based on open source software that can run on any operating system you are using.

Some of you asked me why the 4xiDraw name: well, AxiDraw is a registered trademark and FreeDraw was already taken too.



Comments

Miguel! This is awesome! Now I want one! LOL

Keep making my friend! You are an inspiration to us all!

Michael
Robottini said…
Very good job Miguel! I want to make one. I see we have a common friend: Mauro Manco.
The world of makers is little. Robottini - Alessandro
misan said…
Very good job Alessandro, not only your version of GRBL is powering the machine but it also implements G4 command that comes in handy for servo delay. What Mauro does not know is that there is in the pipeline another version using g-slot and his wheels.
Vinícius said…
This is simply fantastic. Me and my friend are trying to do the same project for a college work, and we are also using arduino. So I have a request: can you plis share your codes with me, and if possible some tips?
Vinícius said…
This is simply fantastic. Me and my friend are trying to do the same project for a college work, and we are also using arduino. So I have a request: can you plis share your codes with me, and if possible some tips?
misan said…
Code is already linked in the blog entry. You can use Bluetooth to make it work wirelessly.
misan said…
Code is already linked in the blog entry. You can use Bluetooth to make it work wirelessly.
Nicolas said…
Hello your work is amazing!!!,and please, I need your help...when you open Universal Serial Sender, do you select "baud rate=9600 or 115200 "?? Cause my stepper motor doesnt work with 115200 and i cant find GRBL v0.9i with baud rate 9600.. Thank!
Nicolas said…
how do you upload your firmware grbl to your arduino?
misan said…
Using this process: https://github.com/grbl/grbl/wiki/Compiling-Grbl
Nico La Rocca said…

Hello your work is amazing!!!,and please, I need your help...when you open Universal Serial Sender, do you select "baud rate=9600 or 115200 "?? Cause my stepper motor doesnt work with 115200 and i cant find GRBL v0.9i with baud rate 9600.. Thank!
misan said…
Firmware is configured to use 115200bps, source code is provided so you can change that to 9600 if you have to.
4ndreas said…
Good job, but now I have to find time to build one.
misan said…
I could not have done it without Easter holidays :-)
Unknown said…
Hi Miguel
I'm looking for the F623ZZ bearings, and I found this.
https://www.moebyus.com/partes-filamento/mecanica/rodamiento-con-canal-1-unidad-detail
But I don't know where are assemble 10 of them.
Maybe are this others bearings?
https://www.moebyus.com/partes-filamento/mecanica/rodamiento-con-canal-1-unidad-1-detail
if they are assembled in pair of two, maybe the counts are ok.
misan said…
The first one is not useful here, the second looks ok but I am not sure about dimensions. I would stay with F623 unless you redesign the two central plates that hold the linear bearings.
Unknown said…
ok thanks you!
I think i'm going to buy in eBay :)
http://www.ebay.es/itm/10-PCS-flange-bush-F623ZZ-3x10x4mm-Miniature-deep-groove-ball-bearing-3-10-4mm-/221963156824?hash=item33ae08fd58:g:nbUAAOSw7FRWZ9G5
misan said…
Or cheaper http://es.aliexpress.com/store/product/Free-Shipping-10-pcs-lot-F623-ZZ-flange-bushing-ball-bearings-F623ZZ-3-10-4-mm/837425_32363767627.html?spm=2114.04020208.3.72.vB5flf&ws_ab_test=searchweb201556_10,searchweb201602_5_10037_10034_507_10032_10020_10017_10005_10006_10021_10022_10009_10008_10018_10019,searchweb201603_1&btsid=e1a434cf-f917-4e9a-bcf0-befa29c08e20
Unknown said…
Good job,Is there a more detailed implementation to set the pen down ?
misan said…
There in now an instructable http://www.instructables.com/id/4xiDraw/ but the details of the pen mechanism are not very detailed. It is just the servo lever that pushes up the carriage (pen-up) and gravity (maybe a spring can help) to push it down. Command M3 S100 (or another number) will allow you to set the level to a certain angle. M5 is equivalent to M3 S0.
Unknown said…
Cordial saludo. muchas gracias por toda la información la cual me ayudo mucho para completar mi maquina.
misan said…
de nada :-)
Unknown said…
great job! what size linear shaft?
misan said…
8mm, there is an instructable with more details www.instructables.com/id/4xiDraw/
Unknown said…
ok thanks you!)
Unknown said…
please tell me how to set up restrictions on X and Y?
misan said…
What do do you mean restrictions? Limiting travel range of one axis?
Unknown said…
yes.is it possible to put limit switches?
misan said…
Yes, it is possible do put limit switches (look grbl info for that). It is possible to limit the length of axis too, again look for guidance here https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.9
Carlos P said…
Hola buenas, estoy montando un 4xidraw, enhorabuena por el trabajo realizado, queria preguntar si podia subir un par de fotos donde se vea como está montado en el centro donde los rodamientos ya que no consigo montarlo de forma correcta con los manuales de instructables y demás. Me falta por poner la correa.
misan said…
http://imgur.com/2PF3Kza
Andres Amorin said…
Felicitaciones por un buen laburo Miguel!. Consulta: conseguiste los rodamientos y smoth rods acá en Uruguay o los importaste?
misan said…
Hola Andrés: Los pedí a Aliexpress (pero no estoy en Uruguay).
Unknown said…
Hi Miguel,
thank you for this, I am putting one together at the moment.
Is a 2A x 12v wall wart enought o power the whole thing if the modification with the wire is done?
My Nema 17 motors specification says 1.6 amps each but I dont know under what conditions they draw this 1.6 amps.
Also My 8mm rosa are 600 long, would it work at 600m x 600mm?
Thank you,
George
Ireland
misan said…
I reckon 12V 2A will be ok. Motors cannot be run at 1.6A per coil with the drivers we use but more around 1A each, plus switch coils draw and return current to the power rails. Moving cart uses around 80mm so total motion is always lower than rod length. What would worry me is the stability of a machine this size (it can tilt as the arm with the servo moves back and forth. Let us know how it goes.
Unknown said…
Hi Miguel,
Thank you for replying. I couldn't find the website again to thank you,
it seems you have a few websites on the go.
I am putting my 4xidraw together and making it a bit bigger to take an A3 page but I bought the 3d printed parts online in PLA and they all just broke when pushing in the bearings etc. I have re-ordered them in ABS. To be fair, they are very cheap.
I have no experience of 3d printed parts but it seems that, structurally, the are a bit borderline; hopefully the ABS will be better.
Thank you for all the work.
George
misan said…
Hi George,

Yep, different activities on several blogs :-)

Sorry to hear you got some parts not up to the task. I am still intrigued on whether A3-size will work ok stock or if some extra weight will need to be added to the base to prevent it from tilting. I prefer ABS parts too. 3D printed parts can be quite robust if printed well. Main problem with PLA is it gets soft with temperature (motors can get hot and a PLA part could bend).

Thank you for your kind donation.
Unknown said…
l dif The 4xiDraw .it is moving diogonsl in x and y Axis.when l move manually in g-code sender
Unknown said…
ali gokus said...
l did The 4xiDraw .it is moving diagonal x and y Axis.when l move manually in g-code sender
misan said…
This is usually happening because you have not enabled COREXY on GRBL firmware.
Jim said…
Thanks for the info and grbl version. I was pulling my hair out, and I have none, trying to figure out why my steppers would not move correctly when I sent G1 X10. I didn't know about H-bot configuration. Plugged your grbl in and away it went, pen servo and all.
Wonder how many others buy a cheap Axidraw kit and wonder why it doesn't work?

Popular posts from this blog

VFD control with Arduino using RS485 link

How to get sinusoidal s-curve for a stepper motor

Stepper motor step signal timing calculation