Tag Archives: Electronics

Supercapacitor Power Packs

As an electrical engineer, I have always found lithium batteries to be…. amusing. They’re extremely volatile; if overcharged, they explode. If over-discharged, they explode. If charged too quickly, they explode. If discharged too quickly, they explode. If punctured, they explode. If they get too hot, they explode. If they get too cold, they simply don’t work. Think back to the recent debacle of the Samsung Galaxy Note 7 battery woes. But yet, these are the best batteries that are currently mass produced. Almost everyone carries one in their pocket and frequently holds it close to their face. For applications where the energy density (energy stored per volume) or the total energy stored (in Watt-hours) isn’t important, there is an alternative storage media that might be of interest to my fellow model train fans. Enter supercapacitors.

Not quite the same thing.

What follows isn’t for the electronically faint of heart. Accidentally short circuiting an alkaline battery or similar for a few seconds isn’t going to cause much harm. Short circuiting a bank of supercapacitors will melt wires and turn your supercapacitors into charcoal in no time. Be smart.

A supercapacitor is different than a battery in several important but sometimes subtle ways. For a model train, some of these differences are to our advantage, others are not. First off, when a battery is discharged from 100% to 0%, the voltage is fairly consistent. The difference between the full and empty voltages and the rate at which it falls depends on the type of battery. For example, a NiMh battery is about 1.45V full, and 1.2V empty. A capacitor is different; when empty, it is 0V. The “full” voltage is whatever you charge it to. Different capacitors have different maximum voltage ratings. When discharged, the voltage falls from the charge voltage to 0V. Most supercapacitors are rated for either 2.5V or 2.7V. Similar to batteries, putting multiple capacitors in series is how you get the desired voltage capacity. For example, a 9V system would need 4 2.5V/2.7V supercapacitors in series. When the system is charged up to 9V, the voltage will be split evenly with 2.25V each on the 4 capacitors.

The second major difference between the two technologies is the speed at which they can be charged. NiMh and LiPo batteries are usually limited to some fraction of their amp-hour capacity for their charge rate. Meaning, a 2000mAh NiMh battery can be safely charged at 1-2A. Of course, this varies based on manufacturer specs, and charging them faster will degrade their capacity faster, but that is neither here nor there. A supercapacitor has a much higher safe charge/discharge rate. The small ones I like to use in my locomotives are safe up to 3.3A! Much higher rated ones exist too, I built an experimental system that used 100F supercaps rated up to 35A. Additionally, a rechargeable battery typically is only rated for a few thousand charge cycles. A supercap can be charged several hundred thousand times.

The major downside to supercapacitors is energy density, or how much power you can store per volume. My choice supercaps are 4mWh/cm^3 whereas a 2000mAh NiMh battery is about 350mWh/cm^3. So they’re less dense by about a factor of 100, useless, right? No! If all we need to do is get over an unpowered track section, for example an unpowered ME Models R104 180 degree curve, we only need about 10 seconds of run time. So if we have an equal volume of supercaps to AA batteries, our run length will be 1/100th: an AA battery set lasts several hours, call it 2h on the conservative side. That means an equally sized supercap bank will run for 1.2 minutes, plenty of time for zipping through a short unpowered track section!

Some of the difficulty in implementing a supercap bank is limiting the charge current. From the perspective of your power supply, capacitors are more or less a 0 ohm short circuit which means the theoretical charge current will be infinite. You can limit this with a resistor, but realistically this is unfeasible. A resistor spec’ed correctly would have to be very physically large to allow for high heat dissipation. It’d get hot enough to melt LEGO (ask me how I know)! Additionally, as the capacitors charge, the charge rate slows down exponentially. Luckily, there are other methods available to limit the current. I found a cheap, small product on eBay that fits the bill perfectly: a CC/CV regulator. Not only can this thing limit the voltage to the bank, but it can also limit the current.

With a CC/CV regulator set to never charge past the supercap’s rated voltage and current, the next step is regulating the output of the supercaps. Because we don’t want our train to slow down as the supercap bank discharges, we need a DC/DC regulator. There are some nice cheap ones on eBay for about $1.50 that just so happen to be exactly 3 studs wide.

