Large Scale Central

RC to DCC

I’ve started down yet another road, this is something I was doing a couple of years ago back when I first started putting R/C into trains. But after getting my DCC output code working, I decided to revisit this and try something different.

What I’m doing is taking the R/C servo output, which is a pulse that varies between 1000 uS and 2000 uS, and using that to send DCC messages to a DCC sound decoder. In this case an Econami Diesel decoder I picked up at the local hobby shop. I’ve got the firmware up and running and everything working, some details are here:

http://martinsant.net/?p=2986

For now, I’m just taking the pulse width and turning that into DCC throttle outputs. As you increase the servo throw, the notches go up on the sound. But there is no reason I can’t take specific pulse widths and turn them into discrete DCC commands.

Next step is to refactor the output stage, I’m currently using an expensive motor driver so I need a new design there. But all the code fits into an 8 pin Attiny85 so I should be able to shrink it down pretty far.

After that, the base firmware needs a bit of refactoring so this can be setup external to the device rather than it all be hardcoded. But anyhow, just throwing it out here if anyone is interested…

Are you saying you are taking a specific servo position (specific pulse width) and having the ability to turn this into a specific DCC command?

If so, why? I understand the idea, but you would have to work with approximate “zones” of servo position to be certain commands, maybe you could turn 360 degrees into 4 commands…

Greg

Why not? :slight_smile: Gives me something to do. Idle hands you know! I’m basically just mixing and matching up software modules I’m working on. This seemed like a fun combination.

But anyhow, yes, I can do anything I want with the positions. If you have looked at doing ‘discrete’ things with R/C, this is often the technique. You have say, four buttons on the tx that translate to four pulse widths on a particular channel. With my board, on the RX side, you can turn those widths into discrete DCC commands. Whatever you want but for the most part this is intended to control the sound. So, I can monitor the throttle command, channel that into the ‘notches’ of sound on a standard DCC sound decoder, then use another channel with the buttons to trigger horns, bells, etc. And do it with any DCC decoder, not just those intended for ‘battery r/c’.

If Martin incorporated a higher power driver in his design, surely it would be possible to use the servo signal outputs to drive a complete motor/sound DCC decoder? Not just a sound decoder

You probably wouldn’t even need addressing for a very basic system. Use the R/C system separation.

Why? The cost would be very low. Good quality 6 channel 2.4 GHz DSM2 compatible Rx’s can be had for US$5 on the net.

Go for it Martin.

Just to be clear (or I hope so), this is the diagram I use on all my locomotive installations now. If I need just a point to point radio control thing, the green ‘RX’ box is a standard r/c sort of receiver. If I need a point to multipoint network, the ‘rx’ box is an Xbee controller. For my critters I generally do the standard radio control thing, for my main locomotives, they get the network install. For both, DCC is just a protocol I need to drive the sound and the lighting. I did experiment with sending DCC over the network but it ended up being why bother? Just encode at the source and translate at the end point.

It’s all just ones and zeroes really fast :slight_smile:

Are you using cat 5 or optical cable and will Esc ,Dcc and Rx all communicate with each other? If so will the diagnostic port be located next to the on/off switch as the schematic doesn’t show it and will it be obd II compatible or just flash codes?

Neither, yes and no.

Martin.

I take it the relay is for R/C direction change. If so it will likely not be needed as most R/C ESC’s we can use are bi directional as they come.

Most of them are also Centre OFF control although I favour Low OFF control as that usually gives much finer speed control for a given TX knob position. 150º - v - 300º.