Building a Steam Locomotive in LEGO Part 2 – Motorization and Electronics

In my previous previous article I introduced the topic of this series – my process for building a LEGO steam locomotive, and discussed researching and choosing a prototype. In this article, I will discuss choosing motors  for a steam locomotive, options for batteries and receivers, as well as how to integrate other electronics into a LEGO train, such as lights and sound.

In past projects, after completing my research, I would typically start building up the frame of my steam locomotive. I would focus on articulation between driving wheels, pilot truck, pony truck, and tender and make sure my design could handle standard LEGO track geometry. This time, however, I wanted to build more electronics into my locomotive than just a motor, so I needed to sort out all of the electronic issues before doing any building. Still, I began with choosing a motor.

For many LEGO train clubs and AFOLs with individual layouts, the Power Functions system has become the primary mode of powering their trains, replacing the discontinued and increasingly expensive 9v system. Companies like ME Models may help to make 9v more affordable and available again, so this may change for some. For me, there is more to it than just availability of components. With the 9v system, there was only one motor, one speed (dependent on voltage of course) and one amount of torque. I much prefer having several motor options and many different ways to gear them up or down, and Power Functions provides that. I only build with Power Functions motors, so that is what I will be discussing here. I certainly still see a future for track powered systems and hybrids between them and Power Functions. Andrew Mollmann recently introduced the topic here. I am hopeful that his and others’ experiments will help give us more options for getting power to our train motors. I plan to try out some of Andrew’s ideas myself some time. For this project, however, I am sticking with a remote controlled setup, a battery, and Power Functions motors.

There are three main types of standalone PF motors available, Medium, Large and XL. There is also the PF train motor used in most of LEGO’s stock train sets. All of these are good potential candidates for a train MOC. Which one we should choose depends on what we want to get out of our engine. I have noticed more than once that people do not often consider what type of running they would like to do when designing a new engine. Will it be going fast or slow? Will it be switching or running on a main line? And, most importantly, what sort of speed and power did the prototype have? All these issues should be considered in choosing the type and number of motors for a model. For example, one of my previous models was an Erie Triplex. It had a top sustainable speed of 8 mph and so I built mine to go slowly. If my model Triplex was zipping around the track at 9v type speeds, it just wouldn’t look right. Likewise, having a high-speed passenger locomotive crawling around the layout is also undesirable.

PF Train Motor

One hangup that seems to be unique to me is that I like to drive my locomotives through the driving wheels. It just feels more correct to me, but I really can’t argue against good running tender-driven locomotives. It turns out that putting PF train motors under the tender, and making the tender very heavy, can allow your locomotive to pull a great deal of weight at speed. Here is a look at Cale’s PRR K4s making it look easy. (Video courtesy of Cale)

If you have a high speed locomotive and the motors will fit and look right under the tender, it’s a great option and one of the easiest to get right.

PF L Motor

For the other three PF motors, the L motor is by far my favorite, and I will explain why. First, I highly recommend Philo’s page on LEGO motors. He does scientific side-by-side comparisons of all  the LEGO 9v motors, including the PF motors. He provides rpm and torque figures, power consumption, efficiency; pretty much everything you could want to know about them. Comparing figures on that page, I think that the PF L motor is a great middle ground between high torque, like in the PF XL or Mindstorms motors and high speed, like in the older 9v motors. Mostly I have settled on the L motor from personal experience rather than hard data, though.

PF XL Motor

Until this project, I had really only worked with stock PF motors, IR receivers, and batteries. I am breaking with that pattern here, so some of what I have experienced with other motors, especially the XL motor, may no longer apply. For example, Many designs using two XL motors will cause the receiver or battery to overheat, because two XL motors draw too much current under load. If you have ever built a locomotive and experienced a “start-stop-start-stop” pattern when running, you have seen this in action. L motors draw less current under load or stalled, and you can put two or even three, under the right circumstances, on one regular LEGO battery. I have found that the XL overheating problem comes up especially when the motors are geared up for greater speed. Some of the new developments in LEGO train powering, discussed below, may make the XL motor a more attractive option in the future,  however, they would not easily fit into my UP 9000 design anyway, so I am not looking at using them in this project.

PF M Motor

Medium motors used to be the only option for some faster locomotive designs, but they are underpowered for most applications. I don’t have any designs that use M motors anymore. I would say if you can only fit one M motor into your model, then perhaps it’s small enough where that would be a reasonable amount of power, but don’t expect to be pulling huge trains at high speed that way. Nevertheless, it is a viable option for small locomotives. The UP 9000, however, is not small.

