# Teacup: firmware made simple, newbies wanted

Posted by Traumflug
 Teacup: firmware made simple, newbies wanted June 01, 2015 08:35AM Registered: 10 years ago Posts: 7,612
Teacup Firmware just completed its Teacup Configtool. Let me put some pitching here to celebrate this :-)

What do users answer when you ask them what they want? "I also want this", "I also want that", "... additionally ..." Yet the iPad with its feature set much smaller than that of a laptop is currently one of the most wanted devices on the planet.

Meet Teacup firmware. Focusses on the essentials, refined for years. Does only what's actually needed and does that right. Hundreds of hours went into improving these fine details which are barely visible, yet make the distinction of a pleasurable experience. For example, step losses simply don't happen because it follows the laws of physics precisely. But, well, so far all these configuration M-codes were missing, calibration was a command line experience.

Meet Teacup Configtool. Suddenly, all these M-codes are obsolete! Change your configuration in a graphical interface, hit the upload button and be done. So much easier than juggling with host softwares, than juggling with M-codes, than juggling with configuration files. Adjust, click, be done.

We did it!

Why I'm writing all this? Well, we're developers. We know exactly how this thing works. If something goes wrong, we know how to fix it in seconds and barely recognize such events. As such, handling Teacup is always easy to us, even when compiling it from the command line.

But is it easy for you? That's what actually matters! Here we need your help. Newbies, inexperienced printer owners, those who don't know what "C" or "Python" means. Now you can tell us and help to hone and further simplify what's already easy.

To start helping, please ... well, simply look at the documentation, the few steps to get started are written down there: [reprap.org] . That's it, you can connect with Pronterface and start printing.

Didn't work? Tell us! Even try to abuse it and tell us how you got it killed! Whatever you don't understand or isn't intuitive for you in this GUI: tell us! Here or, even better, on Teacup's issue tracker: [github.com] (green button)

Didn't I promise one-click changes? Go ahead, try it! Change a value, select upload and you're done. No manual neccessary, all value fields show help if you hover over them.

P.S.: big Thank You to @jbernardis, who wrote almost all of the GUI code.

 Generation 7 Electronics Teacup Firmware RepRap DIY

 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 09:23AM Registered: 6 years ago Posts: 869
Quote
Traumflug
For example, step losses simply don't happen because it follows the laws of physics precisely.

Damn all those firmwares that break the laws of physics!
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 10:51AM Registered: 10 years ago Posts: 7,612
Quote
cdru
Damn all those firmwares that break the laws of physics!

Jugding by the number of step loss problems reported in this forum, some apparently do.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 11:02AM Registered: 10 years ago Posts: 7,612
Quote
youssefaly97
Hello, I was wondering how well are LCD and button controlls are working in Teacup as well as the SD card ?

There are some loose ends (Git branches) implementing this, but all people wanting such support so far were too lazy to even test these efforts. It's a cruel world, no free lunch.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 11:04AM Registered: 5 years ago Posts: 5,232
If it follows the laws of physic, why does a newbie user have to fill in all the acceleration/max/min -stuff? I expect a one button GUI, called autotune and that´s it
-Olaf
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 11:49AM Registered: 5 years ago Posts: 977
Quote
o_lampe
If it follows the laws of physic, why does a newbie user have to fill in all the acceleration/max/min -stuff? I expect a one button GUI, called autotune and that´s it
-Olaf

Teacup itself follows the laws of physics i.e. generates step pulses at correct intervals to generate proper motion. The GUI is used to configure the parameters of such proper motion. The only "autotune" button that has enough knowledge of reality to generate proper configuration values for each and every printer in the world is (possibly) inside your brain, and it is called "intelligence".

Markus, congratulations! Anything that makes 3D printers easier to build/configure is a Good Thing (tm) imo. I really have to try Teacup ASAP.

Edited 1 time(s). Last edit at 06/01/2015 11:52AM by AndrewBCN.
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 12:06PM Admin Registered: 12 years ago Posts: 12,628
... some years ago Delcam developed a sort of 'autotune' configuration for their 6/8-axes milling software called "machine DNA"- it runs a positioning and milling job with varying values and 'developes' an optimal settings list based on the detected/measured errors.

So why not programming the same behaviour for the RepRap-printers

Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 12:15PM Registered: 10 years ago Posts: 7,612
Quote
o_lampe
I expect a one button GUI, called autotune and that´s it

No need to whine, you can put action to your words: patches are welcome.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted June 01, 2015 01:04PM Registered: 6 years ago Posts: 814
Congrats, If I can fin someone to make one of those SinapTec boards I'm going to put this to use...
 Re: Teacup: firmware made simple, newbies wanted June 07, 2015 06:55AM Registered: 10 years ago Posts: 7,612