Above is my Amtrak B32-8WH being retrofitted with 10x 15F 2.7V supercaps. The small circuit board on the left is the CC/CV charger. The wires going down through the center lead to the fuel tank, which is where the DC-DC regulator, bridge rectifier, and bluetooth motor controller all live.
Complete circuit diagram of my supercap system. The bypass diode on the CC/CV charger was later removed.

I’ve also made a system with 10x 100F supercaps. The added capacity doesn’t really add any utility over 10F-20F supercaps, so all of my recent systems are 15F. One of the downsides to charging the supercaps as quickly as possible is the sizing of the power supply required to handle the peak current, especially when you have multiple locomotives on the same circuit. Luckily for me, my work has stacks of 24V 6.5A power supplies lying around. Unfortunately for you, they are not cheap new. A used PC power supply can be rigged up to perform similarly, but as always, the exercise is left to the reader…

Matson’s Landing in L-Gauge – Gearing Up (or Down)

It’s been several weeks since I’ve updated the Matson’s Landing in L-Gauge series. In all openness, there hasn’t been a lot of progress. I find that, from time to time, I need to take a break from a project and come back to it with fresh eyes at a later time. I was running into some design issues with the Matson’s Landing locomotive, so I moved on to other projects. This week I returned to this locomotive, and find myself energized to work on it again.

In my last article on the design, I promised to document the main drive system for the Climax logging locomotive that I’m building. First, though, for the beginners, a quick run-down of the LEGO Power Functions technology that I’m using.

The Power Functions (PF) system was released back in 2007, at about the same time that the LEGO 9v and RC train systems were discontinued. Power Functions elements were designed to be used cross-theme, with elements showing up in both Technic and Train sets. The first official Power Functions compatible train was the Emerald Night (10194), released in 2009.

At its most basic, a PF system consists of a battery box connected to a motor. The battery box has an on/off switch, which sends or cuts power to the motor. There are a few different types of battery boxes available. For our purposes, we’ll use the box with a 4 x 8 stud footprint.

PF Battery Box with Medium Motor
PF Battery Box with Medium Motor

