My Modified DCC++ Base Station - Notes

Travis Farmer Jul 26, 2019

  1. Sumner

    Sumner TrainBoard Member

    2,829
    5,949
    63
    If you are using Google Chrome just hit the 'translate button' in the 'translate this page window',

    Sumner
     
  2. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    Firefox, but i just downloaded a translator add-on. Thanks!

    ~Travis
     
  3. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    kinda looked like a bunch of info i already knew... ;)

    ~Travis
     
  4. vasilis

    vasilis TrainBoard Member

    110
    39
    10
  5. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    Regarding the IBT-2 current sense... i reviewed the BTS7960 datasheet, and realized i neglected a major part of the current sense circuit. the 1K resistor connected between the current sense pin, and ground. i know i had it on my early prototype, but forgot it on my current prototype. even the schematic i drew up for the prototype has it missing. clearly this is the cause for my erratic current sensing. the BTS7960 outputs a current reference, in proportion to the load. therefore a resistor is needed (1Kohm value is recommended by the datasheet) to convert from a current reference, to a voltage reference.
    with that in mind, pending testing, i may just use the IBT-2 current sense for my DCC boosters. i will verify after work.

    even the best of us, and i don't claim to be the best, can make mistakes.

    amazing though, what a good nites sleep, a good cup of coffee, and some good research can solve. when, by contrast, frustration solves very little. :coffee:

    ~Travis
     
  6. Softec

    Softec TrainBoard Member

    27
    9
    6
    Travis;

    I think you will find that the IBT-2 current sense lines are wildly inconsistent between units. Even the two BTSD7960 chips on the same IBT unit do not give the same readings. I reported this in the multiple power district thread https://www.trainboard.com/highball...dcc-for-multiple-power-districts.97445/page-6 and was recently confirmed by Hans Tanner on is IOTT video channel . I have been using Current transformers CT’s but I am constantly evaluating other devices. The CT’s work great and are extremely consistent and linear my only problem is that I want the use the current sense for block detection. The lower limit for the block detection is about 20ma or about 1000 ohms.

    On my list of test subjects is the MAX471, ina129 and ina169. The MAX471 and ina169 would be direct replacements for the CT’s, the ina129 is an I2C device but if successful I would just change my program.

    BTW, I believe the IBT-2 is the best motor driver out there; it generates excellent wave form, very low signal propagation delay and no voltage drop. I limit the output anywhere between 2.5 and 5 amps. The CT circuit above is limited to 3 amps. All other motor drivers I have tested either do not generate good square wave signals, have excessive voltage drop or excessive propagation delay.

    Dan
     
    Travis Farmer likes this.
  7. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    while using my backup DCC (MRC Prodigy Express, with computer interface, and wired control) to configure my new loco, i noticed the much faster response of the wired control, vs JMRI, and i had a thought: is it possible to use the MRC wired control, through DCC++? seems like it would be handy in tight areas, like an industry yard, or when switching around a yard, making up a train.
    i did a comparison using EngineDriver on my tablet, via JMRI, and still got a lot of lag. this is true of JMRI controlling DCC++, or even my MRC base station.
    too bad there isn't a way to integrate both into my future layout. i am not saying i want to do away with my DCC++. more of an observation of control lag.

    i am still waiting for delivery of my Arduino motor shield (clone) to arrive, so i am using my backup DCC to program my loco, and test settings.

    one thing i can attest to, my roto wheel cleaner, while good for cleaning loco wheels, is not so good for programming the loco. not a very good quality connection, and i keep getting timeouts. my circle of track, freshly polished up, works 100% better.

    ~Travis
     
  8. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    Just curious, on what machine and os runs the jmri?
     
  9. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    at the time, my windows 10, Intel Pentium 5405U 2.3Ghz (dual core), 4GB ram, machine.
    i haven't yet compared on my laptop i intend to dedicate for JMRI (CentOS Linux, can't remember what the processor is, 16GB ram), but i assumed better results. the catch is, that laptop has a failing WiFi adapter, so i have to use Ethernet for it. (no ethernet in my workshop, yet)

    ~Travis
     
  10. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    just booted it up, it has an Intel Core i7 3520M 2.9Ghz (quad core)

    ~Travis
     
  11. Sumner

    Sumner TrainBoard Member

    2,829
    5,949
    63
    Have you considered using a Raspberry Pi? I've been happy with it but maybe it doesn't give you the flexibility you want?

    Sumner
     
  12. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    I wasn't all that impressed with JMRI on my Rpi 4 (4G). i think it mainly collects dust on my shelf, while i figure out what to do with it.

    ~Travis
     
  13. SASRR

    SASRR TrainBoard Member

    126
    50
    12
    Have you considered a External wifi adapter for the usb slot they were really cheap alot under 20 bucks
     
  14. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    yeah, i have one. it works for a bit, then Linux tries to use the inboard one, and then neither work right. i am considering either finding another WiFi module, or removing the current internal WiFi module, just to see what happens.

    ~Travis
     
  15. SASRR

    SASRR TrainBoard Member

    126
    50
    12
    removing the inernal shoud work as the system wont see it on boot so wont register it for use
     
    Travis Farmer likes this.
  16. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    I received my Arduino Motor Shield (clone) yesterday, and installed it this morning. i adjusted the ACK threshold (30), and tested it to find the CVs can now be read and written with ease. :)
    Something i noticed, if a track receives a short, and the current monitor trips >0 times, if i power off the track manually, the track that tripped with automatically re-power itself. this is because i neglected to reset the trip counter in code. so i added the fix to the code, and it now works properly. the changes were made on my "Personal Copy" branch, on my GitHub. i am still fine tuning the code, and when i have a guaranteed stable version, i will merge it with the master, after sanitizing it of my config settings that won't apply to other users of my code.

    I currently have the motor driver shield "air mounted" (not plugged in, just off to the side, with jumper wires) for testing, as i will be changing from an Arduino MEGA2560, official, to a "MEGA2560 Core Micro, with prototyping board" from eBay, as soon as it arrives. hopefully with this version, i can clean up my prototype setup, so it looks cleaner, and easier to debug.

    i also noticed a bizarre error on my DCC++, vs my MRC Prodigy Express. on the MRC, the headlights correctly change from front to rear, based on the direction selected for travel. but on my DCC++, for some reason, the rear headlights are lit for both directions. not sure why yet, just odd.

    ~Travis
     
  17. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    deleted my GitHub, all my source code, and threw away all my electronics and train crap. why? i couldn't care less anymore, and really, nobody gives a damn anyway.
     
    rray likes this.
  18. rray

    rray Staff Member

    8,304
    9,410
    133

    I've done that before! And right afterwards, everyone comes out of the woodwork asking why? As for me, I'm Arduino dumb. I just bought the $59 mega learning kit so I can try to figure out what is going on. DCC++ is way over my head, and there are so many threads, and all are confusing, and not one says simply...1) buy this and that. 2) connect this to that like this. 3) download this, that and the other.... instead, you get a bunch of guys saying, naw, don't do it like that, do it like this, so a regular goof like me gets so confused, and sees the thread swell to 60 pages of voodoo reading, and runs away.

    But we do hope someone will get everything all sorted some day and make a thread that really tells you how to do the whole thing, then posts at the bottom of his post, DO NOT READ PAST HERE. EVERYTHING YOU NEED IS HERE, AND ANYTHING POSTED BELOW WILL CONFUSE YOU.
     
  19. Sumner

    Sumner TrainBoard Member

    2,829
    5,949
    63
    First off Travis I think one way or the other we've been where you are now at one time or another. Hopefully you will take a step back and look at the whole thing in a new light and reconsider when it is right for you.

    Ray what you want is basically here now. You don't need to know anything about an Arduino and programming one if you take Keith up on his offer of getting an Arduino from him that is set up and ready to basically connect a power supply to, connect it to your tracks and a computer running JMRI. Go to the Plug and Play Option here ...

    http://1fatgmc.com/RailRoad/DCC/page-3.html

    You will connect it to a computer running JMRI with a USB cable. If you don't mind spending $35 for a Raspberry Pi and $12 for a pre-configured SD card that plugs into it you can have a dedicated train room computer that is up and running 30 seconds after you turn it on. Again the pre-configured SD card means you don't have to do anything to get the Pi computer running except plugging the card into it, a power cord to it and connecting it to a monitor and a keyboard/mouse. All the same things you do with about any computer but you won't have to know anymore than how to connect those items and turn it on. More here ....

    http://1fatgmc.com/RailRoad/DCC/page-2.html

    Soon we will have a page up that even shows how to make the simple connections between the items with standard cables and soon the latest version of DCC++ will be installed on the Arduino.

    Another member here (Dex) is working on an installer program for DCC++ that will be similar to the ones you use to install programs on your computer now. You will connect the Arduino to your computer with a simple cable and download his program and it will configure the Arduino for you eliminating about 19 steps that one has to go through now.

    So go with the first option I outlined above if you want to have DCC++ right now or wait a bit for Dex's option. Either way the availability to have DCC++ has gotten way easier in the last couple weeks.

    Sumner
     
  20. DacamNZ

    DacamNZ New Member

    2
    0
    1
    Travis, I've been following this thread closely from New Zealand and keenly interested in your research. I certainly understand your frustration when people don't feel appreciated and hit significant roadblocks. Let this be an encouragement to you.

    Like Ray I am a newbie to the DCC side of things. I have Arduino and Pi solutions and are learning the DCC++ stuff. I'm no electronics engineer (Hardly know the difference between a resistor and a capacity - lol), but by reading LOTS, I'm learning. I started with a simple download for DCC++ and loaded up my Arduino, installed JMRI and followed some basic instructions like Sumner has listed above. I'm pleased to say it works! and I have something to begin with.

    It's a slow learning process but I enjoy reading the development others have put into this. Please keep us posted with progress and I hope more people will pitch in with their knowledge help.

    Darren.
     

Share This Page