The Open-Source-Bluetooth-Train-Control Thread

RT_Coker Oct 17, 2014

  1. Davemil

    Davemil New Member

    4
    2
    1
    Currently assembling the hardware to try a lazy man's dbtc. Gregg's dcc++ code running in an arduino adafruit mini (with an ez link bluetooth board) hard wired to the signal input of a gn1000 tsunami ho loco control board. Hopefully will avoid the need for a motor shield if i can find the right injection point on the gn1000. Failing that, an onboard motor shield would provide a brute force dcc signal for the dc track power.

    Also was drooling over a wifi equipped photon which has the thruput, memory, and link bandwidth to support a full gn1000 emulation. This could allow dispensing with dcc signal synthesis, while still keeping Gregg's jmri compatible packet parsing front end
     
  2. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    The only help (for finding the right processor-input) I can think of is to examine the dcc-input-circuits in some of the open-source DCC-decoder-boards. There will probably be a resistor (probably in a multiple-resistor package) that will have to be removed or disconnected.
    Getting CV-reads working will be an even bigger challenge (maybe form the BEMF input to the processor).
    Bob
     
  3. Davemil

    Davemil New Member

    4
    2
    1
    With a hard wired channel, I had hoped the decoder status could be replicated in the arduino and a reported from there. Might have to master reset or initialize the decoder to establish a starting point.

    Bemf just means an extra wire and some signal conditioning, since gregg's motor shield current monitor would otherwise be floating.
     
    Last edited: Jan 26, 2016
  4. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    Open-Source DBTC Update

    I am still working on a getting a demonstration-DBTC-locomotive running and a video of its “automated” operation. I have one ready for the drive-shafts (the dire-shafts are removed for static testing). As this is the only DBTC-locomotive, I will be getting the HO-FTA put together (as a DBTC-locomotive) for backup first.

    I am doing extensive static testing on the firmware in the demonstration-DBTC-locomotive. The precision-scale-distance and motor-speed control are working like a dream (good bye to DCC-CVs used for BEFM, speed matching & ...).

    I changed the firmware so that DBTC-CVs can be changed as part of the “automated” operation. This will make it possible to do many things, like have a diesel locomotive move at one “momentum” to pick a heavy load of cars, and then switch to a slower “momentum” once the heavy load is coupled up.
    Bob
     
  5. Pete Steinmetz

    Pete Steinmetz TrainBoard Member

    737
    6
    22
    Bachmann already has Blue Tooth control and a patent. Are you guys just doing this for your own enjoyment, or do you hope to develop a product?

    Pete Steinmetz
     
  6. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    Pete,
    I am developing (and hope to complete the development) of this effort. Because:
    There is no patent, just a highly questionable patent-application (by BlueRail).
    The Bachmann/BlueRail Bluetooth products are not open-interface, and do not come close to doing what I am doing. I am adding many advanced capabilities such as precision-scale-distance and motor-speed control.
    Bob
     
    Josta and ClassiCut like this.
  7. Pete Steinmetz

    Pete Steinmetz TrainBoard Member

    737
    6
    22
    Sounds good Bob. The more choices to control trains the better. I am a Dead Rail guy.

    Just make sure it is easy to run your board and loco on battery power.
     
  8. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    DBTC_Loco_FW_Demo_01

    First video of the first OS-DBTC locomotive is here:


    Don’t get distracted by the hardware (just a kludge for now). HO production hardware is just a little larger than the HC05-Bluetooth-sub-board.

    The Command-Stack (CS) being executed by the loco demonstrates the precision-scale-distance-control and is as follows:
    1) Proceed-To-Time = 5 seconds. [For time to start recording.]
    2) Proceed-T0-Distance = 3 scale-feet.
    3) Max_Speed = 40 ~MPH.
    4) Proceed-To-Time = 3 second. [For time break between movements.]
    5) Proceed-T0-Distance = 6 scale-feet.
    6) Max_Speed = 40 ~MPH.
    7) Proceed-To-Time = 3 second. [For time break between movements.]
    8) Proceed-T0-Distance = 12 scale-feet.
    9) Max_Speed = 40 ~MPH.
    10) Proceed-To-Time = 3 second. [For time break between movements.]
    11) Proceed-T0-Distance = 24 scale-feet.
    12) Max_Speed = 40 ~MPH.
    13) Proceed-To-Time = 3 second. [For time break between movements.]
    14) Proceed-T0-Distance = 48 scale-feet.
    15) Max_Speed = 40 ~MPH.
    16) Proceed-To-Time = 3 second. [For time break between movements.]
    17) Proceed-T0-Distance = 96 scale-feet.
    18) Max_Speed = 40 ~MPH.
    19) Proceed-To-Time = 3 second. [For time break between movements.]
    20) Proceed-T0-Distance = 192 scale-feet.
    21) Max_Speed = 40 ~MPH.

    This is the first of hopefully many CS test-files that make testing OS-DBTC-locomotives a much more reliable and repeatable process.

    Minimum motor-speed is set to 3 ~MPH in CVs. Motor-speed-control is within +- 0.67 ~MPH. This is the limitation of the six ticks-per-motor-revolution tachometer-wheel in this HO locomotive. The firmware limitation is +-1/8 ~MPH. [I have not determined the upper limit on the ticks-per-motor-revolution for HO tachometer-wheels.]

    The control-variables (CV’s) that set the scale-feet-per-motor-tick could be off by as much as +-03%.
    Bob
     
  9. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    All,
    To my knowledge this is the first hobby-loco to use precision-scale-distance-control and to autonomously-execute-internal-operational-commands. And from my point of view it looks like it will be the last for some time.

    I any very thankful that the (much abused) first-OS_DBTC loco ran on the test-track long enough to get some tack-testing and at least one video. I want bore you with all the original-loco-hardware that is no longer working on this loco. It served me well for ~2 years of experimenting! It will now have to be retired to static-testing for the rest of its life.

    I plan on “moth-balling” this project by the end of this month, and leaving it “moth-balled” until (and if) OS-DBTC-decoder-hardware becomes available for further track-testing (assuming that I am still functioning on this earth by then). Two years of trying to swim (mostly on my own) against the existing “strong-electronic-currents” in the hobby is enough.

    *** Much thanks to those that helped!!! ***
    Bob
     
  10. RCJunction

    RCJunction TrainBoard Member

    34
    5
    7
    Sorry to see the project put on the shelf, Bob. I'm not a big fan of Bluetooth for this particular application, but I applaud anyone trying to advance the hobby and wouldn't have minded being proved wrong one bit.
     
  11. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    The OS-DBTC-decoder-boards will have an auto-run-on-power-up feature. (It is in the firmware and tested.) This is intended to be used for things like trolleys (or any single-power-unit on its own track). So all that is needed after the operational-commands are set up with an iThing-App, is a ~12 volts DC wall-wart (or battery-power), and a magnet in (or near) a strategic location on the track. Set the powered-unit near the starting point and turn the power on. The operational-commands provide for much more that just stops, waits, accelerations, and decelerations. Only one “sensor” (a magnet), and the number of stops, waits,... are no longer limited by hardware, or require the addition or moving of sensors.
    Bob
     
  12. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    All,
    Two OS-DBTC documents (updated) “BlueTrain IF Manual.rtf” and (new) “BlueTrain PIC Dev HW.rtf” are available to anybody for download at: https://sourceforge.net/projects/dbtc/files/BlueTrain/.

    The “HW” document is intended for use as an input into the design/development of OS-DBTC-mobile-decoder-boards. The processor could also be a PIC18F46K22, and the DRV8801-chip could be a full-wave-PWM-motor-circuit. Most of the simple PIC I/O can be move to different PIC-pins to minimize the board size. The HC05-Bluetooth-sub-board would typically be mounted on the non-component side of the decoder-board with the Bluetooth-antenna protruding over the edge.
    Bob
     
  13. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13
    All,
    The BlueTrain PIC18 bootloader has been released as a complete “MPLABXProjects” in a “Compressed (zipped) Folder (.zip)” called “PIC18_Bootloader.X”.

    The BlueCMD control application for BlueTrain has been released as a complete MS-Visual-C-6.? project in a “Compressed (zipped) Folder (.zip)” called “BlueCMD”.
    Bob
     
  14. RT_Coker

    RT_Coker TrainBoard Supporter

    517
    33
    13

Share This Page