Controlling temperature of reprap extruder hot-end

More
19 Sep 2011 08:35 #13283 by fma
Hi there,

I'm new to EMC. I plan to use it to drive my reprap Prusa Mendel, using this motor driver:

cgi.ebay.fr/4-Axis-TB6560-CNC-Stepper-Mo...-Board-/250879810408

The reprap also has a hot-end which needs to be driven through special G-codes. Reading the 'integrator manual', I was wondering if it could not be possible to control the hot-end temperature through the parallel port. I have several ideas in mind:

1) Using a smart external temperature controller

Some people already have build such system. The controller is driven through a serial line. Some python modules has been developed to handle specific G-codes to drive the hot-end. The controller receives a temperature setup, and manage the power to keep the hot-end at that temperature.

But instead of driving it though a different port, it is maybe possible to use the parallel port:

1.a) pwm/analog output

I read that it is possible to turn a pin into an analog output. I guess it is by setting it up as a PWM, and by adding simple external components (capacitor?). This analog output could be used as temperature setup for the controller. But is it accurate enough? And is it reliable? As there is no feedback...

1.b) bit banging

This configuration is more or less similar to the original ide, but instead of using a standard serial port, it is maybe possible to use some bits of the parallel port, and do bit banging to emulate a synchronous (SPI/I²C or so) serial port. This setup will be more accurate. Don't know if it is possible to read back something using bit banging as input...

2) using a dumb external controller

2.a) pwm/analog output, encoder input

There, the idea is to use a simple power temperature controller. This controller could be driven with a PWM/analog output. But this time, the closed-loop regulation is done by EMC. The external controller just has to turn the temperature into some encoder-like signals. Is it possible? Does the servo config allow that?

2.b) spindle interface

Close to 2.a), this configuration would use the special spindle output, which can be driven through a PWM too.It seems to also be possible to have an encoder feedback, but I don't know if EMC will do closed-loop regulation in all case, or only in lathe mode, for threads buidling.

In 1.a), 2.a) and 2.b), the G-code could be modified externally, before sending it to EMC. The modifications could juste replace the specific hot-end temperature codes by standard G-code for simple axis/spindle. This would just need EMC output configuration, and simple electronic. But no EMC specific module.

In 1.b), this would require EMC specific module/Driver (don't know exactly how and where to do that yet). Don't know if it is even possible.

What do you think of theses ideas? Are they dumb/too complex? I would prefer to build a dumb external controller, without the need of another PIC/AVR or so to configure...

Thanks for any suggestion.

Please Log in or Create an account to join the conversation.

More
19 Sep 2011 14:45 #13297 by andypugh
fma wrote:

Close to 2.a), this configuration would use the special spindle output, which can be driven through a PWM too.It seems to also be possible to have an encoder feedback, but I don't know if EMC will do closed-loop regulation in all case, or only in lathe mode, for threads buidling.


EMC2 doesn't do closed-loop control of spindles by default, but it is relatively easy to set it up. The same approach will work well for your heater, as long as you can find a way to convert the temperature into a frequency.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Clo...pindle_Speed_Control

Please Log in or Create an account to join the conversation.

More
19 Sep 2011 16:45 #13305 by fma
Nice :) The more I read about EMC, the more I like it. The HAL appraoch is really great.

As soon as I get my dedicated machine running EMC, I will try this. Then, I will dig further to see if I can write a dedicated component, working like the spindle. And maybe extend the G-code interpreter to directly recognize reprap commands?

Anyway, thank you very much for your help.

Please Log in or Create an account to join the conversation.

More
19 Sep 2011 16:56 #13306 by cncbasher

Please Log in or Create an account to join the conversation.

More
22 Sep 2011 07:21 #13349 by fma
Yes, I know this page; I downloed all files to try to understand how things works together.

BTW, could it be a good solution to write a dedicated temperature component using hal_comp? It is not yet clear for me how to use such components...

Please Log in or Create an account to join the conversation.

More
22 Sep 2011 11:53 #13355 by andypugh
fma wrote:

could it be a good solution to write a dedicated temperature component using hal_comp?


All that such a component would contain would be a PID loop, and it would have to make assumptions about the feedback type.
It only needs counter, PID and PWMgen at the moment, and you can easily swap the input and output stages to suit different hardware.
I don't think a dedicated component would add much, and would lose flexibility.
You are, of course, perfectly free to write one if you want to.

Please Log in or Create an account to join the conversation.

More
22 Sep 2011 12:04 #13356 by fma
Ok, thanks. Well, it could be a good practical exercise...

Please Log in or Create an account to join the conversation.

More
23 Sep 2011 10:49 - 23 Sep 2011 10:49 #13379 by fma
BTW, is there a way to linearize an signal? I can make a very simple temperature-to-quadrature_signals converter, using a NE555 or so, but a thermistor is not linear. If I can add a hal_component behind the encoder one, to linearize the pseudo-speed value, it would be nice.

If not, I guess I will have to write this component?
Last edit: 23 Sep 2011 10:49 by fma.

Please Log in or Create an account to join the conversation.

More
23 Sep 2011 11:03 #13381 by Rick G
Have you looked at the available thermistor amp chips, I beleive some have linear output.

Rick G

Please Log in or Create an account to join the conversation.

More
23 Sep 2011 11:09 #13382 by fma
I didn't know such chips exist...

Please Log in or Create an account to join the conversation.

Time to create page: 0.179 seconds
Powered by Kunena Forum