Jump to content

Capacitors for Model Trains 101


gavino200

Recommended Posts

This thread is a work in progress - I'll be adding as I learn. Feel free to post below anything you know about these things that's relevant and I'll add it.

 

Basics of Capacitors

 

 

What they are/how they work - A layman's understanding.

 

A capacitor is a component that stores charge. It consists of two plates that are separated by an insulating material. One plate is connected to the + side of a circuit. The other plate is connected to the - side of a circuit. In most capacitors the plates are long and thin and are rolled up. That's why they look like little cylinders.

 

Connect a capacitor to a power supply. Electrons go from the negative side of the battery to the negative plate. Electrons go from the positve plate to the positive side of the battery. This happens until no more electrons can be pushed onto the negative plate or sucked from the positive plate. The current stops and the capacitor is "charged'. It's like a coiled spring or a stretched elastic band.

 

Now disconnect the battery. The electrons squished onto the negative plate flow from the plate into the circuit to get away from each other. Electrons flow from the circuit onto the positive plate to fill the vacuum. A current is produced until the capacitor plates are back at their original neutral state. The capacitor is now uncharged again.

 

In a model train, the capacitor gets charged in times of plenty when the track current is flowing. When the track current is momentarily disrupted the capacitor discharges and provides a current for a short time - hopefully long enough to keep the current flowing until track current is established again.

 

Capacitors have polarity. They have a positive and negative side and won't work unless connected correctly.

 

 

 

 

 

Types of capacitors

 

"Through-hole" Capacitors - look like little drums on legs. These are the type that usually come with decoders.

 

SMD Capacitors - (surface Mount) are marginally smaller and more expensive

 

They can be made from Ceramic or Tantalum

 

Tantalum

"are nice as they can be compact in smd form and less prone to melting down or “popping” (ie exploding, you hear a pop and find part of the cap has exploded out) than electrolytic. But tantilums are more expensive, especially as you increase the capacitance." - Cteno

 

 

 

 

 

Capacitor specs

 

Voltage

The voltage rating of a capacitor is the maximum voltage that you can apply to it. If you exceed the maximum voltage, the capacitor will fail, - often destructively. It's important to choose a capacitor with a voltage rating in excess of the highest voltage that will be applied to it. Many model train enthusiasts use a rough 'rule of thumb' of choosing a voltage rating twice that of the maximum voltage they expect to apply to it.

 

N scale systems range from 12-16 V. 

25 Volts is a common voltage chosen

 

 

 

Capacitance

This is a measure of how much  charge a capacitor can hold. Capacitance is measured in Farads (F), but in model railroading we use small values in the micro farad range (uF). The higher the capacitance, the longer it takes to discharge, and so the longer the time interruption that the capacitor can buffer. For internal lighting on reasonably good track, the duration of the electrical interruption is no more than a fraction of a second.

 

Imagine the capacitor like a bucket.  A larger uF number means that the bucket can hold more power.   If you imagine the resistance of the circuit as the size of the bucket drain, a bigger capacity bucket (more microFarads) with a smaller drain (higher resistance or Ohms) will be pouring for much longer than a smaller capacity capacitor with low resistance.  As Leds do not use much power and you don't need them to stay powered for more than the few microseconds where the coaches loose power a small capacity capacitor should work fine. 

 

A commenly used value for decoder "keep alive" capacitors is 220uF

 

For internal lighting we likely need a lower uF number. Ken from Sumida crossing discussed using values from 100-560 uF, but reports using 100uF capacitors with success.

 

 

 

 

Resources suggested by members

http://www.sumidacrossing.org/ModelTrains/ModelTrainDCC/CarInteriorLighting/CarLtCapCircuit/

 

https://www.allaboutcircuits.com/textbook/direct-current/chpt-16/voltage-current-calculations/

 

 

Credits* this post contains paraphrased quotes from @cteno4 and @Kiha66

Edited by gavino200
  • Like 1
Link to comment

