Detection with a reed switch and a magnet. Experiences?

Bereich für alle Themen rund um Digitaltechnik und digitale Umbauten.
Antworten

Threadersteller
RudyB
InterRegio (IR)
Beiträge: 203
Registriert: Sa 20. Sep 2014, 10:18

Detection with a reed switch and a magnet. Experiences?

#1

Beitrag von RudyB »

Today I tried occupancy detection with a reed switch and a small magnet under the loc. Results seemed OK.

Link to the video.

Although current sensing probably is the most used detection method, I like to try some other methods too before I make up my mind what to use with my near-future layout.

At this moment chances are 80% That I'm going to use an Arduino for S88 sensor feedback, simply because of its low cost. In that case current sensing is not the most easy, because some additional current detection PCB's will be needed, which will also raise cost again. Optical or magnetic detection are easier and more cost efficient.

The drawback is that there will always be a sensor in view, somewhere besides or between the rails. Some will not like the view or will find it non-realistic. To me this is not a big factor though, since I'm not that much of a 'prototypical purist' ... more a 'technical tinkerer'. :) Both the optical sensor as well s a reed switch (10 x 2 mm) will fit neatly between the rails, not really that much noticeable.

A reed switch needs only 2 wires, while an IR sensor needs 3. So, that might make me turn to the reed switches as train detection method.

Chances are that (many?) forum members also tried these detection methods, or even use them in practice? I'm curious about experiences ... good or bad ... and if there are any tips ... or any pitfalls?
Stahlbahn
Ehemaliger Benutzer

Re: Detection with a reed switch and a magnet. Experiences?

#2

Beitrag von Stahlbahn »

Been there, done that. 20 yrs. ago. Reed switchs are ok for speedometers or anything else when you need a short impulse. And if your going to equip every loco with magnet. For track occupany current detection is the best way. The additional costs are affordable, if one uses DIY circuits instead of out-of-the-box solutions. I would never go back to reeds for that purpose.

Frank

Threadersteller
RudyB
InterRegio (IR)
Beiträge: 203
Registriert: Sa 20. Sep 2014, 10:18

Re: Detection with a reed switch and a magnet. Experiences?

#3

Beitrag von RudyB »

Thx Frank for your reply.

I hear you say ...'For track occupany current detection is the best way" ... but could you maybe elaborate a bit on the reasons why? Besides from having to put a magnet on every train ... that is obvious ... what were the troubles that made you change from reed switches to current sensing?
spielbahn
Ehemaliger Benutzer

Re: Detection with a reed switch and a magnet. Experiences?

#4

Beitrag von spielbahn »

Reed switches control one point but current sensors will control a whole track.
Stahlbahn
Ehemaliger Benutzer

Re: Detection with a reed switch and a magnet. Experiences?

#5

Beitrag von Stahlbahn »

spielbahn hat geschrieben:Reed switches control one point but current sensors will control a whole track.
Yes, that's it.

Train arrives in staging yard and ze loco's magnet activates the reed switch for a short moment. After that, the switch opens again. Your control systems recognizes that and shifts track status to "occupied". OK. Then operating is finish, power is shut off and the control system loses its memory. Next day, either all tracks are occupied or free, depending on the system's default value. Apart from that, removing or adding a train manually isn't detected either..

To sum up, that approach is not reliable and therefore too expensive.

Frank

BTW: I changed to current sensors when introducing DCC and softwar control.

Bild

Threadersteller
RudyB
InterRegio (IR)
Beiträge: 203
Registriert: Sa 20. Sep 2014, 10:18

Re: Detection with a reed switch and a magnet. Experiences?

#6

Beitrag von RudyB »

I see ... yes of course that is an important point to consider. So, the computer control does not save its status when closing down in order to start up with that same staus at next powerup? In stead it reads out where the trains are? Which computer control program are you referring to?

That's a neat piece of wiring you have there Frank!

Rio
InterRegioExpress (IRE)
Beiträge: 295
Registriert: So 20. Mär 2011, 14:24
Nenngröße: H0
Stromart: digital
Steuerung: ECoS 2, TC Gold 8
Gleise: Märklin C-Gleis
Wohnort: Rio de Janeiro, Brasilien
Alter: 75
Brasilien

Re: Detection with a reed switch and a magnet. Experiences?

#7

Beitrag von Rio »

