Polarsandtisch

I’m sorry, I don’t speak Italian or German, and my Spanish is pretty bad. So I guess we are stuck with google translate. I will try hard to avoid errors in my English.

I will keep trying as long as you do. I’m sure we can figure it out together.

Here is where we created a conversion from “ThetaRho” from sandify to X, Y for a SCARA machine:

Here is another post, in the same topic. This uses the raspberry pi as the controller, instead of a separate board:

You should be able to run sandify from a pi to create patterns. If you are running it locally, you can also easily make changes for your machine.

There is another program called sandypi. It is brand new, but it should be great for your project. It saves patterns on a raspberry pi and provides a neat interface to choose them.

Hi Klaus,
great start on your scara sand table! Looks awesome :smiley:
I’m on the other side of those Alps you mention :mountain:

@jeffeb3 already pointed you in the right direction. You have 90% of what it would take to use our software on your sandtable. But instead of using the Arduino to control the motors, we directly output the step/direction signals from the RPi. These are sent to a DRV8825 stepper driver. As Jeff already solved the math for translating from the scara setup to theta/rho (in the post he linked above), all you would need is to combine the two :+1:

Hi

First of all, thank you for the help from this forum.
I have received many suggestions and I am still reading (we are still a long way from understanding).

Today the silent blocks which will hold the glass plate later arrived.
I bent the holder and immediately found a small problem.
The arms are too long and hit the silent blocks.
Will draw your arms around to make it fit.

In the meantime I’ve also described the Arduino Mega with Marlin Ramps 1.4 I’ve equipped drivers.
At the moment i want just to get the arms turning.

I will report on.

If you see something that you don’t like,

get in touch.

Servus Klaus

2 Likes

1 Like

Guten Tag

Wollte mal ein Update geben.
Der Arm ist soweit mechanisch fertig.
Bei der Software (Marlin) bin ich an meine persönlichen Grenzen gestossen.
Habe im Internet viel gelesen und eigendlich erst jetzt herausgefunden dass es keine wirklich funktionierende sofware für einen MP oder Single Arm Scara gibt.

Was kann ich tun das diese Projekt doch noch zu einem Erfolg führt?

Habe RPI-3, Arduino Mega, Ramps1.4, closed Loop Motroren (Nema 17)

Danke in Voraus
Klaus

1 Like

Don’t be discouraged. We can get there together.

First, Roman uses a raspberry pi, and has wired in some drv8825 drivers and wrote some sandtrails software to do the scara mechanism all from the pi.

Later in that same thread, Jchaplain123 made a scara table, and the two motors were driven by Marlin.

I wrote a python script that can be ran in the browser to convert sandify thr files into the Marlin x, y command you would need to run a scara table in Marlin. That isn’t a complete work, but it is close, and I suspect @jchaplain123 and @ratnaweera and myself would be happy to help with any questions you have.

I think it’s very possible for you to not need to write or edit any software, but you may need to try to understand what it is doing, and tune some of the settings for your build. For example, Marlin uses steps/mm to determine how much to rotate each arm. But you will set it for steps/deg to match the output from the python script.

1 Like

Danke Erstmal für die Hoffnung,

als erstes danke Danke @jeffeb3 dass du dir die Zeit nimmst. :innocent:

Das mit den Schritten pro Grad hab ich gelesen und versucht zu berechnen. :pensive:
Am Motor (Nema 17 mit 16 Microschritten )habe ich ein Zahnrad mit 20Zähnen, die dann auf die Welle des Dreh-Armes mit einem GT2 Riemen auf 60 Zähnen Übersetzt wird. die Arme haben eine länge von 155 mm

(200Stepps*16Microstep) * 3Umdrehunhen am Motor / (2GR2Riemen * 40GrossesZahnrad-Kleinen Zahnrad)

Was die Motortreiber angeht, dachte ich mit den Closed Loop Treiber Geht das sogar besser da diese den Winkel bereits kennen und keine Endschalter benötigen.

Vielen Dank für eure Hilfe

200 steps/rotation * 16microsteps/step * 60T/20T * 1rotation/360degrees = 26.67steps/degree.

This is easy to verify by setting the steps/unit to 26.67 and then commanding a distance like 180degrees. If it’s right, it will stop at 180. If it’s off by 3x, or 9x, it will be pretty obvious.

