Re: Project: Teacup Firmware February 22, 2016 02:25AM |
Registered: 12 years ago Posts: 7,616 |
Quote
Wurstnase
For example, filament diameter can change while printing and it could be needed to change the flow (or e-steps).
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware February 24, 2016 10:27PM |
Registered: 7 years ago Posts: 75 |
Re: Project: Teacup Firmware February 25, 2016 03:29AM |
Registered: 12 years ago Posts: 7,616 |
Quote
rollingdice
For those without EEPROM, M-codes should works to check calibration, but the user needs to recompile using Configtool to make the changes permanent.
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware February 27, 2016 08:13AM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware February 27, 2016 08:53AM |
Registered: 12 years ago Posts: 7,616 |
Quote
bisky
What am I doing wrong?
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware February 27, 2016 02:04PM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware February 27, 2016 03:47PM |
Registered: 12 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware February 28, 2016 04:35AM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware February 28, 2016 06:04AM |
Registered: 12 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware February 28, 2016 08:29AM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware February 28, 2016 10:14AM |
Registered: 12 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware March 01, 2016 02:10AM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware March 01, 2016 04:18AM |
Registered: 8 years ago Posts: 4,977 |
Triffid Hunter's Calibration Guide | --> X <-- Drill for new Monitor | Most important Gcode. |
Re: Project: Teacup Firmware March 01, 2016 07:19AM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware March 01, 2016 07:50AM |
Registered: 12 years ago Posts: 7,616 |
Quote
bisky
This original teacup repo dos not contain the board which I try to upload the firmware to.
Quote
bisky
The file and pinout included in attachment.
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware March 01, 2016 11:46AM |
Registered: 7 years ago Posts: 7 |
Re: Project: Teacup Firmware March 01, 2016 11:50AM |
Registered: 12 years ago Posts: 7,616 |
Re: Project: Teacup Firmware March 05, 2016 09:46AM |
Registered: 7 years ago Posts: 75 |
Re: Project: Teacup Firmware March 05, 2016 02:37PM |
Registered: 12 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware March 05, 2016 08:42PM |
Registered: 7 years ago Posts: 75 |
Re: Project: Teacup Firmware March 06, 2016 05:02AM |
Registered: 12 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware March 06, 2016 10:10AM |
Registered: 7 years ago Posts: 75 |
Re: Project: Teacup Firmware March 09, 2016 08:39AM |
Registered: 7 years ago Posts: 75 |
Re: Project: Teacup Firmware March 09, 2016 09:36AM |
Registered: 12 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware March 09, 2016 10:14AM |
Registered: 7 years ago Posts: 75 |
Quote
Traumflug
Looks great!
Regarding this precision thing ... is it actually neccessary to calculate them in Configtool? At the first glance it looks to me as if they could be calculated inside the Teacup source code just as well. Can even be done with floating point math, as float calculations with constants are optimised away.
D:\Dropbox Banitama\Dropbox\Project\3D Printer\Teacup_Firmware\dda.c:46:32: warning: initializer element is not a constant expression const int32_t delta_tower1_x = (int32_t)(cos(DegToRad(TOWER_X_ANGLE_DEG)) * DEFAULT_DELTA_RADIUS) >> 4;
Re: Project: Teacup Firmware March 10, 2016 06:58AM |
Registered: 12 years ago Posts: 7,616 |
Quote
rollingdice
I get warnings when compiling:
D:\Dropbox Banitama\Dropbox\Project\3D Printer\Teacup_Firmware\dda.c:46:32: warning: initializer element is not a constant expression const int32_t delta_tower1_x = (int32_t)(cos(DegToRad(TOWER_X_ANGLE_DEG)) * DEFAULT_DELTA_RADIUS) >> 4;
int32_t delta_tower1_x; delta_tower1_x = (int32_t)(cos(DegToRad(TOWER_X_ANGLE_DEG)) * DEFAULT_DELTA_RADIUS) >> 4;
#define SIN(x) x - (x * x * x) / (2 * 3) + (x * x * x * x * x) / (2 * 3 * 4 * 5) ... (add a few more terms)This is simply a taylor series, like found here: [schools-wikipedia.org] Such preprocessor math isn't too complicate to write, but needs some testing (comparison with a proven function), as some of the traditional algorithms have pitfalls.
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Project: Teacup Firmware March 10, 2016 07:39AM |
Registered: 8 years ago Posts: 4,977 |
Triffid Hunter's Calibration Guide | --> X <-- Drill for new Monitor | Most important Gcode. |
Re: Project: Teacup Firmware March 10, 2016 09:17AM |
Registered: 11 years ago Posts: 44 |
Quote
Traumflug
The preprocessor can do the very basic math functions, only. This is addition, substraction, multiplication, division, shifts. Everything else has to be calculated at runtime, so it can't be used as initialiser. This should work without warning:
int32_t delta_tower1_x; delta_tower1_x = (int32_t)(cos(DegToRad(TOWER_X_ANGLE_DEG)) * DEFAULT_DELTA_RADIUS) >> 4;
Quote
Traumflug
There are ways to deal with this. If DegToRad() is a macro (defined with a #define) it'll be computed at compile time. An example is ACCELERATE_RAMP_LEN(speed) in dda_maths.h.
#define PRECOMPUTED_EXP(x) exp(x) double foo = PRECOMPUTED_EXP(0.5)but the machine will still call the exp function at runtime. Some expressions are pre-computed, but it is a compiler-dependent feature. gcc pre-computes sqrt(CONSTANT), for example, but not exp(CONSTANT). The compile-time sqrt feature is relatively recent in gcc, but I think it pre-dates Arduino toolchains.
Re: Project: Teacup Firmware March 10, 2016 09:54AM |
Registered: 7 years ago Posts: 75 |
Quote
Traumflug
There are ways to deal with this. If DegToRad() is a macro (defined with a #define) it'll be computed at compile time. An example is ACCELERATE_RAMP_LEN(speed) in dda_maths.h.
A preprocessor-compatible sine could look like this:
#define SIN(x) x - (x * x * x) / (2 * 3) + (x * x * x * x * x) / (2 * 3 * 4 * 5) ... (add a few more terms)This is simply a taylor series, like found here: [schools-wikipedia.org] Such preprocessor math isn't too complicate to write, but needs some testing (comparison with a proven function), as some of the traditional algorithms have pitfalls.
Re: Project: Teacup Firmware March 10, 2016 10:53AM |
Registered: 12 years ago Posts: 7,616 |
Quote
rollingdice
It seems that 4 iteration is practical for this implementation, since DEFAULT_DELTA_RADIUS rarely goes bigger that 1,000,000 um (1 meter).
I'm gonna add the macros in dda_maths.h.
Generation 7 Electronics | Teacup Firmware | RepRap DIY |