Charger for Train

Hello, I'm trying to create a proof-of-concept for railroading applications using scale model trains (HO). The proof of concept is a battery powered locomotive that can overcome the problem of dead spots in the rail power, while charging off of the regular rail power when contact is made. This would make layout design much easier and could overcome some of the obvious limitations of a two-rail design involving track loops sort circuiting and current direction change.

This is a very early stage idea, but I am looking for a way to charge 2 -3 cell LiPO batteries or 6 - 7 cell NiMH batteries from a 10-16V power source. I could run the power source AC, but DC is the norm for older style HO trains. If I do go AC it wouldn't matter obviously, but if I go DC, i would like the charger to be able to charge regardless of which direction the current it picks up from the track is going, and change on the fly.

The goal here is to completely isolate the locomotive power control from the track power while still running it off of track power. I'll be using an RC electronic speed control, receiver, transmitter and battery to power an old school DC brushed motor locomotive that should be happy with as low as a 5 V supply but can handle up to 16V. It doesn't need to be fast nor pretty.

Another option I have considered is using a single 3.7V lipo with a voltage amplifier (to 12V) ad a DCC encoder. A few problems arise from this - a) it still needs to charge while having current drawn and b) the relatively low amount of current I assume this can probably handle massively limits locomotive power and c) I might need to get a DCC encoder because I'm not sure my DC RC electronic speed control can run off of this due to the low current drawl limitation which I would have to set up.

The main problem is that I am at a loss for what kind of hardware to use for this and where I can find/ how I can make a charger capable of dealing with such a variety of power supply switching direction and on/off, and handle the battery being drawn from constantly at the same time. I am thinking arduino or at least an adafruit product might be the solution.

Any ideas of pointers in the right direction would be extremely useful.

DiggerBro:
The goal here is to completely isolate the locomotive power control from the track power while still running it off of track power. I'll be using an RC electronic speed control, receiver, transmitter and battery to power an old school DC brushed motor locomotive that should be happy with as low as a 5 V supply but can handle up to 16V. It doesn't need to be fast nor pretty.

That doesn't make sense. Isolated or not isolated?

The usual way to make an uninterruptible power supply is basically just charge a battery and have the output run off the battery full time. Pick any charger that fits within your locomotive and any battery. Attach the motor controller to the battery as if the charger isn't there.

Batteries can deliver huge amounts of current very easily. Even the tiny ones. Anything bigger than a watch battery will run your locomotive. How long is it supposed to run on battery alone? A second? five seconds?

To allow the charger to work off any track polarity, wire it with 4 diodes exactly like an AC rectifier. Then the DC polarity doesn't matter any more.

MorganS:
That doesn't make sense. Isolated or not isolated?

The usual way to make an uninterruptible power supply is basically just charge a battery and have the output run off the battery full time. Pick any charger that fits within your locomotive and any battery. Attach the motor controller to the battery as if the charger isn't there.

Batteries can deliver huge amounts of current very easily. Even the tiny ones. Anything bigger than a watch battery will run your locomotive. How long is it supposed to run on battery alone? A second? five seconds?

To allow the charger to work off any track polarity, wire it with 4 diodes exactly like an AC rectifier. Then the DC polarity doesn't matter any more.

The hard part is finding a charger that will fit this category. Run off a sometimes interuppted DC supply? I have an old DC nimh charger but it resets if it looses supply current while charging and will stop charging until you clear the system by disconnecting everything. It's also big but I could take it apart and fit it into my project I suppose.

Ideally the locomotive should run for the life of the battery if necessary.

I have very limited experience with dealing with electronics hardware. Do you have any advice on how to find diodes that will work for my requirements?

Thanks for your help :slight_smile:

MorganS:
That doesn't make sense. Isolated or not isolated?

Also to address this. Old school mode trains are directly controlled by power thru the tracks. My goal is to power the locomotive thru the tracks as before, but make it work even if there are dead spots in the track or insulators so that track designs such as back loops (normally not possible with two-rail setup, instead only 3-rail).

I suppose the reason old locomotives weren't simply wired with a rectifier is because they would then be one-direction limited. I guess that won't be a problem with this setup. :slight_smile:

Your power requirements are pretty low. Probably less than 1A going from the rails to the charger. So pretty much any small diode will work. 1N4001 is about the most common cheap-as-sand part number. Here it is at Sparkfun With a little searching, you can find rectifier modules with 4 diodes all in one compact package.

