Author Topic: Next electrical question: Arduino powered DC/DCC circuit breaking?  (Read 2176 times)

0 Members and 2 Guests are viewing this topic.

peteski

  • Crew
  • *
  • Posts: 32943
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #45 on: February 25, 2024, 12:41:40 PM »
+1
In the NTRAK club I belong to we have been running mixed DC/DCC for years.  Originally 2 track loops were DC, and one DCC, but nowadays we run 2 DCC track loops with one DC loop.

Some modules do have crossovers. But per the NTRAK standards, the crossovers are isolated (both rails). We just make sure no members throw those crossover turnouts. Over the years I don't recall having any problems with this configuration and zero protection electronics are involved.  We just *DON'T* cross into the other territory.

What you guys are discussing seems way too complicated. KISS!
. . . 42 . . .

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24738
  • Head Kino
  • Respect: +9250
    • Conrail 1285
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #46 on: February 25, 2024, 01:22:15 PM »
0
The T-Trak standard is Kato #6 turnouts for the mainlines.  Kato #6s are always power-routing. 

Kato #4s can be either, based on positions of a couple of screws on the underside.  Mine have always been power-routing out of the box.  T-Trakers who want to use Kato #4s are directed to do some mods on the turnouts (filing points and stock rail notches), so specifying that they must be power routing isn't any substantial additional burden.  But, there is the problem that the instructions are backwards, so some might inadvertently be made non-power-routing.  But, that can easily be checked with a multimeter.

#6s are the standard? Well damn, I never knew that. I've never seen anyone using them for crossovers though because they require quite a bit of hacking to get to work at the 33mm spacing, don't they?

I've always seen either the full crossover or the crossover pairs used (admitting that I am doing that myself). I don't think either of those are power routing.

And this does bring up an important point: the difference between the spec and what's "standard".

Maletrain

  • Crew
  • *
  • Posts: 3543
  • Respect: +606
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #47 on: February 25, 2024, 02:13:06 PM »
0
I went looking for the website that I got the #6 turnout "requirement" from and did not find any mention of turnouts at all in https://www.t-trak.org/resources/Documents/T-TRAK%20Standards.pdf .  So, Ed may be right about "standards" vs "recommendations" vs "practices".

Anyway, the concept of jumpers as guards against crossover access will work with turnouts that are power-routing.  But, if other turnout types are used for crossovers, and some of them are not power routing, then using jumpers will not be possible, because it would stop the loop from ever running.

I just checked a Kato double crossover for power routing.  It does route power.  But mine is hard to reach right now, and I am not clear on how power is routed in the diamond in the middle.  The diamond would make them a little difficult to jumper because the powered rails that need to be connected are not directly across the track from each other before getting to the diamond.  So it probably would take a skewed jumper of some sort.

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #48 on: February 25, 2024, 02:19:49 PM »
0
Almost certainly. DCC components are almost always more expensive to replace.

The more I think about this the more I think that just using DCC circuit breakers might actually be enough to protect "the expensive stuff".
You mean you weren't already planning on this?  An electronic fast-acting interrupter is an absolute must.  Heck, I even designed one of those into my DC throttle.  I can't imagine how anything could get damaged if these things trip in under 1/10th of a second like they are supposed to.  I have my DC one set to kick at +10% of my current rating (so a 3 amp version trips instantly at 3.3A).  Given the wide-ranging user base you are expecting, I would plan on this type of protection on both sides, DC and DCC.  Newbies do unimaginable destructive things.   :)
« Last Edit: February 25, 2024, 02:22:02 PM by mmagliaro »

Maletrain

  • Crew
  • *
  • Posts: 3543
  • Respect: +606
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #49 on: February 25, 2024, 02:32:25 PM »
0
Max, that brings up the question about what to use for an "electronic fast-acting interrupter" for the DC circuit(s). 

Do you have a specific component that works for DC? 

I am thinking that it really should be in the DC power pack, where it can get continuous voltage, instead of being wired into the track output, where the voltage can range from zero to ~12 volts, based on throttle position. 

I guess you could externally power an appropriately designed external component wired into the track circuit, perhaps using the "accessory" output of the DC power pack, but that is usually AC power at maybe 18 volts rms.  A battery might work if the interrupter's circuit is designed to fail open when the battery dies, so that it is "fail safe".

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #50 on: February 25, 2024, 07:36:13 PM »
0
Max, that brings up the question about what to use for an "electronic fast-acting interrupter" for the DC circuit(s). 

Do you have a specific component that works for DC? 

I am thinking that it really should be in the DC power pack, where it can get continuous voltage, instead of being wired into the track output, where the voltage can range from zero to ~12 volts, based on throttle position. 

