DCC_EX programming rail Current problem

ricky101 Mar 25, 2024

  1. ricky101

    ricky101 TrainBoard Member

    14
    10
    9
    Hi,

    Have built the command station using and ESP32 Wroom board and a L298 module.

    It drives the Loco ok on the main track using the browser Web Throttle but even though nothing is connected to the Programming track output connector it continues to output an alarm message .

    Even so, it is possible to Read a CV from the loco , though a Write fails .

    001977.jpg

    The Motor Shield values are as below, and use an inverter chip rather than ports.
    Have tried various different values but nothing eliminates the Alert.
    Measuring the ADC input shows virtually 0.00v

    001978.jpg

    The first build, a breadboard, showed this problem, but thought a properly soldered board might cure it, but no effect.
    The ESP32 and L298 modules have been changed, and the software totally removed and reinstalled, to no avail.

    Though there is a formula for the Current Sense values not sure about using it for the ESP32 12 bit adc as do not know its set to 12 bit or 10 bit ?

    Any help appreciated.
     
    Mark Ricci likes this.
  2. Sumner

    Sumner TrainBoard Member

    2,846
    6,001
    63
    If you haven't posted this on the DCC-EX Discord channel .....

    https://discord.com/invite/PuPnNMp8Qf

    .... I'd consider doing that. Unless one of the developers happens to see it here not sure if any of us can help.

    Sumner
     
    Mark Ricci and BNSF FAN like this.
  3. ricky101

    ricky101 TrainBoard Member

    14
    10
    9
    Hi again Sumner,

    Have joined various forums and buying sites but never had such strange problems as trying to join that Discord forum.
    Tried three times using both Edge and Firefox and with two different email addresses and still cannot log in to that forum ??

    Probably just me and old age , but think its time to go back to the our 15 year old obselete dcc controller, its simple but at least it works !
    https://dcctrains.lovestoblog.com/CommandStation1Eng.html?i=1

    Thanks for your help anyway (y)
     
    Mark Ricci and BNSF FAN like this.
  4. Sumner

    Sumner TrainBoard Member

    2,846
    6,001
    63
    I looked at that build yesterday a little and it looks complicated to me compared to using a Mega or Uno (wouldn't use an Uno anymore because it can't use some of the advanced features). For what you want to do a Uno would probably be fine if you had one but the Mega's are really cheap.

    I get on that Discord link I posted with Firefox OK so not sure what the problem is. Also I've tried to stress to them that Discord is not a good place to handle support for a lot of users out there. They do look here at times so still might.

    I'm not sure what is going on with what you posted above but wonder if it has to do that you don't have a programming track wired. I think that with some of the newer DCC-EX versions you can actually program on the main and also an isolated programming track you can drive onto it off the main. Once you have driven onto the isolated track, if I understand it right, as soon as you give a programming command it will automatically change that track to a programming track. If that happens I could see where you might get the alerts shown if things are out of range, such as a normal programming current.

    With the option I just mentioned you can use the <join> command and it will change the programming track back to the 'main' and you can drive off. This is similar to what people have done with a programming siding and a DPDT CO switch to change the siding between the main and programming but without needing an electrical switch.

    I was surprised that you said you could read cv's as although DCC-EX lets you write them on the main I don't think it can read them there. Again I have no experience doing this so might not be reading their documentation correctly.

    I think I'll post your original question on there (won't name you) and see what they have to say.

    Also info here might explain some of this better....

    https://dcc-ex.com/reference/software/command-reference.html#gsc.tab=0

    Sumner
     
    Mark Ricci and ricky101 like this.
  5. ricky101

    ricky101 TrainBoard Member

    14
    10
    9
    Hi Sumner,

    Sorry for my self frustration earlier, seems things all go wrong at once !

    To clarify, I have the L298 module wired as the DCC site shows with one half plugged to a strip of the Main track A and the other to a separate strip of Programming Track B

    When we run the loco normally, via the web throttle, on track A it drives ok, but we get a constant stream of those current alerts from track B

    If we restart things with the loco on track B and start the web throttle again, without specifing any loco number, as soon as we turn the track power on via the web throttle it starts to give those alerts.
    However if we enter "R" it does cause the loco to judder forwards and returns the correct address as below.
    It does not allow us to drive the loco on track B

    Please do not worry about posting details on the Discord site, will perhaps try to join up again in a day or two if needed.

    We do have a Mega board, but no wifi or motor shields, but as the DCCEX now seemed to have an ESP32 version it seemed simpler to go with that as we had them and the L298 module to hand.
    However perhaps its still a little new and buggy ? what we can try is connecting the L298 module to the Mega and see how it runs like that.

    Will let you know how we go on,

    Thanks again !

    001981.jpg
     
    Mark Ricci and Sumner like this.
  6. Ash

    Ash TrainBoard Member

    106
    67
    8
    Happy to see that you have had some success with the ESP32.
    If you do not want a separate programming track, you can replace GPIO34 with UNUSED_PIN. That will eliminate the overcurrent issue.

    Another way is to not power the programming track.
    Use <1 MAIN> instead of <1>

    When using JMRI DecoderPro, and reading multiple CVs, I will use several commands to provide more efficient reading.
    The commands are sent using the DCC++ Send Command window.
    <1 PROG>
    <D PROGBOOST>

    The current sense factors are determined on the 0-4095 pincount range over 3.3 volts.
    The question is what you are using for current sense. If a 1 ohm resistor, the factor would be 0.806
    Code:
                    pincount          current sense   
    pincount  volts per volt ohms  mA     factor    watts
    4096       3.3  1241.2     1  3300    0.806     10.89 
    2482       2.0             1  2000    0.806      4.00 
     248       0.20            1   200    0.806      0.04 
     186       0.15            1   150    0.806      0.02
     
    Mark Ricci, ricky101 and Sumner like this.
  7. ricky101

    ricky101 TrainBoard Member

    14
    10
    9
    Hi Ash,

    Many thanks for that current sense info as not easy to come by without trawling though the program code to see if the ESP32s ADC was using 4096 or set to 1024 / 10 bit like the Mega.

    The other thing causing some concern was those 1R resistors shown on the L298 Module page, yet the Arduino L298 motor shield schematic shows 0.15R ? so quiet a difference in voltage drop.

    When you say "some success with the ESP32" does that imply there are a few things still need resolving with this set up vs the Mega or just me making a mess of things through lack of knowledge ?
     
    Mark Ricci and Sumner like this.
  8. ricky101

    ricky101 TrainBoard Member

    14
    10
    9
    Hi Sumner,

    Think the info from Ash above will help me recode the motor drive /current sense values, if that does not work might just order up a motor shield and use it with the Mega.

    Cheers.
     
    Mark Ricci and Sumner like this.

Share This Page