TinyG

From ShapeOko
Jump to: navigation, search

Fully integrated motion controller from Synthetos.com
Vendor: synthetos.com
Link: http://www.synthetos.com/wiki/index.php?title=Projects:TinyG
Link: https://github.com/synthetos/TinyG
ShapeOko Defaults: https://github.com/synthetos/TinyG/wiki/TinyG-Shapeoko-Setup

TinyG is a complete stepper driver hardware system. It is a port of grbl to the Atmel xmega that runs on the TinyG hardware.

Features:

  • 6 axis motion (XYXABC axes)
  • jerk controlled motion for acceleration planning (3rd order motion planning)
  • status displays ('?' character)
  • XON/XOFF protocol over serial
  • runs a limited JSON interface over USB serial (like REST w/o the HTTP) for easier integration with upstream controllers
  • tgFX is a Java FX2 controller we are developing to run TinyG (see the Synthetos github page)

Hardware:

  • Four stepper motors supporting X, Y, Z and A axes, or double up on any axis for dual-gantry support
  • 8x microstepping
  • 2.5 amps per winding (bipolar steppers)
  • 12v-30v motor voltage supported
  • Independent controls and dynamics per axis
  • Motor connectors plug compatible with RepRap and Makerbot electronics
  • Uses TI DRV8811 stepper drivers. These are extremely robust and we've never seen one blow up, nor have heard of anyone else who has blown one up.


More details: http://www.synthetos.com/wiki/index.php?title=What_is_TinyG

Software to Control TinyG:

  • tgFX is available to control TinyG. The most recent version seems to have problems actually sending Gcode and/or configuring the motors. It is actively being worked on. You can find it at https://github.com/synthetos/tgFX
  • There is a fork of Universal Gcode Sender by John Lauer that supports TinyG's JSON formatting for sending Gcode. This has been shown to work quite reliably for sending large amounts of Gcode to your TinyG. It is available at https://github.com/johnlauer/Universal-G-Code-Sender


Here's a discussion of the differences between grbl+grblShield and TinyG http://www.shapeoko.com/wiki/index.php/TinyG-or-grblShield



TinyG Profile for Shapeoko

I can clean this up in a bit, but for now here's the header file I use to setup a TinyG profile for Shapeoko.

/*
 * settings_shapeoko375.h - Shapoko 375mm table
 * Part of TinyG project
 *
 * Copyright (c) 2010 - 2012 Alden S. Hart Jr.
 *
 * TinyG is free software: you can redistribute it and/or modify it 
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation, either version 3 of the License, 
 * or (at your option) any later version.
 *
 * TinyG is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 * for details. You should have received a copy of the GNU General Public 
 * License along with TinyG  If not, see <http://www.gnu.org/licenses/>.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
/* Note: The values in this file are the default settings that are loaded
 * 		 into a virgin EEPROM, and can be changed using the config commands.
 *		 After initial load the EEPROM values (or changed values) are used.
 *
 *		 System and hardware settings that you shouldn't need to change 
 *		 are in system.h  Application settings that also shouldn't need 
 *		 to be changed are in tinyg.h
 */

/***********************************************************************/
/**** Shapoko 375mm profile ********************************************/
/***********************************************************************/

#define TINYG_CONFIGURATION_PROFILE "Shapeoko 375mm"	// displays base config profile

// **** common settings - applied to all axes or motors ****

#define JUNCTION_DEVIATION	0.05		// default value, in mm

// **** system settings ****

#define JUNCTION_ACCELERATION 200000	// centripetal acceleration around corners

#define STATUS_REPORT_INTERVAL_MS	0	// in milliseconds

#define GCODE_DEFAULT_PLANE			CANON_PLANE_XY
#define GCODE_DEFAULT_UNITS			MILLIMETERS
#define GCODE_DEFAULT_COORD_SYSTEM	G54
#define GCODE_DEFAULT_PATH_CONTROL 	PATH_CONTINUOUS
#define GCODE_DEFAULT_DISTANCE_MODE ABSOLUTE_MODE

#define COM_APPEND_TX_CR			FALSE
#define COM_IGNORE_RX_CR			FALSE
#define COM_IGNORE_RX_LF			FALSE
#define COM_ENABLE_ECHO				TRUE
#define COM_ENABLE_XON				TRUE

#define ENABLE_ACCELERATION 1			// *** NOTE: this feature is disabled in 338.11 - always equal to 1 

// *** motor settings ***

#define M1_MOTOR_MAP X					// 1ma
#define M1_STEP_ANGLE 1.8				// 1sa
#define M1_TRAVEL_PER_REV 34.5			// 1tr
#define M1_MICROSTEPS 8					// 1mi		1,2,4,8
#define M1_POLARITY 0					// 1po		0=normal, 1=reversed
#define M1_POWER_MODE 1					// 1pm		TRUE=low power idle enabled 

#define M2_MOTOR_MAP Y
#define M2_STEP_ANGLE 1.8
#define M2_TRAVEL_PER_REV 34.5
#define M2_MICROSTEPS 8
#define M2_POLARITY 1
#define M2_POWER_MODE 1

#define M3_MOTOR_MAP Z
#define M3_STEP_ANGLE 1.8
#define M3_TRAVEL_PER_REV 1.25
#define M3_MICROSTEPS 8
#define M3_POLARITY 0
#define M3_POWER_MODE 1

#define M4_MOTOR_MAP A
#define M4_STEP_ANGLE 1.8
#define M4_TRAVEL_PER_REV 360			// degrees per motor rev - 1:1 gearing
#define M4_MICROSTEPS 8
#define M4_POLARITY 0
#define M4_POWER_MODE 0

// *** axis settings ***

