Model Train Forum banner

1 - 20 of 34 Posts

·
Admin
Joined
·
44,195 Posts
Discussion Starter #1
Here's all you need to fabricate a variable voltage DC supply from track power. This design is good for at least 200-300 milliamps of DC, maybe more under the right circumstances.

Although this was created for use primarily for O-gauge trains with AC track power, it will work for any command system with constant track power, AC or DC. It also includes provisions for jumpering for isolated ground with full-wave rectification or common ground with half-wave rectification. This flexibility is needed for certain applications with O-gauge trains, and may be useful for other gauges as well.

Here's how I make them.

I use this DC-DC switching module from eBay for the regulator section, currently around 37 cents each on eBay.

2PCS New Mini 3A DC-DC Adjustable Converter Step down Power Supply LM2596S

AC-PS Switcher PCB.png

I sandwich that under my PCB to create this power supply module.

AC-PS Connections.png

Attached are the Gerber files to create the PCB, the schematic of the board, and the BOM for the parts needed.

Gerber files for PCB Fabrication: View attachment AC-PS Gerber.zip

Bill of Materials
AC-PS BOM.png

Schematic Diagram
AC-PS Schematic.png
 

·
Admin
Joined
·
44,195 Posts
Discussion Starter #3
Yep, that's what it was designed for. I sometimes have the need to power stuff that's a bit more power hungry than a linear regulated supply will do.

I even laid out the same style with a large capacitor to increase the filtering so it could supply more current. I haven't build this one yet, but there's no reason to believe that it won't work, it is the same design as the one above. :D The only downside is the larger cap makes it less likely to fit in a lot of situations, it's a 680uf cap, giving me over twice the filtering of the 300uf on the existing one. The additional capacitance comes at the expense of the height of the package.

ac-ps 3d (Hi-Current).png
 

·
Registered
Joined
·
1,080 Posts
what don't i understand?

if you pass DCC thru a bridge, how much capacitance do you really need? (peak to average is practically 1, unlike a sinusoid)

wouldn't the coil be more useful, if needed at all, on the output where there's DC instead of the input where there's AC. (doesn't the coil on the input make the voltage across the bridge more sinusoidal)?
 

·
Registered
Joined
·
1,080 Posts
Well, I pass 60hz AC through the bridge, so I need a bit more filtering. ;) For DCC, you don't need as much filtering as it's higher frequency.
while i'm sorry I was careless in misreading your post, i believe for DCC you would need very little filtering not because it's higher frequency but because it's square waves (peak-to-average ~1).
 

·
Admin
Joined
·
44,195 Posts
Discussion Starter #8
Well, you'd be wrong. ;) The switching power supply wants to see pure DC, not square waves. Depending on the frequency, you'd need less filtering, but for a 60hz square wave or a 60hz sine wave, you'd need pretty much the same amount of filtering to make the switching power supply happy.
 

·
Registered
Joined
·
1,080 Posts
but for a 60hz square wave or a 60hz sine wave, you'd need pretty much the same amount of filtering to make the switching power supply happy.
if you rectify a sinusoid, the voltage is less than half the average voltage for a significant amount of time.

if you rectify a bipolar, +/- not +/0, waveform the output is + and only dips during the slew period (<< 1 usec) when the voltage changes polarity. how much capacitance does a decoder have to provide dc power for the processor that is very susceptible to momentary drops?
 

·
Registered
Joined
·
1,080 Posts
i saw a 1uf (105) tantalum cap on a picture of a decoder. I think it's overkill for maintaining DC, but excessive to handle momentary loss of power that inertia can ride thru to prevent a decoder processor reset.

i can't find a spec for how quickly DCC needs to change polarity.
 

·
Registered
Joined
·
1,080 Posts
S-9.1 describes the period between polarity changes: nominally 56 usec for a "1" bit and <= 100 usec for a "0".

i don't see a spec for how quickly it must change from + to - polarity, that vertical edge in the diagram, the slew rate.

it's that small time that rectified DCC would dip and may require filtering.
 