DiggerBro:
Ideally the locomotive should run for the life of the battery if necessary.

How long? Seconds? Hours? you need to have a real specification to pick a battery.

You need to stay away from "smart chargers". Pick something that says it's a trickle charger or maintenance charger. They don't ever switch off - they just maintain the battery at a constant voltage. I suspect that your battery requirements are so minimal that you don't need a modern LiPo battery. A Ni-Cad will do nicely. They love high currents. They don't love constant voltage but you don't care if the battery capacity degrades to 10% of the claimed capacity in a few years.

MorganS:
Your power requirements are pretty low. Probably less than 1A going from the rails to the charger. So pretty much any small diode will work. 1N4001 is about the most common cheap-as-sand part number. Here it is at Sparkfun With a little searching, you can find rectifier modules with 4 diodes all in one compact package.
How long? Seconds? Hours? you need to have a real specification to pick a battery.

You need to stay away from "smart chargers". Pick something that says it's a trickle charger or maintenance charger. They don't ever switch off - they just maintain the battery at a constant voltage. I suspect that your battery requirements are so minimal that you don't need a modern LiPo battery. A Ni-Cad will do nicely. They love high currents. They don't love constant voltage but you don't care if the battery capacity degrades to 10% of the claimed capacity in a few years.

15 minutes would be plenty. I agree on the NiCd and I think I have some AA NiCd cells I could wire up for this. I also agree on the not-smart charger... but I don't know where to get one of these. It just needs to be a step down to the voltage I want to go into the receiver which is a max 3 s so max 11.1 V. But I'd be fine with an 8.4V setup. I would be worried about overheating the batteries if the loco is drawing just a little current. Which is why I am inclined to go smart charger route.

Regardless, I cannot seem to find a dumb charger, so I guess I'll have to rig something up using circuitry. How do I limit the current to a non-destructive amount is the question. First, I'll do a current draw test on the loco at battery voltage power I suppose.

The easiest way to limit current is with a resistor, but a better way is a simple constant current circuit using two transistors.

A bridge rectifier allows you to charge with input in either polarity.

It seems a NiCd battery just needs to be provided with a current, nothing special really, so much easier to charge than a LiPo. Then basically run your train motor off the batteries - it will effectively be supplied directly by the power from the rails most of the time, seamlessly switching to battery when needed.

DiggerBro:
Ideally the locomotive should run for the life of the battery if necessary.

As far as I can see all of the discussion so far has been about charging the battery. But you cannot consider that on its own without also considering how to control the speed and direction of the train.

If the train is powered by a battery then you cannot control it by varying the power fed to the tracks. Radio control is an obvious solution.

I have been fiddling with Battery Powered Radio Control (BPR/C) for a few years.

There is a lot of information about BPR/C on RMWeb and on he US FreeRails Forums. This is my recent contribution

If you need to be able to draw current regardless of the polarity of the rails you will need a rectifier on the Loco.

If you can settle on a standard type of battery the simplest way to regulate charging is to supply a voltage that is a little below the max charge voltage for the battery. That way it can never over-charge. This is true of LiPos as well as NiCds. However you need the be CERTAIN that a LiPo never becomes over-discharged.

There is some risk with battery of LiPo cells that they will become unbalanced (i.e. not all charged to the same voltage) unless they are each charged separately. This risk is probably a lot less serious for model trains where the current draw is very low compared to model flying, but I have no experience. I suspect a balance-charge after a running session would be sufficient.

For my own system I have decided on the simplicity of a single 3.7v cell and low voltage motors that will work directly at that voltage. AFAIK the voltage boosters have very low current capacity and may not be capable of driving a motor. A pair of LiPos (7.4v) should probably be sufficient to operate most nominally 12v motors. But, for my situation, the problem is that I want to be able to use a single cell where space is limited.

By the way, a fully charged battery will actually drive a train for a considerable time and it would be prototypical for the Loco to have to return to base for refuelling (i.e. a change of battery).

...R

https://www.amazon.co.uk/3Series-Protection-Automatic-Recovery-Function/dp/B0752H8Q2R/ref=pd_lpo_sbs_328_t_1?_encoding=UTF8&psc=1&refRID=B5KB1TYRSA3WPSGYYDXB

Anyone here ever used one of these? Thinking this might be the way to do it. Would this require any additional circuity besides diode protection? :confused: