Welcome! Log In Create A New Profile

Advanced

Project: Teacup Firmware

Posted by Triffid_Hunter 
Re: Project: Teacup Firmware
April 26, 2015 04:44PM
I am having trouble achieving stable temperatures on my J-Head hot end. The bed is fine, but the hot end, when set to 185 for example will fluctuate between 181 and 189. It's very rhythmic - the cycle from 181 to 189 and back to 181 takes about 25 seconds. Previously with Marlin, there would be some fluctuation when first reaching the temp, but it would settle in on 185 quickly and stay there. Not so with Teacup.

I have PID enabled, but the config file gives me no ability to enter values, so I guess it's starting out at P=8192, I=512, and D=24576 which are the defaults. I understand I have M130, M131, and M132 to set these values in EEPROM (which is enabled) but I don't know how to derive values I should try. I re-flashed Marlin and ran it's PID tuning, but the numbers I received were greatly out of scale with the Teacup default values.

As far as a temp table is concerned, I am using the configtool-generated table which is based on the EPCOS 100K from hotends.com. I used a 4.7K pull-up and a voltage of 5 (Arduino with RAMPS 1.4). I also just guessed a Beta value of 4406 since I saw that value in some posting.

If anybody could offer some assistance here, I'd greatly appreciate it.

Edited 1 time(s). Last edit at 04/26/2015 04:45PM by jbernardis.
Re: Project: Teacup Firmware
April 26, 2015 07:15PM
See [github.com]

And a tab in Configtool which figures these values would certainly not be rejected. For an algorithm, see [en.wikipedia.org]

BTW., I'm still excited about this Configtool. Your work! Thank you.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 14, 2015 01:14PM
Hi there,

I have a problem compiling the Teacup SCARA firmware...
I downloaded the scara branch zip file, unzipped the folder onto the Desktop, renamed it into "Teacup_Firmware", made a copy of "config.ramps-v1.3.h" and renamed it to "config.h", opened the "Teacup_Firmware.ino" and tried to compile.
At first, there was an error telling me to use "Tools --> repair & reload", what I did.
Afterwards I tried to compile once more and it tells me:

Arduino: 1.0.6 + Td: 1.20 (Windows 7), Board: "Arduino Mega 2560 or Mega ADK"
C:\Program Files (x86)\Arduino_1.06\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\variants\mega C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\analog.c -o C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\analog.c.o

C:\Program Files (x86)\Arduino_1.06\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\variants\mega C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\clock.c -o C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\clock.c.o

C:\Program Files (x86)\Arduino_1.06\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\variants\mega C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\copier.c -o C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\copier.c.o

C:\Program Files (x86)\Arduino_1.06\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\variants\mega C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\crc.c -o C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\crc.c.o

C:\Program Files (x86)\Arduino_1.06\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino_1.06\hardware\arduino\variants\mega C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\dda.c -o C:\Users\user\AppData\Local\Temp\build4818484504370941143.tmp\dda.c.o

dda.c: In function 'dda_create':
dda.c:226: error: 'DDA' has no member named 'delta_um'
dda.c:228: error: 'DDA' has no member named 'delta_um'
dda.c:164: warning: unused variable 'steps'
dda.c: In function 'update_current_position':
dda.c:936: warning: unused variable 'steps_per_mm_P'


Maybe someone can give me a hint to solve?

Thanks in advance
Mike
Re: Project: Teacup Firmware
May 14, 2015 03:45PM
Quote
theothermike
dda.c:226: error: 'DDA' has no member named 'delta_um'
dda.c:228: error: 'DDA' has no member named 'delta_um'

Try with LOOKAHEAD defined as well. It's in config.h.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 14, 2015 05:37PM
Great,
compiles without error.

Thank you so much !!!! :-))

