Tuesday, December 30, 2014

Installing servos in Peco turnouts

Some posts ago I showed how I wire Peco electrofrog turnouts. 
Hace unos cuantos posts mostraba como cableo los desvios Peco.


I also talked about the paper clips and using them as piano wires to move Peco turnouts:
También hable sobre el uso de los clips de papel como alambre o eje para mover los desvios Peco:


An today I would like to show the the complete process I follow to install a servo motor under a turnout. First of all, bend a paper clip in a "U" shape, with one arm longer than the other. Also mount servo in servo mount and screw the single arm to the servo. Before screwing the single arm (white plastic piece), make sure the servo is centered connecting it to the servo driver board. Y hoy me gustaría enseñar el proceso completo de cómo instalo un servo debajo un desvío. En primer lugar, se dobla un clip en forma de "U", pero dejando un brazo mas largo que el otro. Monta también el servo en el soporte y atorníllale el brazo sencillo. Antes de atornillar el brazo (la pieza blanca de plástico), hay que asegurarse que el servo está centrado conectándolo antes a la placa controladora de servos:




Put the paper clip in the servo as in the photo.
Se pone el clip en el servo como se ve en la foto.



Then bend the paper clip and cut the short side properly.
Después se dobla el alambre y se corta el lado corto a la medida.



That's the result before fixing it under the table. 
Este es el resultado antes de fjarlo bajo el tablero.



Put double sided tape on the servo mount to fix it easily under the table. This helps to keep the servo in place while we screw it to the table.
Poner cinta de doble cara sobre el soporte para poderlo fijar cómodamente bajo la mesa. De esta manera se puede atornillar luego sin que se mueva y se descentre el servo.



Before mounting it you have to remove the spring from the turnout in order to allow point blades to move freely. Of course you have drilled the needed hole before fixing the servo. Pass the clip through the hole of the throw bar and make sure servo and servo arm are aligned with the turnout. Also make sure point blades are in the middle of the movement, not touching any of the stock rails, and press the servo to the table. With the double sided tape it stays in place and you can screw it.


Antes de montar el servomotor hay que quitar el muelle del desvío para que los espadines queden sueltos. Por supuesto, antes de fijar el desvío se ha hecho el agujero necesario. Se pasa el clip por el agujero del tirante asegurandose que el servo y el brazo están alineados con el desvío y el movimiento que ha de hacer. Asegurarse que los espadines están en mitad de su movimiento, sin tocar ninguno de los contracarriles, y apretar el servo contra el tablero. Con la cinta de doble cara quedará fijado y se puede atornillar con seguridad a continuación.





Espero como siempre que os sea de utilidad. I hope this be useful!!


Wednesday, December 24, 2014

Control Bus

Summary


As a summary of my latest post, I was explaining there are several digital communication systems to send orders to trains (DCC, Selectrix, Motorola,...). All them are based in a Central Station that, with the help of a Booster, modules the electric current to send commands to the mobile decoders installed inside the locomotives. But DCC is by far the most common and widely used at least in N gauge, despite it isn't the best nor the most versatile.

Later we saw, because of the lacks of functionality of DCC, new feedback buses used to send back information to the Central Station from the Feedback Modules. An example of those buses are RailCom and  S88, but nowadays they are completely old-fashioned.




And before talking about the different elements that compose a digital layout, I think is mandatory to talk about the Control Buses. The election of the Control Bus is the key for a new installation. It acts as a backbone or central nerve system interconnecting all components together. That means, all components must be compatible with the Control Bus. So it's a restrictive selection and it will restrict us in the range of digital components that we can connect to the layout.

Distinct buses used in model railroading

Everybody jumps into digital world buying first of all the Central Station, but most people select it taking into account just visual characteristics like how many throttles it has, or if it has color screen, or tactile, ... when all this things (throttles and panel screens) are not really part of a Central Station. Also functions like the possibility of creating routes or move trains in an automatic way are evaluated, when again those functionalities shouldn't be in charge of the Central Station. The better approach for me would be to evaluate the compatibility with the different buses in the market, and therefore with the existing software and electronic components like feedback modules, output modules, servo management modules, sound modules, ... of course other characteristics like how many locomotives can drive at the same time or the current power should be also evaluated.

What is a Bus?