As far as deciding what sort of speed a locomotive design should have, L motors are also a good choice. I have had success without any gear change in them, as well as with gearing them up and down in various models. Below are three movies of my locomotive designs in action. All three have L motors with different gearing.

My PRR L5 electric has two L motors, with no gear change, driving Big Ben XL drivers.

My SP&S Challenger has 4 L motors (two IR receivers and 2 batteries, with 2 motors on each battery). The motors are geared up for additional speed and are driving L sized wheels.

My Erie Triplex has 3 L motors on one battery. One drives each set of L wheels and they are all geared down.

L motors made all these locomotives run pretty well, and do what I wanted them to do.

I settled on L motors for my current project, the Union Pacific 9000, fairly quickly based on past successes, but I also recognized that I was coming up against the limitations of the PF system. My SP&S Challenger needed two complete systems. 2 batteries, and two receivers, to avoid over-stressing the system. I realized, though, that if I had a more powerful battery and receiver, not only would I need only one each of these, but I could probably get similar speed and power as I got out of the Challenger with fewer motors. I decided to try some new things. The weakest link in the chain is the IR receiver. The motor driver chip in it is fairly weak, and it’s current limits are far below that of the PF motors. V2 IR receivers have better chips in them with a higher voltage limit and, if you are dedicated to a pure LEGO solution to increasing your locomotive’s performance, they are the way to go. Unfortunately you cannot buy them directly from LEGO, and they are fairly expensive on Bricklink. I have replaced all the receivers in my old models with V2 receivers and have seen some improvements, but I really wanted to get more out of the 9000.

An SBrick

Thankfully, a solution already existed in the form of the SBrick. SBricks have the same motor driver chip as the V2 receiver, but they have one per channel, making the SBrick’s overall current and voltage limit much higher. Plus, they have four channels available instead of the IR receiver’s two, and use bluetooth signals rather than IR and so do not have to be exposed on the outside of your model to work. I had several problems with the app early on in SBrick’s life, but things seem to be working very well now.

A BuWizz Brick

Last summer, there was a successful kickstarter campaign for the BuWizz, another LEGO bluetooth controller like the SBrick, but one that also includes a high performance battery. I do not have a BuWizz in hand yet, but they just announced that they are starting to ship, so look for a review on this site soon! I am eager to give it a try, but I don’t think it will be right for this model. For the 9000, I planned to have motors driving the drive wheels in the locomotive, and I will also have other electronics in the locomotive. The battery will have to go into the tender. The issue with the BuWizz is that, if the battery is in the tender and everything else is in the locomotive, wires for four channels will have to run between the two, which is difficult to route and can cause problems with articulation. That said, I have several older models and future plans that I think will benefit from this integrated battery and receiver.

If DIY is more of your thing, Nick Iaconis has created an entirely open-source buildable bluetooth receiver, the Brickster. Its internals can also handle up to 12 volts, like SBrick and BuWizz, and should provide a substantial improvement over LEGO’s IR receiver. I played around with this a bit, but it was honestly a little above my level of electronic expertise. Still, if you are a tinkerer, this might be for you.
I chose the SBrick because I already had experience with it, and it met all of my design requirements.

With the IR receiver thus replaced, LEGO’s battery options became the weak link. In PennLUG, we mostly use LEGO’s rechargeable Li-ion battery. The upshot of this battery is its rechargeability. We would go through untold numbers of AA or AAA alkaline batteries in one weekend show if we used the standard battery boxes. It’s cheaper for us in the long run to invest in these more expensive battery packs. Lithium type batteries also have very flat discharge curves. That is, they maintain their peak voltage for almost all of their useful life, which is good for pulling trains. The downside is voltage and current limits. Power Functions is often billed as a 9v system, but the rechargeable battery only outputs 7.4 volts maximum. Fresh alkaline batteries in one of the other battery packs will provide better voltage, at least for a while.

The battery also has a pretty  strict current limitation in place. Philo once again has some good data on this. He shows that at 1.5 amps of current draw, the LEGO lithium battery will cut out very quickly. This is because it has an internal thermal fuse to prevent overheating.

