I do quite a few TMCC conversions, and I've been asked a number of times about improving the functionality of chuffing synchronized with the sound on the projects. ERR has a chuff buffering board, but it's pretty basic, and it also isn't compatible with the new RS5 board they sell as the chuff input must be totally isolated with no common ground. With that in mind, I set about coming up with a more complete design.
To start, I had a list of things I'd like my board to do.
- Synchronize the sound and smoke chuff (no kidding!).
- Run smoke fan continuously when locomotive stopped. Smoke motor runs at lower voltage when stopped to have a better look of "idling".
- Generate timed motor chuff output so short or long switch closures don't make the chuff generation look wrong.
Since I know when the locomotive is running or stopped, I decided to add a couple of features that I like to include in my conversions if possible.
- Provide Rule-17 lighting control for an LED headlight, dimming when stopped.
- Provide cab light control to turn off cab lights while moving, and on when stopped.
One other input is provided to allow turning the headlight off if the locomotive lights are turned off from the remote. This is driven from the existing TMCC headlight output.
After looking over the logic, I decided that a PIC processor would probably be the way to make this all happen. I dug out my proto board and started programming up a PIC12F1501 (happened to have it on hand). It's been a real learning experience getting it all working, and I have a little better understanding of the capabilities of these inexpensive yet very capable parts. I've also managed to travel down a number of dark alleys in the quest, and I have a lot better understanding why the datasheet (or should I say encyclopedia!) for this part is almost 300 pages! There is an amazing amount of capability packed into this 75 cent part, and I have only scratched the surface with this project.
Please note that this is a "work in process", I just figured I'd post and let you folks critique the progress so far, and perhaps offer some useful suggestions for improvements before I go to press. I still have a ways to go before I'll have a completed board, but here's where it stands now.