Welcome! Log In Create A New Profile

Advanced

1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?

Posted by realthor 
1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 22, 2015 07:54PM
Hi Guys, I have a dilemma. I am building a 1-ARM scara with linear (albeit unorthodox) Z and I have ironed out most of the mechanical design choices. I am at the moment when I start thinking about controller/firmware. When I started the project I was thinking of using the Morgan branch of Marlin but even Quentin has moved over to smoothieware in the meantime. Of course I'd like the cheapest that this machine can run on so if Mega/Ramps would do I'd stick with that.

I was thinking Due/Ramps-FD but that would get me stuck with Marlin i guess, which doesn't have a good support for SCARA as far as Google could tell.

Is a smoothieboard compatible controller and smoothieware my best bet? I tend to favor smoothieware's noob friendly approach but the price is quite high, even Chineese clones aren't very cheap.

Thanks for your input.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 22, 2015 10:51PM
Wally required preprocessor software to do all the conversion X, Y to polar

I am not familiar with Morgan firmware / software.

Do you intend to do the conversion on the fly?
Slicer >>> G-code >>>> Arduino Ramps (XY to 1 arm commands) >>>> stepper motor output >>>> Lander?
or a unique slicer for your ! arm bandit?

I think you should look at a more capable CPU .... ARM 32 bit
but
as mechanically complex your printer --- I think firmware / software even more complex??
and the development of unique code for a one of a kind printer

confused smiley
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 23, 2015 06:45AM
That's not at all the case, the mechanical complexity is more in the eyes of the beholder smiling smiley. If I limit the movement of the arm up to the singularity (on one side only), the printer I designed is basically a Morgan without the assisting arms (single arm scara). Whatever Morgan is running onto I basically can use. As far as I know Morgan first started with Mega/Ramps1.4 now they use Smoothieware.

My question was about SCARA support in Marlin/Smoothieware and if anybody has recent experience with any of them. My bot is not ready - still quite a long way to go but i'm preparing for it.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 27, 2015 03:31PM
I guess not many people want to deal with SCARAs .. too bad we can't really print linear rods smiling smiley


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 28, 2015 05:55AM
Teacup firmware has a Scara implementation. Young, but said to be working. Small enough to fit on a controller as small as the Arduino Nano and also adjustable for 32-bit controllers.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 28, 2015 09:02AM
Indeed Teacup looks like a strong piece of software and I enjoyed reading the whole Project: Teacup thread. I sucked like a sponge the discussion about SCARA in about the middle of the thread but it soon faded away and to the end of the thread reports of failed attempts (by theothermike) got me wondering. I have no formal programming skills so I am useless with the software development. You guys talking there sure know what you are doing.

I will try though the Teacup SCARA on a sanguinolulu I have access to but this is as far as my knowledge goes about it. I am afraid I might end up hunting for Smoothie* stuff sad smiley.

Edited 3 time(s). Last edit at 06/28/2015 09:08AM by realthor.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 28, 2015 09:45AM
What are the equations of motion for your 1-arm SCARA printer? I'm wondering whether it would be straightforward to implement segmentation-free SCARA motion in RepRapFirmware for the Duet, much as I did for delta motion.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
June 28, 2015 11:16AM
I haven't yet done any such calculation but my printer is basically a Morgan, without the assisting arms. At least that is how I started, I pretty much wanted to have an already existing firmware as I am no programmer.
Here's a sketch of how the stepper move the arms. I have to dig out some math and trigonometry skills to do the calculations.



I am using spectra fishing line instead of timing belts but the principle is the same. From motor to pulley I have 8mm to 120mm diameters. Length of arms is 150mm.

When I started the design over at ConceptForge, Nicholas posted these equations:

Quote
Nicholas.Seward

Re: Ideas for the next Wally.

Postby Nicholas Seward » Wed Apr 15, 2015 3:23 am
Here are the kinematics for all the cases. They are all pretty simple and as I said in the last post the effects of miscalibration all look about the same.

Variable Definitions
L=length of arm
ma=mechanical advantage (This is what could be miscalibrated if you drive the machine with string.)
(r,theta)=polar coordinates
(a,b)=stepper positions

Inverse Kinematics
Case 1:
a=(theta-acos(r/(2*L)))*ma;
b=(theta+acos(r/(2*L)))*ma;

Forward Kinematics (Needed for end stop detection.)
Case 1:
r=2*L*cos((b-a)/(2*ma));
theta=(a+b)/(2*ma);

