Thursday 1 December 2022

Backscene and Signalling (1)

 Big news today - we have a back scene. This is important because, once I have buildings, etc. on the layout, I won't be able to turn it upside down to install any more electrics/electronics. The back scene means that I can balance the layout on it and have clear, supported, access to the underneath.

The back scene is made from my usual 5mm foam core. Unfortunately, it does warp a bit when exposed to acrylic paints but it will be securely stuck using hot glue. There are three boards. I used school acrylic paints in blue, white and black. I mixed the the white and blue with little blue and put that on at the lowest level. I then increased the blue for another  two stages to get an idea of the normal sky. I have to say that I didn't put enough blue in the first layer but it's too late now. Once all this was dry, I painted some white clouds on using a stipple brush. This was followed with a white/black mix to get the normal grey underside of the clouds.  I think that it does the job, especially as I am not an artist. (You can right click and see a bigger version of any image).




OK, so now down to some interesting electronics. This is still being built so you won't see it working yet.

I am arranging to put a protective signal on the exit road to the staging. When at the Warley show over the weekend I bought a Berko two aspect signal. Silly really as it is a UK style signal. I should have waited and bought an Atlas one but there we are. Maybe I will replace it. The idea is that when a train gets to the end of the staging it will trip the signal feed to go from green to red. This will happen when the loco moves into the last element of the staging road so about 8" from the end. At the same time, the track power to the whole line will be removed so, should any loco pass the red, it will stop. When the loco and train are  removed, the power will come on and the signal will revert to green.

The stuff that makes this happen is as follows:

An Arduino Uno (eventually, a Nano)
A light sensitive diode
A 5V Relay interface for Arduino
A signal - this time it is a two colour light - red and green.

The idea is that the track is isolated at that 8" distance from the end. The track at that point is fed from the relay.  The Arduino sketch (program) loops around continuously and checks the output of the light sensitive diode. Anything under 1000 as seen by the Arduino indicates that the light above the diode is being blocked. If that happens, the track current is stopped and the signal set to red. Over 1000, the power is restored and the signal turns green.

The sketch looks like this.

// Project Control Staging Track and Signal
int LED = 13; //define LED digital pin 13
int relay = 11; //define relay digital pin 11
int val = 0; //define the voltage value of photo diode in digital pin 0
int state = 1; //state of light sent. diode 1 = ON 1 = OFF

void setup(){
pinMode(LED,OUTPUT); // Configure LED as output mode
pinMode(relay,OUTPUT); // Configure relay as output mode
Serial.begin(9600); //Configure baud rate 9600
}

void turnOff() // power off to track and signal to red
{
if( state = 1 ) {digitalWrite(relay,LOW); // turn relay off
state = 0; // note state as off
}
}

void turnOn() // power on to track and signal to green
{
if( state = 0) {digitalWrite(relay,HIGH); // turn relay on
state = 1; // note state as on
}
}


void loop(){
val = analogRead(0); // Read voltage value ranging from 0 -1023
Serial.println(val); // read voltage value from serial monitor
if(val<1000){ // If lower than 1000, turn off LED
turnOff();
}else{ // Otherwise turn on LED
turnOn();
} // delay for 10ms
}


I think that if you start at the loop and follow that even a non-programmer can follow what is going on.

I am waiting for the last little bits to build the actual setup so that will be the content of the next blog entry.


Thursday 24 November 2022

Software news

 I am busy resurrecting my "Car Cards" software that I used on my previous Kato round-roundy. I am making some changes to it to get a mobile phone view that is reminiscent of the development I did for the final project unit of my Open University course. This look like so (right click for a bigger version):


I don't have the software to make a true mobile phone app like the one shown so it will be a simple web page. There is also a back up web package that provides views of all of the relevant data.

This is how it goes.