The next step up from the basic box/motor setup is the Rechargeable Battery Box (8878) (http://brickset.com/sets/8878-1/Rechargeable-Battery-Box), connected to a motor. The rechargeable box, in addition to the lithium polymer battery, has a small speed-control dial built into the top of the box. With this, you can set or change the speed of the motor. This is good for models that stay in one place, but difficult to use for models that will vary their speed and direction often.

Rechargeable Battery Box with Medium Motor
Rechargeable Battery Box with Medium Motor

To gain more control over a model, an Infrared Receiver (8884) (http://brickset.com/sets/8884-1/IR-Receiver) and Remote Control (8885) (http://brickset.com/sets/8885-1/IR-Remote-Control) can be added. The receiver will pick up signals from the controller, then send the information along to one or more motors. The IR Receiver can pick up signals over 4 channels on two ports, allowing up to 8 motors or other outputs to be controlled. The basic controller allows for forward/stop/reverse movement, which must be monitored by the user.

Rechargeable Battery Box, Infrared Receiver, Medium Motor with Remote Control
Rechargeable Battery Box, Infrared Receiver, Medium Motor with Remote Control

Another step up, and what most brick train builders use, is to swap out the IR Remote Control for the IR Speed Remote Control (8879) (http://brickset.com/sets/8879-1/IR-Speed-Remote-Control). The Speed Control remote allows for all the basic functions of the IR Remote, but also adds speed dials to the mix. Each speed dial can be increased or decreased in steps, allowing for smooth control of locomotives and other models. Each speed dial also has a red kill switch, which will immediately send a signal to the IR Receiver to set the power on that port to zero, effectively stopping the motor.

Rechargeable Battery Box, Infrared Receiver, Medium Motor with Speed Control
Rechargeable Battery Box, Infrared Receiver, Medium Motor with Speed Control

For the Matson’s Landing Climax, I’m using a very simple application of the last PF setup. The battery, IR Receiver, and a Medium Motor (8883) (http://brickset.com/sets/8883-1/M-Motor), will ride on the base of the locomotive. An small 8-tooth gear is attached to the output of the motor. This gear meshes with a second 8-tooth gear to transfer power to a larger 24 tooth gear that rides just below the base of the locomotive. The large gear drives the axles that are connected to the universal joints of each truck, thereby driving the locomotive’s wheels. The small to large ratio of the main drive system gears the power down, decreasing the overall speed of the locomotive, but increasing the power. While it doesn’t look as flashy as a speeding locomotive, it is more typical of a logging locomotive on a mountain line.

Climax Locomotive Main Drive System
Climax Locomotive Main Drive System

In the next installment, I’ll talk about track testing, and how the results will drive the design of the Matson’s Landing track plan.

Hybrid PF/9V Systems

Following up on my previous article introducing LEGO’s 9V system and their Power Functions (PF) system, I’m going to go a little more in depth about building hybrid systems that utilize both PF battery packs and 9V train track. I’ve developed and iterated through several different systems that combine the best of both and have come up with several easy to implement systems.  Anyone with a few dollars, a volt meter and a soldering iron can hack together one of these hybrids in a matter of hours. Continue reading Hybrid PF/9V Systems

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.

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

Battery Powered vs. Track Powered

Young and new recruits to the LEGO train scene will never have known anything other than the current generation of power functions. Battery packs coupled with infrared receivers and remote controls, each taking up precious space in your build. However, it didn’t used to be this way. The previous generation of trains (ignoring the aborted RC train theme) used metal rails to directly power the motors. Both generations had their own advantages and disadvantages, which I will attempt to shed some light on. In a follow up article, I will go over some advanced applications of each, and hybrids that combine the best of both technologies.

Batteries take up space. In my eye, this is Power Function’s main drawback. Additionally, the current generation Infrared (IR) Receiver is quite large and the sensor on it needs to be visible from outside the locomotive for the signal to reach it.

IR Receiver with the shell removed. Why is this thing so big?

Trying to incorporate the AAA/AA battery pack and the IR Receiver into a model is often very tricky, especially when working with 6 or 7 stud wide models. Additionally, batteries need to be recharged or replaced after several hours, so the battery pack needs to be accessible or removable.  When running for many consecutive hours at a convention, swapping batteries becomes a chore. For home use, it is not such a big deal. The IR receiver also has difficulty reaching more than a few feet when there aren’t any walls or ceiling to reflect the light off of. On the other hand, the IR receiver and battery boxes are still currently in production, which means they’re cheap.

PF track Vs. 9V track

Track power has always been my preference and I’ve iterated through several generations of electrical systems searching for the best configuration. LEGO’s classic 9V train controller is simple, turn the knob and your locomotive starts to move. The biggest limiting factors are being limited to metal equipped track and the original 9V train motor, (meaning no double crossovers). Additionally, laying out certain track geometries will cause short circuits. Also, once your loop gets to a certain length, additional power hookups are required so as to avoid slow downs. Of course, the main drawback is price. Expanding or building a new 9V layout is very costly. 9V straight track hasn’t been manufactured in almost 10 years and averages $3.50 each used and $5.50 new on the aftermarket. Original 9V train motors average $35 each used and $75 new.  Many clubs still use 9V systems, and with ME Models finally shipping their metal track, will continue to do so for years to come.

Things start to get interesting when you get rid of LEGO’s speed controller and start substituting your own electronics. Swap in the third party Bluetooth controlled SBrick in lieu of the IR receiver and not only save space, but also gain control range, gain 2 more channels for a total of 4, and lose the line of sight requirement.

In addition to being gigantic, the output power per channel is low.
2 Channel PF IR Receiver3rd party SBrick, approx 8x available power output in a smaller footprint


Get rid of the LEGO 9V train controller and use constant track power to feed a Bluetooth motor controller. No batteries! Or better yet, use batteries and track power together: constant track power feeding a Bluetooth motor controller, with batteries for backup. With such a system, a track powered locomotive can continue through double crossovers, over draw bridges, maintain consistent speeds through spotty connections on dirty track, or possibly even charge itself. With the track providing power most of the time, the batteries will rarely need to be recharged.

Read about my experiments in hybrid systems in depth in my next article.