But before that, what is a Bus? Taking the definition from wikipedia: "a bus (from the Latin omnibus, meaning 'for all') is a communication system that transfers data between components inside a computer, or between computers. This expression covers all related hardware components (wire, optical fiber, etc.) and software, including communication protocols."

It means a Bus specifications covers and explains not only the physical medium used (cable, radio, WiFi, fiber optics, ...), type of connectors (USB, microUSB, SubD9, RJ12, ...), supported topologies..., but also the communication protocol, message formats, type of commands available and everything referred to the software and programming part.

Keys to select a Bus


There are dozens of distinct Bus in the market, and many manufacturers designed its own bus like an industrial secret, without sharing the specifications so only they can build peripherals and modules and become your only possible supplier, setting the prices they want. Of course these are the ones we have to avoid first.

Second, there are also other kind of Bus being created openly by groups of users, completely the opposite example than before. But in many cases all the hardware must be constructed by our own so you need a deep knowledge of soldering, isolating boards, electronics and programming. Usually it's a cheap but very complicated solution.




And the third big group of Bus we have to avid are those based in old-fashioned technology. As I see it, any kind of bus not based in a Peer to Peer architecture (see Peer to Peer information). In this kind of architectures or topologies Peer to Peer (more known as Networks, better than Bus) doesn't exist the figure of "master component" and "slave component", so all at the same time can send and receive information, produce or consume information, or be "master" and "slave" at the same time. The way of connecting the components (topology) is normally also very flexible:




So despite the communications with locomotives will be for sure DCC, the connection and dialog with the rest of components of the layour (PC, outputs, feedback modules, sound, lighting, ...) will be done through the Bus. That's why is so important the bus election over the central station, throttle or any other component.

My suggestion


I don't want to finish just here, without any specific advise or Bus recommendation. I know it's a personal election based in many factors like our skills (are we able to construct our electronic components?), likes (do we want to program our modules) and of course budget. But if I have to recommend a bus not knowing the particularities of a person I would suggest Loconet by far because it has all this characteristics:


  • It's a Peer to Peer type Bus
  • Very flexible form the topology side, it can be connected very simple in line, or using hubs and combine star and tree. 
  • The Bus is property of one manufacturer (Digitrax), but on the other hand specifications are public. Everybody can access to them and build and program they own modules and devices.
  • Supporte by multiple manufacturers. You are not restricted to Digitrax, also Uhlenbrok, Digikeyjs, Fleischmann, ...) make central stations, modules, throttles and all kind of devices for Loconet. 
  • DIY (Do-it-yourself) possible. If you like to program, and/or build and/or solder your own electronics, there's plenty of information to make your own digital system's components and shops to buy pre-made boards.
  • Arduino compatible. For me that's a personal must. It exists a Loconet shield called GCA185 that you can build or buy here, done by Giling Computer Applications. With this you can easily program your own throttles, fast clocks, outputs/input modules, sound modules, .... whatever!!!!





I don't want to state Loconet is the best option, just my recommendation knowing no details about the final user. That's the option I have despite if I would start again from scratch, may be I would choose C-BUS because I like to construct all my electronics.

But as I want this to be usefull, from now on I will talk just about DCC and Loconet combined, which seems the best option at least in a short/medium term.


Tuesday, December 23, 2014

History of Digital Systems

I would like to write some useful articles for those who want to step into the digital world of model railroading. It's not my intention to create the ultimate guide to digital systems, nor to cover all technical aspects and all kind of details. There are millions of much better pages out there and really specialized in concrete buses, wiring, lighting and each one of the different aspects of the digital railroad modelling world. My intention is just to create an introduction to that, and easy way to step into with no fears, so people used to analog layouts or completely novices feel safer and more confident to move to DCC world.



Iberama 570

Analog layouts and systems are quite old, with many years of experience, and nowadays there is no one inventing new things: one transformer for each aisle circuit, one train can move in each of these circuits, push buttons to change switches, electrical switches to light traffic lights and activate or deactivate current in a section... and some automation more or less complex (but simple) using relays, diodes or passive components. That would be the most common scenario for analog layouts.

More or less all problems or doubts have one good answer or way to solve them, and the number of elements and ways to solve it are really reduced in comparison to a digital system. Like said before, in analog you use simple electronic components like diodes, relays, switches, resistors, .... not much variety (taking as an example a simple or common layout). And you can mix easily components or products from distinct vendors.


