Final PCB Board Complete!
Well, Silver Circuits manufactured and delivered my PCB much much quicker than expected and I'm not complaining!
And, last night, after a rush of construction... I couldn't get the board to work... The 'trip' sensors were permanently active! After a 30 minute stare at the circuit design today I'd realised I'd viewed an older circuit schematic when designing the PCB and had put the inputs to the LM339 the wrong way around!
After a quick test to correct this I had the booster operational.
Unfortunately this now means that all boards in this initial run are defective, but I have devised a way to correct the issue without too much hacking. A small veroboard piggy-backed on has allowed me to correct the inputs to the IC.
I was very much relieved once it was all operational. I now need to get the final components (you can see a dodgy-hack of resistors wired on) and the heatsinks in place. Then I'll need to find a neater box to mount it all in and all should be set to go.
PCB Design Complete
Well, after a long fight of finding appropriate software and then design I've finally sent off the final (if not entirely messy) design to the manufacturers...
Sure, it's not as small as I would have liked... but it's all set in stone now. I should see 8pcs on my doorstep in around a fortnight and then I can finally produce a finished product.
I can't wait actually... Last weekend I tested the final prototype on my own layout... which really only allows for around 3 trains running (one on a branch, one stuck in a siding and one on the main) and my battery ran out on the laptop before I had a chance to fully test it all out... either way, the quick test ran perfectly on all accounts:
I also purchased two DCC Accessory Decoders from eBay. I coded those in to trainControl (you'll see a few little squares above the console messages and below the train throttles) and they work great. Unfortunately they cannot be wired directly to the Kato UniTrack points (you'll need to wire a few relays in between) but I'm told work well on the Peco points. I didn't get to test them at the time.
The DCC Accessory Decoders did require me to do a bit of fine tuning on the Booster circuit though; it turns out they suck quite a bit of current on power-up to charge their little capacitors. This meant that the initial current draw on the booster was exceeding the trip circuit and the whole system would not power on.
After a little help the 1K2 resistor providing the op-amp comparison voltage was incremented to a 1K4 and everything worked fine.
This made me realise that the circuit will have different requirements for different layouts and so the final design will now incorporate a trimpot (initially set to 1K4) that can be user adjustable [but WILL void warranty] for 'expert users' to adjust.
Anyway... the work continues... everything is now set. I'm quite proud of the entire system and I can't wait to see the final circuit boards!
UPDATE: The boards are already done and on their way (priority) to me... thanks to Silver Circuits!
DCC Booster Prototype Mark II
Ok, hot off the development floor is the Booster Prototype 2.
This now includes short-circuit protection! The final design will have 2 outputs (for two separate segments of track) at 3 Amp each (depending on power supply capabilities.) There are also now 4 status LEDs (Supply Power, Data, Overload, Track Power/Data)... More to come as I finalise the circuit board design.
Eizan Dentetsu (叡山電鉄) Kirara 900 Decoder Install
I'd bought both the Maple Red and Maple Orange versions of this EMU back in 2006 when I first went to Japan and have always loved the quality and performance.
Since the latest trend has been to DCC all my gear, I had decided that what better candidate next than to do one of these up. It was all quite simple too. The 'power rails' run down each side (internally) of the chassis and after isolating these from the engine I soldered the decoder in.
Firstly I took the thing to bits... I love Kato and their use of clips... everything snaps apart, but you really need to be careful! I nearly broke one clip underneath as you have to squeeze them with a fair bit of force.
After disembowing the engine I soldered it directly to the Decoder as I could easily put it back without having to worry about where the wires ran.
Putting it back in was easy and the next step was to wire up the main power to the copper rails.
There's a pair of LEDs (Red/Orange) at either end and they're wired up in parallel where one is reversed to allow them to switch between reverse/forward marker lights. This of course, wont work with DCC as you now have one common (single polarity) wire and then two rev/fwd wires... so I ripped one LED out of the board, flipped it around and then had my common.
I then used some very fine-gauge 'winding wire' (used for transformers/magnets) to connect the LEDs up (there was already a resistor in the circuit) since the thicker decoder wiring wouldn't fit under the light shield. To get the lights in the rear trailer working I ran this wire all the way between the trailers and to the other board, resoldering it in the same way.
I also ran an extra two wires from the 'power rails' in the trailer to the rails in the motor car. Therefore ALL 4 bogies were wired for power pickup and the thing ran like a dream (initially it was a bit sloppy with only the 2 power car bogies picking up the power.)
After programming it to use address 12, it was set to go. Next is to do my Maple Orange. ...actually, I'll get back to the programming first... I want to have my app able to at least set the addresses on decoders.
trainControl evolves…
After a few more days of work the trainControl application has evolved further:
Notable features:
- Loading and saving of trains/connection config
- Resizable
- Add/Delete trains via interface
- Connect/Disconnect on the fly
Still more to go... but very functional now... Download the source here. Of course, be warned! ... The source is constantly being updated by me and may DESTROY your computer. I've also considered the next challenge on this project... Handheld control via a GamePark GP2x.
trainControl v0.1 created!
After 3 days of coding/learning/coding-again I managed to whip together a fairly usable *nix console application to control the DCC System.
It is a client for the srcpd service mentioned previously and can control any number of trains.
There's still a fair bit of work to do on it... dynamically resizing windows, mouse input, etc... but I thought I'd post to show some progress.
If anyone is interested the source is here and can be compiled with gcc -o tc main.c -lncurses -lform -lpanel
...work continues...
Controlling the Booster from Linux
After losing the source code to my DCC Throttle application I decided it was time to get the whole system controlled from Linux (or, in my case, Debian.) I'd known that the DDW Server I'd been using was based off srcpd and that they were more-or-less compatible.
After a lot of tinkering (making sure libraries/compilers/etc... were installed) I finally got srcpd compiled and running.
There is a nice web-app to create the required configuration file which is then thrown in /usr/local/etc/ or can also sit in the same directory as long as you specify it.
It seems that you need to make sure that the 'NRMA/DCC Translation Table' is set to '1'. I have a copy of my configuration file here.
Right, now that the server was running I grabbed Telnet and connected to localhost:4303. I attempted to use the same set of commands as I had with DCCThrottle but to no avail... it turns out the version of srcpd I had installed was based on the 0.8.3 srcp specification... much had changed.
Instead of reading up on what I should be doing differently I connected up dtcltiny 0.8.2.
After a lot of tinkering with compilation/libraries/etc... I finally got it installed. On debian make sure you have qt3-apps-dev and libqt3-compat-headers installed... do this with apt-get. Anyway... I'd done all this on a spare Thinkpad 600E I had lying around (PII 266mhz 256mb RAM) and I'd had a few issues with lag once it was up. I'd turn the headlights off on the control panel and my Twilight Express locomotive would then go dark around 1.5 seconds later. After turning off nearly all debug output I had a relatively stable system... but it does need a lot more investigation.
The next trick will be to investigate building a client on the console... I don't need fancy Xorg to get a gui and an ncurses console app should do. I saw rcsh and rcman and the rest, but python isn't my friend... although it'd be a nice opportunity to learn.
Anyway... all of this was a great learning experience... and I was quite impressed that my old notebook handled Debian and got the locos moving.
EF81 (Twilight Express) Marker Lights
Well, after a successful Decoder + Headlight install I thought I'd attempt to get the reverse marker lights going as well. I'd been told on the JNS forums that these lights are used very rarely in Japan and that explained why the model manufacturers (in this case Tomix) didn't bother to put lights behind them. Despite this there is a 'tube' of clear, but red, plastic behind the marker lights and this means that I would only have to get an LED lined up behind it to get them to work.
So, I went down to the local electronics store and looked for the smallest LEDs I could find...
... and I tell you what, they're tiny... I used the 'helping hands' aligator clips to get the soldering done and initially attempted to wire in one LED behind the lights.
The next issue was wiring... I first used thin insulated wire I'd stolen out of a broken toy shotgun (with laser sight)... and this was OK, but there was starting to be too much piling up on top of the chassis and causing headaches when trying to put the shell back on.
Then I found 'winding wire' for building electromagnets and transformers and this stuff did the trick perfectly! This worked OK, but I could only ever get the brightness I wanted behind one of the lights. Since I wanted to be even I chose to put two lights in there.
After a little electrical tape for insulation and some blu-tac for positioning I had what I found to be success :)
There's a few issues... like the lights moving when you remove/replace the shell... but once it's all together they look great...
...the light seen on coming through underneath isn't really visible in normal conditions... my camera just decided to extend the exposure. Anyway, one end done... the other is still to do.
EF81 (Twilight Express) DCC Decoder Install
Well... This wasn't anywhere near as easy as I was hoping... The Japanese really know how to use every last bit of space in their models and although the full-metal chassis adds a nice amount of weight for smooth running, it is hell when trying to make room for a decoder.
Anyway, that said, everything is in and functioning... there is just a little more to do on making the shell fit back on properly... and a little more to do on lighting. Out of the box, the locomotive does not have reverse marker lights... just the top front headlights. So I'll be purchasing some 3mm red LEDs tomorrow to fix this situation (there is just enough room to install them.)
So, after dismantling the locomotive, reality hit me when I realised how little room there was inside. The chassis is a two-part construction with each side conducting either negative or positive. This was bad... the power came directly off the bogies and into the chassis and then straight to the bushes on the motor. I had to insulate this somehow and get wires in there. I managed to drill through the soft metal chassis and then solder on to the bushes (There are actually removable contacts that slide on, of which I soldered to.)
In the picture above you can see that the chassis fills the entire shell and there is only a few chunks missing where the headlights go. Since I no longer needed the diode/capacitor combo for the original headlights, I could remove the board and use one of the spaces for the decoder.
I went and bought a set of files and got to work at hacking out a space for it to go. After I'd removed enough I decided to quickly tape up the wiring and decoder and attempt to run it...
Well, no problems here... the locomotive ran like a charm... at some very very slow crawls! The Hornby 8215 decoders (although cheap) contain the back emf technology for really low and strong speeds.
So, the next step was lighting... I unsoldered the original 12v globes from their boards and wired them directly to the decoder... they then were taped in place where they used to sit.
There was not much room at all near the decoder, as it had taken the spot of the previous light. In the end it's still too tight and there needs to be a little more room made (more filing.)
These locomotives were not fitted stock with reverse marker lights! They have the clear plastic inside and just enough room to hold a small globe to light them... so I haven't completed this yet until I get them working...
And then I need to find the carriage set for the my Twilight to pull :)
Prototype Booster Complete!
Well... after a night of work (and using my breadboard version as basis) of soldering and drilling I have a prototype! I've used off-the-shelf components to house the board and everything fits nicely... secure... and works perfectly.
The next version will have an override switch (since the current version will only activate when there is data on the serial port) to allow power all the time.
Now is time to use this version as a test for how many amps it can push out... note I'm still using my computer power supply (which is still powering this machine I'm surfing on!) and all is well.
Finally... The going price for one of these will be AUD$65.00.
Anyone wanting one can leave a comment on this post or email me at stevenhoefel at hotmail dot com.
I've also written a new client app... very basic... controls the train that you specify.