I was pretty busy learning mechanical engineering and CAD in the meantime, knew the math and firmware time would come but frankly I procrastinated as much as I could. Designing a new configuration bot is intimidating enough as is.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
July 14, 2015 09:45AM
@DC42: Was this info useful in any way? What RepRapFirmware are you talking about exactly?

I took a quick look in the Marlin for Morgan and I see variables defined for both arms, A and B. I only have 1-arm so I am not very sure how to modify the Marlin for Morgan, so if teacup has a 1-arm SCARA already I'd be happy to start digging into that. I just remember that the only SCARA implementation in teacup is Morgan style, which would again have to be modified for 1-arm style scara robots.

@Traumflug: is Robert Kuhlmann's variation committed to main now or should I look into [github.com]?

Thanks.

Edited 1 time(s). Last edit at 07/14/2015 09:51AM by realthor.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
July 16, 2015 07:02PM
Quote
realthor
@DC42: Was this info useful in any way? What RepRapFirmware are you talking about exactly?

I feel dumb, I just now stumbled upon RepRapFirmware as a name of a piece of software. I always took it as generic, a placeholder for Marlin, Teacup, etc. So now we have another firmware option without SCARA grinning smiley.
More and more often I regret not pursuing my career in programming.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
July 17, 2015 01:53PM
@Traumflug: I started learning bits and pieces about arduino IDE, git, teacup, configtool... it's a messy soup in my head right now. I installed a LinuxMint virtual machine in VirtualBox to get it easier with package management and all and managed to install arduino 1.0.5, wxPython, git and also downloaded Gen7 Arduino IDE Support. I managed to clone the git for the master and checked out to the scara branch and created a local branch to avoid messing up anything on git.

Now imagine that for a noob like me this is very mind bending.
I have run the configtool from master just to see how it looks before I checked out to the scara branch but I now realize that the scara branch doesn't have the configtool. There could be so many things that are different or missing since the scara branch hasn't been updated. The git webpage of the scara branch sais " This branch is 10 commits ahead, 224 commits behind master".

Ok, let's assume that I can work with the scara as is. I need some assistance on the next steps and for now I'd like to have the following sorted out:

1) Can I just copy the configtool from Master to scara branch? If that is possible, what files/folders (/configtool folder for example) should I "backport?" to the scara branch?

2) The board I am trying to use is a Sanguinolulu that has its chip changed to an Atmega1284p yet I don't see anywhere any file that would suggest this chip is covered. At least in scara branch. I see a mention of 1284p in the configtool/data.py in the master. But it should be pretty similar to the 1280 I guess.

How should I proceed to manage to compile a firmware and upload to the board?

Edited 1 time(s). Last edit at 07/17/2015 05:40PM by realthor.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
July 18, 2015 06:24AM
Quote
realthor
The git webpage of the scara branch sais " This branch is 10 commits ahead, 224 commits behind master".

Yupp, this is the result when people drop substantial amounts of code in a "works for me" status, then simply walk away. :-)

Quote
realthor
1) Can I just copy the configtool from Master to scara branch?

The better approach would be to rebase the scara branch to current experimental. Like described here: [github.com] Yupp, you initially you need 225 of these '^'.

That said, Configtool isn't essential for developers. All it does is to edit the config.h file in a convenient manner. Being used to use a text editor, it's just as fine to do these edits with this text editor.

Quote
realthor
2) The board I am trying to use is a Sanguinolulu that has its chip changed to an Atmega1284p yet I don't see anywhere any file that would suggest this chip is covered.

This chip is covered in some config.h templates for the boards supporting this chip, e.g. both Gen7 variants. To get it into the Sanguinololu templates, replace this:
#if ! ( defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644PA__) )
	#error Sanguinololu has a 644P/644PA! set your cpu type in Makefile!
#endif
by this:
#ifndef __AVR_ATmega644__
  #ifndef __AVR_ATmega644P__
    #ifndef __AVR_ATmega1284P__
      #error Sanguinololu has an ATmega 644, 644P or 1284P. Set your CPU type in the \
             Makefile or select your board in the Arduino IDE!
    #endif
  #endif
#endif

An ATmega1280 is pretty different from an ATmega1284. It's the last digit which gives the feature set.

Quote
realthor
How should I proceed to manage to compile a firmware and upload to the board?

For development the most convenient way is to install the tools:
sudo apt-get install geany make avrdude gcc-avr avr-libc
cp config.sanguinololu-v1.2.h config.h
cp Makefile-AVR Makefile
then to use geany to adjust the Makefile (lots of comments in there on how to do this), to build and to upload:
geany Makefile  # for editing, then save
make
make program

