# DCC++ my first experience



## rva1945 (Feb 11, 2016)

Hi all:

If someone is passing through the same fear of trying something new and out of the standard (i.e. building an Arduino based base station instead of buying a commercial one) that I passed through, let me tell you that DCC++ works like a charm at the first try!

I'm using an Arduino Mega 2560 and a motor shield. I just had to connect pin 2 to pin 13 on the shield, powered it by a regulated 12V source, the decoder rail pickups connected to channel A (still no loco, just testing everything), and a motor connected to the decoder motor output wires.

The decoder is a Bachmann E-Z Command no. 44915. As expected, it came with address no. 03.

Then, with the Mega connected to the USB port, typed this in the Serial monitor:

<1> (to power the "rails" up)
<t1 03 10 1> (run decoder no. 03 at speed 10, forward direction)
<t1 03 0 1> (stop)

Then I played with starting voltage, acceleration/deceleration rates, etc.:

<w 03 2 5> (write in decoder 03, CV2, which is the starting voltaje, value 5 volts)

<w 03 3 30>(write in decoder 03, CV3, the acceleration rate, value 30)

<t1 03 20 1> (run again with new parameters)

Just a few examples. Now to mount everything, LCD display included.

Enjoy!


----------



## DonR (Oct 18, 2012)

I have great admiration for folks, like you, who have the saavy
to use the fantastic digital tools available today.
Have you checked the Arduino threads in our
Technical Forum?

I have a Bachmann EZ DCC command system. I know how
it works, but I don't understand how you will
use your system to actually run a loco even tho
you have tested it. We have a 'knob' for speed
control, buttons for address and other functions.
Do you plan such a control panel?

Don


----------



## rva1945 (Feb 11, 2016)

Well, I must admit that running the train by writing cryptic commands in the serial monitor doesn't look funny or comfortable.

I later downloaded and installed JMRI, the Java interface for model railways. It's another story now.

And I wrote this sketch to use a remote control and a LCD display to input commands, so far it doeas nothing to any track, I must assemble it to the DCCpp_Uno sketch:






Regards,
Robert.


----------



## crusader27529 (Apr 3, 2016)

DonR said:


> I have great admiration for folks, like you, who have the saavy
> to use the fantastic digital tools available today.
> Have you checked the Arduino threads in our
> Technical Forum?
> ...



JMRI works just fine with DCC++ using the standard on-screen throttles AND also with WIthrottle through a wireless router using your smart phone as a throttle.

The apps for Android and iPhone are free, as is JMRI.

It's really simple, just plug the DCC++ into a computer running JMRI with a USB connection or a serial-to-usb adapter, and you're set. Same thing goes for the wireless router......just load the phone app, turn on wifi on the phone, and run trains.

JMRI setup is reasonably easy, but it offers MUCH more than just the throttle part.....most don't use it for anything but the throttle stuff. Don't let the possible complexity get in the way of just runing trains.


----------



## sachsr1 (Mar 3, 2016)

I'm just getting started playing around with the Ardunio, and I'm waiting on the slow boat from China with the rest of the parts. I'm currently using NCE on my track, so I'll probably make a test track to use the DCC++ and go from there. I'm also planning on doing some LED light effects for the town I'm going to build. I'm thinking an ARC welder, and maybe have a thunderstorm roll through and take out the street lights a block at a time. I'm just enjoying learning about how the thing works.


----------



## sachsr1 (Mar 3, 2016)

*It works*

I got my DCC++ controller up and running with JMRI after a few hours of trouble shooting. I had a 16V laptop power supply laying around, so it only cost me about $4 for the UNO and $6 for the motor shield. My next step is to get it switch it over to my Raspberry Pi.

I still run my main layout via my NCE Powercab. I like being able to just use the NCE, and not have to boot up the computer.


----------

