CBUS & MERG

MERG (Model Electronic Railway Group) is an international, UK based group promoting interest in the application of electronics & computers to all aspects of railway modelling (quoted from their Website).

That covers one of my railway modelling interests and the annual fee of £20.00 (+£5 joining fee) is reasonable and includes a quarterly journal and access to a vast amount of information including a forum where your questions can be answered.

If you are doubtful about the quality of the group, you can download from the website a FREE book written by MERG member Davy Dick, entitled “Electronics for Model Railways”. This is a very comprehensive and informative introduction to the subject and I would highly recommend it as a worthwhile read.

MERG offer a growing list of kits, including Train-on-Track indicators, Gas Lamp Twinklers, a Computer Control system, DCC and the new CBus Layout Control System are available to members and, on occasion, ‘bargain’ components of model railway relevance. There are also basic projects & kits called Pocket Money Projects and these would appeal to starters in the hobby and those less confident in “things electronic”.

CBUS:  This is a universal layout control system developed by MERG members. The designers describe it as “a system for comprehensive layout control based on a general purpose Layout Control Bus (LCB). 
So what are the functions of a layout control system. You can divide these into two basic categories:

  1. Control of devices (outputs)
  2. Detection of ‘states’ (inputs)

Examples of (1) are changing turnouts (points), signals, power to block sections, turntables, level crossing gates, layout lighting, setting routes, controlling the speed and direction of locomotives (by DCC or analogue DC) and any other electrical or electro-mechanical devices that may be on a layout.

Examples of (2) are control panel switches, block occupancy detectors, bar code or RFID readers, turnout direction sensors, turntable position and ‘RailCom’™ track detectors.”

The choice of CAN: The CAN bus (Controller Area Network) was developed by the Robert Bosch company in the 1980s for use in motor vehicles but has since been applied to many other types of machinery including aircraft and medical scanners to name just two”.
Davy Dick, in “Electronics for Model Railways” describes it like this: “Imagine building a new layout consisting of four boards. With CBUS all you need do is run
four wires the length of the layout – two for power and two for the control system. No matter how many switches, button, lights, points, track occupancy detectors, accessories, etc. you now add to the layout, you still only need those four wires. The accessoryconnections between boards are always just these four wires – not the scores of wires associated with conventional wiring.”

But what does it look like on my layout, Brolgan Road?

In order to find out I built a small test panel to check things out as shown below. In simple terms the process runs from RIGHT to LEFT

  • starting with the module called CANUSB4. It connects to a computer off to the right by means of a USB cable and to the CANBUS twisted pair (red/white)
  • then comes the board labelled CANACE3 (to the designers, these acronyms made sense, but they puzzled me!) which is a switch interface that can handle 128 toggle
    switches or 64 pairs of push buttons. The module talks to the CANBUS and tells other things, in this case specific Servos to do something eg. operate points.
  • the module at the left labelled CANSERVO8 (I can understand this one – it controls 8 servos!) listens on the CANBUS and when it gets a message relevant to the points it controls – it talks to the particular servo concerned, and alters its state (normal or reverse). The servos do the business.

It’s interesting to note that the previously mentioned 4 wires seems true here (2 for CANBUS and 2 for 12DC to power modules, servos, lighting etc). But what about the DCC bus? That’s another 2 and it’s very prudent to divide the layout into SUB buses for DCC.
For example, Brolgan Road has 4 sub buses – loco, yard, carriage works, main station area and a number of isolating areas controlled by microswitches to isolate the areas either side of the lifting entry flap. Then, of course the servos have to be connected to the CANSERVO by cables and so it goes on!
BUT – if you are methodical and use colour coding and write a master list, then wire neatly and use labels, all will be well.

The video above shows a test rig built on a board being used to move a servo, in this case to find its centre position. The test rig consists of two Pocket Money Projects (PMP). The one on the left is a “Servo Controller/Tester” and all it does is respond to the position of the control knob (operating a variable resistor). It allows me to make sure the servo arm is fitted in the correct position – giving equal movement each way.