With this done I can help you on the rebasing. I have no such hardware, so I have to guess a lot. You know the hardware, I know the code, so together we should be able to get this Scara thing not only working, but also up to date, into Configtoool.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
July 18, 2015 12:24PM
Ok, this is a start. I wanted configtool because Arduino IDE was throwing strange errors while I was trying to compile. Now, with your suggestion, after choosing in Arduino IDE the 1284p chip via Tools>Board and copying the ThermistorTable.single.h to ThermistorTable.h as temp.c expects, I get:

config.h:382:58: error: ‘THERMISTOR_BED’ undeclared here (not in a function)
 DEFINE_TEMP_SENSOR(bed,       TT_THERMISTOR,  AIO6,      THERMISTOR_BED)
                                                          ^
temp.c:54:102: note: in definition of macro ‘DEFINE_TEMP_SENSOR’
 #define DEFINE_TEMP_SENSOR(name, type, pin, additional) { (type), (pin ## _ADC), (HEATER_ ## name), (additional) },
                                                                                                      ^

I think the next steps should follow now. Please correct me if I am wrong:

1) create a fork of the scara in the official github and rebase the experimental into the code (I don't exactly understand git yet but I guess rebasing will not overwrite any code that was modified for SCARA within the myriad of files in the branch; this way what I have in my local repo I could commit to the github branch and you can see exactly what I am talking about when you try to compile ...or whatevere other issues.

2) I will try to compile the code for my specific situation and will upload the firmware to the board. When the steppers will move I will start digging into the code to see where I must modify the kinematics equations.
Because every other SCARA implementation in firmware is only addressing one specific case, If I get any help from the smart guys around here, I would like to have implemented into the code the several SCARA configurations I know of:

- Morgan (presumably already implemented into Teacup by Robert Kuhlman)
- Vitaminrad's Marlin SCARA implementation (i guess same as heliumfrog), which is the classic one, having one motor rotating the shoulder joint and the other motor right onto the shoulder joint and rotating the forearm around the elbow (Single Arm Scara by vitaminrad )
- RepRap Lander (my current design), having both Motors behind the scara arms, one rotating the shoulder and the other one rotating the forearm via a redirect pulley. This should basically be able to use Morgan's scara equations but I am not sure yet how/if it differs in any way besides not having the assisting arms.

I don't know yet where these equations will go into the code but I imagine they can be included in the configtool. I will just select scara (instead of cartesian or corexy), then maybe the type of scara I'll be using, like Morgan or Lander /etc.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: 1-Arm SCARA support in firmware? Which one? Smoothieware best for SCARA?
July 18, 2015 01:03PM
Ok, got passed that... I defined in ThermistorTable.h the THERMISTOR_BED just as THERMISTOR_EXTRUDER in config.h, for which there was no error, so it must have been correctly defined.

// Names for our tables, so you can use them in config.h.
// Table numbering starts at 0.
#define THERMISTOR_EXTRUDER   0
#define THERMISTOR_BED   0  // <-- added this

Now I get:
dda.c: In function ‘dda_create’:
dda.c:226:5: error: ‘DDA’ has no member named ‘delta_um’
  dda->delta_um[X] = abs32(tmp_steps_x - startpoint_steps.axis[X]);
     ^
dda.c:228:5: error: ‘DDA’ has no member named ‘delta_um’
  dda->delta_um[Y]= abs32(tmp_steps_y - startpoint_steps.axis[Y]);
     ^

I saw that theothermike had the same issue at some point but I didn't understand exactly why this works I hope it doesn't circumvent any scara definitions. I have enabled LOOKAHEAD in config.h and it compiled allright. Just trying to understand here.

Quote
Traumflug
Quote
theothermike
dda.c:226: error: 'DDA' has no member named 'delta_um'
dda.c:228: error: 'DDA' has no member named 'delta_um'

Try with LOOKAHEAD defined as well. It's in config.h.


Edit: either enabling the experimental LOOKAHEAD did something else or the scara branch is not even tested by its creator sad smiley. I get the same behavior of having the motors hum but no movement just as theothermike. I tested also the scara fork of Marlin that vitaminrad has on git and that moved the motors as instructed. Something is not right with this branch and I think this has to be corrected, because as far as I can see on the forums, more and more people are experimenting with scara bots.

Edited 2 time(s). Last edit at 07/18/2015 02:19PM by realthor.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Sorry, only registered users may post in this forum.

Click here to login