Firmware for embroidery machines and custom stepper motors control.
 
 
 
Go to file
Martin f105aa05b5 Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
.gitignore Some cleanup and fixes. 2018-07-12 02:05:39 +02:00
Makefile Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
README.md Configuration update for tiny plotter. 2018-09-09 21:27:40 +02:00
arduino.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_32U4.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
arduino_168_328p.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_644.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_1280.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_lpc1114.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_stm32f411.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_usb1286.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
arduino_usb1287.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
boards.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
config.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
debug.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
gcode_parser.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
gcode_parser.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
homing.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
homing.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
kinematics.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
kinematics.h Some refactoring 2017-02-19 19:15:53 +01:00
maths.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
maths.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
motion_planner.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
motor.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
motor.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
msg.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
msg.h initial commit 2017-02-19 17:50:07 +01:00
pinio.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
pinio.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
queue.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
queue.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
ringbuffer.h initial commit 2017-02-19 17:50:07 +01:00
runsim.sh Some cleanup and fixes. 2018-07-12 02:05:39 +02:00
sensors_control.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
sensors_control.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
serial.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
serial.h Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
simulavr_info.h initial commit 2017-02-19 17:50:07 +01:00
teathimble.ino Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
teathimble.ino.c Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00
timer-avr.c Added board configuration scheme. Code refactoring and some updates with teacup. 2018-09-08 01:41:22 +02:00
timer.h Refactor of homing code by merging teacup snippets and added option of movement triggered by sensor interrupt. 2018-09-25 04:41:58 +02:00

README.md

Teathimble

Teathimble is a minimalistic firmware intended to control variety of stepper motor based machines. It runs on most AVR (so arduino as well) microcontrollers and fits into ATmega16 MCU, providing great base for many projects. Teathimble is a trimmed fork of Teacup - lean and efficient firmware for RepRap printers by Triffid Hunter, Traumflug, jakepoz, many others.

Features

  • Minimalistic code.
  • Communication via buffered serial and text commands (G-code).
  • True acceleration, interrupt based, with look-ahead and jerk calculation planning.
  • Integer only math to save cpu cycles for performance boost.
  • Up to 4 axis in straight or coreXY kinematics scheme.
  • Decent performance: can run up to 48'000 evenly spaced steps/second on 20 MHz as mentioned by core developers.

Work progress

For coli winder machine check this branch. Current code is checked on custom made arduino-like board top on ATmega32 to control winder. It is just a matter of formality to port configurations on other avaiable boards. You might also need this arduino core to turn custom board into arduino compatible. To run inside simple simulator build project with enclosed makefile, this might be come in handy for development.

Building

Most of the configuration is described and is in config.h file. To disable simulavr info sections, launch make with variable set SIMULFLAGS= Example command for flashing Arduino UNO: make flash MCU=atmega328p SIMULFLAGS= UPLOAD_PORT=/dev/ttyACM0, assuming that configuration is complete. Makefile contains paths configuration to arduino core or mighty core, they need to be set up correctly. Project does not use arduino libraries at all, it is just compatible with Arduio IDE which should be capable of whole compilation and memory programming task, just open the .ino file.

Source files description

Code is written in pure C.

Name Description
config.h Configuration constants definitions.
debug.c Debugging aids.
gcode_parser.c G-code interpreter, instructions and their actions definitions.
kinematics.c Separated code for different movement schemes.
maths.c Calculation stuff, functions, constants, tables.
motion_planner.c Ramping acceleration and lookahead related stuff.
motor.c A rather complex block of math that figures out when to step each axis according to speed and acceleration profiles and received moves.
msg.c For numbers parsing.
pinio.c Initialize all I/O.
queue.c The queue of moves received from the host.
serial.c Serial buffers and communication management.
teathimble.ino.c Code starts here.
teathimble.ino Same as above, allows firmware to be built in Arduino IDE.
timer-avr.c Timer management, used primarily by motor.c for timing steps.