Jump to content

UMO+ to Marlin 1.1


Recommended Posts

Posted (edited) · UMO+ to Marlin 1.1

Hi

I flashed Marlin 1.1 on my UMO+ with Dual-Head.

configured all - works.

BUT: The Extruder Auto-Fan doesn't switch on.

I tryed to change the Pin to 255 (like in the marlin 1 before) -> failre during compile.

Now i figured out, that 255 is not the real pin.

If i try pin 7, i get failure too:

 

#if E0_AUTO_FAN_PIN == FAN_PIN     #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."

 

How can i solve this?

I think pin7 is even the wrong - this is the 24V fan, isnt it?

Which pin is the 5v fan?

Edited by Guest
  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    I found on amedee's branch of the old marlin this code

    void setExtruderAutoFanState(int pin, bool state)
    {
     if (pin == 255) {
       // Hack for Ultiboard 2.1.4+, hot-end fan is on pin PJ6, not mapped on Arduino
       // We do direct pin access, no PWM
       DDRJ |= _BV(6);
       if (state) {
         PORTJ |= _BV(6);
       } else {
         PORTJ &=~_BV(6);
       }
     } else {
       unsigned char newFanSpeed = (state != 0) ? EXTRUDER_AUTO_FAN_SPEED : 0;
       // this idiom allows both digital and PWM fan outputs (see M42 handling).
       pinMode(pin, OUTPUT);
       digitalWrite(pin, newFanSpeed);
       analogWrite(pin, newFanSpeed);
     }
    }
    void checkExtruderAutoFans()
    {
     uint8_t fanState = 0;
     // which fan pins need to be turned on?      
     #if defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1
       if (current_temperature[0] > EXTRUDER_AUTO_FAN_TEMPERATURE) 
         fanState |= 1;
     #endif
     #if defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1 && EXTRUDERS > 1
       if (current_temperature[1] > EXTRUDER_AUTO_FAN_TEMPERATURE) 
       {
         if (EXTRUDER_1_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN) 
           fanState |= 1;
         else
           fanState |= 2;
       }
     #endif
     #if defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1 && EXTRUDERS > 2
       if (current_temperature[2] > EXTRUDER_AUTO_FAN_TEMPERATURE) 
       {
         if (EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN) 
           fanState |= 1;
         else if (EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN) 
           fanState |= 2;
         else
           fanState |= 4;
       }
     #endif
    
     // update extruder auto fan states
     #if defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1
       setExtruderAutoFanState(EXTRUDER_0_AUTO_FAN_PIN, (fanState & 1) != 0);
     #endif 
     #if defined(EXTRUDER_1_AUTO_FAN_PIN) && EXTRUDER_1_AUTO_FAN_PIN > -1 && EXTRUDERS > 1
       if (EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) 
         setExtruderAutoFanState(EXTRUDER_1_AUTO_FAN_PIN, (fanState & 2) != 0);
     #endif 
     #if defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1 && EXTRUDERS > 2
       if (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN 
           && EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
         setExtruderAutoFanState(EXTRUDER_2_AUTO_FAN_PIN, (fanState & 4) != 0);
     #endif 
    }
    #endif // any extruder auto fan pins set

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    Solved it by adding following code at the end of temperature.cpp

     DDRJ |= _BV(6);
     if (current_temperature[0] > (EXTRUDER_AUTO_FAN_TEMPERATURE) || current_temperature[1] > (EXTRUDER_AUTO_FAN_TEMPERATURE)) 
     {
       PORTJ |= _BV(6);
     }  
     else if (current_temperature[0] < (EXTRUDER_AUTO_FAN_TEMPERATURE - 2 ) && current_temperature[1] < (EXTRUDER_AUTO_FAN_TEMPERATURE - 2 )) 
     {
       PORTJ &=~ _BV(6);
     }
    

  • Link to post
    Share on other sites

    • 5 months later...
    Posted · UMO+ to Marlin 1.1

    I copied your above code to the bottom of temperature.cpp and I get the following error on compile:

     

    Arduino: 1.8.5 (Windows 10), Board: "Arduino Mega ADK"

    In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

                     from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,

                     from sketch\Marlin.h:32,

                     from sketch\temperature.cpp:27:

    temperature.cpp:2289: error: expected unqualified-id before 'volatile'

     DDRJ |= _BV(6);

     ^

    temperature.cpp:2289: error: expected ')' before 'volatile'

    temperature.cpp:2289: error: expected ')' before 'volatile'

    temperature.cpp:2290: error: expected unqualified-id before 'if'

      if (current_temperature[0] > (EXTRUDER_AUTO_FAN_TEMPERATURE) || current_temperature[1] > (EXTRUDER_AUTO_FAN_TEMPERATURE))

      ^

    temperature.cpp:2294: error: expected unqualified-id before 'else'

      else if (current_temperature[0] < (EXTRUDER_AUTO_FAN_TEMPERATURE - 2 ) && current_temperature[1] < (EXTRUDER_AUTO_FAN_TEMPERATURE - 2 ))

      ^

    exit status 1
    expected unqualified-id before 'volatile'

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

     

    Any suggestion?

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    I'm also super super curious about your process for getting this running. I'm hoping to get the latest marlin (1.1.8) up and running on my UM2, to try and get their sweet sweet autoleveling working using a precision piezo kit, and one of the aliexpress 2.1.5 boards with the removable stepper drivers so I can go to TMC2100 Silent Stepsticks (seems to be working great in testing so far, but I haven't disassembled the old board yet). 

     

    Any chance you'll be making a fork we can look at?

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    I think you guys will have more luck following my thread: 

     

     

    The UM2 or UMO+ should only need a couple small changes compared to my branch (motherboard, temp sensor).

     

     

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1
    12 hours ago, lars86 said:

    I think you guys will have more luck following my thread

    The UM2 or UMO+ should only need a couple small changes compared to my branch (motherboard, temp sensor).

     

    The UM2 head uses this 5V hot end cooling fan which I don't think is applicable to your configuration.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    I'm running the new UM2 board in my UMO+.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1
    12 hours ago, nullsibnelf said:

    I'm running the new UM2 board in my UMO+.

    Can you please post a fork of the codebase?

    I am getting errors and am not yet familiar enough with the Marlin codebase (or C for that matter) to understand what exactly I'm doing wrong.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    Sorry, but I dont have a clue how to do a fork.


    I'll try to figure it out the next hours and will post the result here.

    give me some time.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1
    12 hours ago, nullsibnelf said:

    Sorry, but I dont have a clue how to do a fork.


    I'll try to figure it out the next hours and will post the result here.

    give me some time.

     

    If you have some patience I can walk you through how to do a fork, git, etc.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    Got it.

    The failure was by me (shame)...

    Please look at https://github.com/nullsibnelf/Marlin

    temperature.cpp from line 2182 to line 2196.

     

    the fork is at the moment not for dual head (because i changed back to single nozzle e3d).
    But I added all the changed mentioned here in this post. so this should fix your compile error. In fact, it was a missing '}' at the right possition.

    Sorry for that.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1
    42 minutes ago, nullsibnelf said:

    Got it.

    The failure was by me (shame)...

    Please look at https://github.com/nullsibnelf/Marlin

    temperature.cpp from line 2182 to line 2196.

     

    the fork is at the moment not for dual head (because i changed back to single nozzle e3d).
    But I added all the changed mentioned here in this post. so this should fix your compile error. In fact, it was a missing '}' at the right possition.

    Sorry for that.

     

    That looks good. I'll try it this evening and report back. Thank you very much for your help.

  • Link to post
    Share on other sites

    Posted · UMO+ to Marlin 1.1

    I saw that you changed your git repo name to something about an E3D lite6. Are you using a 5V fan for the hot end fan on an E3D hotend?

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 beta released
        Another Cura release has arrived and in this 5.8 beta release, the focus is on improving Z seams, as well as completing support for the full Method series of printers by introducing a profile for the UltiMaker Method.
          • Like
        • 1 reply
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...