Scara Bot!

So I couldn’t really test it that well because I couldn’t figure out how to get sandify to give me scara gcode that wasn’t bugged.
I resorted to finding gcode that was already made up in scara mode. It just didn’t feel like a good solution to me. I can only use the few gcode files I can find that are in scara format. Maybe I’m doing something wrong with the sandify?
Also some of my end goals are to connect the table to an app / my computer to upload new designs. I’m not exactly sure how to get the Arduino to do that.
I bought all these boards for this table so if one of these boards makes this easier then I’m here for it.

Yes I did see his post!! It’s translates really well with my iPhone. I’m going to spend the day reading through the whole post today. I saw it was 100+ comment thread so I wanted to be able to sit down somewhere and read it really throughly.

Where did you find 3 mm thick aluminum and how much did it cost you?

I bought a Arduino mega and a ramps 1.4 board. Still can not figure it out :joy:
Marlin is complicated. GRBL is definitely more my speed.

Hallo
beim Ramps und Marlin kann ich dir helfen
und weiss wie es funktionieren sollte und sicher auch beir funktionieren wird.
Bei GRBL kann ich dir leider nicht helfen.

3mm ALU hab ich bei mir in der Schule bekommen sollte aber jeden Metall verarbeitende Betrieb für ein Paar Euro bekommen.

servus Klaus

Jeffeb3 du sprichst mir aus der Seele

Also als erstes musst du den Arduino beschreiben.
Dazu musst du den Arduino mit deinem PC über USB verbinden.

Dann vogende Datei herunterladen:

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

Diese Datei auf den Arduino mittels der IDE software spielen.

Jetzt musst erst in der IDE deinen richtigen Arduino auswählen.
und jetzt die heruntergeladene Datei auf den Arduino spielen.

Jetzt vom USB trennen und Spannungsfei arbeiten.

Als nächstes müssen am Ramps alle Jumper unter den Treibern (X+Y) eingesteckt werden.
Jetzt können die Treiber in das Ramps gesteckt werden
Jetzt noch 2 Endstop an X und Y und der erste Zauber ist fast vorbei.

12V Spannung an das Ramps geben
und den Strom an den Treibern einstellen.

Wenn du soweit bist Geht es in Marlin weiter.

Wir brauchen die Anzahl der Zähne am Motor und am Antrieb um weiter zu machen.

Mein Roboter hat folgendes:

  • Übersetzung von 20 Zähne auf 60 Zähne auf beiden Achsen
  • TMC2008 mit 16 Microsteps
    ((200 x 16)/6)x3 =1600 Mikroschritte / Umdrehung

Jetzt verwenden wir eine Druckersoftware wie Octoprint um in Marlin deine oben berechneten Microschritte zu speichern.

M92 X1600 Y1600
M500

Jetzt müsste dein Scara betriebsbereit sein.

Wenn du Jetzt Octopi auf deinem PI installierst hast du alles um Bilder auf deinem SCARA-Bot zu zeichen.

Bilder werden auf Sandify erstellt und beim Export auf Thetarho auswählen und diese Daatei dann in Octoprint hochladen.

Dein Glas ist aber gross und dick hab ich gelesen,
bin gespannt was du für Magnete brauchst um die Kugel zu bewegen.

servus Klaus

Hmmm. Ok. Maybe I broke something.

Klaus, have you tried a file recently from sandify using the scara output?

I will try to carve out some time later to look more closely at it.

The backup is to take the thetarho output and run it through the python script I made originally:

Ist schon einige Zeit her dass ich die letzte Zeichnung gemacht habe da der Tisch immer noch im Schaufenster des FabLab der Uni in Bozen steht und dort meine voreinstellten Bilder malt.

Ich werde demnächst meinen Tisch zurückholen.
Ich hab ein paar neue Ideen aber nur zum Tisch nicht zur Mechnanik.

Einen Tisch aus Beton gedruckt in Vornoi Design

Sousa-Phone

Mal schauen ob das was wird.

servus Klaus

1 Like

I did some testing of sandify’s scara output. From the post I linked, the basic math is this:

alpha = acos(rho) * 3 / pi
X = theta + alpha
Y = theta - alpha

The 3/pi just converts from radians to our 6/rotation units.

I made a very simple shape, a single loop of a square, 100x100 on a 250mm polar table. I exported it as thetarho (5.6 KB) and scara.gcode (6.3 KB)

thetarho.gcode (5.6 KB)
In the theta rho file, I found the 5 major points (where the rho was the largest):