Thanks for all the support, this survey brought some cruicial fixes for Windows users. Developers forgot that executables there have an .exe extension :-)

What next? Even smoother stepper movements? Finally this LCD support?

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted June 07, 2015 07:20AM Registered: 5 years ago Posts: 977
Hi Markus,

Here is my personal wishlist for Teacup. Note that I fully understand that there is a need to keep the main Teacup code as small as possible, so take all my wishes as optional compile-time modules where applicable.

1. LCD support for two LCD controller types, the standard LCD2004 Smart controller panel, and the Full Graphics 12864 Controller.
2. Delta kinematics support, fully debugged and performance optimized. I am willing to contribute the code for the simple G30 A auto-calibration procedure for linear delta printers here.
3. Indeed, jerk control would be nice if it can be implemented elegantly enough.
4. A fully supported 32-bit version of Teacup for me to experiment on my Due + hacked RAMPS setup.
5. Support for M80/M81 to be able to remotely turn on/off the PSUs in my printers.
6. Support for M119 limit switch status reporting.
7. Support for M500/M501/M502 EEPROM related commands.
 Re: Teacup: firmware made simple, newbies wanted June 07, 2015 07:51AM Registered: 10 years ago Posts: 7,612
Quote
AndrewBCN
Note that I fully understand that there is a need to keep the main Teacup code as small as possible, so take all my wishes as optional compile-time modules where applicable.

That's not a problem. Useless stuff simply gets wrapped in #ifdefs, so not a single byte will end up in the binary if not enabled.

Quote
AndrewBCN
1. LCD support for two LCD controller types, the standard LCD2004 Smart controller panel, and the Full Graphics 12864 Controller.

We actually have two implementations already. One on the lcd branch, another one on the delta branch. Didn't decide which one to drop, yet, still have to do performance/size measurements.

Quote
AndrewBCN
2. Delta kinematics support, fully debugged and performance optimized.

There we have two, too. One on the delta branch, another one on the delta-temporal branch. I have no such printer, but a video demonstrating the former implementation exists.

Quote
AndrewBCN
3. Indeed, jerk control would be nice if it can be implemented elegantly enough.

I consider this to be fully implemented. What else do you want to "control"?

Quote
AndrewBCN
4. A fully supported 32-bit version of Teacup for me to experiment on my Due + hacked RAMPS setup.

Here exist three implementations, on the teensy3, on the teensy3.1 branch and another one elsewhere, using some kind of pseudo-OS. The developers bringing this in ... well, they plunked down the code and couldn't care less to make it compatible with ATmega code. Accordingly it bit-rots from the beginning.

Quote
AndrewBCN
5. Support for M80/M81 to be able to remotely turn on/off the PSUs in my printers.

Teacup handles this automatically. Just forget the idea you have to turn on your PSU, Teacup handles this as needed (if you turn on a heater or move a stepper). For immerdiate shutdown there's M0/M2.

Quote
AndrewBCN
6. Support for M119 limit switch status reporting.

Quote
AndrewBCN
7. Support for M500/M501/M502 EEPROM related commands.

EEPROM storage is deprecated entirely. Making everything configurable at runtime slows down performance and is pretty pointless if you have Configtool. Unless I missed something.

You see, the problem isn't implementing this or that. It's getting users into actually trying this code, giving useful answers. And to get developers to integrate their code. "It works for me" means, implementation is only half done.

And sometimes to get people away from the idea that Teacup is a cheap Marlin fake. Teacup does some things better, for a reason.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted June 21, 2015 11:07AM Registered: 5 years ago Posts: 790
Quote
Congrats, If I can fin someone to make one of those SinapTec boards I'm going to put this to use...

We have received from a company that makes pcb 3 samples.

Yesterday we ( lets be realistic inapTec, lol..) have finished soldering the components on the board, we will be performing new test and letting know the status. I have not received the board yet. Due i live like 700kms from sinaptec home. Also the company that did se t us the board is lime 400km from sinaptec home.

Here its the new picture of the board.

reprap.org/wiki/SinapTec

Regarding the config file i did created and posted some were here in the forum. but i have not tested yet.

Edited 1 time(s). Last edit at 06/21/2015 11:09AM by tatubias.
 Re: Teacup: firmware made simple, newbies wanted July 14, 2015 05:40PM Admin Registered: 10 years ago Posts: 730