Motor Decoder Stay Alive Capacitors

 

 

"Actually all decoders can take a keep alive, you just need to find the point after the diode bridge to add it." - Kiha

 

Some manufacturer's decoders "keep alive" wires that can be connected to either a simple capacitor or to a "stay alive unit". This is common especially with sound decoders. A common capacitance used is 220uF.

Edited by gavino200
Link to comment

This post is a work in progress.

 

Interior Lighting Stay Alive Capacitors

 

The following information on circuitry was provided by Kiha66. I will add a write-up on this process with pictures after I've attempted it. Basically it's a modification of the Dani Method of coach interior lighting, to include a 'stay alive' function.

 

The circuit is described component by component, starting at the pickup wires.

 

One wire soldered to each brass pickup strip.

Then the wires are soldered to the input legs of a rectifier chip.

Nest, one leg of the rectifier is soldered to a limiting resistor.

A resistor of 2.2K Ohms is suggested by @Dani

Next in sequence is the capacitor 

The positive leg of the capacitor is connected to the positive out put of of the rectifier  indirectly by the resistor mentioned above.

The negative leg of the capacitor is connected directly to the negative output of the rectifier.

The positive and negative sides of the capacitor are then connected to the positive and negative solder pads of the LED strip.

This completes the circuit.

 

Will add pictures and a diagram later.




Replace the Decoder +/- with lightboard +/- and this is what I mean.  
Replace the Decoder +/- with lightboard +/- and this is what I mean.  
http://mrdccu.com/_Media/4_med.jpeg

Image from this guide on stay alives in DCC decoders
http://mrdccu.com/curriculum/stayin-alive.html


Also using these guides as a refrence
http://mrhpub.com/2013-03-mar/land/files/assets/basic-html/index.html#page43

http://www.members.optusnet.com.au/mainnorth/alive.htm

 

 

Discussion of this issue also in Sumida Crossing 

http://www.sumidacrossing.org/ModelTrains/ModelTrainDCC/CarInteriorLighting/CarLtCapCircuit/

Edited by gavino200
Link to comment

I think the value of the capacitance is up to you -- the larger the value the longer it should keep your lights lit when interfered with.

 

Kiha said something about 447 uF cap and 1K Ohm resistor is good for about 1/2 second to 63%.    I believe this page goes over the math of it:

 

https://www.allaboutcircuits.com/textbook/direct-current/chpt-16/voltage-current-calculations/

 

 

Link to comment
2 hours ago, chadbag said:

I think the value of the capacitance is up to you -- the larger the value the longer it should keep your lights lit when interfered with.

 

Kiha said something about 447 uF cap and 1K Ohm resistor is good for about 1/2 second to 63%.    I believe this page goes over the math of it:

 

https://www.allaboutcircuits.com/textbook/direct-current/chpt-16/voltage-current-calculations/

 

 

 

Well, yes and no. I think there's probably a certain uF range that would be ideal for this application. Probably, that will need to be worked out with a bit of the ol' trial and error. But it would be nice to foresee any obvious pitfalls. 

 

