1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Solved Matter Control & Arduino are not connecting.

Discussion in 'Troubleshooting' started by BrooklynBay, Jan 1, 2021.

  1. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I've just discovered something interesting. I was using Matter Control version 1.7.5 but have version 2.0 on the same desktop. While attempting to connect the board, the program said that it wasn't able to because another program is already connected. Could the Arduino UI be that program? My Monoprice mini delta connects to Matter Control but doesn't have anything to do with the Arduino UI, and doesn't contain an Arduino. I wonder why version 1.7.5 doesn't show a similar error message.
     
    #21 BrooklynBay, Jan 5, 2021
    Last edited: Jan 5, 2021
  2. Rod Smith

    Rod Smith Member

    Joined:
    Nov 7, 2017
    Messages:
    87
    Likes Received:
    33
    You SHOULD be able to get your computer to upload the firmware to your existing board(s). I can think of basically three reasons why it might not work:
    • You're doing something wrong -- You're clicking the wrong button, entering the wrong data in a critical data-entry field, etc. Follow instructions precisely to avoid these issues. You might check alternate instructions, too, in case the ones you're following are outdated, poorly written, etc. (I can't suggest specific instructions to follow, though.)
    • There's a problem with your computer -- You've loaded the wrong driver, your computer is infected with a virus, you're using outdated software, etc. You can (mostly) rule out this problem as a cause by trying another computer. If I'm following your description, then you've tried two computers already with similar results with both of them.
    • There's a problem with the board itself -- You're trying to work around this by trying multiple control boards, so this seems unlikely.
    For both of the last two possible causes, it's always possible that you'll have very bad luck with multiple bad computers or control boards, but the odds of that are pretty low -- unless perhaps you're setting up your computers in the same bad way both times, such as using the same bad drivers on both computers. Trying another OS entirely (like a different version of Windows, or even Linux) might help eliminate such a possibility. Still, if I understand correctly, you're running into the same problem with multiple computers and control boards, so that suggests you're doing something wrong -- or maybe there's a common problem with both your computers, like if you're using the same bad driver on both of them.

    If you get too frustrated with this, you could switch to a very different type of control board, such as a 32-bit board. These are typically updated by putting files on an SD card rather than by uploading from your computer to the control board using a USB cable; however, you'll need to switch to 32-bit Marlin (or more radically, SmoothieWare, RepRapFirmware, or something else entirely). It's conceivable that the cause of your problems could follow you even with such a switch, though; or the cause could manifest in other ways -- a virus that's interfering with the upload could cause much worse problems down the line, for instance.

    If you do decide to go this route, then the Panucatt ReArm board should theoretically be a drop-in replacement for the Arduino MEGA; however, I don't know if anybody's used one in a Robo3D, so there may be unexpected stumbling blocks. (Panucatt lists the ReArm as out of stock, but there are Chinese clones; check eBay, Amazon, or wherever.) Something like a BigTreeTech SKR series board should also work fine, but may need more in the way of physical adjustments. A couple months ago, I installed an SKR Pro v1.2 in my Robo3D R1+. I also installed RepRapFirmware and am planning future upgrades, too. See here for all the gory details, if you're interested in doing something more major like this:

    http://www.rodsbooks.com/robo3d-upgrade/

    If you want to stick with Marlin with a 32-bit board, then you'll need to recompile it yourself or track down a binary compiled for Robo3D hardware. I've never done this myself, so I can't offer much guidance; however, here's a forum thread on the subject:

    http://community.robo3d.com/index.php?threads/marlin-2-0-x-release-for-robo-r1.22898/
     
  3. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    Thanks for your reply. I've tried an all in one MKS clone board, two cheap Arduino boards, and now an expensive Arduino board but can't connect to Matter Control. The task manager didn't show that anything is in use but Matter Control 2.0 shows that some program is in use. I've uninstalled the Arduino UI but it didn't make a difference so I've reinstalled it again. I didn't see anything in use on that port number. Swapping USBs to assign a different port number didn't make a difference either. I don't know why version 2.0 thinks that another program is using the same port or board.

    When I installed the more expensive Arduino, windows assigned a different port number even though it was connected to the same port as the other cards. One one card was connected at a time. So far I've tested it on windows XP & 7, and used 3 different versions of Matter Control. Two desktops & one netbook were used to test everything. The correct drivers are installed, and no viruses or malware were found.
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Yes. If it is still running and connected then you can't connect with MC or anything else. One USB port...
     
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Physical USB ports can be assigned to a range of dynamic "COM" ports by windows. Usually once you have connected to an Arduino it will maintain that same "COM" port going forward. Even a different Arduino board will get a different "COM" port on the same USB connector.
     
  6. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    Even after uninstalling programs, closing whatever is running with the task manager, and swapping usb ports, all of these boards won't connect except for the MKS clone which worked only one time after drivers were installed but never worked after that.
     
  7. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Well, that should cover the bases ... that leaves you with likely bad boards.

    I have never had more than 2 from the same vendor be birth defective even with the cheap ones, but given how they have zero QC on those... anything is possible.
     
  8. Rod Smith

    Rod Smith Member

    Joined:
    Nov 7, 2017
    Messages:
    87
    Likes Received:
    33
    I was under the impression that even the new genuine board was failing, but when I reviewed the last few posts, that's not 100% clear. Could you clarify that point, @BrooklynBay? If the new genuine board is failing along with several others, then I'd disagree with @mark tomlinson and suggest that the problem lies elsewhere, like a buggy driver (if you're using the same driver on both computers), a virus, or a mistake in how the programs are being used. If you haven't yet fully tested the genuine board, then I recommend doing so now. If it works, then I agree with @mark tomlinson -- it's most likely a string of bad luck with the cheap boards.
     
  9. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    The last two boards link to the Arduino UI but don't link to Matter Control. The first two boards couldn't link to anything except for the first one which only worked once.
     
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    It may not link to MatterControl until you load the firmware.
    Because MatterControl is expecting to talk to a printer...
     
    Rod Smith likes this.
  11. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I thought about that. That's why I tried to load the firmware through the Arduino UI. It looks like it was able to load when I clicked upload for each file in the firmware folder.
     
  12. Rod Smith

    Rod Smith Member

    Joined:
    Nov 7, 2017
    Messages:
    87
    Likes Received:
    33
    When you say "upload for each file in the firmware folder," what do you mean? Depending on what sort of form your firmware is in, that may be exactly the wrong thing to do. It's been many months since I've uploaded Marlin firmware to an 8-bit board, so I'm a bit foggy on the details; I'm sure that @mark tomlinson can provide more details. My recollection, though, is that you must load the firmware source code into the Arduino IDE to be compiled locally, with the resulting compiled version uploaded from that. I don't recall there being a precompiled binary file being available, so there's no individual file that you'd upload; but I could be forgetting something. In any event, if you were to try to upload a source code file, or even some intermediate file, it would not work. Here's a brief description of the process on Robo3D's own site:

    https://help.robo3d.com/hc/en-us/articles/115000717071-Updating-firmware-with-Arduino

    Another point: The above page specifies that Arduino IDE 1.6.9 must be used; later versions don't work with Robo3D's version of Marlin. The current version is 1.8.13, and 1.6.9 is several years old at this point. Thus, even if you were doing the right thing, but with a too-recent version of the Arduino IDE, that might explain your problems. There are also a couple of threads that cover using more recent versions of Marlin with the R1 series than Robo3D's official version: one for Marlin 1.1.9 and another for Marlin 2.0.x. I don't know offhand what versions of the Arduino IDE they require -- or even if the Arduino IDE is the right tool for Marlin 2.0.x. (For Marlin 2.0.x on 32-bit boards, I know that developers tend to use Microsoft's VS Studio Code along with a tool called PlatformIO. I don't know offhand if that's suitable for 8-bit boards, though.)

    There are a lot of online tutorials and YouTube videos about updating Marlin firmware, but I don't happen to have any URLs handy.

    (In case you're unfamiliar with it, all but the most trivial modern programs, including 3D printer firmware implementations, are written as many individual source code files, which are then compiled [turned into a binary form] and merged together into a single working binary. [There are also scripts, which aren't compiled; but they aren't relevant to this discussion.] Marlin is distributed mainly in source code form. Some printer manufacturers make Marlin binaries available, but my recollection is that I always dealt with Marlin source code for my Robo3D R1+ prior to upgrading my printer's control board to a 32-bit board running RepRapFirmware.)
     
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    @Rod Smith has nailed it. There are a few dozen files in the Marlin source that are not firmware, but Arduino source code. You use the Arduino compiler to compile those into a single file (the firmware) which is then automatically uploaded to the Arduino. You can have it save a HEX (binary) file that can then be loaded via MatterControl as well (but you don't need to do that if you used the Arduino IDE to compile and upload it).

    The link I provided earlier : https://help.robo3d.com/hc/en-us/articles/115000717071-Updating-firmware-with-Arduino

    Has details on doing it via the Arduino Compiler
     
  14. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    This site has R1 firmware. I know that in Matter Control or Cura it could directly upload into the eeprom as a single file. The Arduino UI divided it into several parts such as the card reader, configuration h, and configuration adv so I had to upload each one separately. So was this the issue?
     
  15. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    No, you compile them all into a binary and THAT automatically gets uploaded from the compiler OR you save it as a single HEX file that MatterControl can upload.

    Only one (binary, compiled) file gets uploaded.
     
    Rod Smith likes this.
  16. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Here are the instructions:

    1. Make sure your computer is connected to the printer via USB cable. You can leave the power cord unplugged for this procedure.
    2. Do not connect Repetier, Matter Control or any other software system to your printer.
    3. Close all arduino Instances and Restart the arduino software.
    4. Under Tools choose Board and then "Arduino mega 2560"
    5. Under Tools choose Port and choose the option associated with your printer (will probably be the only option, if not, unplug your printer and see which option goes away).
    6. Under File, choose sketchbook, and then choose "Your Firmware Name".
      • Note: You may need to restart the Arduino software for it to see the new sketchbook you added
    7. Now hit the upload button in the Arduino software. This is the green arrow pointing to the right at the top of the Arduino software window.
    8. When the firmware is finished uploading, the Arduino software will say “Done Uploading"
    You are all done! Your software should confirm the updated firmware and your good to go.

    The upload will also do the compile into a single binary file for upload.
     
    Rod Smith likes this.
  17. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    Number 6 is what isn't working. I clicked sketchbook, but nothing happens. I went to sketch then add file. This is why only individual files were being loaded. How do I get number 6 to work?
     
    #37 BrooklynBay, Jan 5, 2021
    Last edited: Jan 5, 2021
  18. Rod Smith

    Rod Smith Member

    Joined:
    Nov 7, 2017
    Messages:
    87
    Likes Received:
    33
    You probably need to either reconfigure the Arduino IDE to point it to where you've extracted Marlin or move the Marlin you've extracted to where the Arduino IDE is looking for files. Here's the relevant procedure from the page I referenced earlier:

    This specifies how to unpack Marlin where the Arduino IDE looks for software ("sketches") by default; but it's also possible to change that default to someplace that's more convenient for you.
     
  19. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I've tried to add the file to a couple of different locations but nothing happens when I click the sketchbook drop down menu option.
     
  20. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    So do not use the sketchbook menu.
    Do
    File->Open
    Then browse for where you extracted Marlin and open the Marlin.ino file (that is the project file and will include all of the related source files).
    Then compile, upload, etc.
     

Share This Page