# RC to DCC



## Martan (Feb 4, 2012)

I wasn't sure if this went in the R/C section or the DCC section as it's a mix of both. I think I posted up the first generation of this a year or so ago, not sure. But anyhow, for some odd reason I fished it out and updated the code and moved it to a new processor with more I/O. It's also a PDIP because I got real tired of soldering surface mount stuff.

This design reads the servo outputs from any standard R/C Rx, (in this case a 'FlySky' $50 TX/RX unit I got from Amazon), and controls an Economi 2A DCC decoder. You can't do a whole lot with only six channels but I have implemented the throttle, direction and 6 DCC functions.

It won't program the decoder, I use a cheap MRC unit for that but it does control it pretty well. I'm also fudging on the 5V power for the board, I'll need to get a Pololu step down so the 14v battery can power the device.

While this drives a single USAT motor block with no problems, I'm probably going to get either the Economi 400 4A or the WOW sound decoder and put this in my U25B for testing. I'm leaning toward the WOW as it is a different manufacturer and thus probably has a slightly different 'flavor' of DCC interpretation as it were.

Anyhow, I'm thinking of getting some PCBs made, if anyone is interested in beta testing or whatever, drop me a line. 

A video and a bit more info is on my site:
http://martinsant.net/?p=3372

Martin


----------



## Greg Elmassian (Jan 3, 2008)

So, are you powering the entire decoder from some H bridge type device? 

To supply 5 amps continuous would be a good goal for a product that could work with pretty much any DCC decoder. That would be my recommendation.

Can you make this extensible to control a few more functions? (I think what you have done is a good first attempt and is a great use of what you have on the controller).

Greg 1,053


----------



## East Broad Top (Dec 29, 2007)

Slick! I like it. Consider using channel 5 for the brake function (F11 by default on the Econami, F7 on the TCS.) Zimo, ESU, and QSI also offer a prototypical brake feature. 

You might also consider looking at Tony Walsham's 2.4gHz transmitters (knobs and pushbuttons for the various channels) and see if you can come up with a receiver set-up which would allow his channels to control the appropriate functions on a DCC decoder. 

I'd definitely be up for having a go with this stuff as you develop it. 

Later,

K


----------



## TonyWalsham (Jan 2, 2008)

Hi Martan.
Nice to see you have returned to this project.

Will this interface be selectable for either Low OFF or centre OFF control?

Will loco separation be by R/C and not by DCC address?


----------



## Dan Pierce (Jan 2, 2008)

Latest Zimo decoder firmware have a brake function that can be set by any function key with the F number entered in CV 309. I have found this acts more like a lock, you can not increase speed but you can slow down.


----------



## Martan (Feb 4, 2012)

Gentleman, thanks for the comments. 

The ‘DCC amp’ is a ’dual full bridge driver’ according to the data sheet, I run both channels. If I am reading the documentation right, at the duty cycle DCC is at (more or less) I can, in theory, get 5 to 6 Amps using both channels. However, I have not empirically tested this. I have ordered PCBs and parts so once its mounted properly with a good heatsink, I’ll do some more testing on that.

As far as functionality, I’m using the ‘DCC Extended Packet Format’ document for reference. At present it supports the throttle and function Codes 0 through 12. I just picked my favorite ones from the Economi and use those. It’s trivial to change these in the code so different sticks/channels trigger different function. If I move to a more capable micro-controller, I could make these programmable via USB or something like that.

As far as Tony’s transmitters, yes, it would require an adjustment in the code to handle a center detent sort of situation, but it would not be difficult. I would however have to order one to test with and I have spent my ‘hobby money’ this month on PCBs and parts.

Speaking of that, I should have boards and parts in about 10 days. I’m also re-designing my IoT device to use the Atmega328p and all through hole parts. Those SOIC things are really tough to solder and I'm growing tired of burning my fingers or browning my boards in a toaster oven


----------



## locomansounds (Jul 7, 2017)

Yes its best to keep organised and consistent with all your F functions.


East Broad Top said:


> Slick! I like it. Consider using channel 5 for the brake function (F11 by default on the Econami, F7 on the TCS.) Zimo, ESU, and QSI also offer a prototypical brake feature.
> 
> You might also consider looking at Tony Walsham's 2.4gHz transmitters (knobs and pushbuttons for the various channels) and see if you can come up with a receiver set-up which would allow his channels to control the appropriate functions on a DCC decoder.
> 
> ...


----------