Kind regards,
Mike
Re: Project: Teacup Firmware
May 17, 2015 07:36PM
I found a version earlier but cant find a thread on i of teacup firmware made for laser cutters All I need is x and y movement adn endstops. plus apin for firing the laser and a pwm pin for power. If i had too I would use a seperate arduino to regulate power because all I cut is 1./8" acrtylic it would be the same anyway.
Re: Project: Teacup Firmware
May 17, 2015 07:56PM
For just X and Y you currently have to define Z and E as well ... and ignore the latter two. Patches to change this are welcome, of course, some 50% of this work has been done already.

Power is like a heater without temperature sensor. Using M106 to regulate between S0 and S255. Simply remove the other heater and both temp sensors from the template.

The same could be used for the on/off pin, but I guess you'd prefer something which doesn't require explicite G-code. The X or Y enable pin might fit this bill well.

Wait, perhaps it's even better to define a DC extruder to operate this laser. This has both, PWM and on/off as well. Operated with M103, IIRC.

You also might prefer to use Teacup Configtool, which is currently on the experimental branch only. Only few known bugs left and we're happy to hear of the other ones. Much easier to use thean Arduino IDE. Start with ./configtool.py, load a board, load a printer (the closest to your actual one), then build & upload. Help is in the tooltips, simply hover over the individual fields.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 17, 2015 08:09PM
I already found a inkscape plugin that spits out pretty nice g-code [jtechphotonics.com] It lets me choose what commands for laser on and off and the power etc. all of the speeds you should check it out. Its default is m106 and 107 for on off with s commands for speed. If you could just have one pmw pin out for the speed command and one pin out for laser on and off that uses pwm that is all I should need. In the end no matter what system i get unless it works perfect I will likley setup a external arduino just to pwm the laser and use the control board to turn on adn off the laser high and low pin.

I saw another thread that says teacup does not support g2 adn g3 commands? if so would i just use find adn replace all g2 with g1 etc. would that work for curves and arcs? anyway the jtp laser tool inkscape plugin is just the foirst one I tried but it looks like it will work besides using g2 and g3 if that is the case.

Edited 1 time(s). Last edit at 05/17/2015 08:10PM by ghost2501.
Re: Project: Teacup Firmware
May 18, 2015 06:59AM
Quote
ghost2501
I saw another thread that says teacup does not support g2 adn g3 commands?

That's true. Nobody found this urgent enough to implement it so far.

Quote
ghost2501
if so would i just use find adn replace all g2 with g1 etc. would that work for curves and arcs?

Your G-code generator should be able to do this approxximation. Before you ask: those RepRap firmwares supporting G2 and G3 do an approxximation, too. LinuxCNC is one of very few controller softwares doing true curves.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 23, 2015 01:30AM
Quote
Traumflug
For just X and Y you currently have to define Z and E as well ... and ignore the latter two. Patches to change this are welcome, of course, some 50% of this work has been done already.

Power is like a heater without temperature sensor. Using M106 to regulate between S0 and S255. Simply remove the other heater and both temp sensors from the template.

The same could be used for the on/off pin, but I guess you'd prefer something which doesn't require explicite G-code. The X or Y enable pin might fit this bill well.

Wait, perhaps it's even better to define a DC extruder to operate this laser. This has both, PWM and on/off as well. Operated with M103, IIRC.

You also might prefer to use Teacup Configtool, which is currently on the experimental branch only. Only few known bugs left and we're happy to hear of the other ones. Much easier to use thean Arduino IDE. Start with ./configtool.py, load a board, load a printer (the closest to your actual one), then build & upload. Help is in the tooltips, simply hover over the individual fields.

So when you say a DC extruder you mean its for a non stepper motor extruder? does the command go something like m103 s127 do adjust the pwm? Basically I need a nice neat command to fire the laser on one pin and set the power (pwm) on another pin from one thing like m103 s127 would turn pin 1 high making the s127 part would make pin 2 do 50% duty cycle. Is that possible because I have no use for a pwm on off pin as I am stricktly laser cutting and need the laser on 100% of the time durring cuts but I still need to set its power.

