Remap Pin D9 to Pin 44 for Laser PWM

New Home Forum Mostly Printed CNC – MPCNC Troubleshooting – MPCNC Remap Pin D9 to Pin 44 for Laser PWM

Tagged: , , , ,

This topic contains 41 replies, has 9 voices, and was last updated by  Dan Garrison 9 months ago.

Viewing 12 posts - 31 through 42 (of 42 total)
  • Author
    Posts
  • #51855

    BrianP
    Participant

    I have tried sending commands with both repetier host and 3dpBurner Sender and nothing. I am using the 106 cmds.

     

    #51857

    Ryan
    Keymaster

    Okay at least we have a reference point now with my code.

    It only works with a S255? If you can change my code to different intensities we are making progress if not the pin is not PWM capable and we need to find a better pin. I have not verified that pin it was another user and the two pin shuffle has me worried.

    Unfortunately I am out for the day (sometimes I do take a day off).  I do have my laser out and can do some testing this evening if y’all haven’t solved this by then.

    #51864

    Jeffeb3
    Participant

    Something isn’t making sense. Can you send this exactly:

    M106 S255

    And tell us what it does?

    Just to make sure you are sending things right, can you move it with a G01 X10 ?

    #51867

    BrianP
    Participant

    Running it from the SD card and GCode files I created works fine.

    When I attempt M106 S255 from within Repetier Host with easy Mode turned off it does nothing.

    Likewise if I use 3dpBurner Sender it does nothing. With it connected to the com port and hitting the laser on, off, power level or even custom code like M106 S255 it does nothing.

    #51882

    Ryan
    Keymaster

    Sounds like you are not actually connected. Can you move it from repetier? The button being green doesn’t actually indicate a connection for some reason, What temp is show for the hotend?

    #52056

    Tim W
    Participant

    is this not the sames as gerbil 1.1 and only turn the laser on while in motion?

    #73904

    Travis
    Participant

    I have found a solution to the original problem, so I thought I would share it with anyone else trying to Remap pin D9 to Pin 44.

    The solution is not elegant but worked.

    Short Answer

    Solution:  I added the following line of code right before the #endif // CONFIGURATION_H at to the end of the Marlin Configuration.h tab in Arduino IDE:

    //Change FAN PIN to 44
    #define RAMPS_D9_PIN      44       //Was 9

    Long Answer

    I tried to change this in the pins_RAMPS.h file, but as was mentioned in this thread it did not seem to work.

    I enabled #define PINS_DEBUGGING in Configuration_adv.h and checked the pin mapping with M43 to find out if anything changed.  Each time I found pin 44 mapped to E_MUX2_PIN and 1 other pin, but not the FAN.  I tried commenting these pins out in the pins_RAMPS.h file but each time they showed that they were still mapped to Pin 44.

    After adding the #define RAMPS_D9_PIN 44to Configuration.h  I found the FAN mapped to pin 44 with M43.

    After hooking the TTL input of the laser to GND and Pin 44 the laser functioned as expected.

    Hope this can help someone else.

    1 user thanked author for this post.
    #79427

    S Sauntson
    Participant

    Hi Travis or anyone

    Just to check one thing.

    Did you make any other adjustments to the Marlin firmware? Say pins_RAMPS_h ?

    At the end of Confiduration.h I have

    #endif

    #endif //CONFIGURATION_H

    Do I add your code between the two #endif  or before the first?

     

    kindest regards for your assistance

     

    regards

     

    regards

    #84731

    Dan Garrison
    Participant

    Hello all,

    This is the first time posting. I’ve been reading the forums for awhile now and have had some luck.

    My setup is a MPCNC running on a Rambo V1.4 board with dual end stops. Its approximately 900 X 900 mm. I have it set up with a Dewalt 660 and a laser. I’m actually on my second laser. I had the first laser working with PWM with out any problems other then not enough power. For some reason when I changed lasers I lost control of the laser.

    By back tracking and troubleshooting I was able to get control of the PWM back but without the Dual End Stops. When I load the Dual End Stop it stops working.

    If i Load “MPCNC813FullRAmbo_GLCD_T8 “and modify the pins_RAMPS.h on line 156 as described in this thread it works from both the LCD controller using FAN2 speed and through Repeater Host.

    When I load the Dual End Stop program “Marlin-MPCNC_Rambo_T8_16T_LCD_DualEndstop” it stops working.

    With the pins_debug enabled this is the results that I get for the working and not working

    15:50:19.237: PIN: 44 Port: L5 FAN1_PIN protected   —- Working

    16:02:02.791: PIN: 44 Port: L5 RAMPS_D9_PIN Input = 0 TIMER5C PWM: 0 WGM: 1 COM5C: 0 CS: 3 TCCR5A: 1 TCCR5B: 3 TIMSK5: 0  —- Not Working

     

    Any help is appreciated.

    #84841

    Dan Garrison
    Participant

    I found a solution to my issue and maybe others that use RAMBo V1.4.

    RAMBo V1.4 has a connector that is labeled X32 PWM Extension. It is located between the main chip and fan/heater connectors. It is 6 pin straight. One of the pins on this connector is FAN-2. This is the line prior to it going to the mosfet and is 5 volt TTl PWM capable.

    Picture of header with wires connected

    PWM Extension header

    As shown pin 1 is on the left.

    Pin 1 is 5 VDC

    Pin 2 is GND

    Pin 4 is FAN-2

    I connected pin 2 to TTL/PWM-  of the laser control module and pin 4 to TTl/PWM +.

     

    To turn the laser on I use M106 P2 Sxxx and to turn it off  M106 P2 S0 or M107 P2.

    P2 specifies which fan to control. P2 is FAN-2.

     

    #84855

    Ryan
    Keymaster

    Nice!

    #84862

    Dan Garrison
    Participant

    Oh and I forgot to mention that it took no modification to the code from stock.

Viewing 12 posts - 31 through 42 (of 42 total)

You must be logged in to reply to this topic.