Hy Rudy,
I had reed contacts which worked reasonably. My problem with Mä C-Track: as there is no room inbetween rails (without cutting the track bed) I had to position the reeds on the outer side of track. This in turn made it kind of difficult to hide the Magnets on the locos. I also noticed some magnetisation of the switches. If I ran the switch open, the switch blade sometimes "glued" in the "wrong" position. Switching usually corrected it but until than, the train in the other direction ended up on the wrong track... BTW: used the reeds to activate switches analogically.

Regards
Klaus

Threadersteller
RudyB
InterRegio (IR)
Beiträge: 203
Registriert: Sa 20. Sep 2014, 10:18

Re: Detection with a reed switch and a magnet. Experiences?

#8

Beitrag von RudyB »

Thx for your reply Klaus. Yes ... it is not possible to hide the reed between the rails with some kinds of set track. Roco has a special rail where a reed is hidden inside a hollow sleeper, a nice solution. I plan to use Peco HO 75, there is room between the sleepers.

The sticking of the contacts indeed is a known issue. Sometimes it can be residual magnetism, but that actually means the reed is faulty. More often it has to do with current flow. Either too high or too low a current can cause sticking.
Stahlbahn
Ehemaliger Benutzer

Re: Detection with a reed switch and a magnet. Experiences?

#9

Beitrag von Stahlbahn »

RudyB hat geschrieben:The sticking of the contacts indeed is a known issue. Sometimes it can be residual magnetism, but that actually means the reed is faulty. More often it has to do with current flow. Either too high or too low a current can cause sticking.
For that reason I never connected reed contacts directly to turnout motors but installed a small circuit (basically a transistor, a flip-flop and a relay) to protect the reed contacts - especially when the contacts were located in hard-to-reach positions. From that point of view, current detection would cost the same or maybe even cheaper. Downside: current detection should be installed during track laying. It may be difficult to do the extra track isolation and wiring afterwards.

Frank
Benutzeravatar

shaddowcanyon
InterCity (IC)
Beiträge: 913
Registriert: So 27. Apr 2014, 17:23
Nenngröße: H0
Stromart: digital
Steuerung: CU 6021
Gleise: Märklin K-Gleis
Kontaktdaten:
Deutschland

Re: Detection with a reed switch and a magnet. Experiences?

#10

Beitrag von shaddowcanyon »

Hello,