Is Teacup Configtool eligible for bobc's bounty on the RepRap-meta-proto issue tracker?

Bounty described here: Create a configuration tool for RepRap firmware
 Re: Teacup: firmware made simple, newbies wanted July 14, 2015 07:14PM Admin Registered: 8 years ago Posts: 1,063
Quote
tatubias
Quote
Congrats, If I can fin someone to make one of those SinapTec boards I'm going to put this to use...

We have received from a company that makes pcb 3 samples.

Yesterday we ( lets be realistic inapTec, lol..) have finished soldering the components on the board, we will be performing new test and letting know the status. I have not received the board yet. Due i live like 700kms from sinaptec home. Also the company that did se t us the board is lime 400km from sinaptec home.

Here its the new picture of the board.

reprap.org/wiki/SinapTec

Regarding the config file i did created and posted some were here in the forum. but i have not tested yet.

i like the idea behind this board, i want to do something similar but with a more universal socket situation for the main processor chip so you could potentially plug in a board with either an arm/avr and in the future something like an xmos chip or even something fpga driven in the future

## -=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-

 Re: Teacup: firmware made simple, newbies wanted July 14, 2015 09:23PM Registered: 5 years ago Posts: 1,873
Quote

and in the future something like an xmos chip or even something fpga driven in the future
You must have some awesome ideas for what you want to do with all that horsepower
 Re: Teacup: firmware made simple, newbies wanted July 14, 2015 09:39PM Admin Registered: 8 years ago Posts: 1,063
Quote
JamesK
Quote

and in the future something like an xmos chip or even something fpga driven in the future
You must have some awesome ideas for what you want to do with all that horsepower

i have a few ideas which would go particularly well on the xmos chips (they are up to 32core and stackable)

however the point is more to do features we haven't even really thought of yet and being as future proof as possible,

## -=( blog )=- -=( thingiverse )=- -=( 3Dindustries )=- -=( Aluhotend - mostly metal hotend)=--=( Facebook )=-

 Re: Teacup: firmware made simple, newbies wanted July 15, 2015 05:41AM Registered: 10 years ago Posts: 7,612
Quote
JamesK
Quote

and in the future something like an xmos chip or even something fpga driven in the future
You must have some awesome ideas for what you want to do with all that horsepower

... and quite some time at hand to write all the code. Designing the hardware is certainly the more trivial part of such a task.

Quote
MattMoses
Is Teacup Configtool eligible for bobc's bounty on the RepRap-meta-proto issue tracker?

Bounty described here: Create a configuration tool for RepRap firmware

Uhm, yes, I think so.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted July 19, 2015 08:28AM Registered: 5 years ago Posts: 158
Hi
I'd like to try it but-
Can anyone offer some clues for Python installation (Win.7 x64)?

If I click configtool.py - I get the message;

Import error - no module named wx
Please install wxPython . . .

The wiki states;
Prerequisites
You need the same as when running Pronterface:
Python 2.7.x.
Matching wxPython.
avr-gcc and avrdude OR Arduino IDE (installed or just unpacked).
That's it, chances are good you have this installed already. . .

I already had Pronterface but there seemed to be no python installed

I have installed;

python-2.7.10.msi
wxPython3.0-win64-3.0.2.0-py27.exe

wxPython is installed in Python27\lib\site packages

There is a wx.pth file in there which lists the wx-3.0-msw folder.

In the python IDLE path browser, the wx folder is listed.

Now I'm a bit stuck. I've googled a bit but every error points towards path problems.

Suggestions welcome.

Ta

-a
 Re: Teacup: firmware made simple, newbies wanted July 19, 2015 11:31AM Registered: 4 years ago Posts: 31
Quote
I already had Pronterface but there seemed to be no python installed
That tells me you're using the precompiled version, do you run pronterface.exe or pronterface.py?

make sure you're not mixing 32bit and 64bit modules/python.
 Re: Teacup: firmware made simple, newbies wanted July 19, 2015 01:53PM Registered: 5 years ago Posts: 158
Thanks ntoff.
Yes pronterface.exe I believe.

I will double check but I think that I picked the 64bit versions of both.
I may try again with 32 bit versions.
-a
 Re: Teacup: firmware made simple, newbies wanted September 02, 2015 07:52AM Registered: 4 years ago Posts: 14
Hi

I wrote you a few weeks ago about trying this firmware with gen 3 electronics. By now the new stepper motor arrived and I have installed all printable upgrades.
On github you wrote that the configtool does not work for the extruder controller. Do I therefore just not define any heaters/sensors for the main board and manually configure the extruder controller?