#define X_AXIS_MODE AXIS_STANDARD		// xam		see canonical_machine.h cmAxisMode for valid values
#define X_VELOCITY_MAX 16000 			// xvm		G0 max velocity in mm/min
#define X_FEEDRATE_MAX X_VELOCITY_MAX	// xfr 		G1 max feed rate in mm/min
#define X_TRAVEL_MAX 170				// xtm		travel between switches or crashes
#define X_JERK_MAX 5000000000			// xjm		yes, that's "5 billion" mm/(min^3)
#define X_JUNCTION_DEVIATION JUNCTION_DEVIATION	 // xjd
#define X_SWITCH_MODE 1					// xsm		1=switches enabled for homing only
#define X_SEARCH_VELOCITY -1000			// xsv		move in negative direction
#define X_LATCH_VELOCITY 100			// xlv		mm/min
#define X_LATCH_BACKOFF 2				// xlb		mm
#define X_ZERO_BACKOFF 1				// xzb		mm

#define Y_AXIS_MODE AXIS_STANDARD
#define Y_VELOCITY_MAX 16000
#define Y_FEEDRATE_MAX Y_VELOCITY_MAX
#define Y_TRAVEL_MAX 170
#define Y_JERK_MAX 5000000000			// 5,000,000,000
#define Y_JUNCTION_DEVIATION JUNCTION_DEVIATION
#define Y_SWITCH_MODE 1
#define Y_SEARCH_VELOCITY -1000
#define Y_LATCH_VELOCITY 100
#define Y_LATCH_BACKOFF 2
#define Y_ZERO_BACKOFF 1

#define Z_AXIS_MODE AXIS_STANDARD
#define Z_VELOCITY_MAX 1200
#define Z_FEEDRATE_MAX Z_VELOCITY_MAX
#define Z_TRAVEL_MAX 50
#define Z_JERK_MAX 50000000				// 50,000,000
#define Z_JUNCTION_DEVIATION JUNCTION_DEVIATION
#define Z_SWITCH_MODE 1
#define Z_SEARCH_VELOCITY -400
#define Z_LATCH_VELOCITY 100
#define Z_LATCH_BACKOFF 2
#define Z_ZERO_BACKOFF 1

#define A_AXIS_MODE AXIS_STANDARD
#define A_VELOCITY_MAX 3600
#define A_FEEDRATE_MAX A_VELOCITY_MAX
#define A_TRAVEL_MAX -1
#define A_JERK_MAX 20000000				//			20,000,000
#define A_JUNCTION_DEVIATION JUNCTION_DEVIATION
#define A_RADIUS 1
#define A_SWITCH_MODE 1
#define A_SEARCH_VELOCITY -600
#define A_LATCH_VELOCITY 100
#define A_LATCH_BACKOFF -5
#define A_ZERO_BACKOFF 2

#define B_AXIS_MODE AXIS_DISABLED
#define B_VELOCITY_MAX 3600
#define B_FEEDRATE_MAX B_VELOCITY_MAX
#define B_TRAVEL_MAX -1
#define B_JERK_MAX 20000000
#define B_JUNCTION_DEVIATION JUNCTION_DEVIATION
#define B_RADIUS 1
#define B_SWITCH_MODE 1
#define B_SEARCH_VELOCITY -600
#define B_LATCH_VELOCITY 100
#define B_LATCH_BACKOFF -5
#define B_ZERO_BACKOFF 2

#define C_AXIS_MODE AXIS_DISABLED
#define C_VELOCITY_MAX 3600
#define C_FEEDRATE_MAX C_VELOCITY_MAX
#define C_TRAVEL_MAX -1
#define C_JERK_MAX 20000000
#define C_JUNCTION_DEVIATION JUNCTION_DEVIATION
#define C_RADIUS 1
#define C_SWITCH_MODE 1
#define C_SEARCH_VELOCITY -600
#define C_LATCH_VELOCITY 100
#define C_LATCH_BACKOFF -5
#define C_ZERO_BACKOFF 2

// *** DEFAULT COORDINATE SYSTEM OFFSETS ***

#define G54_X_OFFSET 0			// G54 is traditionally set to all zeros
#define G54_Y_OFFSET 0
#define G54_Z_OFFSET 0
#define G54_A_OFFSET 0
#define G54_B_OFFSET 0
#define G54_C_OFFSET 0

#define G55_X_OFFSET 0			// but the again, so is everyting else (at least for start)
#define G55_Y_OFFSET 0
#define G55_Z_OFFSET 0
#define G55_A_OFFSET 0
#define G55_B_OFFSET 0
#define G55_C_OFFSET 0

#define G56_X_OFFSET 0
#define G56_Y_OFFSET 0
#define G56_Z_OFFSET 0
#define G56_A_OFFSET 0
#define G56_B_OFFSET 0
#define G56_C_OFFSET 0

#define G57_X_OFFSET 0
#define G57_Y_OFFSET 0
#define G57_Z_OFFSET 0
#define G57_A_OFFSET 0
#define G57_B_OFFSET 0
#define G57_C_OFFSET 0

#define G58_X_OFFSET 0
#define G58_Y_OFFSET 0
#define G58_Z_OFFSET 0
#define G58_A_OFFSET 0
#define G58_B_OFFSET 0
#define G58_C_OFFSET 0

#define G59_X_OFFSET 0
#define G59_Y_OFFSET 0
#define G59_Z_OFFSET 0
#define G59_A_OFFSET 0
#define G59_B_OFFSET 0
#define G59_C_OFFSET 0

Personal tools
Namespaces
Variants
Actions
About
Additional Build Information
Using Your Machine
Software
Upgrades
Additional Resources
ShapeOko 1 Build Instructions
wiki
Toolbox