0.78540 0.40000
...
-0.78540 0.40000
...
-2.35619 0.40000
...
-3.92699 0.40000
...
-5.49779 0.40000

Theta rho draws nothing but arcs, so to make straight line segments, sandify breaks all of the lines into many dozens of coordinates to follow, so there were a lot of other lines in there.

I made a table to convert those key coordinates into scara gcode:

theta rho X Y
0.7854 0.4 1.857 -0.357
-0.78540 0.4 0.357 -1.857
-2.356 0.4 -1.143 -3.357
-3.927 0.4 -2.643 -4.86
-5.498 0.4 -4.143 -6.357

I also grabbed the same pattern in scara gcode output. Since the shape is rotating around one way, both motors end up rotating a full circle between the beginning and the end. So these coordinates make sense, right?

-4.143 - 1.857 = -6.000 
-6.357 - -0.357 = -6.000

Those are both one full rotation from start to finish.

And just scrolling through (I am just scanning the X values to look for matches and checking the Y values), I see these lines:

G01 X1.857 Y-0.357 ;;
...
G01 X0.357 Y-1.857 ;;
...
G01 X-1.143 Y-3.357 ;;
...
G01 X-2.643 Y-4.857 ;;
...
G01 X-4.143 Y-6.357 ;;

I added the ;; comments to make it clearer.

That’s doing exactly as predicted. Which isn’t a surprise, because I am only confirming my own model :slight_smile:. The question remains, why would the gcode you found that went through my scripts be different than the gcode that you’re getting from sandify? Maybe there is a setting missing? Maybe there is a procedure that is missing?

The grbl controller should work very well for you. I don’t think trying to write any embedded code is the solution. We just have to figure out what is wrong with the gcode generation, or the procedure.

1 Like

I’m at work right now I will open sandify and try it here maybe it’s something with my computer at home?
I’ll upload the file in a min
I’ll screenshot all the screens too.

I do not have a raspberry pi. If I wanted to do it this way do I have to get a raspberry pi?
I will try and download that sketch you linked. I could not find a sketch that would just load onto my board.
I think we have the same ratio for our gears actually. My micro steps are very similar. I also got 1600 with the math and then I fine tuned it and found 1618 to give me exactly the right rotation.

so I copied the setting you had exactly on my computer at work and sandify worked here. I checked the gcode and it is extacly the same as the file you uploaded…
I am almost 100% sure I did the same procedure at home but maybe not?
I am off in a few hours and I will try the gcode at home again and see what kind of result I get now.

1 Like

WE GOT IT!!!
That is so exciting
So I am not sure if this is a thing or not?
One of my motors points up and the other one points down.
So the wiring for each axis is different I guess?
And for sandify i needed to export as Scara and have a value of 1 for RHO.
CHECK IT OUT GUYS


Thankyou so much everyone
Now to finish the table up and get end stops working and a way to talk to the bot without plugging it into my computer

4 Likes

That looks an awful lot like a square!

Two things I noticed:

  1. Is that scale about right? Try increasing the initial size of the shape so it fills the preview and make sure that ends up with a full size on your machine.
  2. I think both motors are reversed. The square should drive clockwise 1/8 and then drive counter clockwise through the square.



3 Likes

4 Likes

scale seems right to me. These other ones I did filled the area the bot could reach.

the image might be mirrored but I will double check on this.

1 Like

You guys are literally the best thankyou so much for all the help. I am not sure what did it in the end. I did a fresh install of google chrome. Fresh install of Arduino ide. Fresh install of GRBL and UGS. I found the motors plug into the CNC shield in opposite directions ( at least with my build)

I still have a few things to work out here! I have to make the felt I have underneath the sand have 0 overlaps ( the ball gets stuck on the little ridges). I have to adjust the voltage for the drivers. I have to finish the wood working for the rest of the table and find something to put on top of this for a lid. I have to tidy up the LEDS and put them on a relay with a switch. I have to get something that will allow me to connect wirelessly to the table. I only want one power cord coming out of it.

2 Likes

Those sound like good problems to have. Congratulations. Have fun.

1 Like

That’s compensating for the one pointing up and the other pointing down. Generally “flipping” the plug reverses the direction of the motor. Reminder to power down the whole system before changing any motor wiring.

Yep i learn slow and it cost me 4 drivers. If my memory was 1 second faster i would save tons of time and monies. Take the time to think out the moves before you start. I wish i did😡

1 Like