Fitting the MKS-TFT32

Répondre
SusanW
Messages : 17
Enregistré le : 06 janv. 2019 16:31

Fitting the MKS-TFT32

Message par SusanW »

Hi - I'm struggling to get the RS-CNC display fitted and plugged in. I have an MKS-TFT32(v4) board, but it doesn't fit into the printed "2xTFT_holder" display mount; the TFT is about 1/2mm too high and there's a little diode (or something) in the way on the back in the top right corner. Should I just force it, or is there a technique I'm missing, please?

Also, the TFT board has 3 identical 2x4w connectors, marked WIFI, SD_EXT , and AUX-1. I'm 99% certain that the Arduino shield plugs into the AUX-1 one ... could you please confirm, before I make an assumption that blows it all up...? :o

Thanks very much!

S.
SusanW
Messages : 17
Enregistré le : 06 janv. 2019 16:31

Re: Fitting the MKS-TFT32

Message par SusanW »

Ok, so we snipped off the little clips on the top of the TFT board holders, and now the board sits there just fine, held only at the bottom. The cover seems to hold things in place.

We overcame the 1% of doubt and uncertainty, and plugged the TFT board in on its AUX-1 port. It powered up, and has loaded up its firmware from SD-card, and it's all very pretty, but when we try actually controlling the machine from the display, nothing happens.

So, new problem: TFT display controls don't work.

The motors operate correctly from the nunchuck, and from a PC sending G-code connected over USB. I can drive it all fine from Repetier-Host. But it ignores commands from the TFT (eg from the Move or Home menus). If I was told that the display wasn't actually connected to the Arduino at all (apart from power/gnd) I wouldn't be surprised!

I've checked the connections and pins, and everything seems good. And the fact that the screen powers up and seems to work in itself suggests that it's something a bit subtle. The problem persists if I disconnect the USB.

One observation: when controlling the machine from a PC running Repetier-Host, pressing a TFT control button (eg Home X) causes the Repetier-Host console to report "Resend: 15" (or some command number). So I think there IS communication going on.

Any ideas, anybody? Do we have to enable something to make the TFT work?

Thanks!
Avatar du membre
RoMaker
Administrateur du site
Messages : 5063
Enregistré le : 02 janv. 2017 20:24
Localisation : Montpellier
Contact :

Re: Fitting the MKS-TFT32

Message par RoMaker »

Hi Susan,

TFT can not work if connected at same time to the computer.

Romain
SusanW
Messages : 17
Enregistré le : 06 janv. 2019 16:31

Re: Fitting the MKS-TFT32

Message par SusanW »

Hi Romain,

>> The problem persists if I disconnect the USB.
> TFT can not work if connected at same time to the computer.

We tried it with the USB disconnected (from cold boot). Still didn't work...

(The reason for mentioning what happened when the USB is connected, was to highlight that there appears to be some kind of internal reaction when a button iis pressed).

Any thoughts, please?

Susan
Avatar du membre
RoMaker
Administrateur du site
Messages : 5063
Enregistré le : 02 janv. 2017 20:24
Localisation : Montpellier
Contact :

Re: Fitting the MKS-TFT32

Message par RoMaker »

When you say that the tft does not work, you have no reaction, even "spindle on" button who activate the relay ?

Can you try with another arduino and another tft?
SusanW
Messages : 17
Enregistré le : 06 janv. 2019 16:31

Re: Fitting the MKS-TFT32

Message par SusanW »

Hi,

Problem solved: baud-rate issues! The MKS-TFT32 talks to the Arduino over a serial connection (didn't know that before), and must be configured same as anything talking down the USB port.

So - to recap: Repetier-Host on a Linux PC could control the machine fine over USB, but the TFT32 display was unable to control the RS-CNC: the UI worked but no controls had any actual effect (including spindle control). Plus, small observation: Repetier-Host's console on the PC showed a "Resend: " command when a display button was pressed, implying that there's a connection, even if nothing actually worked.

There's a long-standing issue that the Arduino community have converged on 250kbaud for clock-multiplication reasons. This is a non-standard speed, and is problematic in Linux (according to Daid from Ultimaker (Mr Cura) here: https://github.com/MarlinFirmware/Marlin/issues/205). If you try to set Ubuntu PC software to 250000, you're likely to get "Error while setting serial port parameters: 250,000 N 8 1" unless that software has been most carefully written.

So I'd set my Repetier firmware to 115200 so it could talk to my PC happily. But I didn't know that would screw up the display connection. I should have looked closer at the TFT32 board: it says Rx/Tx on AUX1, which would have been a big hint.

Quick fix: edit the mks_config.txt in the MKS_TFT32 firmware to ">cfg_baud_rate:3" (or whatever rate you want, changed from default 4). Whatever you do, make sure that your PC software, the TFT32, and the Arduino all agree on baud-rate!

Thoughts: I had a dig through the Arduino's Repetier firmware to see if I could set the AUX-1 baud-rate independently of the USB, but it wasn't obvious (it seems pretty fixated on having lots of Bluetooth channels). When we found how easy it was to change the TFT32, I stopped looking ... but I might have another look - it seems odd that the firmware would admit to only one serial input channel, given how obvious it is that a machine would have multiple control sources (USB, display UI, nunchuk etc) and it's clear that there's some work going on in Repetier to provide a GCodeSource concept.

In the discussion on the Marlin site linked above, there are concerns raised about data errors due to clock-sync'ing at 115200. I haven't experienced that, afaik. There are also concerns about data under-runs at low baud rates: probably not a concern on a CNC: 115200 is still ~500 long GCodes per sec, although the tiny Arduino data buffers might be vulnerable to running dry. I'll keep my eyes open.

Susan
Avatar du membre
RoMaker
Administrateur du site
Messages : 5063
Enregistré le : 02 janv. 2017 20:24
Localisation : Montpellier
Contact :

Re: Fitting the MKS-TFT32

Message par RoMaker »

Thank you for your feedback,

Yes Baud rates must be set to the same value on repetier host, repetier firmware and TFT firmware
Répondre