The PMP on the right as called “Ezy Points” and you will see it working in the video below. It is connected to a turnout test bed so that I can test the movement of the point blades. The 3 BLUE objects on the circuit board are variable resistors (aka potentiometers aka “pots”) which adjust 3 things manually with a screwdriver: speed; movement Left; movement Right, so that you can make the poin blades “kiss” the stock rail.

These PMP projects are fully described in the free book “Electronics for Model Railways”

An earlier test rig (below) better shows the “pots” (blue) and the standard RC (radio control) cable – yellow, orange, brown. You can get these in various lengths from hobby shops dealing in RC aircraft. Or, you can buy them on eBay very cheaply. You can plug them together for longer runs.
If you had a tiny shelf layout with a couple of points, you could use a few “Ezy Points” to control them. OR – you could use the servo to activate any other moving thingy eg. a gate, a signal etc. anywhere on your layout. Of course then you haven’t got remote control of all aspects like you have with CANBUS (or DCC).

The servo cable would normally come out the bottom of the layout.
Here is a close-up of the CANACE3 printed circuit board (PCB). You can buy the complete kit from MERG or just the PCB as I do and source the parts locally.
The soldering is not difficult but it requires practice. I will try to develop a VIDEO showing the process.
This is a close-up of the CANSERVO8 and this is a beautifully designed PCB of a more modern style. This board can control 8 servos and 2 are plugged in at the top. The long device in the centre with lots of legs is an IC and it can be purchased pre-programmed. It has all the “smart stuff” that responds to signals on the CANBUS and then bosses the servos around!

Controlling Mains Power on a Layout

This is a simple topic and one which may be of no value if you have a tiny layout.

In my case, with a layout running around the walls, I had 3 mains power outlets all of which would be difficult to access when the layout construction was under way and completed.

This Remote Controller is one of a number that are available which allow you to switch varying number of outlets. This one does the job for me.
Check on-line for pricing (look up: remote control power outlet)

The switched outlet plugs into the wall socket as above. I can turn ON ALL with one switch or select which one I want.
It is also useful for me to divide the layout power into three sections which eases the load when powering up. Others have more than 3 controlled outlets.

Solder Fumes Disperser

I have never been happy with the fumes from lead based soldering wafting into my face. A properly fitted extractor hood would be ideal but I cannot justify the cost or space for hobby use. I know I probably should use lead free solder but I have never been happy with the finished joint in that either.

The simple device described below at least blows the fumes across the work area for dispersal, instead of up into my nose.I have recycled a computer cooling fan (12v 300mA) wired to a fan speed control which was also recycled. I notice that you can buy the simple controller on eBay at $3.40 AU from China. It is adjustable to give enough airflow to move the fumes. without being too draughty.My unit plugs into a 12v outlet on my workbench – also available for testing various MERG & other projects.
TOOL Racking and Storage will be the subject of another post.

Soldering