With these limitations in mind, I decided to just look around and see what sort of batteries were available. There are plenty of websites selling lithium batteries of every shape, size, and power. I had several requirements. My reading and experiments suggested that PF motors should be able to handle more than 9 volts without damaging them, so I wanted a battery of about 11 or 12 volts to keep under the voltage limits of the SBrick.  I also wanted  battery with a higher current rating. One L motor can draw 1.3 amps stalled, and the LEGO lithium battery will cut out at 1.5. I want to be able to reach stall current with two L motors without endangering the battery, so I settled on a current limit of about 4 amps. I also wanted greater capacity than the LEGO battery, which is about 1100 mAh. Finally, the battery had to be a reasonable size to fit into a LEGO train. I settled on a battery similar to this one which fulfilled all those requirements. It’s about 7 x 7 studs and under 2 bricks thick. I am not trying to sell anyone on this battery. I have not tested it under full load for extended periods of time. Once the locomotive is done I will know for sure whether this battery is everything I hope it will be, but so far it looks promising.

All of this battery talk was new to me when I started the 9000, and I assume I am not alone, so I will go over a couple things to look out for. Single lithium cells are usually around 3.7 volts. So, to have an 11 or 12 volt pack, you need more than one cell. In order for battery packs like this to be safe, they need built-in safety features. Overcharging a lithium battery pack can cause it to combust. Discharging a lithium battery pack can cause it to combust. Too high voltage can cause it to combust. Charging the individual cells unevenly can cause it to combust. Basically, lithium battery packs like to catch fire. Look for batteries that come with built-in overcharge/undercharge cutoffs and other protection circuitry. In order to be shipped without a massive shipping fee, batteries have to pass the UN 38.3 standard for shipping, certifying they are safe to ship. Look for batteries that have passed the safety standards. It’s also worth getting a dedicated lithium battery charger. Some batteries have a second set of wires coming out of them specifically for charging that lets the charger sense the current of each cell. Chargers designed specifically for this are called balance chargers. If the cells in your battery pack are matched at the factory (a good seller should list this information) a balance charging system is not strictly necessary, but having a balance charging system may increase the pack’s life. I did not get one for this project, but the charger I bought supports balance charging, and I may try different batteries in the future.

Male and female Deans connectors.

The final step for my battery was connecting it to the SBrick. It’s very important not to reverse polarity with your lithium battery pack, so choose a battery with a non-reversible plug, or add your own, like I did. I chose a Deans Connector. They are easy to install and impossible to reverse if correctly installed in the first place. I cut up a PF extension wire and added the Deans Connector to one end. Once again, Philo has some basic info about PF wires and their polarity. Check and recheck before you connect everything to make sure you have the polarity right! If you are only providing power via the PF cable, you don’t need the middle two wires, which send command signals from the receiver to the attached peripherals, so I omitted them from my custom connector. That makes it easier to route between the engine and tender of my 9000, and makes it take up less space where it runs inside of the model.

With the motors, battery, and receiver selected, we have the basic electronics necessary to run a locomotive but, seeing as I already had my soldering iron out, I wanted to go further, and add lights and sound.

For sound, LEGO doesn’t really provide any options, so I knew I would have to look elsewhere. The model railroading world has tons of sound system products, and I can’t claim familiarity with most of them, so I will only discuss what I have used here. Fellow contributor Glenn Holland recently introduced PennLUG to the Dallee sound system. Glenn built it into his Reading Crusader model and it has worked wonderfully, so I knew I had to give it a try. The first benefit of this unit is that it can work with almost any kind of control system, and just about any input voltage. I didn’t have to make any changes to my power setup to integrate this unit into my design. It is also quite small, about 3×6 studs by 4 plates high, not counting its peripherals. It has several options available that really add to the realism of a train model. First, sound functions like bell and whistle can be controlled remotely. Both the power for the unit and the bell and whistle control can be tied in to one PF channel, and one PF cable. With this setup, I can have one slider on my SBrick control that activated both the bell and whistle. Slide one way for bell, and slide the other way for whistle. Dallee even sells a pre-made cable for this purpose.

Before Dallee was offering its PF breakout cable, I asked them how they would recommend doing it, and followed the instructions in their response. The two outside wires on the PF cable, the power cables, needed no changes. Just solder one of the provided micro connectors. (and get the polarity right!) For the command wires, you can wire either one to bell or whistle, but they instructed me to add a diode to limit voltage on the command wires. Basically, solder the diode with the little arrow or whatever marks the diode’s polarity, facing towards the PF plug and again, solder the micro connector on to the other end. The idea is that current should not flow to from the SBrick to the sound card, but that the command signal will pull an internal switch to ground even with the diode in place. I ended up putting my sound unit right next to the receiver but, even if you didn’t, they provide enough wire to get the job done in most cases. With a pretty easy custom operation (or a purchased custom wire) your bell and whistle are now under your control.