This is where I go back in a circle and havent yet seen a good solution yet and it seems like I will just set my power manually with a potentiometer or another second arduino as the power pin on a co2 laser power supply can be constantly pwm'ed or given a 0-5v analog and it dont matter unless the laser on off ttl signal is fired on a seperate pin.

This is also where I get nervous about all the talk of acceleration and lookahead etc. it may be nice for 3d printing or even a pen plotter on paper but a laser cutter is always on the edge of not cutting through or cutting through too far and causing flare up or fire ( matters a lot more for me as I cut mirrored acrylic and too much power can cause heat damage). I Imagine the laser uses a constant power and the controller moves at a constant speed while in g1 moves. It can't accelerate or ramp etc. around curves or it would mess up the laser cut same like a plasma cutter it cant accelerate or it simply would not cut through.

Smoothieware talks about having to accelerate around curves and it programs the laser power to increase at that time. Even if that was so i would then have to lower the power of my regular speed cuts as to not over power that making my overall cut time much slower and as I look at it the laser module actually is useless to me if that is true and the only neat part I saw about it for me is the little code that says if g and followed by 1,2,3 laser is on if G0 laser is off etc.

So I guess what I am asking is can you make teacup go ahead and accelerate jerk etc all that stuff for G0 moves but it has to slow down and come to a constant speed for all g1 moves right before the actual G1 move starts so I can have a constant depth in my cut to go along with a constant power. I was hoping one of these controllers/firmware is capable of just going at one solid speed no matter what even in a circle or if it has to stop and reverse etc. It just has to for my needs unless I am totally mistaken in all this. The only way I can see acceleration (aka anything other than constant speed on cuts) working for me is if the laser I have is too powerful for the acrylic and I have to cut at lower than 100% power. Then I can afford to accelerate on curves or here and there as long as the power jumps up accordingly. But right now I have a 25 watt laser and it goes along at 5-7mm/sec and has no overhead as far as power goes.

Basically I would be using all g1 moves at 7mm.sec etc. 99% of the time so really going slow and steady is just fine. Or am I just confused and acceleration etc. themsleves is the functions tht allow the steppers to approximate constant motion itself and have all this backwards lol?

Edited 4 time(s). Last edit at 05/23/2015 01:44AM by ghost2501.
Re: Project: Teacup Firmware
May 23, 2015 07:14AM
Quote
ghost2501
So when you say a DC extruder you mean its for a non stepper motor extruder? does the command go something like m103 s127 do adjust the pwm?

Yes and yes.

Quote
ghost2501
Basically I need a nice neat command to fire the laser on one pin and set the power (pwm) on another pin from one thing like m103 s127 would turn pin 1 high making the s127 part would make pin 2 do 50% duty cycle. Is that possible because I have no use for a pwm on off pin as I am stricktly laser cutting and need the laser on 100% of the time durring cuts but I still need to set its power.

Yes, that's possible.

That said it's currently unclear to me why you can't simply set PWM to zero to turn this laser off instead of this additional pin. Or why you can't set PWM once, then operate just the on/off pin.

Quote
ghost2501
This is where I go back in a circle and havent yet seen a good solution yet

All these RepRap firmwares are made with printing in mind. Operating a laser is almost the same, but only almost. You have to try and experiment a bit.

Quote
ghost2501
This is also where I get nervous about all the talk of acceleration and lookahead

Acceleration is a physical neccessity. If you don't do it in firmware, you do it by bending the machine frame or the driving belts. Not that much of an issue, because reaching 400 mm/min at 1000 mm/s2[/sub] is less than half a second.

Lookahead is a technique which tries to avoid to decelerate at the end of a move, just to accelerate for the next one. It gives a more smooth run.

Quote
ghost2501
Smoothieware talks about having to accelerate around curves