I am using reed-switches on my layout as well. The specific advantage is that there is one, and only one specific position at each train - where the magnet is mounted - that triggers the reed relay. One side of the reed relay is connected to track mass (Within the 3-rail-system it's quite natural to do so), so there is only one wire per reed contact. Another advantage is that I can change the contact position very easily, without removing any tracks or ballast from the layout.

As Frank has already pointed out: the reed contact only creates one short impulse, and the information on track occupancy may be lost after layout shutdown. For this reason I always use reed contacts in connection with bistable relays. These relays keep their state when the layout is off. For track occupancy detection you need two reed contacts: one at the beginning and one at the end of the respective track section. I use this principle also for automatic block control.

One other thing is what happens when you remove a train from the respective track section by hand. I usually avoid to do this, and when I really need to do, I drive the train to a better accessible part of the main line. Further, I have connected something like a signal (actually it's 2 LEDs on a mast situated at the beginning of the track section) which indicates the present state of the relay. It's a nice optical feature and you are informed on that what the track occupancy bookkeeper believes.

Another point is that I mount the reed contacts on the right side of the track (seen in driving direction), not in the center between the rails. This offers the opportunity to make the contact sensitive to train direction, and it makes the mounting of the reed contact easier.

And yes, I never connect a Märklin turnout motor (7549 etc.) directly to a reed contact. The electro magnet inside these motors needs 1 A of current. Much more than miniature reed contacts can safely supply. There is always a pulse forming electronics and a power relay in between.

Best regards

Hans Martin
The Presidents, Chief Engineers, Finance Directors, Baggage Porters, and Yard Sweepers
of the Benton Valley Railroad Line : https://www.stummiforum.de/viewtopic.php?f=64&t=109585

Les Aventures du Chasseur Noir
https://www.stummiforum.de/viewtopic.php?f=168&t=138761

Threadersteller
RudyB
InterRegio (IR)
Beiträge: 203
Registriert: Sa 20. Sep 2014, 10:18

Re: Detection with a reed switch and a magnet. Experiences?

#11

Beitrag von RudyB »

Thx for your extensive reply Hans Martin. Seems with all the additional circuitry you have in use in the end it's not cheaper (maybe even more expensive) then current detction. But, like you, I do like the flexibility to be able to move sensors around a bot during the testing phase. With current detection that is not very easy to do.

Rio
InterRegioExpress (IRE)
Beiträge: 295
Registriert: So 20. Mär 2011, 14:24
Nenngröße: H0
Stromart: digital
Steuerung: ECoS 2, TC Gold 8
Gleise: Märklin C-Gleis
Wohnort: Rio de Janeiro, Brasilien
Alter: 75
Brasilien

Re: Detection with a reed switch and a magnet. Experiences?

#12

Beitrag von Rio »

Hi Rudy and others.

Apparently my experience was not correctly understood. Let me try again.

I meant to say: The magnets attached to the locos magnetize the moving parts of the turnouts, after some time of operation. This may cause problems, as the magnets on the locos or even wheels cutting turnouts open moved the needle (moving part of the turnouts / crossing / rail) to another position without interference of the electromagnetic activator (Reed, servo, actuator, etc). The small spring force to return the moving part to its original position was not always strong enough to overcome the acquired magnetic attraction force and return it to its original position.
I use c-tracks.

Regards

Klaus
Benutzeravatar

shaddowcanyon
InterCity (IC)
Beiträge: 913
Registriert: So 27. Apr 2014, 17:23
Nenngröße: H0
Stromart: digital
Steuerung: CU 6021
Gleise: Märklin K-Gleis
Kontaktdaten:
Deutschland

Re: Detection with a reed switch and a magnet. Experiences?

#13

Beitrag von shaddowcanyon »

Hallo Klaus,

Yes, what you said is an issue. The moving parts of the turnouts may be magnetized, and the magnetized turnouts do not work reliable. This is one reason why I placed the reed contact besides, not between the rails on my layout. The reed relay is oriented parallel (not perpendicular) to the track, and so is the magnetization direction of the magnet. I had the problems you described as well, but placing the magnets outside the track did solve the problem so far. In this case the magnets are always far enough apart from the turnout tongue and spring (I use K-track, and the spring is simply a elastic bar made of plastics, so I guess it's the tongue that adheres at the rails when it is magnetized). With my modified arrangement I never had any difficulties. Best solution would be if they made the turnout tongues of non-magnetic materials, e.g. brass.

Regards

Hans Martin
The Presidents, Chief Engineers, Finance Directors, Baggage Porters, and Yard Sweepers
of the Benton Valley Railroad Line : https://www.stummiforum.de/viewtopic.php?f=64&t=109585

Les Aventures du Chasseur Noir
https://www.stummiforum.de/viewtopic.php?f=168&t=138761

GDT518
InterCity (IC)
Beiträge: 546
Registriert: Fr 31. Mai 2013, 01:53
Nenngröße: H0
Stromart: DC
Steuerung: Piko Smart Control
Gleise: Tillig + Weinert
Alter: 40
Deutschland

Re: Detection with a reed switch and a magnet. Experiences?

#14

Beitrag von GDT518 »

Hey Rudy,

I'm testing Hall sensor right now, I position them beside the track, just like the "indusi" used by the DB. The Indusi a the loco will be milled to make room for the 0.5mm think N52 magnets. I got some prototypes running already, up to know they work without any problems. Advantage is that you do not have any wear-out, the hall sensor is fully electronic, no mechanical parts.

Greetings from Chicago

Leif
Grüße aus Chicago

Leif

Meine Modellbahnbaustelle: http://www.stummiforum.de/viewtopic.php?f=64&t=114182
jakeman103
Ehemaliger Benutzer

Re: Detection with a reed switch and a magnet. Experiences?

#15

Beitrag von jakeman103 »

Hello railers,

I tried reed sensors as well on a N gauge track and exactly the same errors; magnetic turn outs doing ghost manouvres at times you really don't want. In the end i used for my 3rail layout loconet s88 detection and used the reed contacts only for the Faller Car system / MCC control detection. Now for my TT layout i use current detection platines from
Hans de loof, and the costs and reliabillity is highly considerable. Also; let's say you want to control your layout with iTrain or Rocrail or Windigipet; computers will notice on wich track trains are placed after you shut down and restart at the beginning of a train day, once there is power on the tracks; the trains use current. If you use reed contacts and a magnet you need to drive all trains manually to their start piont were the reed switch will turn before you system again knows were all your trains are. So; i would say; all the magnetic troubles and insecure moments on you layout.. avoid the magnets and reed contacts and the bit higher costs are much more worth instead of the annoying moments having no fun with your layout and trains when ghost manouvres switch turnouts trains will clash or loose track and crash from your layout board on the ground, as they once did on my layout.

Succes! Greets Jake

Heinzi
Metropolitan (MET)
Beiträge: 4282
Registriert: Mi 26. Apr 2006, 11:59
Wohnort: Schweiz

Re: Detection with a reed switch and a magnet. Experiences?

#16

Beitrag von Heinzi »

Reed switches control one point but current sensors will control a whole track.
Not only this.....
Reed switches controls only the loco, and not the attached "wagons". If you prepare the wheels of the wagons, current sensing can also detect wagons.

As far as I untersdood Hans Martin the reed switch has either to be palced in the midle of the track (and it needs two contacts) or beside the tracks (than it needs four contacts.)
Gruss Heinzi
------------------
CS1R / ControlGui
Benutzeravatar

shaddowcanyon
InterCity (IC)
Beiträge: 913
Registriert: So 27. Apr 2014, 17:23
Nenngröße: H0
Stromart: digital
Steuerung: CU 6021
Gleise: Märklin K-Gleis
Kontaktdaten:
Deutschland

Re: Detection with a reed switch and a magnet. Experiences?

#17

Beitrag von shaddowcanyon »

Hello all,

Images tell more than 1000 words, so I took my camera:

This is how I have mounted a reed contact besides the rails (at the right side seen in driving direction):

Bild

One side of the reed contact is connected to the rails (i.e to ground potential), the other contact goes to a relay, a signal or whatever electronics. It looks like an Indusi, indeed. Concerning C- or K-track from Maerkin, which have rails made of magnetic material, there are two important points: 1. leave a gap of few millimeters between the reed contact and the rail. 2. The connecting wire between the pin of the reed contact and the grounding rail should be made of non-magnetic material (copper or brass, not steel). Otherwise the remanent magnetic field from the rail will eventually branch to the reed contact through that wire, so the contact will "hang"after some time. There is no such issue if one uses tracks with non-magnetic rails.

Here an image how a magnet could be attached to a locomotive:

Bild

I use tiny supermagnets for this purpose (only few millimeters in size). This one here fitted in a small gap on the fuel tank of the diesel. On other locomotives I found mounting at the trucks more suitable.

Regards

Hans Martin
The Presidents, Chief Engineers, Finance Directors, Baggage Porters, and Yard Sweepers
of the Benton Valley Railroad Line : https://www.stummiforum.de/viewtopic.php?f=64&t=109585

Les Aventures du Chasseur Noir
https://www.stummiforum.de/viewtopic.php?f=168&t=138761

Threadersteller
RudyB
InterRegio (IR)
Beiträge: 203
Registriert: Sa 20. Sep 2014, 10:18

Re: Detection with a reed switch and a magnet. Experiences?

#18

Beitrag von RudyB »

Those are very nice pictures Hans!

I had to laugh on what you said about the magnet: 'This one here ...'.
This one where? :)
Probably the pcture shows the magnet, but it only catches the eye when you know where it is!
Benutzeravatar

shaddowcanyon
InterCity (IC)
Beiträge: 913
Registriert: So 27. Apr 2014, 17:23
Nenngröße: H0
Stromart: digital
Steuerung: CU 6021
Gleise: Märklin K-Gleis
Kontaktdaten:
Deutschland

Re: Detection with a reed switch and a magnet. Experiences?

#19

Beitrag von shaddowcanyon »

Oh, sorry!

The magnet is this tiny rectangular metal piece located close to the bottom of the grey part of the loco body between the trucks, just at the upper left edge of the reed contact (the part labeled as "MS06"). The magnet is a 5 x 5 x 1.5 mm neodymium (or "super") magnet.

Regards

Hans Martin
The Presidents, Chief Engineers, Finance Directors, Baggage Porters, and Yard Sweepers
of the Benton Valley Railroad Line : https://www.stummiforum.de/viewtopic.php?f=64&t=109585

Les Aventures du Chasseur Noir
https://www.stummiforum.de/viewtopic.php?f=168&t=138761
Antworten

Zurück zu „Digital“