DCC++ Hardware - Throttles

KE4NYV Jan 25, 2016

  1. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    I’ve done a loopback test on the UNO which indicates that driver,USB cable,and USB to serial converter are all working. I am not at all familiar with Tera Term but will study up … if you could give some guidance on connecting two HCs together with serial converters I will get atarted.

    Steve F
     
    Scott Eric Catalano likes this.
  2. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Steve - Tera Term is a simple terminal program like the old terminal program that once came with Windows (Hyper Terminal).
    You open up Tera Term (free download) and select the Setup tab then Serial port - set the baud rate for 9600 and set the COM port to whatever port one of your HC-12's is connected to - you can check that with Device Manager upload_2016-7-25_16-28-7.png .

    Open up a 2nd Tera Term session (Click File then New Connection) - set that one to 9600 and set the COM port to whatever the 2nd HC-12 is connected to.

    Once that is done typing on one session of Tera Term should show the output on the other.

    Hope that all makes sense

    dave
     
    KE4NYV and Scott Eric Catalano like this.
  3. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Simple enough (I thought you were physically connecting the two HCs) ...... with two Teraterm connections open, typing on the keyboard (wireless BTW) the UNO RX led lights with each keystroke but nothing typed appears in the Teraterm window. Does it matter what sketch is loaded on the UNOs or does the UNO just act as a pass through to the serial connection?
     
    Scott Eric Catalano likes this.
  4. RossNZ

    RossNZ TrainBoard Member

    12
    12
    5
    Dave,
    I have successfully got the BTS7960B 43A H-Bridge option working on an Arduino Mega after a bit of head scratching.
    On your web site on the page describing the project the first schematic with the 8 pin header does not indicate which pins to connect to an Arduino. The second schematic shows Arduino connections but for the Uno. A minor detail that took me a while for the penny to drop. All is good now on that one.

    I have also now got two wireless throttles working successfully using HC-12s. I would like to change the number of trains controlled by each throttle to 1 but while the throttle is happy to go into the correct function to change the number of trains it will not accent 1 as an option, it will however accept 5 as an option but return it as a 4.

    I can report that the * key does work very effectively as an emergency stop.
    Your ground work on this project is much appreciated.

    Ross
    NZ
     
    Scott Eric Catalano likes this.
  5. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Dave
    This AM I figured out why my typing didn't show up .... turned on "local echo" and now see what I type ..... but, with a send/receive messenger sketch on each UNO I still do not get what is typed on one screen showing up on the other screen
    EDIT: Now, using Arduino terminal monitors (and the send/receive sketch..attached) I am getting a response but (using two seperate [not File New] IDEs) send from IDE #1 does not sent to IDE#2 but sends to itself. Seems like progress but still not testing interaction between the HC12s
     

    Attached Files:

    Last edited: Jul 26, 2016
    Scott Eric Catalano likes this.
  6. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Steve - all you are seeing is the local version of what you type, not what is being transmitted.
    I do not use the UNO as a serial interface so I am at a disadvantage as to what you are seeing / doing - I use a dedicated USB/Serial interface unit which removes issues that might come up with the UNO interface -
    One thought, are your processor chips socketed on the UNO? If so, try removing them and using the UNO board as the interface - you should still be able to pick up 5 volts and TX/RX as before. Worth a try

    dave
     
    Scott Eric Catalano likes this.
  7. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Ross - that is all good news! I'll revisit the software and see what I can do about the bugs you found - there are bound to be others!
    Right now I am in the middle of a large job that may keep me away from DCC++ for a time.
    Thanks for the report!
    dave
     
    Scott Eric Catalano likes this.
  8. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Ross
    I am endeavoring to get my HC12s to communicate (my throttle works when hard wired) ..... can you give me an idea of what you used to flash them to 115200 and how you tested them to insure that they were communicating.
    Thank you
    Steve F
     
    Scott Eric Catalano likes this.
  9. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    Dave has a really good 'how to' on his website, perhaps you overlooked a thing or two.
    If you do a little refresher here http://trainelectronics.com/Arduino/HC-12-Serial_Radio/
    I'm sure you'll be up and running in no time.
    Unless of course you've been unfortunate enough to get a defective part.

    S.
     
    Scott Eric Catalano likes this.
  10. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Been through it 100 times as well as everything I can find on Google ....... at this point I can only think that the units are defective ...... my only recourse is to get another set (from China, unfortunately, ) .... it's the only way to determine that it is the units and not my configuration.
    Thank you for jumping in
    Steve F
     
    Scott Eric Catalano likes this.
  11. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Steve - if you are in the US stick them in the mail to me and I'll see what I can do......
    dave
     
    Scott Eric Catalano likes this.
  12. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Dave
    Will do, thank you much. Bower Hill addee?
    Steve F
     
    Scott Eric Catalano likes this.
  13. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    That is it (duplicated below) - I have a few extra HC-12's, too, so we should be able to get you on line in a jiffy
    dave

    David G. Bodnar
    338 Bower Hill Road
    Pittsburgh, PA 15228
     
    Scott Eric Catalano likes this.
  14. RossNZ

    RossNZ TrainBoard Member

    12
    12
    5
    Steve, I followed Daves webpage on the HC-12. Where it talks about connecting the SET pin to ground to enable the configuration process, I connected the two, before plugging in the USB to the PC , with a "permanent" connection for the duration of the configuration process. I also closed the configuration program after each reconfiguration. as for testing ........ I am a firm believer in getting extras so i bought 5 when only needing 3, just in case. I connected the HC-12s to the throttle and to the base station , and used the Arduino serial monitor to see what was happening . My good fortune was that both throttles spoke as they should. The only issue I had was that initially I set the power level real low, and had to reconfigure them to a higher power setting due to having a shipping container between the DCC++ base and the throttle in one area of my back yard.

    Ross
    NZ
     
    sboyer2 and Scott Eric Catalano like this.
  15. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Ross
    Thank you for your response .. Dave has graciously offered to check out my HC12s. I have additional units ordered so that I can start from scratch and do the flashing myself as well. Since you have a working set up I assume that you used the Arduino serial monitor connection (USB?) only for testing and not for communication between the two HC12s. Did you do your flashing of the HC12s (using the HC12 configuration utility) with an FTDI interface to your computer or did you use an Arduino?
    Steve F
     
    sboyer2 and Scott Eric Catalano like this.
  16. RossNZ

    RossNZ TrainBoard Member

    12
    12
    5
    Steve,
    I used the FTDI interface mentioned on Daves web page (another package from china). The Arduino serial monitor was purely to see what was being received by the DCC++ base station. My only testing was in the setup I want to use it in. The base station was powered by USB, the throttle runs on a 9v battery.

    Ross
    NZ
     
    sboyer2 and Scott Eric Catalano like this.
  17. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    Steve - I received your HC-12's in the mail today - I tested both and found them to be dead - I resoldered the joints, looked over the circuitry and did everything else I could think of and they are gone!

    I am sending them back to you along with two of my HC-12's that are known to be good - they are set for 115200 baud and high power - I also added a 2nd GND pin to simplify putting them in SET mode.

    I also send two USB-TTL converters and connecting wires so you can test them with TeraTerm (or whatever terminal you choose ) - just be sure to leave the SET jumper off for these tests.

    I should be able to get them in the mail tomorrow. That will give you something to experiment with - just send them back once you get your new ones and find them to be OK

    dave

    [​IMG]
     
    Scott Eric Catalano and sboyer2 like this.
  18. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Dave
    What an asset to have someone like you to lend your expertise and assistance to our community …. I will report back and comply upon receipt.
    Sincere thanks.
    Steve F
     
    Scott Eric Catalano likes this.
  19. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    I am pleased that I can help, Steve - the HC-12's and such went in the mail this AM

    dave
     
    Scott Eric Catalano likes this.
  20. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    'Morning Steve
    Any further progress on the throttle?
    Steve F
     
    Scott Eric Catalano likes this.

Share This Page