A Nextion Based Controller for DCC++ and DCC-EX

NormHal Sep 6, 2022

  1. Sumner

    Sumner TrainBoard Member

    1,849
    2,663
    47
    I read it through twice so probably missed something but my thoughts and my perspective is someone who has managed, after YouTubes, to use an Arduino in basic terms and program one a bit. If you are trying to reach someone like myself or someone with less experience links to some basics might be helpful. As it is written right now I don't feel it is basic enough maybe for myself or someone with less experience. I still haven't tried to take something and proceed with it using only a GitHub source. Maybe it should stay that way as I know there are a number of people out there that have the ability to use what you have as it is.

    Another question would be and considering the cost of a 5 inch Nextion is what does it have to offer over what I have now which is an Android phone running EngineDriver with a physical throttle (volume control) attached? Also where do you see it going? EngineDriver has been improved over the years with more and more features. I'm interested in your throttle thinking if it catches on and you, your team and maybe with more help from the Discord guys it could also evolved past where it is now.

    So on to some suggestions:

    1. Links to how to load the sketch onto an ESP32. You reference the Uno and I think it is the same but maybe clarify that?

    2. If the ESP8266 and Uno aren't really as good as the ESP32 maybe remove them and go with the ESP32 only. It is not like the others are a lot cheaper.

    3. I know you started with this being a tethered throttle to a command station and I think that with a cabinet design that would house a power supply, buck converter, mega with WiFi and one of the three options that has appeal for smaller layouts. I would look like a commercial command station. With that said I think what most want, probably even if they have a smaller layout, is a wireless handheld throttle. With that in mind I'd expand the option for it and the associated battery and charging circuit. Wonder if Dave's charging circuit and battery options might be a start or I'm sure there are easier options like the battery shield we discussed further up the thread.

    4. Also on the Encoder would his application of the 'caps' be what you mentioned as a possible add-on to the encoder?

    5. To replicate some of the other handheld controllers instead of using the encoder push button could a 2 way switch replace if for more of a throttle feel and sight reference to the current direction?

    6. The wiring is very basic and the description handles it but I still feel that a simple schematic with the parts shown would be nice and would also show how little wiring is needed vs. some other do-it-yourself throttles.

    7. As far as the Basic vs. Enhanced Nextion would we see a difference on the screen between one or the other? Is the Enhanced something that would be better to have down the road if the throttle evolves. If so I think I'd just reference the Enhanced, not much difference between them.

    8. I feel that images always help on selling the idea of something and feel that a build step-by-step with pictures/images or a YouTube video would also help broaden the group of people that might be interested in building the throttle.

    I do realize that you are in basically in the beginning steps of the project, even though you have put in the time over the past years, so take it step by step and don't burn yourself out and the others. Easy for me to say do this or that and I do realize the time needed to accomplish it.

    The best to you and the rest of the guys working on this. I think it has a lot of potential,

    Sumner
     
    Erik84750 and NormHal like this.
  2. Erik84750

    Erik84750 TrainBoard Member

    269
    92
    10
    An extensive manual is in the writing. At the moment the project is ready for install for all those familiar with the basics of Arduino programming.

    Where did you read the ESP8266 or the Uno/Nano/Pro Mini are not as good as the ESP32? The project runs well on all three families of processors; but what I wrote before is that the ESP8266 has some limitations, which has no bearing on the workability on a ESP8266.

    We have advanced a lot since David's Nextion throttle. And basically, this project is all about being wireless. But I understand some accompanying "how-to" is necessary. And in the works.

    The "caps" (capacitors) for the rotary encoder are optional, to make sure there are no parasitic signals; will be covered in the "how to" doc.

    The encoder already has the built-in available physical switch for direction reverse. Far more handier than a separate button.

    In the works.

    The enhanced has the advantage of built-in EEPROM, meaning a lot of data is stored without the program having to rehash at every start; and for the difference in price absolutely worth it.

    Time will tell and marketeering is not an electronics developer strongest asset :ROFLMAO:. But we will look into that.

    The project is "oven ready", as our beloved Boris would say :D.
    We are far from burned out. and basically we started somewhere around Jan 1st, 2022. Let the champagne roll ;).

    If Norm or esfeld or... has to add/rectify on my musings we will read it here ;)

    Thank you very much!
     
    Last edited: Oct 6, 2022
  3. Sumner

    Sumner TrainBoard Member

    1,849
    2,663
    47
    Reading this...

    • An ESP32 as the Host processor (Recommended Configuration)
      • The amount of integrated Memory, additional Hardware Serial Port and WiFi make this the processor of choice
      • In addition to facilitating WiFi, its range of features and relativly affordable cost, contribute to its strengths
    It looked to me that they all work but maybe why have all the options if the ESP32 is the 'recommended configuration' and it is easy to get and cheap. Would cut down on documentatio. I had a trading post for a number of years and sold a lot of jewelry. When there were too many options for a buyer to chose from I found that at times they just wouldn't buy anything. I'd found that only keeping so much out that I sold more that way. I guess it all depends on who you are targeting with this.

    On not using the button on the encoder I was thinking that if I remember right one of the goals was to move towards something like the Proto throttle...

    [​IMG]

    ... as an option. So instead of using the encoder as the reverser use a physical switch as an option. Possibly adding other features that could be physically controlled as options down the road. I didn't go back and look but maybe I'm mixing up what your guys are doing with another thread here or somewhere else.

    Sounds like a lot of what I brought up will be covered in the manual so look forward to it.

    Sumner
     
  4. mtncityman

    mtncityman New Member

    2
    0
    1
    Downloaded V1.1 and installed per the instructions available. Using ESP32 with Nextion Nx4024TO32-011R. Program compiles, and 1st Flash Screen looks great. Touch the screen and Main Menu with configuration loads. Power and Stop/Go buttons work but none of the other buttons do anything. Just wondering if the TFT file only contains 2 pages???
     
  5. esfeld

    esfeld TrainBoard Member

    436
    381
    15
    Sumner, Here is a simple DIY case for our throttle. The small window is a voltmeter to read the battery voltage .. the batteries I use for the ESP 32/Nextion are two 3.7V cell phone batteries in parallel... with a JST connecter on the side for charging. I have made these for 3.2", 3.5" and 5" Nextions .... Just an idea if your looking to do 3d printed versions. BTW this is an old pic showing a much earlier version of the code .. the latest code is very much improved as you can see in Norms pics.
     

    Attached Files:

    Last edited: Nov 13, 2022
    Sumner likes this.
  6. NormHal

    NormHal TrainBoard Member

    128
    117
    11
    Hi! The tfts actually have 15 pages - but they are accessed via communication with the host (in your case an ESP32?)
    The symptoms you describe indicate that there is no communication between the ESP32 and Nextion... If you're using the sketch as uploaded, you should connect the Yellow (RX) wire to pin GPIO17 of the ESP32 and the Blue (TX) wire to GPIO16. The baud rate speeds between the two have been pre-configured for 38400 bps so there is no need to change them:)
    As a small BTW, version 1.2 of all the Nextion Images and the Arduino Sketch is very imminent - I'm busy with some final bugs fixes and testing, and should be available before the end of this week:).

    EDIT: PS. More "Beta" testers are always welcome:) - if you're interested, you could join our development group?
     
    Last edited: Nov 13, 2022
  7. mtncityman

    mtncityman New Member

    2
    0
    1
    always interested in Beta testing.. I've been working on this project for a month - starting with Dave Bodner's original version..just couldn't get the radio versions to work with DCC_EX CS wifi. That's why I like the mods you are making - all Wifi.
     
  8. NormHal

    NormHal TrainBoard Member

    128
    117
    11
    I'll send you an invite... I've just uploaded version 1.2 for the guys so you will also be able to see and download the "raw" HMIs.
     
  9. NormHal

    NormHal TrainBoard Member

    128
    117
    11
    New Version uploaded!

    Version 1.2 had just been posted on Github - " https://github.com/normhal/DCCppEX-Nextion-Controller " Apart from some rather significant changes to both the Nextion images and the Arduino Sketch, the major new feature is support for a "Guest" loco. Due to operational experiences, the need for "instant" access to a non-permanent loco address was needed. This is facility is accessed by touching the currently active Loco Address which causes the Nextion to prompt for a "guest" address which can instantly been controlled, without interference to the existing active Locos. Touching any "other" location on the display instantly discards the Guest and restores the interrupted state.
     

Share This Page