Sunday 11 August 2013

Freshwater gets Cup-Holders, er, I mean CAB-Holders

If you have ever used hand held controllers to operate a layout, you will know that you need somewhere to put them when you need to deal with a derailment, or drink some tea. Often this means hanging it over the backscene, or letting it dangle down to the floor.

On previous layouts, I have used Velcro to allow the controller to be stuck at various places at the back of the layout. This is very handy, but removing the controller from the Velcro can cause some fairly major earthquakes on the layout.

However, I have been given a pre-production kit from Merg to try out, which has been designed by Howard Watkins specifically to hold the Merg CANCAB controllers. The kit consists of 8 laser cut pieces of MDF. The instructions advise fitting them together dry at first to be sure how they assemble, and this is a good idea. The laser cutting is so accurate that the pieces fit together perfectly, and it will hold together very well without gluing. Having satisfied myself that I had got it right, I then reassembled it using a bare minimum of white PVA woodworking glue. The pieces fit together so well, there is just no room for excess glue. Once the glue was set, it appears to be very strong.

I have now given it a quick spray of Halfords grey primer to protect the wood from moisture.

With the optional 8th piece fitted, the CANCAB locates in such a way that all the buttons and speed control knob are accessible without having to remove the controller. This can be a useful feature.

There are various screw holes for fitting to the layout, but I opted for self-adhesive Velcro. This will allow me to remove the holders and keep them safe in a box when transporting the layout, without having to resort to a screw driver.

Unfortunately, at this point, I do not know when the kit will be generally available, or what the cost will be, but I think it will be a 'must have' for all CANCAB users, and I will definitely be ordering more.

Thursday 25 July 2013

My First Dabble With 3D Printing

Freshwater station only has one platform, but it was extended at various times over the years. The first section by the buffers where the locomotive would stand is very low with plain brick facing. It then ramps up to a more normal height. The next section is typical Southern Railway concrete panels from the Exmouth Junction concrete works, while the latest extension used the Southern Railway lightweight concrete trestles, more standard components from Exmouth Junction.

Modelling the brick faced platform should be fairly simple using plastic and printed paper. I bought some Peco concrete platform facing for the next section, but it needed cutting down to the correct height, and it appears to be absolutely nothing like typical Southern Railway platforms. It might be based on a foreign prototype, or possibly just the imagination of somebody at Peco. I added some Milliput to fill the vertical channels and add the curved supports at the top of each column. It might have been better to completely scratchbuild some instead.

That leaves the trestle platforms. Nobody manufactures it in 2mm scale, so I had to make it myself. I could have formed each pair of legs separately, but would probably have given up through boredom before completing them all. Also, I knew they would vary too much and would not produce the neat, regimented rows that are such a feature of this type of platform. I had dabbled with resin moulding some years ago, so I filed a trestle from perspex and formed Plasticine moulds with it, and filled them with epoxy resin glue. This experiment was not a great success, the results being too fragile and varying in quality. I decided it was not worth trying with rubber moulds and polyurethane resin.

My next option was to try etching in fairly thick brass. This would still have required sweating two layers together to get the right thickness, but would produce a very strong result. However, I decided to try my third option - 3D printing - instead. Many people have been trying out 3D printing with varying success. However, the technology seems to be improving daily, and I figured a simple scenic item might turn out better than some of the more ambitious projects some people were attempting.

I had previously done quite a bit of 3D modelling on the computer, producing models for use in Microsoft Train Simulator that I made available on, so creating the 3D models for printing did not seem too daunting. However, the software I used to use appears to be no longer supported, and did not create files of the required format, so I downloaded the free 3D model editing software called Blender. I know some people swear by Google Sketchup, but I had tinkered with it once and found it confusingly different to what I had used before. Blender is open source, supported by lots of programmers and contributors, and there are lots of tutorials available for it on the Internet.

A 3D model is made up from a series of points, each of which has an X, Y and Z coordinate specifying its position in 3D space. A pair of points can be joined by a line, or an 'edge' and the edges joining three or more points can form a 'face'. A face can be double-sided, but usually only has one side. It cannot be seen from the other side. A simple cube has six faces and eight points - one at each corner - and twelve edges. Spheres, cylinders and circles are not actually possible to create faithfully in this type of 3D model. Instead, a circle is formed from a large number of points, each linked by a straight edge. With enough points, the resulting polygon can start to resemble a circle. Similarly, cylinders and spheres can be portrayed using lots of small, flat faces.

This is where creating models for use in a real-time computer game differs from creating models for 3D printing. In order for a computer to create the displayed images of the game fast enough for smooth, realistic animated motion, the models need the minimum number of points and faces possible. You can play with things called 'normals' on the faces to create the illusion of curved faces, but you would also leave out any unnecessary faces, such as the underside of vehicles which would not normally be seen. However, for 3D printing, we want lots of faces to produce fine curved surfaces, and most important, the models must be 'watertight'. That is, there should be no missing faces, or inward facing surfaces. So, a cube must have all six faces, and all must face outward.

Having grasped these basic premises, model making is rather like modelling in clay. You can grab a bit and pull it out (called extrusion) or you can add more bits of clay. Most software allows you add cubes, cylinders, spheres or toroids (ring donuts). You then deform these objects, divide faces and edges, and extrude parts to get to the required shape. There are other useful tools that can be employed, such as the lathing tool. This can be used to transform a set of lines drawing the outline of one side of, say, a vase, for example, and spin it round to create a 3D vase shape. It is also possible to merge shapes, and use logical unions, intersections or differences to add or subtract shapes from each other. Subtracting a small cylinder from a large cube is like drilling a hole in the cube, for instance.