Componentes electrónicos (fuente Wikipedia)

Digital world is not more complex (I think it's easier). A good example for me would be in telephony: modern smartphones aren't more complex to use than and old and analog one, if you use it just as a telephone!!! But as it has a lot more of functionality, options, vendors, operative systems, firmwares, connectivity, .... seems more difficult.

Same thing happens in digital railroading, and besides that it's still an immature market with no big standards set (just DCC as you will see or the ones from Digitrax manufacturer). There are lots of vendors, new brands every day, every one makes it's own systems not compatible with others trying to be the first setting a big standard, ... It's normal for someone starting to have so many doubts!!

And to start in a proper way, I think the better is a bit of history to know where one of the big standards called DCC come from.

If you read something about digital systems in railway modelling, for sure these three letters appeared everywhere: DCC (Digital Control System). Many times it's used in wrong way to talk in a general way about any digital train control system. But strictly speaking, it's the NMRA DCC; a communication protocol defined by NMRA (National Model Railroad Association) in 1993 which defines the communication system to send orders to the locomotives at both physical and electrical level. It defines a central station that, in conjunction with a booster, modulates the track current to encode digital messages at the same time that delivers current to the rolling stock. Inside locomotives a small chip (called Decoder) is installed in order to decode and understand those messages and act to the orders. So, here we have a bit difference in front of analog systems: digital tracks are always feeded with current, it doesn't matter if locomotives are moving or not. That also means more that one locomotive can be in the same section and it's not needed to create aisle sections for each locomotive. Because the orders to start, break or turn on the lights are sent personalized for each locomotive. Later on the different components of a digital system (central station, booster, decoder,...) will be better explained.

There are other protocols or digital systems to command trains like Selectrix (created by Döhler & Haas, bidirectional and based in a big industrial standard from Siemens) or Motorola, but now a days DCC is the leader of the whole market despite is the worst protocol ever thought. Yes, you read well. The ones who designed this protocol hadn't a wide view nor future vision, and created this protocol completely unidirectional, just from the central station to the locomotives. So you can send commands to the trains, but trains cannot answer any kind of information. Knowing this fact, you will easily understand later why you need a programming track to setup the decoders where locomotives have to move the motor to send acknowledge signals to the central station, or why you can configure a locomotive in the normal track but you cannot read the current configuration values.

So, with this protocol or system we were able to move locomotives, but we also wanted to command switches and lights. That's why a new kind of decoders appeared, called "static decoders" in front of "mobile decoders" (the ones installed inside the trains). Static decoders are connected to the rails' current and receive DCC commands to turn on/off switches, lights or any other device.

But not after a long period of time, the need of receiving information appeared. In order to automate the control of the layout from a computer software it was needed to know the occupancy of each section of the layout using any kind of sensor (consume sensors, reed contacts, light barriers....).

That's why in 2007 the NMRA included to the DCC norm a new extension called RailCom (developed also by Lenz and other manufacturers). They could have extended the already existing DCC to create a new bidirectional and compatible one, but again failed creating a parallel communication channel, and again unidirectional, from the sensors to the central station or directly to the PC. So you need to double the meters of wire needed in a layout for both unidirectional channels:


Fuente: Wikipedia

Here in Spain Railcom didn't become popular, but its competitor S88 from Märklin (a really similar systems for feedback modules) is still in use and widely used. The "boxes" connected to the physical sensors and sending the occupancy signals are called "feedback modules". So a common digital installation (I said common, not modern) is composed by the Central Station and booster, of course a throttle to set the speed and direction of locos, mobile decoders installed inside locomotives, stationary decoders to command switches and lights, and feedback modules to send occupancy detection signals to the main system (usually a PC).

Just to finish this brief review, DCC has an extra problem: as static decoders (those controlling switches, lights and outputs generally speaking) are connected to the track current, consumption can grow easily to be forced to buy another booster, which is an expensive element.

To solve that, and relatively new in this world, appeared the Control Buses. Static decoders and feedback modules as they are known until this time disappear, and everything (called just input or output modules) are connected together to a single communication line (bus) that shares completely all messages and information of all elements of a layout.

In next posts I will talk about Control Buses and a modern digital system approach using them as I understand this digital world.