Mesa de Arena Scara - Arduino uno - Arduino Mega?

Estoy intentando construir una mesa de arena para mi hijo, al principio pense que la parte mas dificil seria la construccion mecanica, pero nada mas equivocado, he comenzado construyendo un prototipo con materiales de mi alrededor para ir descubriendo errores y corregirlos en el modelo definitivo.
He buscado toda la informacion que he podido y cuanto mas leo y hago pruebas mas lejos me encuentro de poder completar el proyecto.
En la parte de software he descubierto un camino infinito para mi, he probado varias configuraciones de GRBL y pienso que no son los acertados.
He empezado por usar un arduino uno con una shield cnc para mover los motores, le he puesto dos finales de carrera para poder realizar homing, pero en cada prueba me suman lo errores y aumentando el desanimo, tambien dispongo de arduino mega con ramp, he visto que ambos arduinos son usados para el control de la mesa de arena e incluso raspberry, pero sinceramente cuanto mas informacion encuentro mas hundido en la ignorancia me encuentro, necesitaria ayuda para aclarar una gran cantidad de dudas, aclarar conceptos para conseguir realizar el proyecto.
Pongo algunas fotos de mi mecanica, no tiene un acabado profesional pero ahroa mismo es lo que tengo a mano y para ser un prototipo de prueba pienso que puede servir, gracias de antemano.

  • No se si se puede escribir en español o hay que hacerlo en ingles, tendria que usar el traductor de google en todo caso.

.

2 Likes

I am sure google translate will produce better spanish than me. :slight_smile:

What I have done for SCARA machines like this before, is to provide a script to convert .thr files into X and Y motor commands (which are compatible with gcode). We can start simple, and eventually, you’ll be able to make patterns in sandify, convert them, and play them on your grbl controller.

We are using very common tools, but we will be using them in ways they were never meant to be used. So it will take a little time and effort to learn it. There won’t be a manual :).

The machine you have, and the controller you have will work fine.

Universal gcode sender is a good tool to use from a computer to configure the machine and send/receive commands.

First thing:

  • Check the status of your endstops. If you set $10=19, then they will show up in the response to ?. LIM=000 means none are triggered. LIM=001 means that X is triggered and LIM=010 means that Y is triggered.
  • Check that a positive movement (or jog) goes clockwise for both motors.
  • Check that homing a specific axis goes towards the endstop.
  • Adjust the steps / mm to move one rotation on either arm with a command of 6 units (and drop the top speed way down).

That might be a long list. Or maybe you have most of that already. Let me know how far you get and where you get stuck. We can work through this together.

Spanish is fine (I can read it a little, but I use google translate anyway).

We can get this working.

OK, gracias por tu ayuda desinteresada, no es tan comun encontrar a quien te ayuda a navegar por un mar de luces cegadoras.

Me encuentro en la misma situacion, me apoyo en el traductor de google .
Bien, he entendido casi todo lo que me has dicho, dado que he encontrado a un buen tutor, voy a empezar de nuevo, te comento:
En primer lugar que configuracion de grbl instalo, modo cartesiano o modo coreXY? , ahora mismo configurado con grbl-cartesiano, esta bien? o debo cambiar a grbl-CoreXY?.

$10

Es correcto, cuando ordeno desde X=0 ir a X=+10, el brazo X gira en sentido de las agujas del reloj, y lo mismo ocurre con el brazo Y (podemos llamarle antebrazo?).

El homing esta activado y lleva el “iman” al centro, aqui, tengo una duda, en el movimiento de homing yo le tengo configurado que realice primero la aproximacion del motor Y (antebrazo o brazo Y) y posteriomente el motor X (brazo X), es buena esta configuracion o deberia cambiarla para que ejecute las dos aproximaciones a cero a la vez los dos motores?

En este paso me encuentro un poco perdido (posiblemente debido al traductor).

Entiendo comando de 6 unidades algo asi: G1 X6 (6 unidades = 6mm)?

$100

Yo encontre este link que parece ser bastante interesante tambien.
https://markroland.github.io/sand-table-pattern-maker/?pattern=cycloid

Leyendo en otro post he creido entender que lo que debo hacer es ajustar el numero de pasos de cada motor para que cuando se envie el comando G1 X6 el eje realice una rotacion completa de 360 grados es decir el brazo de una vuelta completa, es correcto mi razonamiento?

Cartesian.

You have $10=3. If you change it to $10=19, then you will start seeing the ‘LIM’ in the status. If you send a single question mark, you will see the status. With $10=3, it will not include the state of the endstop switches.

I don’t see a problem with that configuration. I don’t know your machine, or how it could be hurt by that configuration.

Grbl thinks we are using the machine in cartesian. If you send G1 X6. It thinks you want it to move 6mm. We want 6 to instead move around in one rotation. I picked 6 arbitrarily, but it is based on wanting numbers with good accuracy, but also not so huge when the machine makes 1000 turns.

Anither way to explain it is, I want 6 “units” per rotation. So each unit is 60 degrees. How many steps does it take to move 60 degrees? If you have a 200 step/turn motor. And 16 microsteps/ step driver, that is 3200 microsteps per rotation. It looks like you might have a 3:1 gear reduction. So the big gear rotates one time for 3200*3 microsteps or 9600 microsteps/rotation. That would mean the setting should be 1600 steps/“mm”. So you would set $100=1600.

