I am working on an LGB "The Big Train 2017D" project with an ACS724 hall effect current sensor and an Arduino UNO. I have measured AC current and voltage values during normal operation and a simulated current spike or a short circuit. The train is powered by the rails in connection with the power supply btw. The issue is that a current spike is expected when a train wheel makes contact with the opposing rail and the current is running through the train and causes damage to parts. Now I want to integrate a relay or similar system with the power controller to shut down power to the track during one of these current spikes. The goal is to completely shut down the system. The only Arduino code I have right now is to detect current during train operation. I'm looking for any advice on which relays to look for and how to link them to the train's power supply/controller.
Train Voltage: 14 volts
Amperage: 0-1 A (normal)
Amperage: 2+ A (spike)
I have no idea what that is? Would this train be running on AC or DC current? OK next is show what you have for code to date. I get that if you experience an overcurrent condition exceeding 2 amps you want to remove power from the tracks. OK power removed from the rails, now what?
I moved your topic to an appropriate forum category @erboland3.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
Please give some more thought to your request. By the time you have identified a current spike. Damage has already been done. You need to add the current limiting to the power supply so it can shut down properly.
From the train wheel interacting with the incorrect track segment. The main issue is to shut the system down whenever a spike is detected to save the train from extended time under the higher current which can heat the train and melt parts.
A spike is usually identified in milliseconds or less. You are looking for a current limiting circuit or what? How much is the stall current at any time for your project and how much over that value do you consider a problem. Numbers, please!
It would be a lot easier to answer your question if you posted an annotated schematic showing exactly how you have wired it. Be sure to show all connections, power and ground.
This shows two isolated pieces of track with opposite polarity, power by the same power supply. In the left pice trains move to the right, in the right piece trains move to the left.
If you get a short because the wheel goes from the one section to the other section (and hence contacts both plus and minus, I've tried to draw that in the upper rail), the current will not go through your engine; current takes the path of least resistance which is the short, not the motor.
So based on that there is no need to protect the motor.
How did you simulate?
Note:
If LGB uses AC (I think it does but not sure), the principle stays the same. Is it a three-rail system or a two-rail system?
The drawing was for a two-rail DC system.
If a few seconds is OK then a PTC (aka self-resetting fuse) would be a quick and easy solution.
When there's significant over current it'll heat up quickly limiting the current; when the fault is solved it'll cool down and restore normal operations.
One problem you may face is that when the train is stopped, and you apply power to its motor, the initial current is much higher than the running current.