I don’t think closed loop will help you at all. The steppers count very accurately and there isn’t much use for actually knowing the position. The trick is that you have to know at least the angle where the arm is straight. It would be good if the other motor knew where it’s zero position was, but if you get that wrong, squares will still be square, they will just not be upright on the table. Since the Marlin controller doesn’t support closed loop, I would just abandon that idea and use open loop motors. If you can’t create a good way to set the zero position, you can still get it working by making sure the arm is straight and pointed at the 12 o’clock position when you plug in the machine. After that, it will count very accurately and will probably never be wrong. if it does get wrong, you can just power cycle it. In this way, you can get your table scribbling in the sand, and find the energy to create an endstop later.

Guten Tag

Inzwischen hab ich an der Mechanik noch einiges umgebaut.
Es wurde ein Spanner für den Riemen eingebaut, um alles straffer zu machen.

Die Arme welche aus Plexiglas gefertigt waren sind leider abgebrochen und wurden aus Alu neu gebaut.

Mechanisch ist alles Super.

Bei der Software komme ich hingegen gar nicht weiter.
Ich habe inzwischen 6 verschiedene Marlin Versionen Versucht zu konfigurieren und muss leider sagen ich schaffe es nicht die Motoren richtig anzusteuern.

Bis jetzt habe ich versucht die Servo - Motoren vom Raspbery Pi aus
über einen Arduino Mega mit Ramps zu steuern.

Ich habe große Probleme Marlin richtig zu konfigurieren.

Könnt ihr mich auf den richtigen Weg bringen?

Ich zweifle langsam daran ob es eine gute Wahl war,
ein Scara anstatt eines XY zu bauen (auch wenn er mir viel besser von der Mechanik gefällt)

danke
Klaus

1 Like

Are the motors regular bipolar motors? Can you share a picture of the arduino and ramps wired up?

It should be a pretty normal configuration of Marlin, and then sending Gcode to move a little. Then we can work out the details. This is a really interesting project, so I am willing to get a bit more involved. We should be able to figure it out together.

Guten Abend

Hab am Projekt Scara Sandtisch weiter gemacht.

Die Arme der Sandplatten Halter sind jetzt nun aus Aluminium hergestellt,
da die ersten aus Plexiglass hergestellt wurden und
dieses Material zu spröde für diese Anwendung und deswegen gebrochen ist.

Der Riemen vom Äuseren Arm hat jetzt einen Spanner bekommen damit er straffer anliegt


Mechanisch ist der Scara sehr gelungen.

Mich quält aber immer noch meine Inkompetenz bezüglich der Programmierung.

Ich habe sehr viel Elektronik von anderen zu Teil aufgegebenen Projekten rummliegen.

  • Arduino Uno mit CNC Shield
  • Arduino Mega mit Ramps 1.4
  • RPI 3 +4 mit HAT Stepper driver
  • Nema 17 Bipolar Motoren

Könnt ihr mir bitte zur besten Auswahl der Hardware helfen und bei Programmieren auch.
Habe es mit Arduino Mega und Ramps 1.4 mit Marlin versucht
aber komme aber nicht wirklich weiter.

Habe versucht die neueste Version von Marlin zu konfigurieren, ich war erfolglos.
Habe Marlin Vitaminrad erfolglos versucht.

Ich zweifle so lansam das Marlin überhaupt das richtige für einen SCARA ist.

Also hab ich michh in Linux CNC versucht, auch da hab ich keinen Druchblick.
So langsam komme ich an meine persönlichen Grenzen.

Könnt ihr mir bitte helfen den richtigen Weg zu finden.

Danke Klaus

1 Like

Glad to see you again. I hope you are doing well. The machine came back much stronger, by the looks of it.

The way I see it, there are two main options:

  1. Flash with a very simple Marlin. Marlin will not know it is a scara machine, it will just be moving two motors. I worked through this with another scara bot and the conclusion is that you would be able to take any .thr pattern and convert it into gcode that looks like rectangular code, but is actually the two angles. Marlin won’t know the difference. This is my preference, because it is using very common tools, except for the very simple script to do the conversion. The script and the equations I used are in a post I linked earlier.

  2. Use the python script on a raspberry pi to control the arm directly. I linked to that post earlier. It doesn’t use linuxcnc, but setting up a raspberry pi takes a bit of reading and there are not many users. The first user finds half the problems. The second users finds about half of what is remaining, etc. So being the second user without the knowledge to fix issues can be frustrating. But it is basically exactly what you’re looking for.

