Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 16 of 16

Thread: Looking for suggestions for touchscreen display for T4.0

  1. #1

    Looking for suggestions for touchscreen display for T4.0

    I'm looking for feedback on experiences or suggestions for a touchscreen display that I could integrate with several T4.0 projects. I need to draw a graphic representation of a keypad with some function keys (i.e. a standard number pad with Exec, Backspace, etc.) on the bottom of the screen. The touchscreen entries would then provide the running program with operational information. This would, essentially, be a way to eliminate the terminal interface to my USB connection to the computer to provide runtime data to the program. Runtime data values would be displayed on a section of the screen not used by the keypad display. I'm planning to use an external +12.0VDC power supply with a +5.0VDC regulator (or +3.3VDC regulator, if needed for the display) for the power supply. The +12.0VDC will be used for a geared stepper motor.

    I see the ILI9341 is available from PJRC and has a resolution of 320x240. Is this the best selection or is there something better? Any examples would be greatly appreciated.

    Thanks for any feedback.

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    312
    Quote Originally Posted by starfire151 View Post
    I see the ILI9341 is available from PJRC and has a resolution of 320x240. Is this the best selection or is there something better? Any examples would be greatly appreciated.

    Thanks for any feedback.
    You need to be explicit about what you mean by "better" - battery life? size? brightness? anti-glare? speed? economical?

  3. #3
    Quote Originally Posted by MarkT View Post
    You need to be explicit about what you mean by "better" - battery life? size? brightness? anti-glare? speed? economical?
    To be "explicit"... less power drain would be "better", as good or better resolution, the size is not as critical a concern, being able to see it easily outside would be beneficial but not essential, as shade can always be provided, if needed.

    In short, I'm asking if anyone has experience with implementing a touchscreen in a mode similar to what I've described and, if so, would you do it the same or "improve" your design?

    Any constructive feedback is appreciated.

  4. #4
    Junior Member
    Join Date
    Aug 2020
    Posts
    2
    Quote Originally Posted by starfire151 View Post
    To be "explicit"... less power drain would be "better", as good or better resolution, the size is not as critical a concern, being able to see it easily outside would be beneficial but not essential, as shade can always be provided, if needed.

    In short, I'm asking if anyone has experience with implementing a touchscreen in a mode similar to what I've described and, if so, would you do it the same or "improve" your design?

    Any constructive feedback is appreciated.
    I will suggest you to use Nextion HMI, I hope it will fulfill your requirements.

  5. #5
    Thank you. This is exactly what I was looking for.

  6. #6
    Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    55
    Be careful of serial ttl voltage levels. Some are 5v, will blow up your 4.0, some are 3.3v which would be ok. Check the relative data sheet on the Nextion web site for your model of interest. All the data is there.

  7. #7
    Quote Originally Posted by BriComp View Post
    Be careful of serial ttl voltage levels. Some are 5v, will blow up your 4.0, some are 3.3v which would be ok. Check the relative data sheet on the Nextion web site for your model of interest. All the data is there.
    Thanks for that. I found the NX4832T035_011 display from Amazon. Going to the Nextion homepage and getting the specs for this part shows the Output High, Output Low, Input High, and Input Low levels under Interfaces Performance as being within the 3.3V range so I wired the display directly into the T4. I have it wired to TX2 and RX2 on the T4.

    Has anyone used this display? I'm having problems getting CompButton_v032.ino to run. It compiled OK. I downloaded it to the T4 and nothing happened. The default built-in program continues to run on the display. I opened a terminal port and it shows the start-up messages from the program.

    I saw another posting by someone using the 10" Nextion display. It talked about changing #define nexSerial Serial to #define nexSerial Serial2 in the NexConfig.h file. When I checked my NexConfig.h file, it is already set to Serial2.

    Thanks for any help.

  8. #8
    Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    55
    If the default built in program is still running on the Nextion then you have not loaded the HMI file into it.

  9. #9
    Quote Originally Posted by BriComp View Post
    If the default built in program is still running on the Nextion then you have not loaded the HMI file into it.
    I guess that's mostly my problem... I loaded the CompButton_v0_32.ino into the Ardunio IDE, compiled it, and downloaded it (I thought, anyway). When I ran the terminal session, it displayed the messages from the .ino program to the terminal correctly.

    You say I have to load the HMI file? There was a CompButton_v0_32.HMI file included in the example directory of the ITEADLIB_Ardunio_Nextion-master directory. Is this the file? Is there a step-by-step example of how to do this with this display? How do I download the HMI file to the display? How do I specify which serial port to use?

    I've sent e-mails to Nextion about how to get started but they're a little less than helpful.

    Any specific information you could provide to help me get started would be greatly appreciated.

    Thanks for responding.

  10. #10
    Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    55
    You have to set up the display and any built program you want to run using the Nextion Editor.
    I suggest you read Nextion Editor and https://nextion.tech/instruction-set/

  11. #11
    Thanks very much. I will do that.

    It was just a little confusing to start with. I have looked at the instruction set. I downloaded and installed the editor but when I tried to load and run one of the hmi files included in the examples directory, it stated it was in an earlier version and didn't execute. Hopefully the editor guide will give a good example of how to use this display.

    I guess I was under the mistaken notion that the display module would be programmed through the serial port of the T4. It appears the HMI editor has to be used to develop the target application to be loaded into the display first, then moved into the display through the microSD card slot. Then control and status information can be sent and received from the T4?

  12. #12
    Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    55
    It appears the HMI editor has to be used to develop the target application to be loaded into the display first, then moved into the display through the microSD card slot.
    That's correct. You can also download the HMI over the USB Serial port. You can also simulate the Nextion display using the Editor. It can be hard reading to begin with, but once it starts to make a little sense it all falls into place.

  13. #13
    Quote Originally Posted by BriComp View Post
    That's correct. You can also download the HMI over the USB Serial port. You can also simulate the Nextion display using the Editor. It can be hard reading to begin with, but once it starts to make a little sense it all falls into place.
    Yeah. Thanks for that. I found the Nextion web site a little confusing. There's really no linearity for first-time users. I did manage to find some good Youtube videos describing the setup process with some examples.

    Thanks, again.

  14. #14
    Junior Member
    Join Date
    Aug 2020
    Location
    Beijing, China
    Posts
    2
    STONE HMI is a firm choice too. The working principle is similar with Nextion.
    Nextion programming is procedure oriented, while STONE programming is more like object oriented.
    STONE HMI works more stable in complex environment too. If your project is used outdoor or in factory, I think STONE HMI will fit better.

  15. #15
    Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    55
    Only problem is that the stone is considerably more expensive. I paid 27 for my 3.5" Nextion, the Stone equivalent would cost me 43.

  16. #16
    Quote Originally Posted by LeonSTONE View Post
    STONE HMI is a firm choice too. The working principle is similar with Nextion.
    Nextion programming is procedure oriented, while STONE programming is more like object oriented.
    STONE HMI works more stable in complex environment too. If your project is used outdoor or in factory, I think STONE HMI will fit better.
    Thanks for the alternative. After looking at their site, though, these displays are much more expensive than the Nextion models (like twice as much).

    I have been able to get a preliminary program with bi-directional communication working between the T4 and the Nextion NX4832T035 module (thanks in large part to Youtube videos). It works pretty good. Now I'm just expanding the basic program to accommodate my needs.

    One thing to watch out for on the Nextion displays, though, is their power usage. They take a lot of power. They recommend you use a separate +5VDC @ ~ 1A source (like through a wall-wart) to power the display. Although they don't explicitly state it, the data sheet for the module lists the interface voltage levels at being within the +3.3VDC range. I have the serial TXD and RXD lines connected to the T4 serial port 2 connections and it works fine with the preliminary program.

    Thanks, again, all who responded.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •