NilsvN

Reliable DCC and reversing loop POC (keep-alive, dual frog juicer, pfx brick)

Recommended Posts

Hi all, I've got something cool to share with you. I've been planning how to tackle my next 9v layout where I want to control multiple trains on a interconnected set of loops. On a regular 9v layout, you cannot do that. This is my solution:

800x600.jpg

It's a 9v motor with the motor taken out, feeding into a bridge rectifier (into the A/C connectors) so that the output polarity is always the same. Then from there it goes into a step-up converter set to 10v output (track power is ~12v, but a bit lower on the frog). From the step-up converter it's connected to both a TCS KA3 keep alive and a PFx Brick. The keep alive ensures that the PFx Brick stays powered (and keeps the motors running) if power suddenly cuts out very briefly. Let me explain why that is important:

For the reversing loop I'm using a TCS dual frog juicer. Basically, the "loop" part of the reversing loop is an isolated section of track, which we'll call the frog. You connect track power to the dual frog juicer input and connect the output to the frog. When the train drives from normal track onto the frog and the polarity of the frog is "the wrong way round", then it will automatically switch the polarity of the frog. This happens very fast, but it's enough of a delay when going into the bridge rectifier and then into the PFx Brick that the PFx Brick shuts off and turns on again, effectively stopping the train. That's where the keep alive comes in!

Demonstration: (watch the indicator LED change between red/green, this means polarity gets switched)

https://bricksafe.com/files/SystemTrains/lego-dcc-train-concept/video 1.mp4

https://bricksafe.com/files/SystemTrains/lego-dcc-train-concept/video 2.mp4

In the demonstration I used a PF remote. For my layout I'm going to be using Vincent Vergonjeanne's fantastic piece of software to control the PFx Brick with a Powered Up remote using bluetooth. That way I can control every train even when they are going through a tunnel for example. Here is the full post about the software: [link]

I hope you found this interesting :)

Thanks to Lazarus992 for the tutorial on how to open up and remove the 9v motor

Share this post


Link to post
Share on other sites
16 hours ago, NilsvN said:

I hope you found this interesting :)

No. I find it absolutely fascinating!!!

Although I am on my own route to reversing loops and so on, this is really nice work. Surely expandable - and the PFx soft/hardware is the best out there!!!

Good luck with your project - and keep posting here!

Very nice.

All the best,
Thorsten

Share this post


Link to post
Share on other sites

I did something similar. I added a PF cable to a 9v motor, separating the power pickup from the motor. With just this, the train can be controlled by any PF controller (Fx Brick, S-Brick, etc) running off track power. But I also added a battery box, connected through a diode (so train will run off 9v track power, and only switch to the 7.2v battery if track power is lost). It then runs through a Voltage regulator, keeping a constant 9v to the controller, so train doesn't slow down with track distance or battery drain. Best of both worlds.

Share this post


Link to post
Share on other sites
7 hours ago, davidzq said:

I did something similar. I added a PF cable to a 9v motor, separating the power pickup from the motor. With just this, the train can be controlled by any PF controller (Fx Brick, S-Brick, etc) running off track power. But I also added a battery box, connected through a diode (so train will run off 9v track power, and only switch to the 7.2v battery if track power is lost). It then runs through a Voltage regulator, keeping a constant 9v to the controller, so train doesn't slow down with track distance or battery drain. Best of both worlds.

Ah, that's also a neat solution! I couldn't figure out how to make it so the battery acts as backup when there is power loss. Does it recharge the battery as well? I can imagine reversing loops are even easier to deal with in your case, just add 1 plastic RC track in the loop (granted you only have 1 pickup point).

The only downside that I can think of is that you are limited to the max current of the battery when track power is lost. With my solution, you can keep stacking motors until you hit the 3A limit of the PFx brick. Or is your battery some kind of RC car battery?

Share this post


Link to post
Share on other sites
On 5/25/2023 at 4:09 PM, NilsvN said:

Ah, that's also a neat solution! I couldn't figure out how to make it so the battery acts as backup when there is power loss. Does it recharge the battery as well? I can imagine reversing loops are even easier to deal with in your case, just add 1 plastic RC track in the loop (granted you only have 1 pickup point).

The only downside that I can think of is that you are limited to the max current of the battery when track power is lost. With my solution, you can keep stacking motors until you hit the 3A limit of the PFx brick. Or is your battery some kind of RC car battery?

Battery is not charged by track, I haven't had a need to incorporate that. I use the AA battery box with Eneloops, which provides a decent run time (~3 hours) on a heavy train with two 9v motors. I found that when running without battery that a single 9v motor could create connectivity issues with momentary power losses at weak track connections, but having a second 9v motor eliminated this issue. Current limitations have never been an issue for me, but I could see it being an issue with long slow freight trains.

Share this post


Link to post
Share on other sites

Well, since I posted I ran into 2 problems with this setup:

1. When put under extra stress (holding back the train simulating pulling lots of cars), sometimes the PFx Brick would simply restart itself, stopping the train. I believe this is caused by slight imperfections in track power pickup, so when a lot of amperage is requested it can't supply it and it restarts.
2. The reverse loop works in the demo, but the dual frog juicer was fried after running my loc full speed over it a dozen times. Basically, from what I understand the dual frog juicer cannot handle any kind of current for a sustained amount of time, which is a problem when used for reversing loops. If only used for turnout frogs, it would have survived a lot longer.

The solution:

I've taken a similar route of @davidzq and added a battery.  This is a 3s1p 2600mAh battery made up of 3x 18650 li-ions. It can output a max of 11A, which is way overkill of course but I thought I'd mention it. It has overcharge protection, so it should not be a problem that it's getting power when it's already "fully charged".

The setup looks like this. Track power goes into the bridge rectifier, same as before, that then goes into a step down converter with manual voltage and manual amperage control. Track is ~14V, minus 1.6V for the bridge rectifier, so ~13V going into the step down converter. Then that is set to output 12.0V, with a maximum current output of 1.3A. This output is then connected to both the battery and the PFx Brick. I set it to 1.3A since that is the recommended 0.5C charging rate of the 2600mAh battery. This way both the batteries and the power supply will not overheat. Note how I charge with 12.0V not 12.6V, so that the battery is never full, only at max ~80%. Li ions don't like to be fully charged. I could potentially lower it a bit more, perhaps. But I think 12.0 is OK.

About the video below; The straight tracks at the top of the loop are not powered, standard RC tracks. As you can see, when it crosses that part the light switches to green which means the battery is being used for power. When the light is blue, it means it's using power from the track and charging the battery. Essentially this means you can have as many reverse loops as you want, it does not add any complexity. Just make sure there is at least some plastic track to isolate the sections. Also this solves the issue of using 3d printed turnouts and then having to apply copper/aluminum foil tape. Now you can still do that to make it look like it's powered, but it doesn't need to actually supply any power; the battery will take over in those difficult sections!

In case you're interested, the locomotive is the SystemTrains big boy model, powered by 4x PF L motors. You can get the instructions on Rebrickable here: https://reb.li/m/139121 . And yes I designed it myself, shameless plug :pir-classic: 

To provide a bit more info (not scientific in the slightest), the 4 L motors pull around 0.4A at half speed and 0.6A at full speed (12V); tested this with the locomotive upside down with no additional load. When holding the wheels down (increasing the load), a very heavy load (many cars) will go to around ~1.2A and almost stopping the wheels at full power showed around ~2A. If we assume 95% of the track provides power, and we use an average of 1.2A, the train will be able to run forever! (theoretically)

https://bricksafe.com/files/SystemTrains/lego-dcc-train-concept/dcc_with_battery_video.mp4

/cc @Toastie thought you would maybe like to see this :pir-laugh:

800x600.jpg

In case you want a similar setup, here's the battery and step down converter I bought:

https://www.123accu.nl/Ecovacs-ICR18650-3S1P-accu-11-1-V-2600-mAh-123accu-huismerk-i43743.html
https://www.tinytronics.nl/shop/en/power/voltage-converters/buck-(step-down)-converters/dc-dc-adjustable-step-down-buck-converter-xl4015-5a-with-current-limiter