SOME NOTES ON SOLDERING PCBs and other things:
  • use resin core electronic solder. I use 1 to 0.7mm for fine work including PCB circuits.
  • the resin is the FLUX to help remove oxides from the surface. It is in small “veins” within the solder (60%tin 40%lead).
  • if you melt the solder onto the tip of the soldering iron, all the flux goes up in smoke!
  • to make a good electrical join, clean the surface to be soldered using a scouring pad / fine wet & dry abrasive paper/ “Ajax” or similar abrasive powder / fibre glass brush (horrible things that shed dangerous tiny pieces of fibreglass).
  • clean the tip using a wire pad (or use a damp sponge)
  • “tin” (coat) the tip of the soldering iron with a tiny bit of solder (this helps to conduct the heat to the join)
  • heat the join area with the tip of the iron and simultaneously feed in some solder to the joint.
  • Only use a liquid flux if it is non corrosive – I only use that when soldering rail or brass kits. Such a flux needs to be washed off with water.
  • In the photo below the solder has been fed briefly to the gap between the tip and the copper. In this case to prepare a spot ready to receive the leg of a component.
    This simple Circuit Board will be used to step down the 12 Volts form the main power Bus to 5 Volts to operate servos on the layout.
    A component (an electrolytic capacitor) has the two radial leads separated and cut short such that each goes to a different pad.
    The component has been held in place with self closing tweezers.
    The tip of the soldering iron is briefly cleaned – then a tiny amount of solder added to “wet” the tip – apply the tip to the join – feed in some 0.7mm solder.
    Doing it this way feeds the flux to the joint as well as the solder.
    A GOOD join should be smooth and have a nice shine to the surface.
    Same again on the second leg making sure that each leg of the component only connects to a separate pad.
    This method is like working with what are called SMDs (Surface Mount Devices) except that our discrete components are 10s or 100s of times bigger!
    The electrolytic capacitor is in position and the Voltage Regulator is being prepared on the right. On a normal PCB the legs would go through holes and be soldered to tracks on the reverse side. In this case the legs are being bent to straddle 3 pads.
    And here are all the parts in place on the PCB. To the left is a diode (passes current one way only) which serves to protect the circuit if it is accidentally connected to 12V with the wrong polarity. A larger electrolytic capacitor is behind the diode.
    Sharp eyes will make out 7805 on the IC (integrated circuit) – the “5” indicates that the output voltage is 5V. This is the voltage required to operate servos and this board provides that power to the servos.

    This is the circuit diagram for the project described above including the “pinouts” of the 3 leg 7805 voltage regulator IC. Feed it with 7-35V DC and it will deliver 5V DC.
SOLDERING BRASS / RAIL / WHITE METAL:

Coming soon

 

 

Making Simple PCBs

Printed Circuit Boards (PCBs) are possibly a step too far for many railway enthusiasts. However the material lends itself to many simple possibilities.
What is PCB? There are two main types:

  • a board based on glass reinforced resin and coated with a thin layer of copper which is a good conductor and easily soldered. Some PCBs are double sided, ie. coated with copper on both sides. For our purposes, both could be used but there is not much advantage in double sided boards for these simple projects.
  • an earlier type which is based on a phenolic material, dark brown in colour and somewhat brittle. Otherwise similar to the above

The PCB we want to use is BLANK PCB which can obtained from on-line
or retailers like Jaycar® or Altronics® in Australia.

The 3 PCBs above are all based on glass fibre PCBs. The one in the middle is the focus of this article. It is a Power Supply.
The other 2 boards are produced by the MERG (Model Electronic Railway Group in the UK). Members can buy these boards either as a kit (with all parts) or just the PCB for the owner to purchase the parts and assemble. The latter is what I have done in these 2 boards.
In these complex PCBs, a series of “components” are connected by conductive “tracks”. The components are soldered to the PCB through holes in the board.
In simple terms, the one on the left operates up to 8 servos which can be controlled by the one on the right. The latter handles input from switches.

The rest of this post will focus on how to make simple PCBs even more basic than the one outlined above.

Rather than a Terminal Strip with screws:
The PCB on the right is about as simple as you can get (& cheap!)
It is divided into 2 discrete parts by making a saw cut through the copper cladding. Each half is a separate part of the circuit. One for the RIGHT rail of the DCC supply and the other for the LEFT rail.
A couple of screws hold it to wood in this case. It could have been glued (epoxy) to the wood or to the underside of a foam layout with contact cement. 2 screw holes are needed.
The copper is cleaned with fine wet & dry or a fibreglass brush. For ease of soldering under the layout, I made 10 small starter “blobs” of solder.

