41Views1Replies

Author Options:

XY plotter for artistic project Answered

Hi everyone,

I am a french artist, and I am starting a new project that involves some robotics and programming, parts for which I need some help.

I am planning on buying this machine :

http://elekslaser.eleksmaker.com/

And to use it as a pen plotter, trying to get the pen to behave as one of the particles visible on this site:

http://labs.minutelabs.io/Brownian-Motion/

I want the pen movements to be generated directly by the code of that simulation (which was shared with me by the creator).

My first question would be, does this seem feasible?

There seems to be some issues working with this particular machine on a Mac, so I wanna be sure that I buy the right tool for the project before even jumping into the programming phase.

Thanks!

Discussions

0
Downunder35m
Downunder35m

7 weeks ago

Mac..
Good that you mention this as it will make things a bit harder.
If you want to stick with only Macintosh then I strongly recommend to look for some kit to build a simple CNC router that has software support for the Mac.
Having said that...

Software here is relative as all those machines work like a CNC router or 3D printer.
For example on a cheap Arduino either something open source like Marlin asle and so on can be used.
The actual code for all these machines is called G-Code.
Whatever the software on the cupter has as input, like a 3D model or vector graphic will be translated into G-Code and sent to the machine.
If you have some basic understanding of Windows things would be much easier on a dedicated laptop or in a dual boot system/Wine.
If you can find a G-code generator for Mac or some open source software for CNC routers, be rotating or with a laser you have a good start.
I don't know enough about what is supported on a Mac and what not but the above hints should enable you to find quite a bit.

For your special needs:
If you have the code to generate this movements and know how to use and modify it you only need to program you own G-code generator.
For the start use whatever you can find for free that can run an open source 3D printer or engraver.
Use the documentation to set up your machine (kits are much cheaper and easier to deal with than your selection).
Once you have things like endstops and directions defined and can actually move the head or pen around you are half way there.
IMHO the best thing is that by then you have spend about 6 hours building your machineand about a day to configure all and get it working.
Means you know what you are doing to get things moving as intended.
Every software that can make your machine move as planned can also give you the G-code used for this.
There is a good Wiki about G-code in general and the commands used.
Right now you provide the required input as a drawing, model or whatever, tell the software where your workpiece is and once all is calculated the entire G-code is sent to the machine.
Your own G-Code generator will do the same.
I see two possible options depending on your requirements:

a) Translate the DOT movement on the screen into coordinates.
Means you translate from either the output calculation or what is used to generate the image on the screen to the dimensions of your plotter.
For example if the results on the screen are limited to 800x600 pixels you would define how many steps the motor have to make so that multiplied by 800 for x and 600 for y it matches your plotter.
This value then translates the output from the code your have into whatever measurements you want to use on the plotter, e.g. mm or Inches.
You define for how long in minutes or by lenght of the line the machine should draw.
This marks the end time for the G-Code generation and the entire code is send to the machine for actually drawing it.
b) Basically the same as above but to make it in realtime.
For this you send every line of G-code through a serial connection to the plotter.
In some cases it will make sense to send it in packets though but at the speed I saw in the video line by line should be fine.
Either way, what you want in the end is like an addon to the code you have for the dots.
You add the required translations for the movement and when the pen should go up or down and send it as G-Code out to your new toy.