I guess you could externally power an appropriately designed external component wired into the track circuit, perhaps using the "accessory" output of the DC power pack, but that is usually AC power at maybe 18 volts rms.  A battery might work if the interrupter's circuit is designed to fail open when the battery dies, so that it is "fail safe".

Excellent point and observation.  In the case of my own throttle, the interruption is in the main DC line inside the throttle, BEFORE the speed controlled track output.  Just as you surmise, it is a lot easier to make a stable, repeatable current detection circuit that operates on a fixed voltage and polarity.  So adding something to a "power pack" would be a real pain, because people would not be willing
to crack open the power pack case to get to the appropriate point.  If these DC throttles are separate devices that are powered from some 12-16v input source, then you just put the interrupter in between.

My circuit is based on the ACS 712 Hall Effect current sensor.  These are wonderful little devices in that they do not actually sit in line with the current flow.  So unlike most traditional current-sense DC circuits (like a "crowbar") that depend on the voltage drop though a series sense resistor, this thing causes NO voltage drop to the output (nor does it make any heat).  It is also temperature stable.   Essentially, it outputs a voltage that is linearly proportional to the current passing through it.  So you can rig up any sort of trigger circuit that will fire at a certain voltage, and have it kick a relay to kill your track power.  They make ACS 712 modules for 5 amp all the way up to 30 amp capacity.   They output 2.5v at 0 current, and in the case of the 5A version, they output +0.3v for each amp of current (so 2.8v for 1A,
3.1v for 2A, and so on). 

They DO work in either polarity (i.e. 2.2v for -1A, 1.9v for -2A, and so on).  So by clapping a bridge rectifier across the ACS712 output, you could have a fixed polarity voltage that you could feed to your trigger circuit.  Since the current draw through the rectifier is tiny and fixed, you wouldn't have to worry about error introduced by the rectifier diodes.   

Now that I think about it, it should be pretty easy to make the trigger circuit work regardless of the track voltage.  The only thing that matters is the current flowing through that ACS712 device on its way to the track.

If you want a schematic for the trigger/ACS712 circuit, I can post it here.  But I won't bother unless somebody is really curious.




« Last Edit: February 25, 2024, 07:39:29 PM by mmagliaro »

Maletrain

  • Crew
  • *
  • Posts: 3543
  • Respect: +606
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #51 on: February 25, 2024, 07:49:40 PM »
+1
Thanks, Max.  I understand the Hall Effect sensor. But, to make a circuit breaker, there still needs to be some steady power to the actual circuit breaking apparatus, whether it is a relay or something electronic.

Are the circuit breaking mechanisms in the DC power packs made these days so inadequate that we should be adding some other device to do the job?  Or is it just the really old power packs that are the concern?

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #52 on: February 26, 2024, 01:44:16 PM »
0
Thanks, Max.  I understand the Hall Effect sensor. But, to make a circuit breaker, there still needs to be some steady power to the actual circuit breaking apparatus, whether it is a relay or something electronic.

Are the circuit breaking mechanisms in the DC power packs made these days so inadequate that we should be adding some other device to do the job?  Or is it just the really old power packs that are the concern?
Yes, you need a steady power supply to the actual circuit breaking "trigger" circuit.  But that's not such a big deal, other than it needs to be a very stable regulated supply.  As long as the trigger circuit INCLUDES something like a rectifier/filter/12v regulator, then it can be powered off any old sloppy power pack AC terminals.  But it should be something completely separate from track power so it is guaranteed to work even if the power pack is shorted or otherwise failing.

The last power packs I actually opened up were the Tech 7 MRC ones like the 760.   All they use for overcurrent protection is a PolySwitch - one of those little solid-state auto-resetting thermal devices.  That means you need to get to about 150% of the current limit before they will open, and even then, it will take 30-60 seconds to do that.  They don't open rapidly until you get to 200% of the current limit, which means a 3 amp system would have to hit 6 amps to rapidly cut the power off.  In other words, they are little more than short circuit protection.

Personally, yes, I consider this utterly inadequate.  The reason we "get away" with it in the DC model train world is that most of the time, an overload is caused by a dead short, so thermal devices are okay.   But any other sort of overload could run for a long time letting things overheat and fail.  When I did my fancy shmancy DC throttle, that was one of the first "must-haves" on my list: sensitive, accurate, fast-acting overload protection that didn't consume power or drop voltage under normal conditions.

The ACS712 (and newer variants of it) work great.  Just be aware that any trigger circuit you hook to it MUST be temperature compensated.   Since it changes it output by only 0.3v per amp of current draw, the natural drift in things like diodes and transistors with changes in temperature will make your trip point move a LOT just going from a cool 60 degree room to an 80 degree room.