Data is stored for the variety of information needed to decide on car routing. This includes trains, cars, locos and industries. Each loco is listed with its road name, running number, loco type (passenger, road or switcher) and DCC id. Cars are listed by their road, car type, AAR designation and an image address. Industries are listed by name, town, car type and allowed time on site. An industry entry is required for each car type at any specific industry so an industry might be listed multiple times. The intention is that this process should be fairly similar to the MicroMark car card package.

There is a single display which is the current train being processed. This lists all the relevant data for the train and all the cars as in this example.


Once you have moved all the cars as described, you click on the "Process Train" button. The database is updated with all the new locations and the next train is built and displayed.

Using a web browser will result in more information being available so you can not only create and process trains but you can also list each data list - trains, cars, locations, etc. 

Oh, I forgot to mention that it will also create unit trains - that is a train with one type of car - coal hoppers, container flats and so on.

It is a simple system as it only deals with a single yard fed from staging which is all I need at the moment. My original Open University project was for a much more sophisticated program that allowed for multiple databases and much for flexible layout design - end to end with three towns or something similar. However, this requires more work before it can be offered even for testing. The Open University project just required me to develop an outline program that produced some test results. I expect to offer that system - Old Bill's Switch List - sometime next year.

Once I am happy with the existing Car Cards system, I will offer it up for others to test but I need to make it multi-user first. Expect that sometime after Xmas as I would like to run some trains myself first.


Sunday 13 November 2022

The board and staging are complete

 Well, the board is complete and I have finished the wiring so far - all of the DCC bus is in place plus all of the points are connected to ESU Switch Pilot accessory decoder boxes.

Here is the underneath showing the wiring before I fitted the point connections.


You can see the square supporting boxes and the attendant legs . Each box is fitted around the specific leg. You can see the area around the base of each leg. These were designed as flexible boxes that can be adjusted to get the height right for each leg position. Once they are right, I run hot glue around the tops and fix them in place.

As you can see, there are lots of little connectors. I have a wide range of these from a simple two channel through up to a 5 way single channel. Here is a three channel.


From there, I have fitted three ESU Switch Pilots to control the points. The Switch Pilots output three wires - a common and a left and right. However the Kato Unitrack points require two wires so some conversion has to take place. I use DCC Concepts DCD-SDC6 which make the conversions.


I have had a few problems from the testing. In trying to sort out one point where I had missed getting into the rail joiner I managed to break a rail away so that £30 for a new point. Then I had some trouble sorting out the double crossover. I set it up on the ECoS controller along with two points to make a single crossover but every time I tried either one, the two way would work. I haven't really sorted this out and it is looking like the four way crossover (which is a single Unitrack unit that costs £50!) has failed but we have some way to go to get to the bottom of it.  Also, in my usual stupidity, I opened up a point to see what was inside and it all sprang apart. I thought that I had sorted it but it turns out that I hadn't so that is another point that I have had to buy. It gets better because when the new point arrived, it was faulty. Not only does it not work through the ECoS but also doesn't work manually. Tony at N Scale American Trains rapidly agreed to put a new one in the post without waiting for me to return the faulty one. That is good service!

All of these issues will be easy to correct once the replacement arrives so I have set the railway up in its chosen place.


It turned out that I hadn't got the legs long enough so, currently, I have put some foam core sheets underneath each pair to get the top level. I have also built the staging extension which is detachable from the main layout. This is a box with legs to get it level.  Here is a shot of the staging.


You can now see the two storage points for the connecting tracks. I have ordered some barrel plugs and sockets. Needless to say, I have to buy 10 when I only need a couple. One of these will be used to move power from the main layout to the staging. The other will be involved in powering an Arduino based light detector on the staging that will control a color light signal on the route off the main board. That's for the future though. 

I am awaiting the replacement point and then, maybe, I can run some trains.


Thursday 3 November 2022

We have legs

 We now have legs on the baseboard. These are made, like the board, out of 5mm foam core. I have some special cutting tools to use with foam core. One of them has two blades set in a v shape that are custom designed to cut a -V- into the board leaving the outer paper layer intact. This is what it looks like.