If you want to start down option 1. Then start with the mega/ramps and this firmware:

https://github.com/V1EngineeringInc/MarlinBuilder/releases/download/508/V1CNC_Ramps_Dual-2.0.7.2-src.zip

It isn’t a perfect fit, but it should be able to spin the motors and let us test some gcode.

Do you have any endstop sensors?

Ja ich habe 2 Reedkontakte als Endstops montiert um eine Start/Home position zu haben.

Neat!

Don’t try to home with this firmware. It is expecting too many endstops.

https://github.com/V1EngineeringInc/MarlinBuilder/suites/1728007278/artifacts/32713996

This version should home X and Y. You may need a github account to see it (it is from our nightly builds).

This is the post where I worked out how to convert a thetarho (thr) file into the X, Y gcode for a scara table:

In that post, there is a link to a website, repl.it where I posted some code that will run in the web browser. You can take a thr file from sandify.org and upload it to that site, run the code, and download a gcode file that should work for your machine. It assumes 0,0 is fully extended, and up.

repl.it

The other arbitrary part is how many motor rotations is one “Unit” in Marlin. Marlin thinks everything is in mm, but we are moving a motor in an angle. In the script, I set MOTOR_X_UNITS_PER_ROTATION for each motor to 6. What this means is that in the gcode output, if I send the motor from 0 to 6, it will do one full rotation. For the elbow, I should stay between 0 and 3, since it only goes one half of a rotation.

Marlin will convert that arbitrary unit into a count of steps to send to the motor driver. This is accomplished with the configuration variable DEFAULT_STEPS_PER_MM. You can change this on a running system by sending M92 X<xsteps/unit> Y<ysteps/unit>.

I’m going to make some guesses here:

  • I’m assuming a 1:1 ratio from the motor shaft to the arm angle.
  • I’m assuming you have drv8825s in the RAMPS
  • I’m assuming you have all the jumpers installed underneath them (1/32nd microstepping)
  • I’m assuming you have 1.8deg steppers, or 200 whole steps/rotation.

200 steps/rotation * 32 microsteps/step * 1rotation/6units = 1066microsteps/unit

So the command to set that would be: M92 X1066.7 Y1066.7. To save that, you would send M500.

Once that is set, a command like: G1 X3.00 F60 should move from 0 to 180 degrees in 3 seconds.

If we get that far, we are doing really good. At that point, you should be able to run this file.

Danke
Als erstes muss ich mich bei [Jeffeb3] bedanken der sich um mein Problem kümmert.

Ich lese den Beitrag immer und immer wieder durch um alles richtig zu verstehen.
Leider brauche ich noch ein paar Tage um alles umzusetzen da mir momentan die GT2 Riemen fehlen und diese erst im neuen Jahr geliefert werden.

Ich gebe nicht auf.
Nun zu den Einstellungen:

  • das Verhältnis Motor / Antriebszahnrad = 3:1 (20:60 Zähne)
  • im Ramps habe ich 8825 Motortreiber
  • alle Jumper sind gesetzt (32 Microschritte)
  • 1.8°Stepper mit 200 ganze Schritte pro Umbrehung

Die Armlänge von Mitte auf Mitte beträgt 155 am äuseren und 155 mm am Inneren Arm.
Als Sand wird Schnee-weiser Laaser Marmor -Staub verwendet, welcher aus einem Absetzbecken eines Steinmetzes stammt.

In der Zwischenzeit habe ich auch noch eine Vorrichtung gebaut um die LED Alu-Schiene welche den Sand begrenzt rund zu biegen.

Bis die Riemen da sind werde ich mich um den Holztisch kümmern in welchen die Mechanik danach eingebaut wird.

servus
Klaus

Ok, so the steps/mm should be 3x larger.

The 155/155mm is good, and it makes no difference to the result. The thr files are normalized between 0,1 and Marlin is really controlling angles. It would be more complicated if they weren’t equal lengths, but nothing major.

You really are making a beautiful machine. I look forward to seeing it assembled.

Hallo Jeffeb3

ich hab mal eine Frage.
ist es möglich in Sandify noch eine weitere Sandtisch Form wie “Scara” einzufügen um die Berechnung direkt dort zu machen?

servus
Klaus