Some sounds the card takes care of automatically, like venting steam and water pump sounds, so there’s no need to add anything. For the chuff sounds, there are several options. The ones that seemed most appealing were the chuff sensors sold separately from the unit. There are two options. Glenn used the magnetic sensor in his Crusader, which requires you to attach magnets to one of the drive axles and place the sensor near it. Each time a magnet passes under the sensor you get a chuff. I chose the IR chuff sensor which uses an alternating black and white (really reflective or non-reflective) striped pattern to time its chuffs. I chose to paint (gasp) a white 2×2 round brick with flat black stripes and put it on one of the driving axles. It’s important that the stripes are flat as it’s not so much the color as the light reflectivity of the striped pattern that the sensor detects.

A painted 2×2 round brick in place for the IR sensor (not yet installed)

The Union Pacific 9000 class was a three cylinder locomotive, as I discussed briefly in the previous article. This means it will have 6 chuffs per wheel revolution. I painted 2 white 2×2 round bricks for testing. One had 6 black stripes (6 stripes = 6 chuffs) and one had 3 stripes. In scale steam locomotive sound systems, the correct number of chuffs often sounds too rapid compared to the full sized prototypes, so modellers often use half as many chuffs in their sound systems. After testing I decided that, indeed, three chuffs was better than 6. The sensor came without connectors attached but, if you follow the included instructions, connecting it to the sound board is pretty easy. The sensor is obviously not a LEGO component, but it needs to be fairly precisely aligned and held in place relative to the 2×2 brick to work,  so I built a little cradle to hold it.

The IR sensor in its cradle

The sound board comes programmed with several options for each sound, many based on specific American locomotive prototypes. In my case my engine wasn’t on there, but I found the choices that were closest to what I wanted and went with those. Again, the included instructions make setup pretty easy. One final note – the speaker is also sold separately. They have many different power and size options. The one I chose is about 5 studs in diameter, but they have even smaller speakers available if it is needed.

The final piece in the electronic puzzle is lighting. There are two major options for LEGO-compatible lighting out there right now, Lifelites and Brickstuff. Both offer nano-sized LEDs and connectors at comparable prices. My club has used both in different projects without any complaints. I chose Brickstuff for this project because I thought the round shape of their LED boards might fit more easily into the marker light and number board parts of the 9000. I may still change this, as I cannot really run all the lights until I am farther along in the build process. For the Brickstuff lights, they make a PF compatible transformer that allows you to connect lights directly to your battery as well as several 1:x adapters to connect multiple lights to one power source. I chose a 1:9 adapter, which provides enough lights for my locomotive.

I will leave a detailed discussion of the lights for this project until a later update, when I am at the point of integrating them into the model itself. I would also like to discuss the options for LEGO lighting in general in a separate article. At this point, my electronic setup looks like this when it’s out of the locomotive.

There are certainly a lot more after-market options for LEGO train builders now than even in the recent past. Given the difficulty of working all of this into my model, and the expenses involved, I don’t know that I will include all of these features in every locomotive I build, but I will certainly consider it as space and funds allow. I hope that this discussion has helped illustrate what options are out there and how they can be put together into a working system that will hopefully outperform traditional Power Functions trains, and provide a higher degree of realism to our train models than ever before.

In the next article, I will discuss custom made and aftermarket plastic parts for my UP 9000 project such as wheels, side rods, valve gear and also take a look at some of the new track options that may change the way we run and build LEGO trains in the future.

4 thoughts on “Building a Steam Locomotive in LEGO Part 2 – Motorization and Electronics”

  1. Although I am a purist, I am still very interested in articles such as this concerning third party options. I like to keep track of what’s available in case my purity comes into question in the future (I’ve already made the switch to bearings!).

    I’m also loving all of these work in progress topics we have going, they keep me hungry for updates. I’ve been checking this site daily since its launch!

    1. There isn’t really any trick to the sbrick that I know of. Mine didn’t work for a long time either. Recent updates to the app seem to have fixed most of the issues. Cale and I have had them in locomotives that we weren’t continuously running with good success. I have static tested them with the phone fairly far away and had them run for as much as 6 hours without disconnecting. That said, I have not had an sbrick in a “main line” running locomotive that goes nonstop at a show, so I am not sure how it will do.

Leave a Reply