DCC++ Hardware - Throttles

KE4NYV Jan 25, 2016

  1. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    That sure would work, Scott - not much different from what I did with the IR remote control - you could use a rheostat or a rotary encoder to adjust the speed. Many rotary encoders have a push button available, too, that could be used to reverse the engine.

    Give it a try!

    dave
     
  2. HVT

    HVT TrainBoard Member

    74
    93
    15
    Scott,
    That would be great. An Arduino Pro Mini would use the same sketch in a smaller format. Looking forward to seeing your results.
    Dave
     
  3. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Hi all, I'm not sure if I'm understanding DCC++ fully. I've read the threads here, and watched Gregg's base-station hardware videos on YouTube, but everything seems to be aimed at automation through a PC or controlling through a smartphone or a handset that looks like a satellite TV remote (no offense intended...).

    Is there any prospect for a simple, untethered throttle in the class of a NCE "cab" or a Digitrax "engineer"? Actually, if I were building my own throttle I would like to provide an interface analagous to an actual locomotive for the fundamental controls--toggle switch representing the reversing bar and slide pot for the throttle quadrant. But switches are switches and pots are pots so the form factor shouldn't be a problem. Sure, push buttons maybe for headlights and bell, momentary switch for whistle, but no stationary accessory decoder or turnout controls... In my case, aimed at a portable switching layout, 4 manual turnouts and a hand-operated turntable...

    Scott, is that the type of thing you're talking about (I don't know if your "master arduino" is referring to the base station itself) I'd certainly be on board for that.

    Thanks,

    Randy
     
  4. David Taylor

    David Taylor New Member

    7
    8
    1
    Something I'm wondering about with 'real' throttles and DCC. If you have a linear or rotary pot what happens when you select a different loco? Unless the pot is powered and somehow set to the correct position the setting will be wrong for the new loco.

    Has anyone dealt with this?
     
    Scott Eric Catalano likes this.
  5. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    All DCC throttles remember the last setting for the locomotives....such as NCE, Digitrax etc...you toggle back and forth
     
  6. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    If I were designing a 'real' throttle and using a rotary device for speed control, I would use a rotary encoder and not a pot.
     
    Scott Eric Catalano likes this.
  7. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    Not exactly correct. The Bachmann EZ Command uses a rotary pot. When you toggle between locos nothing happens - until you touch the speed knob. Then the loco speed 'jumps' to whatever the knob is set to. Same scenario with an NCE Cab04. On devices that use a rotary encoder instead of a pot, moving the knob is translated as an adjustment of the current setting, whereas when using a pot the position relates to a fixed setting. Generally, you will see the knobs on pots marked with an indicator line while knobs on rotary encoders don't have a mark because there is no 'zero' position
     
    KC Smith, HVT and Scott Eric Catalano like this.
  8. David Taylor

    David Taylor New Member

    7
    8
    1
    I hadn't thought about a rotary encoder. That works aside from not having an obvious stop point. OK for adults but kids might get confused. But still much better than a pot. Thanks!
     
    Scott Eric Catalano likes this.
  9. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Dave (Bodnar, I see there are a couple of Daves here now :) ), assuming that I use an Arduino Pro Mini in a wireless throttle rather than a TV remote, does your infrared link offer anything better than the RFM69HW 915MHz RF link you tested on your website?

    I realize that the MIni could easily produce the 38KHz carrier wave to modulate as the IR transmitter (I have read several webpages explaining IR serial comm for Arduino), but I wonder about the range and security from crosstalk if I would use the IR throttle in a large convention center room with other layouts in proximity. I see from your source code for the RF transceiver, that it uses an encryption key that would seem to protect against crosstalk with other RF throttles.

    The switching layout I'm working on has two functions--something to take to shows, and to act as proof-of-concept for things I'll use in the eventual home layout. So I'm in big learning mode now...

    Thanks,

    Randy
     
    Scott Eric Catalano likes this.
  10. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Randy - I believe that the IR system would work in a crowded environment so long as you kept close to the receiving sensor. It is possible that flickering lighting systems could cause problems but I have never had any issues with using IR on my HO module at a number of shows.
    As to the RF system on my web page, yes it could be used but one would have to design a hand-held unit with a display, buttons, a rotary encoder (or pot) where the IR system just uses the buttons on the remote control - that makes it much simpler to implement.

    I have been mulling over building a hand-held, wireless unit and could use the RF unit you referenced with it. Stay tuned for more on that, maybe!

    dave
     
    Scott Eric Catalano likes this.
  11. LEGOManiac

    LEGOManiac New Member

    5
    5
    1
    I've been trying to build this since I have most of the parts (minus the MP3 board).

    Do you recall where you got your LiquidCrystal_I2C library from? Mine doesn't appear to have the same functions:

    DCCppThrottle.ino:96:87: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'
    DCCppThrottle.ino:96:87: note: candidates are:
    In file included from DCCppThrottle.ino:85:0:
    /home/matthias/sketchbook/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:71:2: note: LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, uint8_t, uint8_t)
    LiquidCrystal_I2C(uint8_t lcd_addr, uint8_t lcd_cols, uint8_t lcd_rows, uint8_t charsize = LCD_5x8DOTS);
    ^
    /home/matthias/sketchbook/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:71:2: note: candidate expects 4 arguments, 8 provided
     
    Scott Eric Catalano likes this.
  12. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Scott Eric Catalano likes this.
  13. LEGOManiac

    LEGOManiac New Member

    5
    5
    1
    Thank you. That worked. That's now my third IIC LCD library. There has to be a better way to manage these things. I don't know about the Windows world (any more) but in Linux, you have to remove any libraries that have conflicting names. It would be lovely if the IDE would just ask when there's more than one to choose from or if there was a compiler directive that could define the library in use.

    Anyway, thanks again.
     
    Scott Eric Catalano likes this.
  14. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    [/QUOTE]

    Pepijn, Scott, All

    I have a complete and running DCC++ system setup;
    Arduino Uno + Motor Shield, 16.7vdc 2.2amp supply with USB to a Surface Pro and JMRI + Engine Driver & Wi Throttles on multiple Smartphones via a dedicated TP-Link mini Wifi AP Router operating four DCC Engines.
    I do not have any other DCC systems or wired throttles at home.

    Can we run "Wired Lenz and Digitrax Throttles" on this DCC++ JMRI configuration?

    I believe I saw an earlier post were TwinDad thought that an Operating JMRI configuration might hand shake with a wired system

    I would like to take and demonstrate my DCC++ setup to two other persons houses who are currently running complete Lenz DCC w/Xpressnet and Digitrax DCC w/Loconet systems.
    Can I just turn off their Command Stations Power, Connect the Arduino DCC++ Main two wires to there Main line and run engines with "Their Wired" Lenz 100 and Digitrax Throttles, in addition to demonstrating the wifi smart phones?

    If not, What would it take to do so on their existing system?


    Do I need to bother with adding a DCC++ RS485 interface board and software updates to my DCC++ JMRI setup in order to communicate to their existing and complete Lenz, Digitrax systems?

    I do have two RS485 Max module boards but do not have them connected or programed in the Arduino yet.

    Your thoughts and experiences would be appreciated.

    Regards,
    Kevin
     
    Last edited: Apr 16, 2016
    Scott Eric Catalano likes this.
  15. HVT

    HVT TrainBoard Member

    74
    93
    15
    Kevin,

    One way to do this would be to use JMRI as the interface between Digitrax/Lenz and DCC++. For example, on the Digitrax layout with a working JMRI connection, disconnect the main track power from the command station and connect to the DCC++ H-bridge. Connect a USB cable from DCC++ to the JMRI computer. In JMRI Preferences>Connections open a new tab and set it to the DCC++ Base Station through the appropriate USB port, then restart. Run the train from JMRI, WiThrottle, WebServer, or the connected Digitrax throttle(s).

    Regards,
    Dave
     
    KC Smith and Scott Eric Catalano like this.
  16. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    Dave,

    Thank you for the follow up. Sorry for the late reply, I was out of town for the week.

    If I follow, your assuming the target Digitrax site had a working USB JMRI computer setup and for me to disconnect the Digitrax Base Station and connect my Arduino DCC++ Base Station and reconnect Their computer JMRI setup, reset the comm port to the Arduino comm port, and it should work.

    I was assuming their home either Lenz or Digitrax system was a system with multiple boosters and circuit breakers and throttles all running and ready to go, But with No USB or JMRI PC setup installed. I was planning on trying to simply disconnect their Base Station/Command Stations two wires and reconnect my two wire Arduino DCC++ Base Station with a USB to my running and ready to go SurfacePro Win 10 /JMRI laptop with comm port 6 setup and a Smartphone Wi throttle .

    Would I be able to run their engines with their Wired Throttles, or do I need to set up a Max RS485 board connection and edit the DCC++ base code?.

    I plan on first testing the idea on a Lenz LNZ set-100 Base Station set up next week followed by a Digitrax Empire system later.

    Kind Regards,
    Kevin
     
    Scott Eric Catalano likes this.
  17. 4-4-0

    4-4-0 TrainBoard Member

    122
    74
    14
    Hi,
    i want to run my DCC++ without a PC as a standaloneunit with two potis for two locos.
    I think that a few Buttons are needed and a Display, has anybody make that ?
    Sorry for my bad english.
     
    Scott Eric Catalano likes this.
  18. DrGonzo

    DrGonzo TrainBoard Member

    26
    5
    5
    The DCC++ Arduino/motorshield is just the backend of a potentially complex layout control system.
    The frontend is a bit more involved then some pots and buttons.

    Look at a Digitrax Zephyr to get an idea of what a minimal frontend has to look like.
     
    Last edited: May 19, 2016
    Scott Eric Catalano likes this.
  19. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    4-4-0, If you are willing to hard code (in the Arduino sketch) things like the loco number you can get away with a very simple controller - if, however, you want to be able to change loco information and other parameters you need some sort of user interface to allow that.

    For the throttle I designed I used an inexpensive TV remote control (lots of buttons including the numerals 0---9) and coupled that with a 2 line LCD display for feedback.

    You can see how it was put together here:

    http://www.trainelectronics.com/DCC_Arduino/DCC++/IRThrottle/index.htm

    It does NOT require a computer or JMRI to operate.

    dave
     
    Scott Eric Catalano likes this.
  20. 4-4-0

    4-4-0 TrainBoard Member

    122
    74
    14
    hi Dave,
    I have seen your site and had a look at the code, but i´m more the Hardware Boy
    I have an Arduino Nano clone and a LCD-Display wich is planed for use as throttle.
    needed is the menu strukture and the variables for changing the Parameters if the analog or digital ports Change value.
    Regards
    Arne
     
    Scott Eric Catalano likes this.

Share This Page