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

Gregg Aug 25, 2015

  1. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    So other than your WT shield would you say that ALL of your other devices are all working as they should with rock solid performance ???

    Can't quite figure if you've got a good upload to WT from your comments, what's the low down ? Good upload but fails to run???
    I hope you noticed that I had included the Static IP code in today's sketch and you commented it accordingly if you were trying tests without it.
    It was uncommented and live so to speek with junk IP data. That would kinda mess things up !
    Oh and it's position in the sketch would only work for me if it came BEFORE WiFi.begin()

    While tinkering the other day, it seems the shield takes it's power from the 5v supply pin, so current demand shouldn't be an issue when it's on the Arduino.

    S.
     
    Last edited: Jul 22, 2016
    Scott Eric Catalano likes this.
  2. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    'morning
    True, my current concern was on my FTDI setup only ...on the your Arduino setup, not a prob ......... Yes, other than the WT I love the ESP setup and your software ..rock solid (especially with my static IP addition)
    RE: WT problem. I get a good compile/upload but the serial monitor gives me the dreaded wdt reset problem and therefor is not accessible.
    Steve F
    EDIT: Just noticed your addition of the static IP code ... thank you, a big help ..... but still throws a wdt reset error
     
    Last edited: Jul 22, 2016
    Scott Eric Catalano likes this.
  3. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Lots of edits to my last post not in your quote above, hope you caught them ?

    Does the reset happen spontaneously? Or just when you try to connect a websocket?

    Another thing we can try (because I actually like this debugging thing :)).
    Is ESP OTA, I've been meaning to give it a go for some time, there can't be much too it.
    I can probably have a working sketch in very short order.
    One advantage is that the update gets written to a different part of progmem so there is little chance of any previous stray code causing problems
    The downside is you need the larger progmem chips, ESP 12's should be OK but not 01's as your average size sketch has to be less than 50% of progmem.

    I'm on it !

    S.
     
    Scott Eric Catalano and sboyer2 like this.
  4. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    The wdt reset shows up in the serial monitor after the upload .. and does not report any IP info as it should
     
    Last edited: Jul 22, 2016
    Scott Eric Catalano and sboyer2 like this.
  5. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Steve,

    So it no longer gets as far as your last monitor report ?

    Edit: Serial Monitor reports:
    scandone
    state:0->2 b0
    state:2 -> (0)
    state:3 -> (10)
    add 0
    aid 9
    connected with zoom, channel 6
    ip:10.0.0.11,mask:255.255.255.0,gw:10.0.0.200
    cnt
    ets Jan 8 2013, rst cause:4, boot mode:(1,6)
    wdt reset
    ........................................

    That surely points to IP misconfig, if it's doesn't make it on to the network, no ?
     
    Scott Eric Catalano and sboyer2 like this.
  6. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Serial monitor on completion of upload now reads:
    il 0
    chksum 0x42
    csum 0x42
    -ld
    ets Jan 8 2013, rst cause:4, boot mode:(1,6)
    wdt reset
     
    Scott Eric Catalano and sboyer2 like this.
  7. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Oh dear !

    On a positive note.........Blimey OTA is fast.........I got it working !

    S.

    Edit: I'm wondering if you're getting a corrupt upload because of 5V serial.....Too High !
    I have a work around ! OTA !!!

    f 0, scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 3
    cnt

    connected with BUFFALO 11N, channel 11
    dhcp client start...
    ip:192.168.11.19,mask:255.255.255.0,gw:192.168.11.1
    pm open,type:2 0
    <t1 03 0 1><t1 03 51 1><t1 03 77 1><t3 1024 0 1><t3 1024 41 1><t3 1024 86 1><t3 1024 103 1><t3 1024 44 1>


    One small caveat ! We need to get the first instance of OTA on the chip via.....you guessed it...Serial :(
    Can you patch in to your Level shifted serial lines on the DIY shield ???
     
    Last edited: Jul 22, 2016
    Scott Eric Catalano likes this.
  8. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    He says: with tongue planted firmly in cheek … :) pardon, good sir, but could you explain that in terms that a child could understand.
    Steve, it is obvious that your skills far exceed mine … I’m not sure I understand how to do what you propose … I would be most appreciative if you could do a step by step for this OTA serial procedure (RE: Can you patch in to your Level shifted serial lines on the DIY shield ???)

    As an aside, if I am becoming a burden and distraction with this dang TW shield please let me know and I’ll can it.
    With much appreciation and regards.
    Steve F
     
    Scott Eric Catalano likes this.
  9. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    OK, I'll slow down a bit. A few questions to start.

    1. Does your Usb to Serial adaptor have a 3.3v - 5v logic level switch on it somewhere ?
    2. If it does, are you programming your ESP's with it set to 3.3v - as it should be ?
    3. Which version of the Arduino IDE are you using ? Latest is 1.6.9

    4. This is a statement really. No, you're not a burden, nothing like, I'd really love to get that thing working for you.
    5. Question is are you up for the challenge ?
    5. Another statement. A new node mcu dev board arrived for me this morning :).
     
    Scott Eric Catalano likes this.
  10. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    1: I have switched to your UNO to WT physical connection as per your photo .... in order to conform to your methods am am now using that.
    2: As you show I have 5v on UNO connected to 5v on TW
    3: Using 1.6.9
    4: Thank you
    5: Oh goody ... more fun
    Steve F
     
    Scott Eric Catalano likes this.
  11. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    1. Is really a get out of jail type hack. I had an ESP a few weeks back that wouldn't play ball with 5v logic levels, took me ages to figure out what was going on.
    It seems some chips are sensitive and don't like 5v Serial. Once I'd level shifted with a diode and resistor to the RX line, bam, all is good.
    You'll remember we designed that into your DIY shield.

    Connecting as my photo is still loading at 5v logic, some chips are OK, others not.
    I would suggest you try a breadboard set up with the diode resistor combo in the RX line.
    Or go back to the ftdi usb-serial device if it has the switch I described.
    Note we are talking about just the serial signal voltage here not the 5v supply to the board, which is ok.

    Arduino 1.6.9 is good for OTA. I suggest you practice on a good module, it needs at least 1M progmem to work though.

    If I remember correctly you had a Node MCU or similar just recently. That would be ideal.

    So how would you like to proceed ? OTA tutorial ? or sort the level shifting for the WT ?

    S.
     
    Scott Eric Catalano likes this.
  12. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Tried the resistor/diode in the RX line .... still get the wtd reset in serial monitor
     
    Scott Eric Catalano likes this.
  13. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Not much else to try then.

    I guess you've played with the WiFi scanner sketch, if not then that's a great example to try as we debug a bit further.
    I've just loaded it to the node mcu board myself.

    In the IDE go...... File -> Examples -> ESP8266WiFi -> WiFiScan

    It's a nice little sketch you can upload without any additional config. It doesn't try connecting to the network, and gives an entertaining serial output on the monitor.

    Get back to me when you've tried that.
     
    Scott Eric Catalano likes this.
  14. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Same wdt error when that uploads .... I really think that my WT board has a blown chip which constant boot mode 1,6 possibly indicates ..... Thank you again for your patience
     
    Scott Eric Catalano likes this.
  15. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    OK, we can do no more for now, I would check under a magnifier before it hits the bin, just look for poor soldering etc.
    Hope you'll order a new one, they are a great solution when they work.
    Catch you later.

    Steve.

    Edit: Just found this https://github.com/esp8266/Arduino/issues/1017
    Very interesting !

    I trust you were setting switches 3 and 4 to OFF once the uploads were complete. Then resetting or power cycling to boot into run mode ???
     
    Last edited: Jul 23, 2016
    Scott Eric Catalano likes this.
  16. esfeld

    esfeld TrainBoard Member

    443
    382
    17

    As we use to say in Navy “Belay my last” ….. I changed the Arduino IDE to a flash size of 4m(3m SPIFFS) and have solved the upload problem: serial monitor now reports:

    del if1
    usl
    mode : sta(5c:cf:7f:13:f5:f5)
    add if0
    f r0, scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 11
    connected with zoom, channel 9
    ip:10.0.0.11,mask:255.255.255.0,gw:10.0.0.200
    cnt
    pm open,type:2 0

    My IP scan shows the presence of 10.0.0.11 on the network .. Now I can move on ……….. again thank you for your help etc etc
    Steve F
     
    Scott Eric Catalano likes this.
  17. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    That's great news,

    Top of the stack and give it good work out.
    I guess I'd taken for granted that you'd got the IDE upload setting correct.

    Have fun and keep me up to speed. We can do the OTA thing some other time I guess.

    S.
     
    sboyer2 and Scott Eric Catalano like this.
  18. Ed Robinson

    Ed Robinson New Member

    1
    3
    1
    Does the wireless version work with any DCC base station in the same manner as a cell phone throttle?
     
  19. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Hi Steve
    Just out of curiosity, have you played with any HC-12 radio modules? Gregg has not been too active lately and I can;t seem to find anyone else playing with these. While waiting for your wireless throttle I built his wireless (HC12- radio) throttle which works via direct wire but not with the radio modules ...... just playing around ...... any progress on your throttle?
    Regards
    Steve F
     
    Scott Eric Catalano likes this.
  20. Atani

    Atani TrainBoard Member

    1,473
    1,775
    37
    HVT and Scott Eric Catalano like this.

Share This Page