The pic above also appeared in the Track Feeder Post
Whilst this one looks slightly chaotic, it shows a couple of other aspects:

  • the PCB has been glued to the base of the foam with contact cement.
  • the piece of PCB is super simple – the copper has been split into 2 sections by using a modellers razor saw (see below)
  • colour coding is obvious and important
  • the 2 CBUS wires (red & white) to the far right have been held in place using a low temperature glue gun.
  • the purpose of the exercise was to feed DCC power to 4 adjacent tracks on the turntable.
    To do a simple divide on the surface of copper clad PCB you can use a home made (left) or purchased mitre box (right).
    Just make sure that both segments are electrically isolated using a test lead or a multimeter on the Ohms range.
    To make the PCB on the right, cutting with a saw, as described above, will not work.
    A cutter such as a dental burr or a “Dremel” engraving cutter such as this one is needed in a rotary tool or drill press.
    This one is a #111 engraving cutter but I think #105 or one of the
    others as shown on the Dremel Site should work.

     This is the finished product PCB.
    It converts 12V DC to 5V DC which is required in some circuits.
    The construction technique is UNUSUAL but SIMPLE to use for basic circuits. In effect a bit like modern boards which are made using SMDs (Surface Mount Devices) except that the latter are TINY, almost microscopic.

    This is the circuit diagram for the project described above including the “pinouts” of the 3 leg 7805 voltage regulator IC. Feed it with 7-35V DC and it will deliver 5V DC. The function of this board was to provide 5V to power the servos controlling my points.
How to Cut the Grooves:

The “pads” of copper will form discrete parts, or “pads”, of the circuit for this 12V to 5V converter.
Below I am using a small bench drill (or a rotary cutter like a Dremel) with a guide clamped to the left. To set the depth of the cutter, the simplest way is to adjust the cutter so that it just touches the surface of the copper, then slide the PCB away and place a piece of paper under the board which will raise it enough to route a groove. You will need to experiment with the thickness of paper but a thin piece is all that is required.

A slightly more crude approach, but one that will work, is to mark out the pattern with a pen and freehand cut the grooves. The electricity won’t mind if the edges are a bit ragged! But check that each area is not shorting to a neighbour with a meter or test lamp.
Treat the cutting tool carefully with respect to SAFETY . Wear safety glasses. If cleaning up with a fibreglass tool, vacuum up any loose material – it has an attraction to entering your skin!

The NEXT STEP of installing the components involves SOLDERING so see the Soldering Post to reproduce something like the little power supply above.

At present I will continue this post to show how to use super simple pieces of PCB as an aid to wiring layouts and panels.

The example above is the rear face of a control panel (see the Post on Control Panels). Several pieces of PCB have been attached to the back of the acrylic panel material. The long strips distribute a connection to the DCC bus. This is used to operate the LEDS, shown later, which reflect the setting of the points switches and the solenoid position. The smaller squares terminate the connections from the LEDs via 1k resistors.
The PCB here brings in the connections from the module that controls the point switches shown in the first photo. The connecting cable is called “rainbow cable” and sells from suppliers like Jaycar in 16 wire ribbons. Other suppliers have even wider cables but they all repeat in batches of 10. This cable makes figuring out which wires go where, much easier.
Strain relief on the cable is provided by clamping an additional piece of 2mm plywood. The mounting ply and the PCB are epoxied to the recycled picture frame housing the panel.
The panel shown above is now complete and ready for testing. At the back, the LH PCB connects switches to the panel. This board was made using techniques shown above.
The right hand board is a piece of commercial strip-board sometimes known as Veroboard. This board is bringing in connections to the frog from 8 points. This signal is used to set indicator LEDs showing which track is “set”.

This gives some idea of what the panel does – the LEDs indicate which road is set. The switches also indicate the road but the LED is easier to see and actually indicates that the road has power. The switch on the right is replicated on the next panel and can be controlled from either panel.

Track Feeders & Buses


No … not that sort of bus!
In our case it’s a wire, or a collection of wires that carry an electric circuit or a data circuit.

In the underside view of this little demonstration layout, the Bus wires are the RED and WHITE pair which carry the DCC Bus along the bottom.
Tapping into it at several places are DROPPERS or FEEDERS (red and black) to carry the DCC circuit to each piece of track on the top.

In this example the bus is connected to a PCB strip in 4 places to simplify connection of the droppers to the bus.

I will have a post to cover using printed circuit board PCB for various purposes.

 

See: Making Simple PCBs

This an underside view of my layout with 4 bus wires in view.

