Showing chamber temperature into LCD display instead of Extruder 2, how to

Hi

I noticed when having two extruders, there is a line added for the temperature of that extruder to the display, meaning there is room for extra temperature readings.

Now, I am only using a single extruder at the moment and would like to monitor my temperate within my enclosure/chamber.

Is it possible to hack the code so that I can display "Enclosure" temperature instead of Extruder 2? And it not setting of any alarms when being a low temperature.

This way I can avoid getting another external display if I can easily integrate it into this one.

For information, I have a full graphic smart controller clone and megatronics v3 board.

Any help would be appreciated! Thanks.

P.S. If I could build in a protection that shuts down the power when going over a certain temperature, that would be awesome. But even getting the temperature displayed would be extremely satisfying.

Comments

  • Display is defined in uimenu.h with most lines taken from language file.

    We use placeholders to add proper values, this function is in ui.cpp.

    How do you measure the temperature at the moment? If oyu have a fan for cooling chamber, we have a thermistor controlled fan for this. Since it measures a temperature you could write out that temperature then, but I think we currently have no placeholder for that temperature. But that should be easy to add.
  • Thanks for the response. Unfortunately I'm not that familiar with C code and there is a lot of it :)
    Could you give me an example of a placeholder in ui.cpp?

    At the moment I'm not measuring it since I'm upgrading my printer and enclosure, but I would use a PT100 or similar probe. I don't plan on having an active cooling or heating chamber, just a sealed enclosure.

    Basically I could just hook up a probe or thermistor to one of the hotend thermistor pins on my board. I just need to find a way to get it displayed on the LCD without having a second extruder actually enabled.

    Is there a simple way to do this in the code?
  • Ok, have added a new var to allow this for thermo controlled fan.
     %et : Thermo controlled fan temperature

    So what you need to do is define such a thermo controlled fan (for fan pin use any unused digital pin). Then you can modify the menu to contain %et in the string which will be replaced by the temperature measured for the fan. The menu string are all in uilang.h so just search there for a text you see and want to replace. e.g. replace Buf with your temperature.

  • Thanks! I think I understand what you mean. Just poked around in the latest dev version. I'll try it out this weekend and will post an update!
  • edited August 2016 Posts: 6
    It worked!
    Took some time to test out different stuff but what I have now works. Couple of questions from uilang.h:
    - What do the _ID lines do? They appear to be overwritten by the language specific lines (in my case _EN) and I don't see them referenced anywhere in the whole code.
    - what does the code /xa or /xe do with the IDs? e.g. #define UI_TEXT_MAINPAGE6_1_ID 229 //"\xa %e0/%E0\xb0 X:%x0"
    - How do I define decimal values for this temperature? I don't need them for now since it's not hugely important, but I would like to know if it's hard to define this.

    Here is an overview of what I have now that works:

    - Adding a variable for the new temperature (what was added by Repetier to the latest dev build)
    uimenu.h
    extruder
    %et : Thermo controlled fan temperature

    - I defined the thermo controlled fan here, with an unused digital pin. I put a thermistor I had lying around to my E2 thermistor input.
    Configuration.h
    #define FAN_THERMO_PIN 36
    #define FAN_THERMO_MIN_PWM 128
    #define FAN_THERMO_MAX_PWM 255
    #define FAN_THERMO_MIN_TEMP 45
    #define FAN_THERMO_MAX_TEMP 60
    #define FAN_THERMO_THERMISTOR_PIN TEMP_2_PIN
    #define FAN_THERMO_THERMISTOR_TYPE 8

    - Here I commented the Buffer text that was displayed on my screen and replaced it with the temperature.
    uilang.h
    //#define UI_TEXT_PAGE_BUFFER_ID 170 //       "Buffer:%oB"
    #define UI_TEXT_PAGE_BUFFER_ID 170 //       " ENCL:%et" cDEG "C""

    //#define UI_TEXT_MAINPAGE6_5_ID 233 //"Buf: %oB"
    #define UI_TEXT_MAINPAGE6_5_ID 233 //"\xa %et"

    //#define UI_TEXT_PAGE_BUFFER_EN       "Buffer:%oB"
    #define UI_TEXT_PAGE_BUFFER_EN       "ENCL.:%et" cDEG "C"

    //#define UI_TEXT_MAINPAGE6_5_EN "Buf: %oB"
    #define UI_TEXT_MAINPAGE6_5_EN "ENCL:%et" cDEG "C"

    image
  • The \xb0 are char codes in hexadecimal (\x + hex code) to show non ascii chars.

    Precision is set in ui.cpp where the codes get converted. If you find the case for thermo controlled fan you will see it sets precision to 0.

    The _ID lines define the string id for translations where the text should be stored. The real string are defined in same name with _ID replaced by iso language code.
  • Thank you, that's all clear for me then. Consider my problem solved :)
Sign In or Register to comment.