I also have a tool that takes 5mm of the end of a board, again leaving the final paper layer intact. This gives me a channel that gets UHU paper adhesive applied and makes the final edge of the box. With a careful bit of calculation, this can be folded up to make a leg that is 3" square and is very strong.


I then create a box for each leg to go into on the underside of the baseboard.



We end up like this. (BTW, it looks as though it is sagging in the middle but this is an optical illusion. The board is flat and checked with spirit level plus rolling stock stay stationary where put!).


As you can see, each leg has a collar around the base and a flat plate. The collar is made to be just big enough to be an interference fit around the leg. The legs are then put in place and the board levelled using these collars. Once in place, they are hot glued into position. It isn't too stable front to back but it is close up to the cabinets so that shouldn't matter. 

As you can see, the board is longer than the gap and thus rests on the end of the desk. The desk has an electric height adjustment so it can be set to support the board exactly. Why would I do this instead of using wood as everyone else does? Well, I have a lot of arthritis and if I have to walk more than about 30 years I resort to an electric wheelchair. I have extreme difficulty in getting onto the floor and even more difficulty getting up so I need this to be as light as it can be so that I can pick it up, turn it over and work on the underside whilst it is on the dining table. 

Well, that's it for now. I am charging uop my wireless Dremel so that I can start wiring up for DCC. That's for next time.

Thanks for watching.

David

Monday 31 October 2022

Track has gone down on the new S&NE

 Some negotiation has taken place with the Estate Manager (SWMBO) about how the new layout was going to work. I built it so that it would sit on the desk when in place and would split into two when not in use. The layout turned out to be a bit bigger for some reason. It was supposed to be 1600 x 350mm but , somehow , it ended up 1700x350mm. This didn't matter but I can't work out how it happened as it was all designed in Anyrail so I must have made a stupid mistake there.

OK, so SWMBO decided that I would never use it if I had to put it up and take it down. Good thinking. One of my other hobbies is making patchwork but I never get to do any as the sewing machine is stored in a cupboard in the bedroom so it never comes out. Her plan was very good. Next to my desk are two glass cabinets that contain my scale models plus my Camberwick Green collection. Currently, there is nothing in front of them. She suggested that I make it permanent by siting along in front of these cabinets. I can easily make legs for the board. I have a special cutter for foam core that cuts a V in a line so that the board can fold into a 90 degree bend. This makes a very strong leg. 

So what does it look like now that it has track and has been fixed into one unit.


All of the track on the main board is now in place. The line in the middle - the short one with a white dash below it - is where the turntable is to go. I was wondering how I was going to get a stepper motor on to  the turntable when there was only 2" clearance, Now that the layout is to be on legs, it won't matter as there will be clear air under it.

The next steps with the layout itself are to wire it up both for DCC and for the point motors. For the point meters, I use ESU SwitchPilots (four outputs on each). The outputs all have one DCCConcepts  DCD-SDC6 which converts the three way output of a SwitchPilot into a two way suitable for Kato point motors.  I have ordered some 22gauge solid wire for the track feeds. That should be here tomorrow. However, my first job is to make the legs for the board. More on that next time.

Tuesday 25 October 2022

I am back with foam core and Kato

 So I am back in harness and buzzing with ideas. I have been down to Hobbycraft to pick up four sheets of 5mm foam core - they always have a deal 4 sheets for £10 - which I use for making lightweight railway boards. I also dashed down to our storage room (at StorageMart - bit of a dig as my son-in-law-manages  the local branch). I retrieved all my track and my ECos DCC controller.

I have spent a couple of days working on a layout design. I have hovered between keeping the Kato track or going to Peco. Financially, there isn't much in it so long as I don't go the route I have always done in the past and used the DCC Concepts point motors. Finally, I decided that I would stay with Kato Unitrack.