For my first 3D print model, I used the drawings of Southern Railway trestle platform components from the useful book 'Southern Nouveau - an essay in Concrete'. I converted all the measurements from inches to millimeters, and divided by 152 for the correct scale. Blender uses unspecified measurement units, so I chose to use 1 unit = 1mm in Blender. I then created models of a pair of legs, and a platform section, starting each from a cube, deforming, dividing and extruding until the correct shape and dimensions were achieved. I also 'drilled' holes in the rear posts for the hand rail and fence wires.

 I then duplicated these shapes thirty or so times, stacked up close to each other, but not touching, and then exported the complete set to a single .stl format file.

3D printers are improving in quality, and the cost is falling rapidly, but the affordable ones are still limited in quality and ability. Although they may be fun to experiment with, for now, it makes more economic sense to make use of online 3D printing services, such as Shapeways, to do the 3D printing. Having registered as a user, I uploaded the .stl file, specifying that 1 measurement unit represents 1mm. Some automated checks are carried out on the file, and a few minutes later, I received an email telling me that my file should probably print OK. I was then able to choose what material should be used for the printing, and the price for printing my model in each material could then be seen. Shapeways have a simple pricing scheme, you pay for the volume of material used, each material type having a cost per cubic measure. Therefore, a hollow model will cost less than a solid model of the same size.

Frosted Ultra Detail (FUD) is the plastic most modellers use as it has the finest resolution (0.2mm) but it is far from the cheapest material. My model, enough components for about 12 inches length of platform, cost €23 plus postage. So, not as cheap as a mass produced kit would be (if available), but not prohibitively expensive. I uploaded the file on the Monday evening, and a box with the components in came through my letterbox on the Friday. I was very impressed.

The FUD material is quite transparent, so you can see the surface irregularities on both sides and an initial look gives the impression that they are a bit rough. The legs with the taller rear post will be used to form a lamp post, with a swan neck formed from .3mm wire. This swan neck would have been too fine for 3D printing.

I cleaned the components, removing traces of the wax used in the printing process, most of which has already been removed before delivery. I was not surprised that the .3mm holes for the handrail were not properly formed, but there was enough to guide a drill through in the correct position. I used superglue to fix the components to each other and roughly painted them with a concrete-ish colour and fitted it to a small board with a length of track to see how it looked. The hand rail is formed from 0.3mm nickel silver straight wire.

I have also added some static grass and some bushes, and formed a wire swan-neck lamp. The lamp head was also 3D printed, making good use of the transparency of the FUD for the bowl of the lamp.

I was quite pleased with the results, but gluing all the components together was quite fiddly, and there is quite some uneveness in the platform surface as a result. I therefore went back to the 3D model and started to combine the components so that they would be printed in units of two or three pairs of legs with platforms. I also created the end ramps as single units, and a single unit to include the station nameboard. I kept to smallish units because the platform for Freshwater is curved, not straight. Below you see the duplicated sections in Blender. You can also see some lamp heads underneath the platforms.

And again, a week later, the new components came through my letterbox:

So, now I have no excuse not to get on and create the platform for Freshwater.

Sunday 2 June 2013

Right back where I started from

It is over 12 months since my last posting on this blog. A quick recap of the project so far is in order.

Way back in July 2010, the 2mm Scale Association celebrated its Golden Jubilee with a special Expo in Oxford. Prior to this, a layout building challenge was issued for layouts up to 9.42 square feet to be exhibited at the Expo. I built Freshwater for this challenge. As a change from my normal use of relays to operate points, I decided to try servos for the new layout. I joined Merg to get access to their Servo4 kits. After some teething problems, I managed to get the layout working just in time for the Expo with a temporary control panel with a switch for each point. Although the layout operated nicely all weekend, there had been no time to create any scenery. It was just track on white painted baseboards.

I did want to have route selection and a proper control panel, but there was a problem with the servos that I wanted to fix first. On powering up the layout, one or more servos would decide to move rapidly to one extreme or the other, despite being restricted in their movement by the point mechanisms. Sometimes they would draw so much current, the power supply voltage to the PIC controllers would not rise high enough for the PICs to start operating and get the servos under control. I had to resort to switching the power off and on a few times until things sorted themselves out.

My last posting on this blog describes the introduction of the Merg CBus layout control bus, the introduction of DCC, and a lot of work on power supplies in an effort to resolve the servo startup problems. The problems persisted and I was beginning to lose interest in the layout.

The introduction of a new Merg kit for a servo mounting started me thinking again. I had done everything I could with the electronics - maybe the problem was with how I had mounted the servos. I had them directly driving the point mechanisms which meant they were only using a small segment of their available movement. The new servo mounts are arranged so that the servo can sweep through its entire range while the rod connecting to the point mechanism only moves a few millimeters. It would no longer matter if the servo wanted to move to an extremity on powering up. It could do so quite freely.

So, a start was made removing the existing servos and their mounting blocks and fitting the new mounting kits (with 5mm shaved off their overall height to fit within the hinged cover panels). At the same time, I decided to replace the under-board point tiebars I had originally fitted. Although they had worked OK, they did not have any way to adjust the distance between the point blades. The old ones also had a microswitch to change the frog polarity, whereas the new mounting also has microswitches nicely mounted on them. My new under-board tiebars, therefore, did not require microswitches.

All this work has now been completed with a couple of weeks to spare before this year's 2mm Scale Association Expo in Wallingford. Unfortunately, the viewing side of the baseboard is pretty much the same as it was in 2010 - ballasted trackwork sitting on plain white baseboards. But, like the duck, calm and serene on the surface but peddling like mad underneath.