TinyG mystery terminals

Discussion of tinyG control platform
Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

TinyG mystery terminals

Post by Christine88 » Sat Dec 06, 2014 5:49 pm

Looking at my TinyG board I see a lot of unused sockets and terminals that I have no idea what they are or what they do. I'm trying to understand so I can get the most out of the board. I see things like PDI socket and there are six terminals. Four are labeled enable, dir, step, gnd and two labeled gnd ss2 ss1 mos mis0 sck 3.3v gnd rx tx. Can somene explain what these are and what they could be used for?

WillAdams
Posts: 8608
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: TinyG mystery terminals

Post by WillAdams » Sat Dec 06, 2014 8:48 pm

I believe that the TinyG is also able to support an additional stepper driver which can be used for the extruder of a 3D printer. Doesn't the documentation describe this sort of thing? We do have a page on the wiki: http://www.shapeoko.com/wiki/index.php/TinyG and it notes 6-axis motion...

Hmm, is this a typo?
6 axis motion (XYXABC axes)
Should that be XYZABC axes?
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: TinyG mystery terminals

Post by Christine88 » Sat Dec 06, 2014 9:47 pm

WillAdams wrote:I believe that the TinyG is also able to support an additional stepper driver which can be used for the extruder of a 3D printer. Doesn't the documentation describe this sort of thing? We do have a page on the wiki: http://www.shapeoko.com/wiki/index.php/TinyG and it notes 6-axis motion...

Hmm, is this a typo?
6 axis motion (XYXABC axes)
Should that be XYZABC axes?
Beats me but I didn't know it supported a 3D printer. I wonder if one could make a 5 axis using the ABC axis?
Last edited by Christine88 on Sat Dec 06, 2014 9:54 pm, edited 1 time in total.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: TinyG mystery terminals

Post by cvoinescu » Sat Dec 06, 2014 9:48 pm

Actually, having looked at the TinyG source code a while ago, it's very clear it's limited to four motor drivers, and it's a hard limit. The firmware uses a port register mapping feature of the microcontroller, which is limited to four ports, and they use one per motor driver. It's impossible for TinyG to control more than four drivers without major code changes. The connectors J17 through J20 just give access to the signals for the existing drivers, in case you want to upgrade to bigger, external drivers. (Yes, it can handle six axes internally, but can only control four drivers; they never got around to implementing the logic to control additional drivers.)

The connector with MISO and MOSI signals (J13) is a SPI port. IIRC, it is not supported in the firmware (they planned to use it to control additional motor drivers, possibly by connecting two TinyG boards in a master-slave configuration). The only other non-obvious connector is J10, which is used to program and upgrade the firmware.

This is all in the documentation and in the schematics at https://github.com/TinyG (the manual is in the wiki, the schematics are in the hardware/ directory).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: TinyG mystery terminals

Post by Christine88 » Sat Dec 06, 2014 9:58 pm

cvoinescu wrote:Actually, having looked at the TinyG source code a while ago, it's very clear it's limited to four motor drivers, and it's a hard limit. The firmware uses a port register mapping feature of the microcontroller, which is limited to four ports, and they use one per motor driver. It's impossible for TinyG to control more than four drivers without major code changes. The connectors J17 through J20 just give access to the signals for the existing drivers, in case you want to upgrade to bigger, external drivers. (Yes, it can handle six axes internally, but can only control four drivers; they never got around to implementing the logic to control additional drivers.)

The connector with MISO and MOSI signals (J13) is a SPI port. IIRC, it is not supported in the firmware (they planned to use it to control additional motor drivers, possibly by connecting two TinyG boards in a master-slave configuration). The only other non-obvious connector is J10, which is used to program and upgrade the firmware.

This is all in the documentation and in the schematics at https://github.com/TinyG (the manual is in the wiki, the schematics are in the hardware/ directory).
Thanks for clearing that up some. But basically then the TinyG board really only supports XYZ?

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: TinyG mystery terminals

