HVT Dave

When DCC++ was mentioned recently in Geoff Bunza's SMA20 thread I glanced briefly at the linked page on TrainBoard.  But when the latest production release JMRI 4.2 came out Christmas day and DCC++ is now a supported command station in JMRI I took a long second look.

DCC++ uses an Arduino Uno or Mega board with either an Arduino (2 amp) or Pololu (3 amp) motor shield to create a DCC command station.  The Arduino creates the DCC signals and the dual H-bridge motor shield provides the power.  There are separate outputs for programming decoders and running trains.  This is entirely an open-source (free) project with documentation, the sketch and a Java based controller program available on github.  The developer, Gregg, has several YouTube videos available on his channel.

One of the JMRI developers, Mark Underwood, developed the JMRI interface which allows the DCC++ command station to connect to a pc/mac/linux via USB allowing use of the entire JMRI suite including programming, throttles, webserver and WiThrottles.  And/or Gregg's Java based controller software provides an optional GUI that displays throttles for 7 locos and an interactive track plan that controls turnouts.  An Ethernet shield can be added to allow the DCC++ to act as a server with multiple clients, and by adding a WiFi shield the DCC++ command station can be operated directly from a smartphone/tablet running a WiThrottle/Engine Driver app.

The DCC++ can run your entire layout, a programming track, or create a separate DCC accessory bus, and it appears to be a viable alternative to the Sprog3 at a fraction of the price.  This would be a great companion for Geoff Bunza's $5 decoder projects. (Sorry, don't mean to take the thunder out of your next release, Geoff  )

Anyway, just wanted to share something for the Arduino crowd here to think about.  Now add a Raspberry Pi2 running JMRI and................

Regards,

Dave

Dave

Member of the Four Amigos

 

Reply 1
Neil Erickson NeilEr

Curious

Would the Arduino output, without the power supply, be able to transmit wirelessly directly to onboard receivers such as those by NCE, Tam Valley, or CVP? Since I run on batteries, it seem that there is no need for the motor shield. This could be the bridge from JRMI to dead rails I've been looking for. 

Neil Erickson 

Neil Erickson, Hawai’i 

My Blogs

Reply 0
Kevin Rowbotham

DCC++

This was mentioned briefly in another thread here that provided the link to the trainboard discussion.

After reading all 20 pages of discussion and watching all of Gregg's videos, I have to say I am quite impressed.

I believe another contributor has provided a simple circuit that will allow interfacing with other motor shields, possibly extending the current capacity to over 5A, which would then be directly competing with the larger commercial DCC systems.

The potential for automation is quite impressive as well, either using a PC to run the layout through the base station or with nothing more than the Arduino Mega driving the layout.

The fact that this is all open source hardware and software seems huge to me.

Indeed, a Raspberry Pi running JMRI, AWESOME!

I would be trying this out already but the motor shield I have on hand is I believe, not directly compatible so I'll have to look at building and implementing the interface circuit or order another shield for my Arduino.

I believe developers are also working on interfacing with commercial base stations to allow the DCC++ station to be controlled by existing handheld throttles.

Very exciting time to be a model railroad hobbyist!

Regards,

~Kevin

Appreciating Modeling In All Scales but majoring in HO!

Not everybody likes me, luckily not everybody matters.

Reply 0
HVT Dave

@Neil

Wireless DCC with the Arduino, I suspect it would be very simple from this point, starting with the DCC++ sketch and sending the DCC output over WiFi using a transceiver chip on the base station and a chip in the loco, much like Geoff Bunza did with the Moteino in his November 2014 MRH article on battery powered trains.  Give it a go, or contact Gregg over at TrainBoard.

Please keep us posted on the results.

Happy New Year,

Dave

Dave

Member of the Four Amigos

 

Reply 0
HVT Dave

Bug update

It was suggested that if you want to use DCC++ with JMRI that you use JMRI version 4.1.5.  DCC++ is broken in version 4.2 so you will need to use the earlier version or wait for the next developmental release for the fix.

Dave

Dave

Member of the Four Amigos

 

Reply 0
Kevin Rowbotham

@Neil

Quote:

Would the Arduino output, without the power supply, be able to transmit wirelessly directly to onboard receivers such as those by NCE, Tam Valley, or CVP? Since I run on batteries, it seem that there is no need for the motor shield. This could be the bridge from JRMI to dead rails I've been looking for. 

Neil Erickson 

Hi Neil,

After looking at the Tam Valley products I am going to assume that your wireless transceiver connects to a standard DCC command station where the rail connections would be for powered rail DCC.

Assuming that is the case, then I would say the Arduino alone will not work.  I think you will still need the motor shield to provide the power and signal that the transceiver is expecting.  The arduino will output the DCC logic bits (1's and 0's) at 5 volts DC.  I would think the Tam Valley transceiver is expecting the DCC logic carried by a higher AC voltage.