Note the battery dimensions (70x37x35mm), it's just under 5 studs wide and with some clever SNOT building techniques could potentially fit in a 6 wide build as well!

Edited by NilsvN

Share this post


Link to post
Share on other sites
17 hours ago, NilsvN said:

800x600.jpg

It's ALIVE!!! My creation is ALIVE!

 

That is insanely crazy and I completely respect you for it. Oh yeah, also pretty impressive.

Share this post


Link to post
Share on other sites

Hello, a year ago I was trying to get a pfx brick to be powered from a 9v motor. I took the motor from a pf train motor and took it and the cable and transplanted it into a 9v motor. The transplanted motor is powered by the cable and track power goes through the connector on the motor's shell. I tried connecting this setup up to a pfx brick but it constantly restarts. I gave up there but now I have come back to this project. I am trying to cram this whole setup with a speaker into a small shunter locomotive so space is slim. Any ideas on how to keep the pfx brick from restarting? @NilsvN @davidzq

Share this post


Link to post
Share on other sites

  If just keeping main power input overdraw or loss from resetting the PFX Brick is the primary problem, don't forget that the USB input on the side can be connected at the same time to a separate 5V 'keep-alive' power source.  (The brick can use the USB input alone for lower operating voltage setups, although in my experience the chances of overdraw by a motor causing resets is much higher if only this input is connected.)  Part of the design of the Brick was parallel power source ability, where the greater of the two sources will determine the maximum motor output voltage, but with the combined overall power (wattage) of both inputs.  Connecting both sources at the same time may not entirely eliminate the possibility of resets, but it would be worth testing.  You may find just enough room in your compact shunter for a tiny lithium flatpack cell and an equally tiny 3.7V-to-5V boost board to feed the USB connector the supplemental power.  You can buy bare micro-USB male connectors from eBay or other suppliers, and these take almost no space if you use one to make your own compact two-wire cable from the boost board source.

  When I have time, I will experiment with this theory myself, as I have numerous small lithium batteries and DC-DC converter boost boards at my disposal.  I got most of these parts with the intention of building much smaller than available custom battery packs for directly driving 9V devices, but the option is there to also try this parallel power source method with some of the same hardware.  I have both fixed voltage output and variable voltage output boost boards, so any target voltage can be achieved with what I have.  (There could even be a 5V boost for the USB connector and a 9V boost for the main PF input coming from the same battery via the use of two boost boards at once, should the scheme be only battery power for everything.)

Share this post


Link to post
Share on other sites
On 8/14/2023 at 10:40 PM, Bankruptcoder said:

Hello, a year ago I was trying to get a pfx brick to be powered from a 9v motor. I took the motor from a pf train motor and took it and the cable and transplanted it into a 9v motor. The transplanted motor is powered by the cable and track power goes through the connector on the motor's shell. I tried connecting this setup up to a pfx brick but it constantly restarts. I gave up there but now I have come back to this project. I am trying to cram this whole setup with a speaker into a small shunter locomotive so space is slim. Any ideas on how to keep the pfx brick from restarting? @NilsvN @davidzq

If you have a bit of space to spare I'd definitely try the solution @UltraViolet proposed, but perhaps then with a step up converter of 3.7->9V? That way it always has full power, not just 5V "backup" power. Only if there's really no space you could possibly try connecting a TCS KA3 keep alive like I did above. I say this because with a battery + 3.5V to 5V/9V step up converter it's much easier to deal with reversing loops and unpowered sections of track. Also, I found the keep alive to be a bit inconsistent when not paired with a buck converter in front of it (I found this out after posting the initial POC, not exactly sure why). Because the battery solution looks to be working so well for me I would recommend that more than the keep alive.

If space allows, you could then even hook up a 9V->3.7V step down converter with adjustable current limiter built in, so the battery can charge off track power. You'd probably want a charging rate of 0.5C, so the amps are limited to half of the mAh (e.g. 2600 mAh -> charge at 1.3A). Essentially the same setup I have ebove, but then the battery voltage is different from the PFx Brick, which you solve with 1 extra step up converter.

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.