ESP32 DCC++ - a few questions

AndyH Jul 30, 2019

  1. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    So I have an arduino Mega base station with a motor shield on top, and have crated, but not installed, a high current booster circuit from Dave Bodnar. I have tried to put an ESP-01 shield on it so that I can control it without JMRI, but that created interference with running it through JMRI at the same time. Which was annoying. But liveable with, especially if I create a Dave handheld throttle, which would be easy enough to do.

    BUT, I am wondering if there is a better way, and am curious about the ESP32 variety of things. However, this seems much more complex than the very basic Arduino product, so I have a few questions. The ESP32 Command Station thread has got rather complex for a rank amateur such as myself.

    1. I can get my head around the Arduino system. I cannot programme, but I can at least see what various bits of the programming are doing - the important bits where it is useful for me to have a clue. How much harder is it to know what is going on with the ESP32 system?
    2. What benefits does the ESP32 system give? Can I easily connect using WiThhrottle to it (or engine driver or digitrains)? Is there an easy way to turn the track on or off, or could that be built in to it?
    3. What do I actually need? I know that there are a whole load of add-on modules, but what do they do, what do they add to the experience, how difficult are they to add in, can they be added in later without much by way of issues? And is there an easy to follow diagram as to how to wire everything up? Given a map, I’m reasonable with a soldering iron.
    4. Is there a way to run an ‘accessories’ circuit to run turnouts, leds etc separately from the main track? I had heard that this was useful so that a short which triggered the main circuit wouldn’t prevent you from moving a turnout (not sure why you would need this, but hey)?
    5. What does Atani’s kit give you that a normal home brew kit wouldn’t? What current output on the main circuit is there in the kit?
    6. Can you run a Dave Bodnar wired throttle with it?
    I’m sure I will have other questions, but these will do for now. Thanks in advance for all help, very gratefully received. Even if it is ‘stick with what you know’ (but with a bit of explanation please).
     
  2. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    It should be relatively painless to transition from the DCC++ Arduino code to the ESP32 CS code. The primary shift will be in going from Arduino IDE to PlatformIO IDE.

    There are a lot of benefits with the ESP32 CS vs DCC++ Arduino, the biggest being that the project is ACTIVELY MAINTAINED! Other benefits can be seen here.

    WiThrottle support is planned but is not currently integrated into the CS itself, but this can be done today using JMRI connected to the CS via TCP/IP. I do plan on implementing WiThrottle support natively soon though which will remove the necessity for JMRI to be running it's WiThrottle server.

    This should mostly be internally handled by the CS itself. There are a few cases which do not yet follow this model but they are being tracked for fixing.

    IF you are eager to jump in NOW you can start with an ESP32 board utilizing the Arduino Uno layout, something like this: https://github.com/atanisoft/ESP32CommandStation/blob/master/docs/esp32-boards/LilyGO-esp32-uno.jpg

    Though, I'll be releasing a PCB kit soon which will include everything you would need on one board! I'm working on the final testing of the v1.0 boards and will be ordering the v1.1 boards in the next week or so. The PCB kit details can be seen here.

    The easiest way would be a dedicated booster device for the accessories bus if you want to run the accessories on it's own bus.

    See above for the link to the kit details. But in short the kit will give you a plug-and-play CS (like a commercially available CS) providing up to 3Amp for the OPS track and 250mA for the PROG track.

    As long as Dave's throttle uses the DCC++ protocol to communicate with the CS it should work. If you are meaning his Nextion interfaced throttle then no, there is however a Nextion throttle that *IS* integrated into the CS and available via WiFi!

    For a serial connected throttle the approach you would use for this would be with the HC12 configuration to open the serial port for sending/receiving data with the throttle. You don't actually need to use an HC12 module for this if you want to use a physical wire between the CS and a single throttle device.
     
    AndyH likes this.
  3. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Thanks Atani.

    Your pcb kit.

    1 - what would 3A run in terms of trains?
    2 - how much is it likely to be, and what are the options? I am interested in keeping cost delivered to the UK under £15 ~$18. (Makes importing easier)

    Ta

    Sent from my SM-G955F using Tapatalk
     
  4. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    That would depend on the scale and if you are planning to run sound, non-sound, etc. There is no guarantees on how many active locomotives it should support as each decoder can consume a different amount of current at any one time. But I'd guess somewhere around 10 locomotives assuming they are sound equipped as a rough guess. I haven't seen a huge current draw with any of my locos on the track but then again I'm running N scale and most of the decoders max out around 1/2-1Amp as a surge current but rarely go over 1/2Amp total.

    Currently the price is around $30 USD for an unassembled kit, shipping would be extra.
     
  5. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    How much for the pcb and a shopping list of parts?

    Sent from my SM-G955F using Tapatalk
     
  6. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    If you want to order just the PCB and order all of the parts yourself you will be able to. I haven't calculated the final price for just the PCBs but it should be around $5 USD plus shipping.

    However, ordering all of the parts you will likely end up spending in excess of $50 USD plus shipping. The only reason I'm able to have the complete kit price be significantly lower is due to ordering in bulk. I've currently got enough stock on hand for 10 kits (5 claimed already) and I'll be ordering a larger quantity of parts for kits with the v1.1 PCB order.
     
    AndyH and bocabob like this.
  7. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Good points, well made. Can you let me know what postage would be to the UK please?

    Sent from my SM-G955F using Tapatalk
     
  8. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    USPS prices for first class mail ranges from $24 USD (under 2lbs) to $37 USD (up to 4lbs). USPS Priority Mail is $36 flat rate (up to 4lb).
    FedEx and UPS would be in excess of $100 USD so I would not suggest either of them.

    Once I have the final set of bits for the kit I'll put together as light a package as I can that will keep everything safe for the journey and I'll weigh it and confirm the prices.
     
  9. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    US prices are cheaper also . I know you are posting for the UK, just wanted others to know.

    Dennis
     
    Atani likes this.
  10. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    USPS Flat Rate Priority within US is around $8 USD...
     

Share This Page