I saw that Kiha gave a thumbs up to your 447 number. I'm sure it's ok. Ken also discusses a range from 100 to 560. But there's no info to my knowledge about which end of this spectrum might be ideal. The reason why I restated the question is because Kiha didn't give the number first. You told him that you already had 447 caps IIRC (correct me if I'm wrong). So it sort of gives a bias. He's more likely to say this number is ok, as it fits in the discussed range, than giving out a theoretical number, that would call for you buying new components. Instead I'm trying to ask our expert - Kiha - what he would choose based on his knowledge as a best guess optimal capacitance number, without bias. Or at least what end of the spectrum he'd veer toward - 100 or 560. Given that I'm going to spend multiples of 100USD on a train, it makes no sense to pinch pennies on small components.

 

I'm going to use SMD components - probably Tantalum

 

So my questions are:

1. What would be an ideal uF number? Is there a value that's "too high"?

2. Ideal V is ~25. But is higher problematic (if say a good price were available for 40V caps)?

 

If I can answer those questions, or alternatively, ascertain that there is no known answer to  question 1, I'll start shopping for caps.

Link to comment

Why do you think there is an ideal number?    The farad rating gets plugged into the formula to tell you how long the circuit will provider power to certain degree of discharge.  You figure out how long you need, plug it into the formula, and solve for farads (using whatever resistance you've chosen).  There is no number that is too high.   A 1 farad capacitor (assuming you could fit it in the wagon 🙂 ) would just give you a really long long coverage voltage in case of loss of voltage to your car.

 

The ideal number is based on what YOUR needs are in terms of how long the circuit does its thing.

 

The voltage capacity of your capacitor is to protect you against it going "boom" due to over voltage.  You need to have a rating greater than your input voltage and a way of protecting against over voltage (over spec).  That is why Kiha said that 16V would be the min for an H0 system (IIRC).  It should work with a 12V DCC system but you don't have a lot of extra protection against any over voltage accidents by your command station or otherwise.  That is why cteno is saying use 25V caps, as they can withstand greater input voltages in accidental situations.  So 40V caps would not be any better except they would have lots of extra overhead against over voltage spikes.  (That sort of spike is probably going to fry your decoders and trains etc).  And the 40V is probably bigger and more expensive.

 

I think I read kiha (and also on some other pages outside the forum) say you can use a zener diode to protect against overvoltage as well.  I need to learn more about that.

 

I've ordered another set of caps (will use these and the previously bought ones) -- tantulum 100 uF 25V (which I plan to put in pairs) and also some 12V zener diodes.  The cost is cheap enough that if I screwed up and bought the wrong things, the $2-$3 spent is not a great loss 🙂

 

Hopefully kiha and cteno or others will correct anything I've said wrong.

 

Link to comment
51 minutes ago, chadbag said:

Why do you think there is an ideal number?    The farad rating gets plugged into the formula to tell you how long the circuit will provider power to certain degree of discharge.  You figure out how long you need, plug it into the formula, and solve for farads (using whatever resistance you've chosen).  There is no number that is too high.   A 1 farad capacitor (assuming you could fit it in the wagon 🙂 ) would just give you a really long long coverage voltage in case of loss of voltage to your car.

 

 

 

Well, an "ideal" range is a range that works. Nice constant lighting. Lower uF caps are physically smaller caps. Therefore, there's a good reason not to go higher than needed. I have no real way to tell what my need is without trial. I can't measure it. However, it's likely a very short time.

 

Yes, a 1F cap would be giant. But it would also give a giant discharge. I guess I'm looking for the smallest uF cap that fits in the functionally ideal range. I'd also rather get council from an experienced voice, as you and I are both sort of whistling in the dark.

 

 

Quote

 

The ideal number is based on what YOUR needs are in terms of how long the circuit does its thing.

 

The voltage capacity of your capacitor is to protect you against it going "boom" due to over voltage.  You need to have a rating greater than your input voltage and a way of protecting against over voltage (over spec).  That is why Kiha said that 16V would be the min for an H0 system (IIRC).  It should work with a 12V DCC system but you don't have a lot of extra protection against any over voltage accidents by your command station or otherwise.  That is why cteno is saying use 25V caps, as they can withstand greater input voltages in accidental situations.  So 40V caps would not be any better except they would have lots of extra overhead against over voltage spikes.  (That sort of spike is probably going to fry your decoders and trains etc).  And the 40V is probably bigger and more expensive.

 

Yeah, I get the purpose of a minimum voltage. Just looking for an experienced voice to weigh in on whether there are any drawbacks to higher voltage (I already have some 40s). More expensive, I guess but don't know. Physically larger, I guess but don't know.

 

Quote

 

I think I read kiha (and also on some other pages outside the forum) say you can use a zener diode to protect against overvoltage as well.  I need to learn more about that.

 

I've no clue what a zener diode is. I know what a diode is. I'm planning to have a resistor in the circuit to limit LED brightness. Will this do the same thing? 

 

Quote

 

I've ordered another set of caps (will use these and the previously bought ones) -- tantulum 100 uF 25V (which I plan to put in pairs) and also some 12V zener diodes.  The cost is cheap enough that if I screwed up and bought the wrong things, the $2-$3 spent is not a great loss 🙂

 

 

That's not a bad idea. Ebay? How many caps fro that price? If possible Id like to use one unit at 200mF than two units at 100 each to save space. The real estate is scarce.

 

Edited by gavino200
Link to comment

New definition: The "ideal" capacitance is the lowest uF value that will supply perfect continuous current to a train car, on track that is electrically good but not perfect - ie very small current gaps.

 

If a 100uF and a 200uF cap both produce the desired effect and the 100uF cap were physically smaller than the 200 then it would be the more "ideal" of the two. If they were the same physical size then they would be equivalently ideal. Price would then be the only deciding issue.

Link to comment

Farads (F) is the unit of capacitance, similar to the measure of the capacity of that bucket.  A Farad is much too large for most circuits, so most capacitors we use use µF, which means microfarad or 10^-6 Farads.

 

Imagine the capacitor like a bucket.  A larger number means that the bucket can hold more power.   If you imagine the resistance of the circuit as the size of the bucket drain, a bigger capacity bucket (more Farads) with a smaller drain (higher resistance or Ohms) will be pouring for much longer than a smaller capacity capacitor with low resistance.  

As Leds do not use much power and you don't need them to stay powered for more than the few microseconds where the coaches loose power a small capacity capacitor should work fine. 

Link to comment
8 minutes ago, Kiha66 said:

Farads (F) is the unit of capacitance, similar to the measure of the capacity of that bucket.  A Farad is much too large for most circuits, so most capacitors we use use µF, which means microfarad or 10^-6 Farads.

 

Imagine the capacitor like a bucket.  A larger number means that the bucket can hold more power.   If you imagine the resistance of the circuit as the size of the bucket drain, a bigger capacity bucket (more Farads) with a smaller drain (higher resistance or Ohms) will be pouring for much longer than a smaller capacity capacitor with low resistance.  

As Leds do not use much power and you don't need them to stay powered for more than the few microseconds where the coaches loose power a small capacity capacitor should work fine. 

 

Thanks. That's an great explanation. 

 

I think I'll try the 220uF caps that I have but buy 25V rather than 40V if the system works and I need to buy more.

 

I'll also at some stage try 100uF/25V or even lower and see if there's any difference. Will post results.

 

Probably for a motor decoder I shouldn't go to low and will stick with 220mF as that's what many of the decoder manufacturers seem to use.

Edited by gavino200
Link to comment

25v should be more than sufficient.  I imagine 220uF will probably go a long ways towards reducing flicker with clean track.  For motor decoders higher uF is definitely better, as they use much more power and will burn through a charge much more quickly.  I need to get a variety pack and experiment myself, its been a few years since I had to do the calculations and I know I'm pretty rusty with on time equations.

The basic Capacitor equation is known as an RC circuit.  Its pretty simple, just multiply the resistance (ohms) by the capacitance (F) to get the time it takes the capacitor to discharge to 63% in seconds.  The drain isn't linear and takes longer and longer the more voltage is drained.

Some examples of the basic math used if you want precise values of time and charge.
http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capchg.html#c1
http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capdis.html

Edited by Kiha66
Link to comment
59 minutes ago, Kiha66 said:

  I need to get a variety pack and experiment myself, its been a few years since I had to do the calculations and I know I'm pretty rusty with on time equations.

 

Thanks Kiha. I suspect experimentation will be king here. I think someone famous said "a good test is worth a hundred expert opinions" or something. But it's good to get a real expert opinion before we start testing.

 

I must have at least 10 trains waiting to be lit. I bet between you, myself, Chad, and anyone else who wants to join in, we can reduce this to a fine art.

 

I bet we can find a capacitor that: 

1. Functions perfectly for our need

2. Is the smallest available that fills criterium 1

3. The cheapest possible that fits criteria 1 and 2.

 

Maybe we could even chip in for a bulk buy.

  • Like 1
Link to comment

My basic install plan is as follows. Please tell me if anyone sees any problems, or a better way.

 

1. LED strip with 6 LEDs

 

These strips have a pair of solder contacts every 3 LEDs. I was planning to solder a cap directly to one of these contact pairs.

 

I was then planning to solder an SMD resistor directly to one of the Cap ends. Dani recommends 2.2K Ohms so I'll start with that. I suspect different values would be ideal for different effects.

 

Then I'll solder the other end of the resistor directly to one of the feet of the rectifier. The other foo of the rectifier will be directly connected to the remaining end of the Cap by an extra piece of resistor leg (I just like using that stuff - I should buy a roll of it.)

 

Finally 30g wires connected to the end legs of the rectifier.

 

I'm going to use little connectors for the wires so it'll be easier to remove the shell if I ever need to without messing up the lighting.

 

Then from the connector the wires will be soldered to the brass strips, or to Kato/TORM type slide in copper attachements.

 

As far as I can imagine that's the most compact way to do it.

Link to comment

These mini connectors from Soundtraxx work very well for this purpose. But they're pricey. I wonder if I can find an equivalent for much less on one of the industrial supply sites. 

 

I'm still waiting for my rectifiers to arrive. Probably another two weeks or so. Then, I'll be ready to start experimenting.

Link to comment
2 hours ago, gavino200 said:

 

 

Well, an "ideal" range is a range that works. Nice constant lighting. Lower uF caps are physically smaller caps. Therefore, there's a good reason not to go higher than needed. I have no real way to tell what my need is without trial. I can't measure it. However, it's likely a very short time.

 

The length you need is dependent on your trains, your layout, and your driving.  Slow speed travel likely results in longer time periods needing to be covered.   If you look at that video of the Popondetta light bar -- it rolls over, at slow speed, track with huge pieces of masking tape without issue.  (And also seemed to have a whole row of caps).  Do you need that?  (I don't know what I need either 🙂  )    I am thinking probably 1/4 second of coverage is probably ok for most things.

 

2 hours ago, gavino200 said:

Yes, a 1F cap would be giant. But it would also give a giant discharge. I guess I'm looking for the smallest uF cap that fits in the functionally ideal range. I'd also rather get council from an experienced voice, as you and I are both sort of whistling in the dark.

 

 

The discharge of the cap is dependent on the load on it AFAIU.  So a 1F cap with the same LED strip and resistors would discharge at the same rate as the small one but just last forever.   That's my understanding.   Again, those more knowledgable can correct me if I am wrong.

 

2 hours ago, gavino200 said:

 

Yeah, I get the purpose of a minimum voltage. Just looking for an experienced voice to weigh in on whether there are any drawbacks to higher voltage (I already have some 40s). More expensive, I guess but don't know. Physically larger, I guess but don't know.

 

I think you nailed it.  Larger and more expensive.

 

2 hours ago, gavino200 said:

 

I've no clue what a zener diode is. I know what a diode is. I'm planning to have a resistor in the circuit to limit LED brightness. Will this do the same thing? 

 

https://en.wikipedia.org/wiki/Zener_diode

 

The way I understand it you can add these to the circuit to keep the voltage from getting higher than you want -- for example in our case to protect the capacitor by putting a circuit piece in that limits the voltage.

 

2 hours ago, gavino200 said:

 

That's not a bad idea. Ebay? How many caps fro that price? If possible Id like to use one unit at 200mF than two units at 100 each to save space. The real estate is scarce.

 

 

I got some on eBay.   Don't know if they were a great deal.  100 uF in a 25V version were hard to find at a reasonable price.  I think your Aliexpress ones were better priced than I got.

 

 

Link to comment
25 minutes ago, chadbag said:

 

The length you need is dependent on your trains, your layout, and your driving.  Slow speed travel likely results in longer time periods needing to be covered.   If you look at that video of the Popondetta light bar -- it rolls over, at slow speed, track with huge pieces of masking tape without issue.  (And also seemed to have a whole row of caps).  Do you need that?  (I don't know what I need either 🙂  )    I am thinking probably 1/4 second of coverage is probably ok for most things.

 

Excellent point about slow speed. Fortunately any 'gaps' I have a re pretty micro. I think some of the electrical gap is probably caused too by imperfect contact between the long and short copper strips as the carriage jostles around.

 

Quote

 

https://en.wikipedia.org/wiki/Zener_diode

 

The way I understand it you can add these to the circuit to keep the voltage from getting higher than you want -- for example in our case to protect the capacitor by putting a circuit piece in that limits the voltage.

 

 

Many thanks. I'll have to study up on this a bit. But I think you've given me the gist of it.

 

Quote

I got some on eBay.   Don't know if they were a great deal.  100 uF in a 25V version were hard to find at a reasonable price.  I think your Aliexpress ones were better priced than I got.

 

 

Yeah, Aliexpress usually has good prices. Perhaps when, collectively, we figure out what works best,  we can divide up a large quantity order to save a few shillings.

Edited by gavino200
Link to comment

Zener diodes essentially act as a safety valve.  When the voltage gets beyond a given point they basically "pop open" until the voltage drops back down below where they close up.  In this sort of case they are to protect the capacitor from going beyond its voltage rating and instead making a short until the voltage drops down to a safe level again.

  • Thanks 1
Link to comment

Hello gavino,

 

I'm really hoping this experiment will culminate in a simple, affordable, stay-alive circuit that we can all use to cover most applications.  I'd be interested in either:

  1. being able to source all the parts, including a simple pcb; or
  2. being able to purchase completed stay-alive circuits directly from a manufacturer.

Perhaps there may need to be 2 or 3 solutions to cover most situations.

 

I look forward to seeing your results.

  • Like 1
Link to comment

I suspect that this will result in a schematic and a suggested list of parts.  I doubt we'll get a PCB from this (or that one is needed or wanted as you would connect this directly to the LED string).

 

Link to comment
14 hours ago, chadbag said:

I suspect that this will result in a schematic and a suggested list of parts.  I doubt we'll get a PCB from this (or that one is needed or wanted as you would connect this directly to the LED string).

 

 

Y'know, I hadn't even thought about a PCB. But it might be something to think about if the basic schematic works well. It would be worth it as this is something that we'll have to repeat hundreds of times. But one step at a time. 

Link to comment

Only issue with a pcb in this case is they can get bulky fast for mounting inside cars that can have a range of obstructions inside them.

 

i really like the German”s group’s design using two rods with leds in parallel soldered in and using a current limiter chip and cap on the outside of the current limiter.

 

Jeff

  • Like 1
Link to comment
2 hours ago, cteno4 said:

Only issue with a pcb in this case is they can get bulky fast for mounting inside cars that can have a range of obstructions inside them.

 

i really like the German”s group’s design using two rods with leds in parallel soldered in and using a current limiter chip and cap on the outside of the current limiter.

 

Jeff

 

I don't know anything about the German's group. Basically, I'm using the Dani design. It uses pre-made LED strips. They can be easily cut to any length, with contact pads every 3 LEDs. Most cars fit 6 LEDs. They are wired in parallel.

 

I wasn't thinking of a pcb with LEDs and components all on one board like TORM or Popondetta. Rather, I was thinking of a very small board only for the "component part" of the circuit. ie for the capacitor, resistor and rectifier. It would be no wider than the cap or rectifier and approx 15mm long.

 

I wouldn't have thought this would be possible until I saw the success that the Kato decoder project people had with their board. Obvously I'd want to get the basic cirucuit working before considering something a pcb. One step at a time.

Edited by gavino200
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...