Arduino motor shields

sidney Sep 5, 2022

  1. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    Another question i have is can two deeks motor shields place one on top of the other one for running trains and the other for ??? provided enough power was fed to run both......
    just something that my pea brain was thinking about while i print some stand offs for another arduino project...
     
  2. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    narry mine it wont do what i wanted it to do they both run exactly the same . ie what ever one is doing the other will do the same.
    my thought kinda was can i use one for dcc track to control locos and the other running the dcc switch on the turn outs thus avoiding a booster witch is $$ more than a motor shield...
     
    Mark Ricci likes this.
  3. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Possibly another way with 1 shield...

    Been experimenting with JOIN. It essentially sends the DCC Main signal on shield's output A to the B channel which is normally reserved for the Programming track. While intended only for moving loco between districts, planning on doing the same thing.... attaching a turnout decoder, eg DS64, DS52 to the B channel..., but for temporary weekend layouts or a small switching layout or possibly to HCD size? Love the idea of using a DS64 or 74 in their partially shelled enclosures with Kato Tamaya connectors... Think its good for these types of small or temp MRR layouts.

    The JOIN has some rules, for example... Turning on track power after JOIN has already executed will reset B channel to PROG mode. The decoder is temporarily subjected to the prog track output until another JOIN is performed.

    Have had Loco's run on both channels, in totally separate sections of track at the same time--ED does not care, it acquires.

    Have setup routes to switch B channel between PROG and OPS from Engine Driver.. The last 2 buttons on ED's Route screen enable execution. Previously, had included the EX commands in mySetup.h so JOIN would execute on startup but want to continue to play. Either method requires configuration using Arduino IDE. And, have not yet attached a turnout decoder to confirm but do know that the A channel, with no loco's running, has sufficient power to throw a DS64-Kato Double Crossover so the future looks promising.

    257249-925b3940b1847fa01c7da6c0dae05be8.png
     
  4. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    I bought the items to build Dave's booster but bit the bullet and bought a 5 amp booster with a power supply for about $65 (includes shipping). I'd probably sell the stuff I got for Dave's booster (minus the pro mini Arduino) at less than my cost if someone would actually use it. You would have to follow the instructions on his site as I didn't build one so can't help you. I did have it all figured out at one point but those brain cells are long gone.

    Sumner
     
    Mark Ricci likes this.
  5. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Have the TAM Valley DAB002 booster on my permanent layout. Would most likely buy another for a 2nd permanent layout since I like having the 3A Cont-5A Max and its a proven way to isolate rails for track connected turnout decoder(s). Plus, as mentioned earlier, use of JOIN for turnout decoder, until at some point in the future is stated in the DCC EX docs or use in this way is officially supported, personally would not plan on using JOIN for permanent turnout control on a layout. But its certainly fun to play with in that way....
     
    Sumner likes this.
  6. BigJake

    BigJake TrainBoard Member

    3,259
    6,172
    70
    So, if the two outputs are JOINed, does an over-current on one shut down the other?

    If not, then JOIN will accomplish exactly what the OP wants (use B only for the stationary accessory decoders). So what if those decoders also get the loco commands (which they will ignore), and if the locos get the accessory commands (which they will ignore.)

    The end result is that an OC on A will (?) only shut down A, while all the commands continue to be sent on B (which did not OC, because it is only wired to the accessory decoders.)
     
    Mark Ricci likes this.
  7. BigJake

    BigJake TrainBoard Member

    3,259
    6,172
    70
    I should note that if B were to be capable of auto-reversing polarity in response to an OC (as I have suggested elsewhere and for which I submitted an issue), then in that mode, a persistent OC on A or B would have to shut down both A and B. But that would only need to happen when in that Auto-Reversing mode (to be mutually exclusive with JOIN.)
     
  8. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    I had most of my test stuff packed and vaquely remembering testing impact on B channel when short across A. This was before the JOIN command so your question dictated a little unpacking as quite curious myself...

    The snippet is the IDE serial monitor reporting status when shorting the A Channel before and after JOIN.

    1-Entered Mode command <=> showing A-MAIN B-PROG+
    2-Shorted A - A channel LED OFF B channel LED ON
    3-Issued JOIN Command via ED and entered Mode command showing A MAIN+ B MAIN+. Indicating Join is Active
    4-Shorted A - A channel LED OFF B channel LED ON
    5-entered Mode command showing A MAIN+ B MAIN+. Indicating Join REMAINS Active after short.

    Its important to note, that to the best of my knowledge, the use of the JOIN command for turnout decoders is unsupported and discouraged. Also, these tests were conducted on a RC version however the JOIN command is part of the official 4.x release.

    upload_2022-9-6_14-29-49.png
     

    Attached Files:

  9. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    hummmmmmmmm Thanks for the test report.............im learning more an more:D so by this report it will work .
     
  10. BigJake

    BigJake TrainBoard Member

    3,259
    6,172
    70
    I'm curious, but what's to support?

    In JOIN mode, there is only one set of commands to send to either/both tracks. JOIN mode should (and appears to) just "hook up" the B outputs to the same waveform commands generated for A. Since shorting one JOINED bus demonstrably does not affect the waveform on the other bus, then obviously the short circuit response is separate and unique per output. This separation would also facilitate running B as a programming track (with current limiting, response readback, etc.) and could support auto-reverse too.

    We're not talking about sending only accessory commands to only B bus. B bus, in JOIN mode, should continue to have all the commands A would have had (loco and accessory commands), but A is just shorted. And until the short is removed, A (alone) will not have (valid) commands on it. But B would happily keep singing both loco and accessory commands as if nothing had changed on A.

    OTOH, if this short-circuit-on-A behavior for B (keep going) is not identified as a requirement, then it could be removed/altered unexpectedly in future versions. Is that what you meant by "supported"?
     
  11. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    One possible thing to think about. A and B are running off the same power supply. The software I think sees anything over about 1.8 amps or so as a short and shuts things down. So a short on A might not shut down B but I think you're only going to have about 2 amps to work with for whatever locos you're running which is probably plenty but if you start adding a lot of accessories two amps might not be enough for everything?

    I am not planning on the command station running anything amp wise as I will have boosters for the track and any accessories if I use DCC accessories which I don't plan on at the moment.

    Sumner
     
    Mark Ricci likes this.
  12. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Yes, the same waveform is passed to the B Channel. A Loco's DCC decoder cannot tell the difference. ED or the DCC EX system will acquire a loco in the same way regardless of what channel the loco is on. No, it does not make a difference regardless of channel whether a loco or turnout decoder is connected. Works very nicely.

    I'm not in any way affiliated with them but have spent hours on Discord learning and observing. From what I've read there and to summarize and paraphrase, the JOIN was never intended to run decoders -- use an alternative method for controlling turnout decoder. Take it for what's its worth..

    However, been exploring using the B channel for some time mostly for testing or temporary layout, .... think its FUN to continually find ways to increase efficiency or reduce materials needed to perform a certain or desired task(s).
     
    Last edited: Sep 6, 2022
    sidney likes this.
  13. BigJake

    BigJake TrainBoard Member

    3,259
    6,172
    70
    Some accessory decoders are, or can be, powered by a separate power supply, rather than the track bus. These would avoid the current limit on the motor driver board driving the track bus.

    If I'm not mistaken, there are also higher ampacity motor driver boards compatible with DCC++EX, if perhaps not plug-in capable.
     
    sidney likes this.
  14. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    HUMMMMMMM something else to look into decoders being powered separately .......man ive got a lot to learn(n) (y) :D
     
  15. BigJake

    BigJake TrainBoard Member

    3,259
    6,172
    70
    I've been looking at Adafruit's "DRV8871 DC Motor Driver Breakout Board - 3.6A Max" (Product ID: 3190), with RR-Circuits' Tower LCC board (will control up to 8 of them) for an LCC (Layout Command & Control) based switch control system. RR-Circuits has USB-LCC interfaces, etc. for setting up an LCC bus for controlling signals, block occupancy detection, switch throwing, etc.

    Mouser has ~1500 of the above DRV8871 breakout boards (Mfr p/n 3190) expected at the end of Oct @ $7.50 ea. Mouser also sells compatible screw terminals that can be soldered to the boards in lieu of the pin headers supplied.

    I'm considering using LCC if I'd have to have a separate DCC bus (from the track bus) for switch decoders anyway. LCC is a distributed bus, where a sensor module can autonomously tell a signal and/or switch decoder to activate, without JMRI having to control them itself. JMRI can be used to configure the LCC nodes.

    But you don't have to use LCC for these, they could be controlled directly from the Arduino IO, or used as a buffer so that a DCC switch decoder need not draw the solenoid's excitation power from the DCC bus, but directly from the power supply for the DCC bus.
     
  16. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    well after much digging today about powering decoders it seems they have to be powered from the dcc mains. as that is how they get there signal. so separately powering them with out a booster is out. im still not buying a booster, dang it all. i may just have to remove those and start using switch kats witch defeats my program of less wires. Ive got my wires down to three (exception of the rest of the turnouts ) I will win ........:D
     
  17. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    For about the cost of a used eBay loco, $65, you can have a 5 amp booster with power supply and shipping. How much are you going to loose by not using what you have? Connect two wires to your command station and two wires to power the DCC accessories.

    Now the bad news....you really need at least two if you want to still have the accessories working during a short. You can connect it to the command station and it will power your DCC accessories and send the DCC commands to them but....

    .......... if you don't have a second one and are powering the track directly with the command stations output and there is a short the command station (at least if it is DCC++EX and probably others) will shut down with the short and no commands will go to the booster being used by the accessory decoders, so you will have lost control of them.

    I figure it is worth it in my case to have multiple boosters. The DCC++EX command station will only produce the DCC signal and will be connected to multiple boosters for different districts (layout is pretty big). If there is a short in any district only that district will shut down. Figure the cost for them will be worth while over the long run as I won't have to worry about how many locos I'm running, in general, and it will be easier to diagnose a short or other problem if I have one.

    With a smaller layout I'd have two. One for the track and one for the accessories if I was running very many DCC accessories and needed the amperage. If I only had a few accessories and I wasn't tripping the command station because I was pulling too much current I'd live with the accessories not working during any period I was dealing with a short. If I had a short I'd deal with it and then start running everything again, looking at any turnouts I might still have to throw. At the moment if you aren't drawing too much amperage you might be in this last situation and maybe as you said don't do anything now.

    Sumner
     
    Erik84750 likes this.
  18. BigJake

    BigJake TrainBoard Member

    3,259
    6,172
    70
    What if you flipped that around, and ran the accessory decoders and the booster from the command station, and all the track from the booster?

    The accessories are very unlikely to short (hardware or wiring failure), so there is little chance the command station's DCC bus will go down, and it can keep driving the accessories, perhaps even to clear a short on the track bus. If the track shorts (much more likely) then only the track is affected, not the accessory decoders.
     
  19. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Don't see where that wouldn't work as long as the accessories don't exceed the amperage the command station trips at and the power supply he is using. I believe that the stock setting for tripping out is around 1.7-2 amps. Most boosters have more amperage to work with for either the track or the accessories. Probably a lot of DCC++EX command stations out there have a 2 amp power supply on them because larger isn't going to do anything with the stock tripping point. Sid how large is yours?

    I think if you go with a higher amperage power supply you can change the configuration file to up the proint to a higher setting. So basically one needs to match the power supply amps to the load and maybe change the configuration file the command station sees (this is with DCC++EX which is what Sid has) on start up. Other command stations might not be so flexible.

    NOTE: for anyone reading this Sid has a DCC++EX Command Station and you can do the above with it. Others probably aren't flexible so this probably doesn't relate to anything except DCC++EX. They also recommend with smaller scales ( N/HO ) to not run more than 5 amps. If you need more than that you probably should be using more boosters and more power districts so there is never more than 5 amps to do damage with a short.

    Sumner
     
  20. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    Sumner my power is 3 amps max (prob more like 2.5-2.7) I do not have any problems with amps . with three locos running at same time im maybe 0.5 max.
    im gunna wait till the nce switch kat arrives then test. i dont have many shorts (just when i forget to switch a turnout )
    if i need a booster added for this then i might think about one. i really dont want to add any more wiring or power bricks.
    I do have a 12 volt 12 amp power supply to use but its not needed as my lay out is 8 x3 in size i had to remove a lot of the layout. (i needed space for grand kid ) maybe if i had a way to more easily program those turn out decoders while there in stalled ???? pic below not a good clear pic.....
     

    Attached Files:

    Sumner likes this.

Share This Page