This is a complicated subject even without the translator. So please ask if this isn’t clear.

Haha. I should have kept reading. Yes. That is correct.

You will be able to use that. You need to:

  • export the pattern to gcode.
  • Import it into sandify.
  • Set the machine type to polar
  • scale and move the pattern so it looks good to you
  • export in .thr
  • run the .thr through the script at repl.it.

I know it seems funny to get files in gcode and convert then to thr. But the thr output does some math that you need before sending it to the scara converter. I will be putting a scara gcode output in sandify in the next release. That just might be a month away.

He configurado $10=19, pero cuando envio “?”, no ocurre nada o casi nada, la respuesta es :

$H
ok
?
ok

Hmmm. Do you have an old version of grbl, or do I have my facts wrong?

That is supposed to tell you if each endstop is triggered. If you can work without that, then go ahead.

El calculo de los pasos/mm teniendo en cuenta el tipo de motor, reducciones, micropasos, tipo de husillo etc, lo tengo claro ya que me ha hecho falta para la construccion de mis CNC’s en las que tuve que calcular para la calibracion de los movimientos.

Lo que no entendia y sigo sin comprender es el numero 6, porque mover el eje 6 unidades debe corresponder a un giro de 360 grados, porque no usar 36 o 360, no acabo de entenderlo, soy bastante torpe algunas veces.

Entiendo que el proceso para crear un patron es usar sandify, configurar el tipo de maquina que tengo ( sistema polar ) y exportat como maquina polar, despues hay que ejecutar el archivo exportado (.thr) sobre el script repl.it. y se obtendra un archivo correcto para enviar a GRBL.
El script donde se puede conseguir y su modo de utilizacion.

It is an arbitrary scale I chose. It needs to match the script:

Repl.it script

The birth of this script comes from this post:

I will be incorporating this script into sandify. And I think I will need that 6 to be configurable.

Voy a intentar hacer alguna prueba para ver que los movimientos son acordes al dibujo elegido y por tanto el movimiento es correcto.

La version de GRBL que uso es “Grbl 0.9j”.

Hay algun tutorial de como utilizar sandify?
Y tambien como utilizar Script de Repl.it?

This link will guide you to an easy tutorial on creating your own tracks. There are 4 Episodes about creating tracks.
To use the Repl.it you need to download the main.py file into a folder.
Then you just put your .thr file in the folder too and click on the main.py file.
Note: The .thr file must have the name sandify.thr if not it will not work.
A file with the name transformed.gcode will be created and you’re finished. :grin:

1 Like

It’s really good.
I looked at other people’s plans, and they all used the ESP32 Development Board, which is strange to me. I want to try it with Arduino UNO board, but there’s no program, so I was wondering if I could share your Arduino program?

Hello, I’ve asked a lot of people about the ARDUINO UNO program, but no one has been able to help me with my sand table device. I’m seeing a lot of responses, and I don’t know if you can help me, but I’d like to get an Arduino sandbox program to finish my desk.

1 Like

I’m going to give answering your question a try, but note that I have not yet built a sand table, though I’ve been following and researching sand tables on this forum.

Background: Though there are exceptions, most sand tables I see are driven by g-code. There are two primary firmwares that handle g-code for these builds, Marlin and GRBL. There are two primary mechanical implementations for sand tables, rectangular (cartesian) and circular (polar). V1 engineering provides a design for the ZenXY which is a cartesian system, and they provide Marlin firmware preconfigured for the ZenXY for a few boards. In addition Jeffeb3 created and maintains the Sandify software used to create g-code to drive this table (and potentially other g-code-driven table designs).

Marlin is not going to run on an Arduino UNO. The cheapest Marlin solution I know of is the combination of Mega board and a Ramps 1.4 companion board. You can pickup the pair, plus the stepper drivers, plus a display for around $35 on Amazon.

If you want to use an Arduino Uno, you probably also want a companion board, and you will be running GRBL The cheapest solution I know of is an Arduino Uno plus a CNC Shield for $20 from Amazon. Note this package does not include a display and therefore you would need to drive your sand table from an attached computer (or some other g-code sender). If you go the GRBL route, you may have some hoops to jump through. For example, if you were to build V1’s ZenXY, the hardware is a CoreXY implementation. There will be some work to configure GRBL for CoreXY.

Another issue which I’m considering in my choices is noise. The low cost A4988 stepper drivers (which are in the packages I list above) make noticeable noise. Often the solution is to move to TMC drivers, but I’m unsure of the GRBL support for TMC drivers especially on the Arduino UNO. Another issue is that the two low cost solutions I list above (Ramps 1.4 + Clone Mega) and (CNC Shield + Clone Arduino UNO), have had quality issues in the past, plus they tend to be more delicate than more expensive, integrated solutions.

So in summary, you need to first figure out what sand table design you are going to build. That sand table will likely have a preferred firmware solution. That firmware choice will drive what control board(s) and microcontroller you need to purchase.

1 Like