Jump to content

Extruder control lines....


Recommended Posts

Posted · Extruder control lines....

Hey Jem, you are always doing cool stuff. Your question is a little unclear. If you want to control something through the printer using PWM, I believe the UM1 board and firmware actually support two PWM outputs for the type of servos used in radio control models (although you might need to rebuild the firmware).

If it is PWM output you want, that would be a good way to go because the firmware has commands that allow you to set the position via gcode.

The primary use of these outputs for automated probing that uses a small servo to flip the probe down, measure the bed and flip it back out.

If you look closely at this pic at just about the center of the board, you will see a 6 pin header location (the headers are populated) where up to two servos would connect.

Arduino MEGA Ultimaker Shield v1.5.7 Board

Looks like the topmost pin is gnd, middle is +5 and the bottom is the PWM signal.

Search for the word servo here: https://github.com/ErikZalm/Marlin

 

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    Hello anon! Well I was looking at pump systems and I figured that all you needed was one control line to switch on and off those pumps. So you could in fact have quite a number of extruders or pumps or whatever running from the board... Like if you had two pwm devices you could switch two doc pumps on and off, causing liquid to flow in a semi controlled manner then use the two extruder ports to directly control screw driven extruders... Antsy way there are possibilities here me thinks...

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    Well if you want to just turn something on and off like a single speed screw driven extruder, it think there are many unused pins that are brought to the top shield and these can be controlled with another gcode command.

     

    • [*]M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.

     

    However, be aware that the pins can't drive much so you would need some electronics like a MOSFET and diodes to drive a motor load.

    You certainly could use the heater outputs for this too and they already have the additional electronics to drive an inductive load. The big issue you would have is obviously the firmware is set up to run the temp control loop on them.

    Also, unfortunately, the M42 command has protection code for the "special" pins like those that control the heater MOSFETs, stepper drivers and the other already wired pins.

    You could probably comment out some things in the firmware to free up the MOSFET pins so you could use the M42 to turn the MOSFETs on and off in gcode.

    Definitely doable...

     

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    ah well, if you are using medical pumps say... temperature is not an issue. With the firmware I would imagine its just a case of simply duplicating some function a number of times?

    It doesn't sound too difficult to do... :-P

     

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    I assume you don't want any of the heating functions. So no nozzle 1 or nozzle 2 or hotbed heaters correct?

    If this is the case, you can disable the code that manipulates the pins used for the software PWM to those three MOSFETs. Then you can remove the PINs from the excluded list of PINs you can't use with the M42 command.

    Get the source for Marlin

    https://github.com/Ultimaker/Marlin

    and look at Temperature.cpp and search for ISR(TIMER0_COMPB_vect)

    This is the interrupt service routine where the pins are toggled. After reviewing and understanding what's going on there, you will know what to comment out. You should also search all the source for other references to HEATER_0_PIN, HEATER_1_PIN and HEATER_BED_PIN to ensure they aren't being manipulated somewhere else.

    You might need to change things in the manage_heater function of Temperature.cpp as there are a bunch of checks around the heaters to ensure the temp is rising when expected etc. However, if you don't call for the temperature to be anything other than 0, you might not run into the checks.

    Then you could remove HEATER_0_PIN, HEATER_1_PIN and HEATER_BED_PIN from the sensitive list that prevents their use in the M42 command. Look for a section like this and remove HEATER_0_PIN, HEATER_1_PIN:

    //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!

    #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,

    #if EXTRUDERS > 1

    #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,

    #else

    #define _E1_PINS

    #endif

    #if EXTRUDERS > 2

    #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,

    #else

    #define _E2_PINS

    #endif

     

    Then look at the end of the file for this and remove the HEATER_BED_PIN -

     

    #define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_PROBE_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \

    HEATER_BED_PIN, FAN_PIN, \

    _E0_PINS _E1_PINS _E2_PINS \

    analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }

     

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    Hey anon! So it sounds like the three heater dealies on the main board could be repurposed as say a way to control three pumps or to switch on and off devices? Like could they be used to simply switch on say a print head? And then switch it off? I mean that is essentially pwm. So I guess this means you could have at least 5 extruding devices from the main board in theory...

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    Well as long as you don't need to heat any of them up!

  • Link to post
    Share on other sites

    Posted · Extruder control lines....

    Well, using the M42 would NOT provide PWM. It would only provide on/off control. And on -> off and off-> on would only happen as quick as the gcode is executed. I don't think the execution is quick enough or predictable enough to be considered PWM. Plus you would need to have lots of M42 commands turning on and off.

    If you really need PWM for something that you need to run at 10% or 60% or 43%, it would take more effort. There is an array of three values used by the ISR to produce the PWM for the heaters and bed at a speed and regularity required to be fairly accurate PWM.

     

  • 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

      • 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
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
    ×
    ×
    • Create New...