Difficulty in connecting to printer

I am trying to connect an Arduino Mega / Ramps 1.4 / RepRap LCD Screen with Marlin firmware to my printer.
I am able to connect to the Arduino and flash the software,  I can operate the servos from the LCD screen but I can't
get the communications to go the other way.  If I load a file in Repetier host and slice it everything goes fine.  When I hit
print nothing happens and the Manual Jog doesn't connect also.  It's like it connects to the Arduino but does not send anything 
back to the printer.....  The LCD screen operates all the steppers and both heaters and thermisters but the computer doesn't . 
I have checked the port number the baud rate, and think it all matches.......... any suggestions how to get it to connect?


Comments

  • First enable log so you see if you get answers or not. Send e.g.
    M114
    and check if firmware responds with coordinates. Only then you know that communication is working. Printing can only work if this is the case.
    Settings is protocol automatic or ascii for marlin. Start with ping pong active and if it works check if without also works for faster communication. Make sure port is correct - if you remove the printer from pc that COM port must disappear or you use the wrong one. Then only baud rate and RTS/DTR stay. With RAMPS dtr/rts is just any toggle signal so that is easy. Baud rate is 115200 or 250000 in most cases. Just test connect and see what log shows. As soon as you get responses from firmware that are readable you know baudrate is correct.
  • When I type in M114 in and get Communication time out and then M 105 codes. I don't get any coordinates  X  Y  Z
    Com port is Arduino Mega Com 7   It also shows port Com 4 as though it is also connected.

    What else can I try?    How do I send a test to the printer?

  • That M114 is the test. Timeout is the indicator that you are not talking with printer firmware.

    When you flash firmware do you also use COM7? Did you make the remove port test to be sure?

    Apart from testing different baud rates and ensuring right port/firmware setting there is not much you can do. So test some other baud rates as well - maybe it comes from eeprom so it differs from the one in your configuration.
  • When I flash the firmware I match the ports but I have also tried another laptop and followed
    matching the ports.  Does Merlin or Arduino lock up the identity of the port when it is flashed?
    What controls are there for eeprom (I don't know anything about it)  what can I check for to be sure 
    the communication is open.  I will test several more baud rates to see if that has an effect.  
    I have 4 or 5 Arduino Mega boards and Ramps paired and I want to get them all flashed the exact 
    same way so I have to learn how..   I've read that Marlin is pretty open for compatability but much
    of Arduino is more particular.  I don't know about Repetier and versions.  How careful do I have to be with the version and date of what I flash?  Most of my designs files are on a 10 year old desktop sliced in Repetier and stored in the hard drive.  Those are the files I am trying to transfer to my printer but can't get it to communicate.

     

  • I have flashed a new copy of Marlin in the Arduino over the years to keep it updated - could the newness of the
    new flashed boards cause a problem with the old file formatting?   I always thought Gcode was Gcode and
    didn't change....
  • Marlin has changed gcode commands available over time, but communication stayed compatible - that should not be an issue. COM port is bound by windows using some usb parameter. Since the mega has own chip for usb communication flashing does not change it. Port number is on every windows different. Windows just numbers them by order of detecting new used devices.

    As a simple test you can use the serial terminal in arduino to connect. At least with 115200 baud. I think 250000 is not available in arduino ide. You should see something or if you send "M115" a lot in response. Then you know all is ok and baud rate is working. Always make sure no other software is connected to same port - this will block the other software. In host you get a message if that is the case, so guess it is not the problem here. Maybe you show a screenshot of communication settings you have. Use external storage (imgur.com for example).
  • So - Marlin GCODE shouldn't be a problem and we can cross that off the list?  
    It sounds like I have a windows port assignment number problem?  
    When I compile _ Marlin through Arduino _I get the port that Windows selects
    correctly and seems to connect correctly...  
    How can I see what ports are being used for?
    How can I free up ports and confirm that other software isn't tying up ports that I need.
    Would that stop the communication to my printer?
    Is there any way to see the code that is sent between Repetier and my Printer?
    Is there a test program that I can can type thru Repetier to test the communications
    between Repetier and my printer?  Do you think it's a Windows problem?  I am trying it 
    to use a an old version Windows 7 and also a new laptop with Windows 11.  Both of these
    machines give me the same results = they connect to Arduino but don't transfer the sliced
    print file to the printer....

    What page do you want see in communications and what is  imgur.com?
    Thank you

     
  • >So - Marlin GCODE shouldn't be a problem and we can cross that off the list?  
    yes.

    Port is easy to check as I already explained above. In host check available port when printer is connected to windows. Then unplug and see which got removed. Thats the one you want.

    Disable easy mode to see communication at bottom. Disable all filter and see what appears when you connect. As soon as you see responses that make sense you have it.

    >What page do you want see in communications and what is  imgur.com?
    I want a screenshot of your connection settings in host to see if you have done something obviously wrong. You can not post images here so you need to store image online and post link to that. imgur.com is a service that can do that, but you can also use a public link to the image on dropbox/google drive/...
  • I tried all afternoon to send a screen shot but dropbox now says my email has been used and google only shows a image of the 3D design grid but doesn't retain any of the G CODE text that might help.
    I can read the code when I connect the USB - what should I look for?
    Also the configuration is pretty simple and has been setup by Marlin with help from MPCNC engineering.

    If you have an e-mail I can send a picture of my computer screen from my phone......??

    Please let me know what to look for and what to do?

  • If I am trying to discover why my printer doesn't connect and what gcodes should I see to confirm it is even trying to print?  What causes the computer to want to send the information?  I understand that Slicer creates the file and sends it to Marlin residing the Arduino but when I hit the print button  who / what / or where is it being held?  If I can communicate thru   the matched ports wouldn't the printing file come through the same port/cable connection?
    Does Marlin have any features that would stop the file without sending an error code?  Can you give me a simple Gcode file that I can type in by hand and see if my printer will move on command?  I know it works from the signals from the LCD screen. Do the temperature thermistors have to be connected to have Repetier send any signals?  I think that is further down the loop....
     
  • I just got some screen shots and new test on the printer - 












  • Ok, in log you see no answer from firmware hence the timeout.

    What about the screenshot I asked for if you hit the "Printer settings" button in toolbar? 
  • I just got some screen shots and new test on the printer -




  • Looks good. Have you tested with 250000 baud instead?
    You might also test with ping pong enabled, also I think that makes no difference here.
  • I tried 5 different baud rates and none worked.  Ping Pong also......

    Can you take a look at these questions? 

    If I am trying to discover why my printer doesn't connect and what gcodes should I see to confirm it is even trying to print?  What causes the computer to want to send the information?  I understand that Slicer creates the file and sends it to Marlin residing the Arduino but when I hit the print button  who / what / or where is it being held?  If I can communicate thru   the matched ports wouldn't the printing file come through the same port/cable connection?
    Does Marlin have any features that would stop the file without sending an error code?  Can you give me a simple Gcode file that I can type in by hand and see if my printer will move on command?  I know it works from the signals from the LCD screen. Do the temperature thermistors have to be connected to have Repetier send any signals?  I think that is further down the loop....

    If I change to Cura as a slicer would that make a difference?  How about changing from Marlin?  I can't find the gap between my computer and my printer..
     
  • Don't think about slicers. It does not matter as long as you can not talk over serial connection with printer. So this has nothing to do with slicer so far.

    Once connected you can move in the control tab. Otherwise here are all marlin g-codes:
    https://marlinfw.org/meta/gcode/

    Did you compile marlin your self? By now I think you have configured it wrong especially the part selecting the serial port. Did you select serial0 for connection or serial usb? For mega there is no serial usb - serial 0 is the one connected via an extra chip with the usb output. This can be wrong even if uploading works since uploading is done via bootloader and not via marlin.
  • Thank you for your help..

    I uploaded a copy of Marlin provided by MPCNC that is tailored for the feeds and speeds of their machine.
    I can reload a virgin copy and load all the parameters but I felt this might be more problematic.

    From what you have said its a communication problem?

    If I look at my existing Marlin - the ports choice is   -1 // 0  will that work with a USB cable and the Mega
    board?  I don't see a choice "serial USB" in Marlin setup.   What should I load in Marlin to have it select the proper ports?
  • What time zone are you located?
  • /**
    * Select the serial port on the board to use for communication with the host.
    * This allows the connection of wireless adapters (for instance) to non-default port pins.
    * Serial port -1 is the USB emulated serial port, if available.
    * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
    *
    * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
    */
    #define SERIAL_PORT 0

    sounds like 0 is the correct value. No need to use new config. That plus 
    /**
    * Serial Port Baud Rate
    * This is the default communication speed for all serial ports.
    * Set the baud rate defaults for additional serial ports below.
    *
    * 250000 works in most cases, but you might try a lower speed if
    * you commonly experience drop-outs during host printing.
    * You may try up to 1000000 to speed up SD file transfer.
    *
    * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
    */
    #define BAUDRATE 250000

    Is all that matters for communication.

    Timezone CEB (Germany)
  • Thank you for clear and concise information and more than I have learned for weeks.  I understand everything you said and I think I have everything set correctly and still can't get communications to the printer.  I have tried two different computers and had the same results of no communications.  That tells it me it is the printer side information 
    that disconnects the port or the gcode signal.  If the LCD screen works and all the steppers respond then it's the gcode (after slicer) trying to be sent to the printer?  What would stop the gcode being sent or accepted by the printer?  What else can I try?  
  • LCD and internal functions are independent of communication. They work also if no one is connected. Actually if you copy gcode to sd card and put it in display (if supported) you can already print gcode.

    What makes problem is Firmware serial connection<->Arduino USB serial converter<->PC/OS<->Host
    One component is not communicating as required or expecting a different speed.

    What you can try is set in firmware speed to 115200 and after uploading try arduino ide serial monitor to connect. You should see some output especially when you hit reset button on ramps. If that happens all is ok and host should also connect with that baud rate. I used 115200 since 250000 is no ansi baud rate and not supported by arduino ide for testing.

    No idea what else could be wrong. Sounds like firmware is running fine so with correct serial 0 I see no reason why it would fail.
Sign In or Register to comment.