Hc12 problems

AndyH Apr 19, 2020

  1. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    I've made up a couple of hardware throttles for my dcc++ system. I've got them talking with the arduino command station nicely through a wire, but I'd like them working wirelessly through an hc12. I've got a few of them, but I can't get any of them to work properly for me. They won't talk to each other, or they won't talk to the command station out the controllers. Somewhere along the line there is a fault.

    I've set them both to 115200(?) baud.

    Any suggestions? I've got coolterm and two usb serial adaptors, but I don't know how to get them talking to each other on there either.

    Thanks.

    Sent from my SM-N976B using Tapatalk
     
  2. IronMan1963

    IronMan1963 TrainBoard Member

    161
    173
    9
    I had issues with my wireless Dave Bodnar throttle. Might check to make sure you have the TX pin on the throttle going to the RX pin of the HC12 and the RX pin on the Arduino DCC++ going to the TX pin on the other HC12.
     
  3. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    What I would do is try one step at a time; First try only one USB adaptor on the PC, and connect it's TX to the RX of the DCC++ BS, and the Adaptor RX to the TX of the BS. Then try and establish communications from the PC using either the Arduino IDE Serial Monitor or Coolterm.

    I'm not sure how you intend using the second USB adaptor?
     
  4. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    Thanks Jimbo. I know I've got wired serial communication between the handsets and the base station - the handsets are working fine when wired. Therefore I know that tx on the handset is working fine, and rx on the base station is fine too.

    What I'm missing is that the hc12s are either not understanding what they are getting from the handset, not transmitting to each other or not sending properly so that the base station can understand.

    I know that the wired end of things on the hc12 is working fine because I successfully connected to them all via the settings adjustment programme. So it's either a wireless transmission/receiving issue or it's a communication issue.

    And I don't know how to test for either of those.

    Sent from my SM-N976B using Tapatalk
     
  5. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    I was really only referring to your question about the USB serial adaptors, as I've no experience of the hc12.

    However, once you can establish a hardwired link from the PC via one of your serial adaptors to the BS (just to establish the comms work), you could then replace the BS with one of your hardwired throttles, and confirm you see the throttle commands appear on the PC in the Serial Monitor (or Coolterm).

    Now replace the hardwire link between the throttle and the USB adaptor with the two HC12s, and establish the link still works (i.e. you see the throttle commands on the PC). Once you get this far you should be able to move the PC's HC12 to the BS and off you go!
     

Share This Page