That's a limitation of Smoothieware, then. Physics undoubly allows to move a curve at constant speed.

Quote
ghost2501
Or am I just confused and acceleration etc. themsleves [...]

I see a lot of confusion here. You simply have to try. There are many people out there with "look, it works for me!", but these people almost never tell about how exactly they did it. So you have to find out yourself, step by step. That's the current state of collaboration in Open Source/Open Hardware. Sorry, can't change that for you.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 23, 2015 09:43AM
Hey ghost2501,

I'm pretty sure that Smoothie is smart with laser control, so that it will keep the PWM level proportional to the speed at any time during a move. So as the printer accelerates the PWM level will be increasing etc.. The last time I looked into the code, the logic was so that if you do "G1 ... Fspeed Slaser_power", the constant factor for this proportionality will be such that if the printer was moving at speed the laser power would be laser_power (even though speed may never be achieved in that move).

The relevant Smoothie code where this is coming from is here. On this line, I think that get_trapezoid_adjusted_rate() is the instantaneous speed, nominal_rate is the value of the F parameter, and laser_max_power is the value of the S parameter.

Finally, a bit of self-promotion: my APrinter firmware supports lasers in much the same way, only with a bit different G-code interface (consult the readme for details).

Edited 3 time(s). Last edit at 05/23/2015 09:49AM by ambrop7.
Re: Project: Teacup Firmware
May 23, 2015 11:29AM
I wonder why Smoothie and APrinter are an option at all. The former doesn't run on ATmega at all and the latter on the largest ones at best. Does @ghost even know what hardware she has?


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 25, 2015 12:10PM
Hi,

I´m sorry, but I have another problem when trying to run Teacup for SCARA... so its the version directly downloaded from github.
I use:
Arduino Mega 2560 + Ramps 1.4 with A4988 drivers, running at 12 V, 1A.
Pronterface 2014.08.01

LOOKAHEAD is defined in config.h and it compiles without error.
I can connect to the board, but I cannot get the steppers moving. They do not do anything, not even jittering.
That´s my config:
config.h

For troubleshooting, I downloaded the "Teacup master" for conventional machines. Directly runs perfectly, quite smooth !

I think there must be something else??

Best regards,
Mike
Re: Project: Teacup Firmware
May 25, 2015 12:25PM
Hmm. Scara is one of these efforts dropped into Teacup once, never integrated into experimental/master and unmaintained since then. For whatever reason these people have no interest in keeping their work up to date.

What does M114 report? Does the reported position change? If yes, please check the Enable pin on your stepper drivers. It should go to zero volts as soon as a move starts.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 25, 2015 12:35PM
M114 gives back the following:
ok X:20.000,Y:0.000,Z:0.000,E:0.000,F:400
Feedback changes coordinates with each movement command, but motors not moving.

I checked the Enable pins during movement command using a Voltmeter.... stays HIGH all time...
Re: Project: Teacup Firmware
May 25, 2015 12:48PM
Then swap X_INVERT_ENABLE, Y_INVERT_ENABLE, Z_INVERT_ENABLE, E_INVERT_ENABLE.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 25, 2015 01:00PM
I tried, but motors stay off now.
Without "enable" motors are definitely under current....but don´t move.
Re: Project: Teacup Firmware
May 25, 2015 01:04PM
Directly after connection with pronterface I can here the motors hum, about 20 seconds later they turn off..without doing anything.
During these 20s no movements possible.

Edited 1 time(s). Last edit at 05/25/2015 01:04PM by theothermike.
Re: Project: Teacup Firmware
May 25, 2015 01:08PM
If they're under current, INVERT_ENABLE is set right. Other than that I can't help much, I'm still covered with the new Configtool (last steps, I hope I can celebrate it in a few days), working several hours each day on Teacup.

