Introducing DCC++ ---a complete open-source DCC station and interface

Gregg Aug 25, 2015

  1. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Any significant changes changes in this iteration?

    I 'm a bit confounded ... Gregg has stated that he has good response from ESP8266 using Arduino 3.3V onboard input ...
    as I have indicated I found that unreliable ..... I have now wired up a 3.3V regulator that promises 950 ma ... my meter
    reads a steady 3.3 volts to the ESP but I still can not get an IP response from the ESP ..... I do get an IP response using
    the 3.3V output from a breadboard power supply .... all this after having a working (but unreliable) stack ....... I am still
    using the same UNO/Motor Shield as before. I'm not sure what I messed up ...... frustrated! Waiting for a ESP8266 V3 Nodemcu 12 Lua which should ease my pain :)
    Steve F
     
    Last edited: Jun 2, 2016
    Scott Eric Catalano likes this.
  2. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    JB
    I had the same problem ...... see my post #1296 on page 65 for the solution
    Steve F
     
    Scott Eric Catalano likes this.
  3. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi JB

    Steve F (esfeld), wrote some code that might help you - see his post at #1296.
    Not tested myself.
    Pleased you got things working, enjoy.

    Steve.
     
    Scott Eric Catalano likes this.
  4. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    No significant changes to the server code.

    So the problem appears to be with the UNO itself.
    I take it you are drawing from the 5v source ???
    If it works with a breadboard supply at least we've ruled out faulty ESP's.

    I missed Gregg's post about ESP's where can I find it?

    S.
     
    Scott Eric Catalano likes this.
  5. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Yes, running 5V from UNO into the regulator and get 3.3V out ESPs are all fine......... Greggs post: #1078 on page 54 ...... BTW I've tested my code addition for a static IP .... works like a dream.
    Steve F
     
    Scott Eric Catalano likes this.
  6. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    Ah yes you mean Dave Bodnar at #1078.

    Do you have another Uno to test with ?

    Great news on the code addition, I'll add it with a comment option for use. Well Done !
    If you can code like that, would you be interested in getting a TCP > Serial bridge working on our server code.
    With it's Async capability it would be a truly universal wifi connection component, as then we could connect any application/throttle/dongle/thingy simultaneously.

    Steve.
     
    Scott Eric Catalano likes this.
  7. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Steve and Steve F.
    I insert the code on sketch and I changed also the IP on the Html app . Now all works fine.
    Thank you so much. Now I just need to correct the html for iphone and ipad. :)
     
    Scott Eric Catalano likes this.
  8. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Steve F,

    Do you get your 3.3v right at the vcc pin on the ESP, when it is mounted on the Uno ?
     
    Last edited: Jun 2, 2016
    Scott Eric Catalano likes this.
  9. Andrei

    Andrei New Member

    4
    2
    8
    Thanks a lot. I switched to the recommended motor shield and ... I got it working!!!

    Andrei
     
    Scott Eric Catalano likes this.
  10. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Yes, 3.3 at the ESP VCC pin. I have tried changing both ESP and UNO to 9600 Baud. Tried additional ground connection to insure common ground. Baffled, but still working on it,
    Steve F
    BINGO! In comparing my breadboard setup and my ESP Shield .... I saw that I had a 10k resistor from VCC to CH_PD on the breadboard (why I haven't analyzed yet) .. but not on the shield .... added one and now I have reliable ESP results. BINGO!
     
    Last edited: Jun 3, 2016
    sboyer2 and Scott Eric Catalano like this.
  11. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Steve,

    At last !

    But how did it ever work without it ?

    In other news, I've ordered one of these...

    unnamed.jpg
     
    Scott Eric Catalano likes this.
  12. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Not really sure ... I would say a sloppy solder job ... but VCC and CH_PD are not neighbors ...... whatever it was, it was sloppy something and that explains why it was intermittent .
    I too am waiting for one of those shields ......OH goody, more testing :)
    Regards
    Steve F
     
    Scott Eric Catalano likes this.
  13. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Excellent.
    This weekend I'm going to try hacking some code together to do a TCP > Serial bridge alongside Websocket.
    The aim is to have something like Gregg's Controller app running with the Mobile Controller.
    If that can be done, then things like Dave Bodnar's new throttle can be easily hooked up together as well.

    S.
     
    Scott Eric Catalano and HVT like this.
  14. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Gregg, thank you for all your effort in developing this system! I do have a Mega with Deek-Robot clone motor shield running, but I'd like to use the Itead MotoMama shield with the upright L298N chip with nice big heatsink.

    The MotoMama is a poster child for the above scenario, since it brings out the four H-bridge inputs directly without the inverting logic. I am trying this weekend to use a hex inverter chip to provide the functionality, but I'd be interested in the long run to use your above scheme if you ever progressed with it. On the MotoMama, channel A's inputs are pins 8 and 9, and channel B's inputs are pins 12 and 13.

    In the interim, I'd like to try using Mega's T/C 0 to drive pin 13 as the Main (using a hex inverter for matching input pin 12) and T/C 4 (16-bit) to drive pin 8 as the Prog (using a hex inverter for matching input pin 9). I'm not a programmer but I've looked through your code and it seems to me that I could edit your channel code for the different timer-counters. Pin 13 uses 0C1C and pin 8 uses 0C4C.

    In my naive state it seems to me that I can just do a search-and-replace to edit the register callouts in DCCpp_Uno.ino to use the new timers, and in DCCpp_Uno.h to define the revised pins. Is there more to it than that?

    Thanks again,

    Randy
     
    Scott Eric Catalano likes this.
  15. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    All,

    I've been experimenting with some new code for the ESP8266.
    While this shouldn't really work, somehow it does !
    In the screenshot below the WebApp (Mobile Controller) is running a websocket connection.
    Putty has a standard TCP Telnet connection (over WiFi).
    Arduino serial monitor has a cable connection.
    All work at the same time, what comes back from Base Station appears on all 3 simultaneously.
    I will qualify this work with the firmware developer. But initial trials seem promising.
    Hopefully this will lead to a standard server code, which can handle combinations of connections for all devices that output Base Station serial commands.

    Steve.

    CaptureU.JPG

    Update, 2 instances of Mobile Controller and 1 of Gregg's Controller all working at the same time !
     
    Last edited: Jun 5, 2016
    esfeld, FStop8, HVT and 1 other person like this.
  16. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve/Gregg/Dave B
    Maybe I'm late to the party, but I just found a very helpful and effective tool to help with circuit design. No need for a breadboard or large stock of components ...... check it out: http://lushprojects.com/circuitjs/ .......... I love it!
    Steve F
     
    chi.sp, HVT and Scott Eric Catalano like this.
  17. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    That could come in very handy.
    And as a spin off the Html5 technology used to construct your circuit could also be used to construct a model railroad circuit.
    Think turnout control from your mobile device. :)
    Something for me to look into down the line so to speak.

    Steve.
     
    HVT and Scott Eric Catalano like this.
  18. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Gregg ... and maybe Steve K
    While waiting for some boards to arrive I am trying to load DCCppUno to a LOLIN ModeMcu V3 board (supposedly a Chinese clone of the UNO..with built in 8266) .... I got Arduino_file_for_8266 to upload (to the ESP portion of the board) but can not get DCCppUno to upload without errors ........ are we not compatible with this board?
    Thanks
    Steve F
    Just received an Arduino ESP8266 WiFi Shield Version 1.0 by Wang Tongze .... anybody uploaded to this shield? I'll wait till the AM to play with it ...... hope I'm not the first and someone can give me some insight.
     
    Scott Eric Catalano likes this.
  19. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    Do you have some links for those boards, I can't find them anywhere.
     
    Scott Eric Catalano likes this.
  20. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Last edited: Jun 7, 2016
    Scott Eric Catalano likes this.

Share This Page