Controlling temperature of reprap extruder hot-end
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.
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.
![:) :)](/media/kunena/emoticons/smile.png)
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.
www.reprap.org/wiki/EmcRepStrap
Please Log in or Create an account to join the conversation.
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.
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.
Please Log in or Create an account to join the conversation.
If not, I guess I will have to write this component?
Please Log in or Create an account to join the conversation.
Rick G
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.