If you're brave, you can start debugging, of course. It's printf()-type debugging, just using sersendf_P(). Many examples spread across the code. You can even send a few characters from within dda_start() and dda_step(). Another option is to run the firmware inside SimulAVR, then you can even use GDB.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
May 25, 2015 01:11PM
Fortune favors the brave. ;-)

Nevertheless, thank you so much!
I will try to go on.....
Teacup Configtool out to the public!
June 01, 2015 08:39AM
Just announced Teacup Configtool, the milestone was reached this weekend: [forums.reprap.org]

Documentation is here: [reprap.org]


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
June 02, 2015 04:59AM
Does Teacup have a way of sending out and receiving commands from a RAMPS board through SPI, I2C or serial interfaces? What I would particularly like to do forward tool change commands such as M60 or T codes to a second controller. This would control print head selection, commanding the presently selected hot end to lift while moving another hot end into position and lowering it. Extruder motor commands would also have to be forwarded so that they could be routed to the appropriate extruder stepper motor.

The general idea is shown in [forums.reprap.org] I have just returned to working on this printer after six months on the back burner.

Control for the multiple hot ends would probably be a lash up of RAMPS board for 5 extruders and a lift solenoid, PIC18 dev board and other controllers for the heaters. The reason is that I speak several dialects of assembler (including PIC) like a native but high level languages are terror incognita (C++ causes me to hide under the table)

Mike
Re: Project: Teacup Firmware
June 02, 2015 07:05AM
eye rolling smiley

I believe Teacup, just like any other firmware, has any capabilities that you want or can imagine - as long as you are willing to program them and they are supported by the hardware that you are going to use.

I hope you understand that what you are asking for is a totally custom piece of code to fit your particular needs. Teacup is written in C so that's what you'll need to learn to write your own code.

Teacup
Re: Project: Teacup Firmware
June 02, 2015 07:38AM
The good thing is, Teacup is independent from Arduino libraries, it even compiles and (kind of) runs on an i386 PC. Good starting point for a port to PIC.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
June 02, 2015 07:44AM
I can just about flail about in C, and maybe do something productive in less than geological time - but only if it is straight K & R. I guess what I am asking is how much can be done by some light tickling in configuration.h or similar and how much will need to be written from scratch.

Mike
Re: Project: Teacup Firmware
June 02, 2015 07:53AM
You have to look at the code and find out. I won't do it for you.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Project: Teacup Firmware
June 02, 2015 08:16AM
Nor would I expect you to. I had hoped though that you could give some starting points such as if there is or is not already code for I2C or SPI in Teacup.
It is not my intention to port to a PIC, only to use a PIC controller to do the actual tool change - that is well within my abilities. Deciding whether to use Teacup or something else is my present quest.

Mike
Re: Project: Teacup Firmware
June 02, 2015 08:53AM
Quote
leadinglights
Nor would I expect you to. I had hoped though that you could give some starting points such as if there is or is not already code for I2C or SPI in Teacup.
It is not my intention to port to a PIC, only to use a PIC controller to do the actual tool change - that is well within my abilities. Deciding whether to use Teacup or something else is my present quest.

Mike

You might want to look at how RepRapFirmware on Duet electronics handles tool changes. Whenever a tool is released, a macro file for that tool is run. Whenever a tool is selected, another macro file is run; then the tool heaters are commanded to operating temperature; finally a 3rd macro file is run. The macro files contain ordinary gcodes, so you can do what you like in them. The standard firmware configuration supports up to 5 extruders and 6 heaters.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Project: Teacup Firmware
June 02, 2015 09:10AM
Thanks dc42. The Duet/Duex4 looks to be an excellent starting point. Would I be correct in guessing that one of the heaters could be kludged to power a lift solenoid? In it's present incarnation the hot ends are slid on, for lack of a better term, I call the X-prime axis and unwanted ones are lifted up by the solenoid so that the nozzles are well clear of the print.

Mike
Sorry, only registered users may post in this forum.

Click here to login