Maletrain

  • Crew
  • *
  • Posts: 3543
  • Respect: +606
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #53 on: February 26, 2024, 08:32:03 PM »
0
Yikes!  The Model Power Tech 7 is what is being used at the club, and, over a year, the temperatures change by large amounts (50s to 90s) in that building while the layouts are running.  So, building an add-on circuit breaker system seems like both a good idea and a non-trivial task.

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #54 on: February 27, 2024, 12:22:00 AM »
0
Yikes!  The Model Power Tech 7 is what is being used at the club, and, over a year, the temperatures change by large amounts (50s to 90s) in that building while the layouts are running.  So, building an add-on circuit breaker system seems like both a good idea and a non-trivial task.

Well, the temperature in the building isn't going to affect the Tech 7's thermal device.  That thing is just a coarse short-circuit cut-off anyway.  If you manage to build a trigger circuit attached to the 712 device completely out of things like opamps, they are usually temperature compensated.  But if you use any transistors, you need to worry about the temperature variations.

-- Max

peteski

  • Crew
  • *
  • Posts: 32943
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #55 on: February 27, 2024, 11:08:13 AM »
0
This thread has really become "popcorn worthy".  Good stuff!  :)
. . . 42 . . .

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #56 on: February 28, 2024, 12:21:46 PM »
0
Yikes!  The Model Power Tech 7 is what is being used at the club, and, over a year, the temperatures change by large amounts (50s to 90s) in that building while the layouts are running.  So, building an add-on circuit breaker system seems like both a good idea and a non-trivial task.

Oh!  "non-trivial" you say?  LOL.
It did take a while to figure this out, I won't kid you.  But it's only 3 transistors and a handful of other cheap parts,
it can drive a relay directly, and it's darn accurate.  If you want to build one, poke me for the schematic.




Maletrain

  • Crew
  • *
  • Posts: 3543
  • Respect: +606
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #57 on: February 29, 2024, 10:59:18 AM »
0
Max, you posted that your design includes 3 transistors, and previously posted that the trigger design needs to be temperature compensated if it includes transistors.  It was the temperature compensation that drew the "yikes" response.

So, I'm asking if the design you have is temperature compensated sufficiently for a range of ~50 to ~95 degrees F that my club experiences over a year.

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #58 on: February 29, 2024, 08:33:43 PM »
+2
Max, you posted that your design includes 3 transistors, and previously posted that the trigger design needs to be temperature compensated if it includes transistors.  It was the temperature compensation that drew the "yikes" response.

So, I'm asking if the design you have is temperature compensated sufficiently for a range of ~50 to ~95 degrees F that my club experiences over a year.
Yep.  One of the transistors is purely for temperature compensation.  I tested it from 18C up to 70C (so 64F to 150F) and the
detection trip point only varies by 100mA over that whole range.

Here's the circuit, since you seemed interested.  The parts are all common, robust, and cheap.  I use a 7805 5v regulator to get the 5v supply (also common, robust, and cheap), since this thing only draws 80mA when the relay closes and the regulator won't make much heat at that level.  The relay shown in the schematic is 62 ohm, but this ought to work with any small relay coil.  I used a DPDT relay with 8A contacts so it they can take a lot punishment.  The text in the drawing
explains how it all works.  And use 1% metal film resistors throughout.  The are cheap these days.
The RtripAdj is a pot that lets you set the trip point.  It can be set to trip anywhere from about 1A up to over 4A.  It can probably go more, but I just didn't bother testing it.   And by changing R15, you can pretty much make it trip wherever you want.
I used the 5A version of the ACS712.  If you use the 10A, 20A, or 30A version, they swing their output voltage a lot less per amp of
change, so the accuracy would not be as good.  But I would think the 10A, at least, would still work well in this circuit.




The trip graph in a simulator.  But trust me, this is realistic.   It is really fast like this in real life.  That little curve at the base of the rise is induced by C1.  If you lower C1 from a 47uF to, say, a 22 or a 10, it will get super sharp and trip even faster when you hit the overload point.  But you might start getting nuisance trips. 




« Last Edit: February 29, 2024, 08:43:11 PM by mmagliaro »

Maletrain

  • Crew
  • *
  • Posts: 3543
  • Respect: +606
Re: Next electrical question: Arduino powered DC/DCC circuit breaking?
« Reply #59 on: March 01, 2024, 10:03:34 AM »
0
Thanks Max!

I am not yet to the point of needing this.  Hopefully, by the time my club gets to where we are hosting meets, I will have found somebody who will build a couple of them.

I have copied the post into a Word document and printed it (as well as saved it electronically) so that I have minimized the probability that this will be lost by the time I need to act on it.

Thanks again.