A = DCC main bus; (heavy duty stranded copper wire) Red = rear track wire
B = 12V; (H/Duty above) Blue is Positive and White is Negative
C = DCC sub bus (in this case from the main bus to the YARD bus). This allows
me to easily isolate that section.
D = MERG Can-bus which distributes the electronic data around the layout.
Note that it is very thin as it carries low current signals.
Note also that the wires carrying a data signal A,C & D are all lightly twisted to lessen interference one to the other.

Note the colour coding – there is no fixed rule but RECORD your code.

Our problem is to get the track feeders through the baseboard, in this case FOAM, to the Bus underneath. EVERY piece of track must be fed between joiners. There is a special issue with foam.

Some sources indicate that the foam can react with the plastic on electrical wiring and cause it to break down. A wooden base board can just be drilled 6mm.

So, after we have drilled the hole in the foam (as shown here with the 6mm K&S brass tube drill still in place) we need to line the hole with an inert material.

 

Note the colour coding – there is no fixed rule but RECORD your code.
See the Post on DRILLING HOLES IN FOAM for more info.

Because this section of my track was using Expanded foam (not recommended) I had to clean the hole out with something that was a loose fit to get rid of all the little white balls of plastic.

This is not needed in Extruded Polystyrene Foam. See details on foam HERE.


The 6mm hole is an exact fit for a drinking straw. My preference is for the paper straws but they seem to have disappeared on the far South Coast so plastic ones will do.

Measure it to be 5 mm longer than the total depth of foam and underlay.

 

 

Coat the straw lightly with some PVA…

 

 

 

 

… and slip it into the hole.

 

 

 

Wipe off the excess PVA …

 

 

 

 

…and do the second one.

 

Now we come to the bit where you need to solder a wire to your track, take it down the feeder hole and connect it to your Bus wiring.
Shown below are the tools you will need for the top side. I have a colour code for the droppers – RED is the Right DCC track (or in my case, the REAR track closest to the wall in an around the walls layout). My front rail is fed with GREEN (because I had heaps of that colour).

In a module you just need to be consistent making sure that no swap-overs occur.
As can be seen at the top, I have a main DCC bus which feeds 4 sections – North (Carriage Works), South (Loco), East (Yard) & West (Station – “Bolgan Road”).

Each section is fed via a STOP LIGHT BULB in series with one feed wire. If there is a SHORT CIRCUIT, the stop light bulb will carry the load and LIGHT UP.
See THIS SITE for more info. Or THIS ONE.

Strip 1cm approx.
The wire I used was from Jaycar and is sold as
Flexible Light Duty Hook Up Wire 13 x 0.12 tinned (WH-3005 green)
Twist the strands tightly together.
A typical appropriate soldering station.
Put a tiny amount of liquid flux on the bottom flange of the rail.
Pick up a tiny amount of solder and tin the bottom flange.
This is a better photo of how the tinned flange should appear.
Use a sharp blade to cut a slit in the track bed to allow the feeder to drop straight down from the rail, as in the last photo.
Tin the end of the feeder wire – ideally only the last 2mm!
This is where the self closing tweezers are handy.
Line up the end of the wire with the flange …
…and try to solder just the tip of the wire to the flange,
Then push the wire down and into the slit made earlier.

If you are working on a timber baseboad, the feeder hole can be drilled between the sleeper (tie) ends under the connection point and there is no need to line the hole.

Once the track is painted (weathered) and ballasted the feeder should be almost invisible. The feeder is shown at the end of the toothpick.

The photo above  shows some of the kit I use when working under the layout.
There is:
1. a low level seat which can slide on the floor
2. a low level 240v light (LED) which has now been replaced by a similar size rechargeable LED work light,
3. soldering station,
4. wire strippers, knife, sidecutters (not visible) for removing the insulation from about 1cm of the Bus wire.
5. and, BEST of all – a locking clamp with a roll of solder attached so that it is easily accessible.    See the post on Strain Relief to help you work under a layout.

This is the LED battery work light. It is a 10W 6000K (cool white) unit which is also useful for colour painting.