thanks
 Re: Teacup: firmware made simple, newbies wanted September 02, 2015 08:32AM Registered: 10 years ago Posts: 7,612
I can only guess.

- There is no heated bed, so only one temp sensor.

- This temp sensor should be of type TT_INTERCOM.

- You have to go into extruder/ and build with the Makefile there, upload the result to the extruder controller in addition to uploading the firmware to the main controller.

- Which stepper motor? Is this a stepper motor driven extruder now? Then you configure this like any other controller.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted September 02, 2015 02:42PM Registered: 4 years ago Posts: 14
Yes, I found a spare stepper controller and did the ugly cable hack (3g 5d shield) here: [www.thingiverse.com]
Going by the schematics there and those for the gen 3 board here [reprap.org] I have figured out all the required pins

I do have a heated bed, which is connected to the extruder board as well. (The machine is an old cupcake: [forums.reprap.org] )

I guessed as much for the extruder. The question is mostly how to tell the main board where the heaters and temp sensors are. Or is the TT_intercom a special setting telling teacup to send and receive all temp data to/from the extruder board?
 Re: Teacup: firmware made simple, newbies wanted September 02, 2015 03:56PM Registered: 10 years ago Posts: 7,612
Quote
benj919
Or is the TT_intercom a special setting telling teacup to send and receive all temp data to/from the extruder board?

That's exactly the case.

 Generation 7 Electronics Teacup Firmware RepRap DIY
 Re: Teacup: firmware made simple, newbies wanted September 04, 2015 08:09PM Registered: 4 years ago Posts: 14
Ok, so far I managed to compile and upload the extruder software (I'll provide a patch once everything works, there were only a few small things) and I can compile/configure the gen 3 mainboard.
This works for moving the steppers etc. although I have to manually copy&paste the tx/rx pin definitions into the board config file (follow up on issue 179 on github, I have a fix for that as well)

The one thing not working are the temperature settings. I have defined an extruder and bed heater and the corresponding sensors respectively:
Quote
Heaters
Name     Pin      PWM
bed      AIO0     False
extruder AIO1     False

Quote
Temperature Sensors
Name       Type        Pin
bed        TT_INTERCOM AIO0
extruder   TT_INTERCOM AIO0


If this is the correct setup I have further problems...

For further questions and problems not related to the config tool do you prefer me posting to the main teacup thread or opening a new topic?
And a big thank you for the support so far
 Re: Teacup: firmware made simple, newbies wanted September 05, 2015 01:09PM Registered: 4 years ago Posts: 14
Quote
Heaters
Name     Pin      PWM
bed      AIO0     False
extruder AIO1     False

Quote
Temperature Sensors
Name       Type        Pin
bed        TT_INTERCOM AIO0
extruder   TT_INTERCOM AIO0


To answer my own question, this setup is wrong in two ways:
first, the AOIx pins define the index in the communication with the extruder, therefore they should be numbered in ascending order and in the same order as in the extruder.
second, in order to fulfil this first requirement, I had to add more pins to the "\def TEMP_SENSOR_PIN" section in the board config. As the pin's _ADC channel number is used for the indexes, the valid pins are AIO0-AIO7

Hence my config now looks like this:
Quote
Heaters
Name     Pin      PWM
extruder AIO0     False
bed      AIO1     False

Quote
Temperature Sensors
Name       Type        Pin
extruder   TT_INTERCOM AIO0
bed        TT_INTERCOM AIO1

 Re: Teacup: firmware made simple, newbies wanted February 24, 2018 01:30PM Registered: 7 years ago Posts: 10
hm, as a newbie with Teacup,
I can definitely say, needs more documentation.
My gratitude for that, Traumflug. Nice piece of work.
But for the Teacup firmware. Well, it's just not plug and play.
EDIT: "Got configtool to work properly on Debian. At least for saving files.
But by no means getting it to compile yet. And as for pinouts. Still a mess.
With the port settings. I've got no idea where to begin.
I've read (skimmed) the source codes of most of the files.
But i have no idea how it's actually working of how it's defined.
to many layers. And just not enough knowledge with (embedded) programming.
I have tried what benj919 wrote.
Didn't work either. Am getting a whole bunch of errors when compiling.
all related to the port settings.
And some of the related to undeclared function names.

So, any here willing to enlighten me?
Maybe help me with compiling a working version of the firmware for my Gen7 v2.0 ARM
and perhaps help with writing a good document on each of the source file?

Unlike the older marlin version (before 3 years ago), it's a bit rough to learn
and consider it a plug and play firmware.
Still, i like most of the source code, as it's much smaller then Marlin.