Mr Moderator feel free to copy this to a more relevant section of the forum if desired...
While I'm waiting for components to arrive I'm going back over the track charging arrangements for the steam tram which has a battery inside it as it would look rather weird with a trolley pole.
So what I've come up with is a section of isolated track that becomes active when a reed switch is tripped by a magnet under the trailer footboard. The reed switch turns on a latching relay and current flows to the onboard battery via a rectifier and thence through the onboard charger module which is fully automatic and balances the 3 x Li-ion 18650 2Ah cells. This is going to be more than adequate given the length of run even with the smoke drawing an amp.... When the tram moves out of the charging track the magnet trips the relay and it turns the charging power off and returns the rails to 0VDC so electric cars can run over it without shorting. The only tricky bit is placement of the magnet so that nothing is turned on till the tram is only on the Isolated track.
The rectifier ensures the polarity is correctly supplied to the charge board and also prevents current from the battery flowing back into the rails and causing a short circuit.
The "smart" charge module needs 13-18VDC so the voltage supplied is around 14VDC to overcome the .7 volt loss in the rectifier.
There is an external ammeter to display the state of charge, when the current drops down I'll know the battery is not being charged and I'll be able to turn the power off....
The schematic below shows how it should all work.
Here are a few links to the key components;
https://www.ebay.com.au/…/12V-1-Channel-Latch…/282740930710…
https://www.ebay.com.au/…/3S-18650-Li-ion-Lit…/253459423969…