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'm using the original Arduino with a good voltage regulator, and a RAMPS 1.6 (not the 1.6+) with the adapter card. There are two 10 wire connectors going to the LCD controller. One is for power, and the other is for data. I could use the Reprap monochrome full size graphics controller regardless if the computer's USB cable is connected or not, and it is capable of running the printer. The TFT E3 V3.0 flickers when it gets power from the printer unless the printer & desktop computer with a USB are on simultaneously. This controller says that there's no connection to the printer so it's not recognizing the Marlin firmware for the Reprap full size graphics display. The controller also has an option to run in monochrome mode to emulate a 12864, but in that mode the screen is blank just like a 12864 would be if a 12864 wouldn't be set to run in Marlin.
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    There are some suggestions over here (looks like they are running Marlin 2.0 but still worth a read):

    https://github.com/bigtreetech/BIGTREETECH-TFT35-V3.0/issues/31

    The last comment on that issue probably nails it:

    "For anyone with this issue when using RAMPS 1.4 and an Arduino Mega, it is absolutely a power issue. The 5V rail on the supplied through the TFT port on the RAMPS is not enough and will drop out after a while. I solved this by plugging in the Arduino Mega through the USB port into a 5V wall transformer. Haven't had issue yet."
     
  3. Rod Smith

    Rod Smith Member

    Joined:
    Nov 7, 2017
    Messages:
    87
    Likes Received:
    33
    One more point: I'm pretty sure that the "no connection" message refers to the serial g-code mode, not to the 12864 emulation mode. If so, this is normal, unless you know of a way to connect the serial mode to the RAMPS/Arduino combination board. Is this message showing in the full-color mode? If so, then it's definitely a serial/g-code issue, and therefore irrelevant to your configuration.
     
  4. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    Here's an update. I found a way to trick it into getting into the Marlin screen. There's an option for Marlin or touch control. I set it to Marlin, but it went blank. I unplugged the USB then it turned off since there was no power. After I turned it back on it booted into the Marlin screen. All of the settings work in this mode just as the regular Reprap controller worked. It doesn't have the screen shifting issue as my Reprap controller. The color of the display is yellow with black compared to the Reprap which is blue with white. The same issue still exists where it will only work if there's power from the USB so it can't be used unless the desktop computer is providing USB power.
     
    #104 BrooklynBay, Feb 4, 2021
    Last edited: Feb 4, 2021
  5. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    The not connected to the printer error message is only showing while using the touch screen color mode. The Marlin mode works just like a regular 12864 controller. So you're saying that the touch screen needs to use a serial data mode? It came with a third cable to use an RS232 port on the back of it going into an MKS board. RAMPS boards have a small connector on the top for a card reader (Aux1) but that part is already connected with an L shaped card adapter for the two 10 pin cables going into the controller.
     
  6. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    One thing which I've noticed is that if you tap the reset or the stop button next to the dial, everything will shut off, and the controller won't work unless you unplug the USB then reconnect it. I like the features of the color touch screen controller but it doesn't seem like it's going to work with an Arduino/RAMPS set up. The Reprap screen might be my only option but it doesn't work correctly due to the display shifting issue.
     
  7. Rod Smith

    Rod Smith Member

    Joined:
    Nov 7, 2017
    Messages:
    87
    Likes Received:
    33
    There's an option to change the color settings, either in the settings somewhere or in the config.ini file, maybe both (I don't recall the details, offhand).

    The power issue is almost certainly related to the voltage provided by the board, as noted by @mark tomlinson. You'll either need a workaround (such as powering it separately from the RAMPS board in some way) or replace the RAMPS/Arduino product with something more modern. Or you can forget about using this specific control panel, of course.

    The control panel has a 5-pin serial port, which connects to a similar port on some control boards. I don't see anything that matches on the original control boards I pulled from my R1+, but many modern boards have something that works, and it's also possible that your updated board might have something suitable, or that I'm missing the connector on my board. If so I don't know what the port is. (I believe I mentioned this several posts back.) The color touch screen mode works ONLY via the serial port, so there's no way to get it working without that connection; but the panel should still work in its 12864 emulation mode without that cable. When using Marlin, you're likely to have to recompile it yourself to activate the serial port on your board, assuming it even exists. You may want to check a YouTube video on this subject, such as this one:



    That specific video refers to Marlin 2.0 on a BTT SKR board, which isn't 100% applicable to your situation. Perhaps you can find something more directly relevant to your RAMPS/Arduino setup running Marlin 1.x, but I don't happen to have a pointer to such more directly applicable documentation.
     
  8. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I saw something helpful in a review on Amazon for the regular graphics controller. This person added a time delay in configuration.h to prevent screen creep. Here's what he wrote:
    I've added this line to prevent display creep. Add before the getting started line in Config.h

    // Display creep timing fix for RepRap Discount Full Graphics display
    #define ST7920_DELAY_1 DELAY_NS(0)
    #define ST7920_DELAY_2 DELAY_NS(400)
    #define ST7920_DELAY_3 DELAY_NS(0)
     
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    I think the USB power problem is only going to be sorted as suggested above (external power applied to the USB port) or by switching to something other than the Arduino/RAMPS since that is a limitation of the 5v buss on the RAMPS. If you really want to run disconnected then the 5v supply connected to the USB port will handle that by supplying the power when no computer is connected.
     
  10. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I'm looking in configuration.h for the getting started line so that I could add the code to prevent display creep but I don't see anything mentioned with a getting started line. Do you know what the number of the line is?
     
  11. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I found something with more information here: https://reprap.org/forum/read.php?415,831502. It shows that the code goes under the display type, and also shows an additional delay but the numbers are lower.

    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
    #define ST7920_DELAY_1 DELAY_NS(0)
    #define ST7920_DELAY_2 DELAY_NS(250)
    #define ST7920_DELAY_3 DELAY_NS(250)
     
  12. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    It doesn't really much matter where in the configuration.h you add it -- within reason. This is the section they are talking about:

    //===========================================================================
    //============================= Getting Started =============================
    //===========================================================================

    Anywhere below that is fine. It is about line 42 in the one I am using BUT every version of marlin is a wee bit different.
     
  13. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
  14. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I'm testing the first one with the 400 delay in delay 2. So far it's been running for a few minutes, and I didn't see the screen shift. I was going to get another controller because I thought that this was defective when I saw a review about a fix for this issue. Another controller wouldn't have made a difference, and I would have had the same shifting issue with another controller. I'm surprised that only the Reprap screen has this issue while the TFT35 doesn't in Marlin mode.
     
  15. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    It looks like the 400 delay didn't completely work. There was a slight shift after a few minutes. I'll try the 250 on both delays, and see if that makes a difference. I've noticed an issue with the controller. Maybe it's a setting. There's a reset or stop button next to the dial control on the left. All of the functions freeze if I hit that button, and there's no way to regain control unless I shut off the screen, and unplug the USB then plug it back in.
     
  16. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    The 250 delay didn't work. I'm going to try a 400 delay on all three delays, and see if that works.
     
  17. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    It took a lot of experimenting but it seems like it's working now with this addition to configuration.h:

    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

    // Display creep timing fix for RepRap Discount Full Graphics display
    #define ST7920_DELAY_1 DELAY_NS(9999999999)
    #define ST7920_DELAY_2 DELAY_NS(9999999999)
    #define ST7920_DELAY_3 DELAY_NS(9999999999)

    The 250 number didn't work. The 400 number was good then stopped working. It was increased to 500, and was good for a couple of hours then it acted up. 1,000 was tried, and seemed to work while it was sitting but acted up as soon as I started to use various functions such as homing. 9999999999 seems to work fine.
     
  18. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I spoke too soon. It just shifted again.
     
  19. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    I found more information here: https://reprap.org/forum/read.php?1,858691. It shows additional code to be added to what was found on several other websites. It still had the same issue with the large number so the number was reduced to 999 which seems to work but might require more testing to see if it's good. It did act up a few times since I set this number so 999 might be too high. This is what my firmware looks like now:

    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

    // Display creep timing fix for RepRap Discount Full Graphics display
    #define ST7920_DELAY_1 DELAY_NS(999)
    #define ST7920_DELAY_2 DELAY_NS(999)
    #define ST7920_DELAY_3 DELAY_NS(999)
    #define ST7920_SND_BIT \
    WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \
    WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \
    WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \
    val <<= 1
     
    #119 BrooklynBay, Feb 4, 2021
    Last edited: Feb 4, 2021
  20. BrooklynBay

    BrooklynBay Active Member

    Joined:
    Apr 7, 2018
    Messages:
    452
    Likes Received:
    50
    This is what the display is showing now:
     

    Attached Files:

Share This Page