Post by cvoinescu » Sat Dec 06, 2014 10:04 pm

Christine88 wrote:Thanks for clearing that up some. But basically then the TinyG board really only supports XYZ?
No. It supports up to four axes, in any combination of linear and rotary, using any labels from the X, Y, Z, A, B, C set. (You can configure up to six axes, but only four can be assigned to motors, so the other two would not be usable; that effectively limits it to four axes.) They explain it very clearly in the docs.
Christine88 wrote:[...]I didn't know it supported a 3D printer.
Anything with four axes (three linear and one rotary) can be used for 3D printing, if you're patient enough to deal with the lack of specific features (e.g. temperature control) and are willing to apply some minimal processing to the G-code (to replace the extruder E "axis" with one of A, B, or C). However ,that's a bad idea. It would have made some sense years ago, but the dedicated 3D printer firmwares have come a long way since then and implement a lot of very useful features very specific to FDM -- you'd be crazy to mess with TinyG when Marlin and Repetier are so much better suited. About the only thing that TinyG has and Marlin lacks is third-order (jerk-limited) motion profiles.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: TinyG mystery terminals

Post by Christine88 » Sat Dec 06, 2014 10:18 pm

cvoinescu wrote:
Christine88 wrote:Thanks for clearing that up some. But basically then the TinyG board really only supports XYZ?
No. It supports up to four axes, in any combination of linear and rotary, using any labels from the X, Y, Z, A, B, C set. (You can configure up to six axes, but only four can be assigned to motors, so the other two would not be usable; that effectively limits it to four axes.) They explain it very clearly in the docs.
Christine88 wrote:[...]I didn't know it supported a 3D printer.
Anything with four axes (three linear and one rotary) can be used for 3D printing, if you're patient enough to deal with the lack of specific features (e.g. temperature control) and are willing to apply some minimal processing to the G-code (to replace the extruder E "axis" with one of A, B, or C). However ,that's a bad idea. It would have made some sense years ago, but the dedicated 3D printer firmwares have come a long way since then and implement a lot of very useful features very specific to FDM -- you'd be crazy to mess with TinyG when Marlin and Repetier are so much better suited. About the only thing that TinyG has and Marlin lacks is third-order (jerk-limited) motion profiles.
3D printing would be interesting but 5 axis CNC mill would be great. Are there any boards that support that?

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: TinyG mystery terminals

Post by cvoinescu » Sat Dec 06, 2014 10:39 pm

Christine88 wrote:3D printing would be interesting but 5 axis CNC mill would be great. Are there any boards that support that?
Yes!

The TinyG2 firmware (renamed G2) works on the Arduino Due with a RAMPS or similar board, and can handle six axes (X, Y, Z, A, B, C) and at least six motors, assigned arbitrarily to any of the axes (so if you have six drivers, you can have them do X Y Y Z A C, for instance).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

WillAdams
Posts: 8608
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: TinyG mystery terminals

Post by WillAdams » Sat Dec 06, 2014 10:49 pm

Yes:

http://www.omc-stepperonline.com/5-axis ... p-197.html

The problem is, the electronics is easy (for a certain value of easy), but the software is incredibly difficult, w/ very complex geometries and non-trivial calculations which have to be accomplished in hard real-time if one wants jerk-control, &c. I don't know of an opensource option for such.

The hardware is also kind of tricky in terms of balancing the weight and achieving a reasonable level of rigidity --- these folks have managed it for a small machine:

http://www.pocketnc.com/products/

but it's $3,500 or so and AIUI, they're still working on the software.
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: TinyG mystery terminals

Post by cvoinescu » Sun Dec 07, 2014 1:08 am

As far as I know, LinuxCNC, Mach3 and G2 already handle six axes with no difficulties -- including jerk control in G2. The really hard part, where no open-source solution exists (that I know of), is CAM.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Post Reply