Author Topic: Simple DCC Detection Switch Position Sensing  (Read 2181 times)

0 Members and 1 Guest are viewing this topic.

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Simple DCC Detection Switch Position Sensing
« on: August 03, 2021, 11:51:31 AM »
0
On the new NCR I'm doing occupancy detection of dispatcher controlled track using Digitrax BXP88s.

One thing I haven't completely solved yet (but know I can) is the need to show tracks as occupied to the dispatcher if a hand throw switch in a block is left open.

I thought about using some sort of thing to indicate each switch's position and feed that back to JMRI, but I think that might be overkill.

Since I'm using DPDT slide switches for turnout control, I figured I can just piggyback off of those and, when a switch is "reversed" (not lined for through traffic), put a 10k resistor in line with the feeder circuit.

I feel like I'm doing my 10th grade homework, but will this work? Or do I need to put the resistor inline as the only path?

Here's the link to the drawing if you want to correct me:
https://docs.google.com/drawings/d/1BqRNnIGaMNAolG1oyfyOuMFfGZd4ZR2dAw9irZCPidU/edit?usp=sharing

[ Guests cannot view attachments ]
« Last Edit: August 03, 2021, 11:53:12 AM by Ed Kapuscinski »

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #1 on: August 03, 2021, 11:55:11 AM »
0
Oh, duh.

This is what it actually needs to do, right?

[ Guests cannot view attachments ]

C855B

  • Crew
  • *
  • Posts: 10674
  • Respect: +2288
Re: Simple DCC Detection Switch Position Sensing
« Reply #2 on: August 03, 2021, 12:03:01 PM »
0
Oh, duh. ...

Yep. #1 rule of posting a question in an online forum - you realize the solution in seconds, but only after your brain fart goes public.

 :D

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #3 on: August 03, 2021, 12:04:15 PM »
0
Oh, it gets worse.

So that was a simplified drawing.

In reality, I'm ALSO using the other contacts to power the frog.

Is it easy enough to add the functionality by doing this?

[ Guests cannot view attachments ]

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #4 on: August 03, 2021, 12:05:53 PM »
0
Yep. #1 rule of posting a question in an online forum - you realize the solution in seconds, but only after your brain fart goes public.

 :D

Nothing quite like brain farting in public...

C855B

  • Crew
  • *
  • Posts: 10674
  • Respect: +2288
Re: Simple DCC Detection Switch Position Sensing
« Reply #5 on: August 03, 2021, 12:12:13 PM »
0
...

In reality, I'm ALSO using the other contacts to power the frog.

Is it easy enough to add the functionality by doing this?

That would do it. Easy peasy!

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #6 on: August 03, 2021, 12:21:23 PM »
0
That would do it. Easy peasy!

Hot damn. Thanks man!

peteski

  • Crew
  • *
  • Posts: 31839
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4613
    • Coming (not so) soon...
Re: Simple DCC Detection Switch Position Sensing
« Reply #7 on: August 03, 2021, 02:39:56 PM »
0
And then peteski chimes in . . . It would have been much clearer, simpler, and less embarrassing if you simply edited the initial post with the updated image. It would have saved everybody from seeing the errors and you from admitting mistakes.  :D  I make lots of misteaks, and I often edit and update my posts.

Even now, as a moderator, you have the ability to clean up the entire thread (including deleting this post), so only the useful info remains.  Your ideal is very clever and simple - it would be nice to have presented in a simple straightforward way.

BTW, I'm confused. If you use a DPDT switch, you seem to have tacked the occupancy resistor onto the same set of contacts that powers the frog, leaving the other set of contacts unused.
. . . 42 . . .

dem34

  • Crew
  • *
  • Posts: 1521
  • Gender: Male
  • Only here to learn through Osmosis
  • Respect: +1081
Re: Simple DCC Detection Switch Position Sensing
« Reply #8 on: August 03, 2021, 06:51:27 PM »
0
Don't worry, you arrived at the solution fairly quickly. 2 weeks ago I spent 40mins giving a lecture to my boss complete with sharpie diagrams on the mechanics of contact closures and momentary switches and how wiring a button in parallel with the contact closure relays of 3 power conditioners won't do anything.
-Al

ednadolski

  • Crew
  • *
  • Posts: 4723
  • Respect: +1665
Re: Simple DCC Detection Switch Position Sensing
« Reply #9 on: August 03, 2021, 09:00:29 PM »
0
BTW, I'm confused. If you use a DPDT switch, you seem to have tacked the occupancy resistor onto the same set of contacts that powers the frog, leaving the other set of contacts unused.

Perhaps it would clarify to use the symbol for a DPDT.


peteski

  • Crew
  • *
  • Posts: 31839
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +4613
    • Coming (not so) soon...
Re: Simple DCC Detection Switch Position Sensing
« Reply #10 on: August 03, 2021, 09:15:23 PM »
0
Perhaps it would clarify to use the symbol for a DPDT.



 Yes, a DPDT switch has 6 terminals. The latest diagram showed a half of a DPDT switch (3 terminals) with a frog connected to it, along with a resistor.
. . . 42 . . .

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #11 on: August 04, 2021, 10:17:12 AM »
0
Forgive me, I was doing the best I could with Google Draw.

And in this case, I've (at the hivemind's recommendation) electrically tied both sets of contacts together for robustness.

The important thing was working out where I can put the resistor to make it work, and @C855B helped out big time on that.

John

  • Administrator
  • Crew
  • *****
  • Posts: 13161
  • Respect: +2896
Re: Simple DCC Detection Switch Position Sensing
« Reply #12 on: August 06, 2021, 04:46:26 PM »
+2
And then peteski chimes in . . . It would have been much clearer, simpler, and less embarrassing if you simply edited the initial post with the updated image. It would have saved everybody from seeing the errors and you from admitting mistakes.  :D  I make lots of misteaks, and I often edit and update my posts.


There is learning value in watching Ed work through this

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #13 on: September 20, 2021, 01:09:41 PM »
+1
Ok guys.

Added wrinkle time.

I want to add in locks for the switches so that you can only throw them if they're unlocked. And I want to indicate to a dispatcher (through occupancy) when the switch is either "diverging" or the lock is unlocked.

The locks will take the form of a cover for the actual turnout control knob with a microswitch in it that is closed when the lid is open.

Think this type of setup:
[ Guests cannot view attachments ]

I ALSO want to indicate on the fascia when things are not lined up and locked up for the crews using a 12-24v LED.

I'm pretty sure that this circuit design is close to what I need, but I think I'm missing something and would be creating a short when the lid is open and the switch is lined for the main. Right?

[ Guests cannot view attachments ]

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 24095
  • Head Kino
  • Respect: +8039
    • Conrail 1285
Re: Simple DCC Detection Switch Position Sensing
« Reply #14 on: October 04, 2021, 10:00:17 AM »
+1
Ok. Getting closer. The light is lit when the switch is open.



So a big part of the next step arrived this week: enclosure parts, locks and microswitches.



Here's how the boxes are assembled. Obviously, when fascia mounted, they'll be a bit lower.



There's a satisfying "click" when you close em up far enough to trip the switch.

I'm waiting for the eye bolts that I'll be using with the locks to keep them closed.

In the meantime I need to finish up the circuits. I realized that I was right about the short that'd be created when the door is open and the switch is normalized. I believe I need a diode in there, like this, correct?



If that's the case, what do I need to know about diodes? I need to make sure that it's not creating a load when current is flowing through it because that'll trip the detection. That's possible, right?