Yet another project in the works. This one is intended to leverage my DCC circuit boards into a interrupt driven DCC I/O system for the Arduino Pro Mini. I actually have all of the software done and tested for both the input and output of DCC signals on my Attiny1634 board but I’ve never actually used a real ‘Arduino’. I’ve always built my own boards so this is a learning experience. I’m probably not going to make it compatible with the larger ‘Arduino’ universe, I’ll just optimize it for the Pro Mini. Anyhow, this project is actually number two on the list, the refurbish of my U25B locomotive is first so I can polish off the main widget code base.
I picked up a cheap Aristocraft U25B in Chessie paint the other day and have been taking it apart so I can rebuild it. The idea is to get from the toy like unit I have into at least a semi-scaled sort of model. The photo above is the closest prototype image I’ve found to what is depicted with this Aristocraft rendition. So I’m stripping it down to the base parts with the idea to install my control system, batteries and sound. And of course, a bit of paint and detail work- it is a bit cheezy with the cast color parts. Yuck. So anyhow, I’m getting there. Below is an image of the original model. More in a later post.
I’ve been doing quite a bit of PCB design these days, here is a version of my controller board, the ‘microwidget’. It’s quite compact. I have not had any made yet but I thought it came out really sort of, well, neat. Like art kinda.
All total I have about five or six small circuits for doing control networks- specifically for large scale model trains. DCC input and output, servo control, DC brushed motor control, reversing relays- all via Industrial strength Xbee Network wireless.
I’m also thinking of making an apt-get debian package to install JMRI on a RPi 2 and gitlab for my code. Hmm.
I think I need a Kickstarter 🙂
Here are the final two prototypes. The master obviously connects to the Prodigy Express and sports a long range antenna for max transmission power. What I’m thinking here is this is the module that will be connected to my RPi 2 which I am planning on running JMRI on. The Pi 2 will also have a long range wifi antenna on it so I can use it to source web pages to my phone and tablet. My standard handheld design is what I actually use to drive my trains with.
The second pic is the client. This one is fairly comprehensive and has quite a few parts but I use it as my standard prototype rig. In addition to the control board, it also has an (expensive) Pololu 18v7 motor controller and a current sensor. The DCC output stage is the board with the large chip beside the speaker. All it is used for in this incarnation is to drive the Econami Diesel DCC decoder which powers the speaker on the right.
Here are all the parts labeled, you can click on the picture for a larger version-
Well, I didn’t like some things about the DCC output state machine in the last post, the one with the (wrong) zero bit on the end so I refactored it and now it works mucho better. I took the background scan timer down to nothing so it would spit out DCC as fast as possible, this is the trace. The top trace is the rebuilt DCC, the bottom is the output of the Prodigy with just the default 003 loco address, albeit set to 128 step mode. Aside from the lesser number of preamble bits I’m sending they are the same, well within a microsecond or two. I am running this on an Attiny1634R-SU which is the 2% clock. Costs a few pennies more but worth it over the regular vanilla chip which is 10%, a bit loose.
I think the diagram in the last post caused a bit of confusion. Suffice to say I am just breaking apart the components of DCC and the subsequent ‘decoders’. I find the term ‘decoder’ somewhat problematic, I would refer to them as ‘clients’ with the DCC ‘booster’ or ‘cab’ as the ‘master’.
Anyhow, one of the things I do not like about DCC is the power aspect. DCC is sort of a bastard child of both power and data packets which makes messing with it more difficult. I realize that is really important when you carry power on the track but I don’t want to do that. I want the compatibility with DCC accessories and JMRI but I want to run battery power (or maybe steam one day) So I am chopping the power part out and siphoning off the data packets, sending the data out via xbee and rebuilding them on the client. The client takes the battery power, injects that into the data part and out comes DCC. I don’t need much in the locomotive that requires DCC per se, except possibly sound but I am interested in choosing routes via something (JMRI?) and setting turnouts (accessory decoders?) and signals and things like that too so I want all this to work.
Oh yeah, another aspect of DCC I’m finding I don’t like is the slam-bam sort of thing. Well, ‘not like it’ is relative I suppose, it’s probably the easiest one and most ‘organic’ of the protocols. Constantly send everything as fast as possible and you are at least sure some are getting there, right? So I’ve also, sort of, modified this at least over the air. This keeps network traffic low. I currently have only one priority queue in the master, I think I may have to expand this to two later one. A ‘hi’ priority for the locomotive situations and a ‘low’ for other things? Dunno yet.
Been sort of busy with a new job so I have not posted anything recently. I am still working on a couple of things though.
First is the completion of my G scale outdoor railroad. I’ve gotten the last major infrastructure project for that constructed but it’s going to take a while to get it skinned in concrete. I do plan to order some track soon and with luck will at least have a simple loop to run trains on.
I’m also working on my widgets again, I should have new Phase B boards in a few days. These are not a radical change, just correct one small issue on the old board, add mounting holes and a power LED. In the future I have additional plans for this board, I intend to take the remaining real estate and add a DCC interface, both in and out (if possible, using an external booster) and probably a couple of LED drivers.
My MOW critter is also coming along, I am converting it to battery power and adding widget control. I am also thinking about building a real small bobber caboose, probably with a work platform to pull behind it.
Also on the horizon is planning for an indoor N scale shelf layout. I have most of that designed, just need some tweaks.
And of course, the styrene depot shown in the last post is also taking shape.
Just an update as I’ve been remiss in my postings- things are warmer and work is busy so I’ve not had a lot of time to work on my various engineering projects. I have a bunch of garden and exterior grounds work to get going too, so I’m pressed for hours in the day.
I also spent an entire week getting my flying chops up to spec- a fresh medical, flight review and a cross country to a train show, whew. But it was worth it and came out well- a link is here if you are interested: East Coast Large Scale Train Show
Anyhow, I am slowly moving along on my 3D printed throttle, but still have some more development on that. But it’s getting there.
I also submitted a new 1:29 scale figure to the 3D printer, but- he de-materialized and made a mess so I guess he wasn’t set up quite properly. I have another iteration of him coming up. And a few others I hope.
As I progress in the garden and outdoor work, I’ll also be laying a small amount of G Scale track so I can start real world testing of all of this.