First step was to make the boards. The tops are firstly supported by a double layer of foam core making it 10mm. Of course, the lengthwise strength of the boards is much greater than they are side ways.




I have built the base in two halves so the railway can be leant against the bookcase next to my desk when not in use. The two halves, when put together, are held by a couple of clips made, yet again, out of 5mm foam core.





Finally, with the board built, it sits nicely on the dining room table. 


This won't be its normal home. I am expecting to clear the front of my desk as this will support the boards completely. Next job is to lay some track. I have just placed an order with N Scale American Trains for the track that I don't have. Hopefully, that will come in the next couple of days and then I can get on with building the layout properly. Once I have the basic track laid, I will be able to build the storage road board. This will be 1000mm long and about 110mm wide and have a couple of yards of Peco track on it. Mixing Peco with Kato is not difficult. The reason for this is that I have about 4 yards of Peco already so that will save some of the expense.

This is the first plan. However, you know what Generals say about a battle plan? No battle plan ever get survives first contact with the enemy. Hence, I don't expect the following plan to end up the final version.









Thursday 20 October 2022

Am I back or am I dreaming?

 Well, its nearly two years since I last posted and all my model railroad stuff has been in our storage unit all that time. I have had a lot of fun building scale plastic models see Gentle Scale Models. I have also taught myself to play the Tin Whistle and am now struggling with a soprano saxophone! One thing we don't have under ordinary circumstances is a television. We are one of those strange couples who can live without one. We did succumb almost at the same time as the railroad went. We even took out a subscription to Sky satellite feed - for 18 months. Well, the 18 months was up about a month ago and guess what, we don't have a TV again!

Our evenings are nice and quiet or we are listening to our superb Naim Uniti-Atom hi-fi. Being old fashioned, I love paying vinyl records of the jazz I grew up with. However, reading from 7 pm to 10pm can get a bit boring and, at 77 years old, I get tired in the evenings. I get too tired to make scale models and no-one wants me playing a sax in the evenings. I got to thinking and realised that, if I had a model railroad, I could spend some evenings running trains. So, we are off again.

Here is my desk.


You might wonder how I can get a railroad on here. Well, you see, it just has to sit here when I am using it. I make my railroad benchwork from 5mm foam core, which, when properly structured, is plenty strong for an N scale pike (to use an old expression). The plan is to build a base that is 1600mm long and 350mm wide.  When not it use, it will stand vertically next to the desk - when we move the bookcase that is just 400mm across. Fortunately, there is sufficient space. This will be the main board. In addition there will be a dismountable storage yard of about 800mm x 80mm coming off to provide a destination. This is the first pass.


The plan is supposed to represent a branch line terminus with a small freight yard and an engine facility. I have a whole pile of Kato Unitrack left over from my previous desktop layout so that is what this is using. I like Unitrack because I don't have to ballast the track (OK maybe I should but...). Also, I like the way that the points (switches) are all set up with motors and only require a two wire connection to work with my ECoS 50210 DCC controller. It is a bit of a fiddle getting all the track lengths correct so that it goes together properly. I have to admit that there are a couple of tiny gaps that will probably be OK with little bit of fettling.

Back to the layout. Well, there is a lot wrong with this. Firstly, a small terminus in the USA wouldn't require double track.  It is there because I have a Unitrack double crossover which I would like to use. I did think of making it a through station but then a small engine terminal wouldn't look right. I would like a turntable as I dislike having low hood locos running in "reverse". I know that they do but... As it happens, the turntable is very expensive - circa £270 - so I may have to forego that and put a bit more yard and industry track work in. We shall see.

The river is there because, from my last layout, I have both a single and a double track girder bridge and it seems silly not to use them. This is as far as I have got. I am hoping that a regular annual payment from the USA will be agreed in December - I do some programming work for them and this is an annual retainer. If that is agreed, the turntable will not be an issue but we are waiting.