I may be unaware of the capabilities of the Tam Valley product, so I could be dead wrong.

Those in the know, please correct me if I am wrong about any of this.

Regards,

~Kevin

Appreciating Modeling In All Scales but majoring in HO!

Not everybody likes me, luckily not everybody matters.

Reply 0
Neil Erickson NeilEr

Re: Tam Valley

@Kevin - Thanks. I've written Gregg so hope he may have some insight. The problem with Tam Valley is the limited frequency so I have been using the CVP T5000 that communicates directly with the cab. This also allows me to chose frequencies, cab, program on the main, etc. What it will not do is interface with JMRI. 

What I envision is JMRI communicating with the Arduino which sends DCC commands to the engines and switch machines (via stationary decoders - $5?) so that I am running against another train in motion. Of course this may also allow control via the Internet at some point as wifi cameras are getting so small that it appears as though I could fit one in an On30 cab.

One thing at a time. I got my Arduino, NCE interface, PowerCab, and downloaded to my MacBookPro so need a solid day or so to play. Maybe after a New Years cycle with the crew ...

Neil

PS Thanks again. This stuff is fastinating! 

Neil Erickson, Hawai’i 

My Blogs

Reply 0
robteed

DCC ++ Reverse Loops

I saw your video with two reverse loops,

What hardware is used for reverse loops with this system?

Reply 0
kpfaff

dc control

I read an article by geoff bunza,about jmri controling a dc layout by changing the decoder address.Do i still need a decoder in my dc engine?Or is there a way to do this?Sorry at jmri and arduino.

Reply 0
Prof_Klyzlr

Dr Geoff Bunza's "JMRI does DCC"

Dear kpfaff,

In order of appearance:

Quote:

I read an article by geoff bunza,about jmri controling a dc layout by changing the decoder address

I take it your mean this one?
"SMA32 - JMRI does DC!"  https://forum.mrhmag.com/post/sma32-jmri-does-dc-%E2%80%A6with-up-to-48-wifi-or-jmri-dc-cabs-12212054

To clarify, the article describes:
-  using a SmartPhone with "WiFi Throttle app" or similar

- to control a DIY "Looks like a DCC++/JMRI" control system

(IE some form of WiFi network,
connected to some form of "Computer" running JMRI software, 
USB-connected to an Arduino + Motor shield)

- which has been modified to output "Analog DC" track power, 
(rather than "digital DCC" track power)

This "system" has multiple "Analog Track Outputs",
and the Modeller selects which "Track Output" they are controlling by selecting a "Loco Address" on the throttle.
(IE the "Loco Address" is repurposed so it does it's selection-thing in the DCC++ circuitry before any Power gets to the Rails, NOT in a loco-based decoder).

Quote:

Do i still need a decoder in my dc engine?

The locos for this system should not have a DCC-decoder installed,
it is better to return them to "Pure Analog" wiring, where:
- RH Rail --> Motor Pos
- Motor Neg --> LH Rail
(Therefore, "when RH rail is Positive Volts, the loco moves Forward")

Assuming you have/leave a DCC decoder installed in the loco (Not reccomended),
SOME DCC decoders may handle recieving such "pseudo Analog DC" and react as the modeller desires,

but many will struggle to reliably tell the difference between "pseudo Analog" and "Valid, but really Ugly DCC" signals on the rails. The resulting "fault condition" symtoms may include:

- Failing to Start/Stop on command

- Failing to travel in one direction or another

- Uncontrolled "run-away" behaviour (sometimes at scary-fast speeds)

- "stuttering" at low speed settings

- "jerking back/forth" at low speed settings

- Rather poor low-speed "crawl" controlability (seems like the loco has 2 speeds, "Stop" and "Fast")

- Poor "minimum speed" reaction (requires over 1/2 Speed just to get initial movement, or 3/4 Speed for Sound-Decoder-equipped models)

If you're going to make the conscious decision to "run analog" on your layout,
then it's Highly Advisable to take the relevant action in-consequence,
and (re)wire or bypass-jumper the loco back to "pure analog" configuration.

Alternatively, if the Locos you wish to run are either:
- already equipped with a DCC decoder
- are "DCC Ready" for a simple "plug in" decoder installation

then you may be better advised to use essentially the same Hardware
(WiFi + PC-running-JMRI-Software + Arduino/Motor-shield)

and "normal" Arduino "DCC++" software load,
to simply "run DCC"...
(and gain all of the features, functions, controlability, and optimisation that DCC offers).

I hope this helps,

Happy Modelling,
Aim to Improve,
Prof Klyzlr

Reply 0
Reply