Model Train Forum banner
1 - 3 of 3 Posts

·
Registered
Joined
·
6 Posts
Discussion Starter · #1 ·
Using an Arduino (Pro Mini), I designed, and mostly implemented, a DCC Encoder/Booster to autonomously control an HO Bachmann steam locomotive (Alco 2-6-0 Steam, Item #: 51814). I implemented basic DCC commands, like speed and direction control and Function Group One instructions (for this Bachmann loco that's such things as Bell, Steam, Headlight, Whistle, etc.)

There's also a “Short Whistle”, but I haven't found a way to get it to blow just once. It always blows at least twice for each time I “send the command”. I put that in quotes, because it's not completely clear to me what constitutes sending a single command. For the train to continue to have power, the DCC signal needs to have no interruption longer than 30 mS, plus, it's recommended that packets be repeated to overcome connection glitches between track and wheel, etc. PLUS it's not clear how to distinguish between a repeat of one command, and the sending of the same command twice (such as to blow the whistle twice in succession).

BTW: I can blow the longer whistle twice (in succession) and I do it by repeating the Whistle command (0x82 or in binary: 0b10000010) for about 100ms then repeating all zeros (i.e. 0x80 – 0b10000000), then, again, repeating the Whistle command. That works just fine. But when I “send” a Short Whistle command (0x84 – 0b10000100), I get a short whistle, but when I send the “All Zeros” command to turn it off, I get another short whistle! I tried varying the timing between Short Whistle repeats and All Zeros repeats, but nothing I do achieves the goal. I also want to be able to do three short whistles before going in reverse. I can to 2 or 4, but I haven't been able to achieve 3!?!

Has anyone encountered this problem? ...and solved it?

I suppose I could “send” a stop packet after each short whistle command sequence, but I would like a “cleaner” solution.

BTW: I'm assuming that were I in possession of a commercial DCC controller, I would be able to press a button and get a single Short Whistle – can anyone claim this as the case?
 
1 - 3 of 3 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top