·
Registered
Joined
·
3,444 Posts
it doesn't show a value for that time, but based on the 'scope reading, it -probably- is around two millisecond ..
by the way , DCC actually doesn't change polarity, it's just where you happen to set zero on the 'scope ..
also, the 'bit' includes both halves [in your terms positive and negative], so the actual bit length is double what you stated
 

·
Admin
Joined
·
44,195 Posts
Discussion Starter #15
In any case, the supply should work fine with DCC, assuming the voltages are sufficient for the output desired. Since this is a buck supply, you need a couple more volts of DC going in that you'll be able to get coming out.
 

·
Registered
Joined
·
1,080 Posts
by the way , DCC actually doesn't change polarity, it's just where you happen to set zero on the 'scope ..
The NMRA baseline digital command control signal consists of a stream of transitions between two equal voltage levels that have opposite polarity

i understand that a unipolar power supply is being used. But mosfet switches of an h-bridge are alternately connecting the supply leads to opposite rails so that from the track perspective, the polarity is changing.

it doesn't show a value for that time, but based on the 'scope reading, it -probably- is around two millisecond ..
considering that the "1" bit is nominally 58 usec, the transition has to be much less than than 58 usec.

when you look at that rising (or falling) edge on a scope at high resolution (ns/cm), you can measure the time it takes to change level. In the trace below (not for DCC) there's a 3 usec rise time that would show up as a dip in a rectified waveform that a relatively small capacitor can filter.

This Allan Gartner page says the rise time is 240 ns.

 

·
Admin
Joined
·
44,195 Posts
Discussion Starter #18
One of the features of my power module is having a common frame ground capability if you use the half-wave option. This is required when you are using TMCC and early Legacy if you power something interfacing to the Lionel electronics. The full-wave option was to provide more power, assuming that the output would be totally isolated from frame ground.

I don't know if the ability to reference to frame ground is an issue with DCC, one would assume it might not be, but I can't say.
 

·
Registered
Joined
·
2,092 Posts
Here's all you need to fabricate a variable voltage DC supply from track power. This design is good for at least 200-300 milliamps of DC, maybe more under the right circumstances.

Although this was created for use primarily for O-gauge trains with AC track power, it will work for any command system with constant track power, AC or DC. It also includes provisions for jumpering for isolated ground with full-wave rectification or common ground with half-wave rectification. This flexibility is needed for certain applications with O-gauge trains, and may be useful for other gauges as well.

Here's how I make them.

I use this DC-DC switching module from eBay for the regulator section, currently around 37 cents each on eBay.

2PCS New Mini 3A DC-DC Adjustable Converter Step down Power Supply LM2596S

View attachment 516514

I sandwich that under my PCB to create this power supply module.

View attachment 516508

Attached are the Gerber files to create the PCB, the schematic of the board, and the BOM for the parts needed.

Gerber files for PCB Fabrication: View attachment 516510

Bill of Materials
View attachment 516506

Schematic Diagram
View attachment 516512
John, I have to pick your brain a bit (sorry, I know your busy).

It so happens I had one of these buck regulators in my parts bin - purchased last year. Nearly identical board as in your pic., but labeled version 1; two passive resistors missing or so, all else the same.

I just tested it with a DC feed (at variable voltages). Works ok but I noticed this: If the input voltage isn't high enough to support the the module's set output voltage, it was erratic, sometimes going to 0 until you reset the output voltage low enough it could operate with the given input voltage; sometimes doing the best it could given the input voltage. I'm wondering if you noticed that and if you thought there were any ramifications for conventional operation: stop the train, no voltage, etc. This is in contrast to the linear regulators that consistently provide the best output they can given a insufficient input. I ordered the exact same module you have so maybe there's a difference between the two.

Also, in your rectifier module, what is the purpose of the inductor before the bridge (forgive me, I forgot the stuff I learned some 40 years ago as my design career went all digital).
 

·
Admin
Joined
·
44,195 Posts
Discussion Starter #20
There's no defined behavior with some switchers if you violate their input/output limitations, I've seen that before.

The inductor is for DCS compatibility, obviously this is primarily for O-gauge operation. Without the inductor, the circuit can degrade the 3mhz DCS carrier on the tracks.
 
1 - 20 of 34 Posts
Top