User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

gca173-en [2018/11/12 08:56] (current)
Line 1: Line 1:
 +====== GCA173 Hall-sensor and/or reed-switch converter. ======
 +[[english|{{ ​ rocrail-logo-35.png}}]]
 +[[english|Content]] -> [[hardware-en|Hardware]] -> [[hardware-en#​interfaces|GCA]]
 +  *  [[mgv-overview-en|The GCA modules]] ​
 + \\
 +^^^^By Peter Giling ^^^^
 +===== Introduction =====
 +Quite a few systems are available now to detect the Loc, passing a certain area.\\
 +Most of them require extra construction inside a loc.\\
 +Sometimes, it is already available in the decoder, like Lissy or Railcom.\\
 +But to receive these messages, it requires quite some expensive hardware.\\
 +One other system , Maerklin'​s MFX is also nice, announcing the train to be on the track, but it does not give \\
 +any information about the exact position.\\
 +The wheel-counter **[[mgv141-en|GCA141]]** together with Rocrail, is a system that will tell you at least \\
 +that a train has entered completely into the block.\\
 +But then, placing the IR transmitter and receiver is a very precise job, maybe not easy to fix for everyone.\\
 +All the other systems do not give you any info about if the complete train has entered the block, without losing \\
 +some wagons or couches on the track.\\
 +This of course unless you will build-in Lissy transmitter ​ or an extra Railcom decoder and/or have the wagon/coach \\
 +equipped with some way of drawing current from the rails, where the current detection on the track will pass that information to the computer.\\
 +Reed-switches were very popular long before the digital era was emerged.\\
 +But due to the very limited possibilities of magnets, and the fact that faster running trains sometimes '​missed'​ the \\
 +reed-switch made the use of it less popular.\\
 +Even now, while we have many other ways of sensing the train on the track, a reed-switch might be sensible to use.\\
 +But we have a better, and much smaller option now :  Hall-sensors.\\
 +These sensors, like the **[[http://​​Sensoren/​TLE-4905L/​3/​index.html?;​ACTION=3;​LA=446;​ARTICLE=25717;​GROUPID=3190|TLE4905L]]** as described here, \\
 +are very small items, even usable for N-track, because this sensor only measures 4,2 x 3,3 x 1,5 mm.\\
 +It even can be inserted inside the gravel, making it totally invisible.\\
 +The other advantage we have now, is the availability of very strong and yet very small Neodynium magnets.\\
 +|  {{:​mgv:​hardware:​wendelsteiner_kieswerk_with_magnet.jpg?​500}} ​ |  {{:​mgv:​hardware:​5mm_cube_underneath_n-kipper.jpg?​500}} ​ |  {{:​mgv:​hardware:​tle4905_in_n-track.jpg?​500}} ​ |
 +|  An example of a very small 1x4x5 mm magnet under this Fleischmann N-track 781283 Loc  |  A small N-Track kipper with a (not glued !) 5mm cube magnet. ​ |  A TLE4905 hall-sensor fixed in an N-track testing circuit\\ It can be fixed between the leggers !  |
 +|  {{:​mgv:​hardware:​magnets_122.jpg?​500}} ​ |  {{:​mgv:​hardware:​hall_magnet_182.jpg?​500}} ​ | {{:​accessories:​pict5268.jpg?​500}} |
 +|  A small example of all different kinds of magnets available ​ |  A Roco NS24xx HO Loc with a 1 x 4 x 5mm magnet \\ Top middle is CAN-GC2 and \\ right top is GCA173 (prototype) connected to CAN-GC2 ​ |  One  other HO solution example ​ |
 +This sensor is 3-wire connected and could be connected directly to a CAN-GC2. or GCA50.\\
 +But why should we need this extra GCA173 ??\\
 +First of all the connection itself, This pc-board makes that much easier.\\
 +Than the pull-up ohm either GCA50 , CAN-GC2 or GCA-PI02 is 10K ohm, which should be much lower to have a solid distortion resistance.\\
 +Also a capacitor of minimum 47 nF is needed, conform the data-sheet.\\
 +CAN-GC2 needs pulses from feed-back with a minimum lengt of 25 mSec. For GCA50 even the minimum is 80 mSec.\\
 +The GCA-PI02 needs minimum of 10 mSec.\\
 +That makes them practically not suitable for this hall-sensor,​ or worse, a reed-contact.\\
 +To explain that  let us make some approximate calculations. **:** \\
 +If we have a distance of 5mm between magnet and hall-sensor,​ the magnet will activate the sensor for a length of approx. 7mm.\\
 +A HO train, running in scale 120 km/h runs in reality 380 mm per second.\\
 +If the sensor only '​sees'​ the magnet for a length of 7 mm, the time the sensor is activated is 7/380 = 0,018 SEC = 18 milliSec.\\
 +A pulse like that is bound to fail, because the pulse will be only 1/4 of what we need.\\
 +The CAN-GC2 and GCA-PI02 are better (=shorter) but still way too critical.\\
 +GCA173 is here to take care for that\\
 +It has connectors for 8 sensors, either hall-sensor or reed-switch.\\
 +A small and cheap microprocessor on GCA173 checks continuously all 8 inputs, and will react when one or more inputs are going low, to forward this signal to either GCA50 or CAN-GC2.\\
 +Even if the input is no more than 2 millisecs, the output will remain high for 150 milliseconds,​ assuring that the message is passed correctly to your LocoNet or Can-network.\\
 +The hall-sensor itself is much faster than that (approx 1 uSec), so the chance that a train will be '​missed',​ is 0%.\\
 +One other extra advantage of using the GCA173 as a buffer, is that we will have enough connections for all eights sensors.\\
 +In case of direct connection between CAN-GC2(GCA50) and 8 hall-sensors,​ you will have to combine all +5V and 0V connections of the sensors together.\\
 + \\
 +===== Features =====
 +  *  Easy connection of up to eight individual sensors and or reed switches.\\
 +  *  Each input will be passed through with a minimum pulse length of 100 mSec.\\
 +  *  Low impedance input takes care for high distorsion immunity.\\
 +  *  Even for reed-switches , the low input current is exactly right, to keep the reed-switch in good shape.\\
 +  *  1 cable connection to GCA50 / CAN-GC2, which also feeds this board with 5 Volt.\\
 +  *  Very low power consumption when all inputs are inactive.\\
 +  *  Led signal on each individual input to simplify testing.\\
 +===== Counting Rolling stock =====
 +The big advantage of this system is the fact that you will be able to detect if the train has entered completely into the block.\\
 +As you are used from Rocrail, this fabulous program also does have a standard setting for this sensor, called 'Wheel counter'​.\\
 +Except here we are not counting wheels but Magnets. But the result will be the same.\\
 +At least two magnets should be mounted under the train, the last one under the last wagon.\\
 +When these magnets have announced themselves on entering the target block, the conclusion is safe to assume that  \\
 +nothing is left behind in a tunnel or shadow station, so the computer will proceed with clearing the used route and use it again.\\
 +The sensor itself will be programmed as **[[:​sensor-int-en#​type|'​wheel-counter'​]]** in Rocrail.\\
 +Rocrail will automatically use this counter after the first initiation, and take over this info,\\
 +If you like, more than one extra  magnet is an option, even different trains with different number of magnets is an option.\\
 +With that installed you could even distinguish which train did come in, but that is an option, not yet available in Rocrail. (Is not planned.)\\
 +Commuting trains should be equipped with at least two magnets, so sensors will work in both directions,​\\
 +and make the train stop at the first detected magnet.\\
 +===== One other interesting option with these sensors: =====
 +Using Loc-combinations,​ where one is a s.c. '​dummy-loc',​ which is not taking any current from the track, this combination might stop too late, where current detection is used and the dummy is in front.\\
 +The use of two magnets -one at each front- will solve this problem simple and easy.\\
 + \\
 +===== Handling in Rocrail =====
 +Rocrail compares the counted wagons from the **From** with the **To** block:
 +  * No comparison is done when one or both blocks are reporting zero.
 +  * Normal (done by the "​enter"​ sensor) processing in case the **To** blocks reports equal or more than the **From** block.
 +  * In case the **To** block reports less then the **From** block the loco is cancelled from auto mode and the **From** block is closed.
 +  * After the lost material is connected to the train again, the **From** block can be set to action, and the train can be re-activated to auto mode.
 +===== Boards available =====
 +A nice double sided board, with through hole metallisation and silkscreen print is available now.\\
 +===== Magnets =====
 +A large variety of magnets is available from​
 +^  Type  ^  Size  ^
 +|  1  |  Rod 4mm ∅ length 12,5 mm  |
 +|  2  |  Rod 4mm ∅ length 10 mm  |   
 +|  3  |  Rod 3mm ∅ length 8 mm  |   
 +|  4  |  Rod 3mm ∅ length 6 mm  |   
 +|  5  |  Disc 5mm ∅ high 3 mm  |   
 +|  6  |  Cube 5mm  |   
 +|  7  |  Plate 5 x 4 x 1.5 mm  |   
 +|  8  |  Plate 5 x 4 x 1 mm  |
 +|  9  |  Plate 5 x 2,5 x 1,5 mm  |
 +|  10  |  Plate 5 x 1,5 x 1 mm  |
 +|  11  |  Plate 10 x 4 x 1 mm  |
 +\\  ​
 +Magnets are only sold in sets of 8 pcs per size.\\
 +===== Correct position of magnets =====
 +Magnets have two poles, of which only one will activate the sensor.\\
 +Before putting magnets on your rolling stock, please check the correct position.\\
 +This can be done by checking with a sensor itself.\\
 +Sensors should be with marked (rounded) side facing towards the magnets.\\
 +===== Safety precautions =====
 +//**These very strong NeoDynium magnets are no toys !!!!!**//\\
 +In principle they are safe by itself, but please be careful with these magnets , do not allow children play with it.\\
 +There are quite a few safety remarks, downloadable here : {{http://​​eng/​safety.pdf|Neodyne safety precautions}}
 +===== Connection Hall sensor =====
 +The connection wires between Hallsensor and GCA173 can be up to 6' or 2 meter.\\
 +Please be careful not to feed those wires parallel with rails and rail wires.\\
 +A bit of twisting these wires will inprove protection to any distorsion.\\
 +If that is inevitable, keep a distance of 4''​ (10cm).\\
 +Straight angle crossing is no problem.\\
 +Below you can download a drawing of hallsensor connection.\\
 +{{:​mgv:​hardware:​connection_tle4905.pdf|How to connect TLE4905L hallsensor}}\\
 +The #1 leg of the tle4905 connects with #1 connector to the gca173, the "​1"​ inscribed on the psk-connector facilitates the correct installation!
 +===== Connection to reed-switch =====
 +Allthough GCA173 can work fine with reed-switch as wel, the option for wheel counter is NOT applicable.\\
 +This due to the fact the the number of pulses, generated on the passing of a magnet is never the same, and unpredictable.\\
 +{{:​mgv:​hardware:​connection_reed-switch.pdf|connection to reed-switch}}\\
 +===== Cable to GCA50 / CAN-GC2 / CAN-GC4 =====
 +refer to:  ​
 +[[PSK-Interface connections-en|**Connection interfaces**]]\\
 +===== Connection table of J1 =====
 +^  J1 pin#  ^  Function ​ ^  Remark ​ ^
 +|  1  |  +5V  |  Supply GCA173 ​ |
 +|  2  |  0V/​GND ​ |  Supply GCA173 ​ |
 +|  3  |  Hall1  | output sensor 1  |
 +|  4  |  Hall2  |  output sensor 2  |
 +|  5  |  Hall3  |  output sensor 3  |
 +|  6  |  Hall4  |  output sensor 4  |
 +|  7  |  Hall5  |  output sensor 5  |
 +|  8  |  Hall6  |  output sensor 6  |
 +|  9  |  Hall7  |  output sensor 7  |
 +|  10  |  Hall8  |  output sensor 8  |
 +===== Hardware =====
 +|{{:​mgv:​hardware:​gca173_sch.pdf|The schematics}}|
 +|{{:​mgv:​hardware:​gca173_pcb.pdf|The pcb and parts positions}}|
 +|{{:​mgv:​hardware:​gca173_parts.pdf|The partslist}}|
 +|{{:​mgv:​hardware:​|The Gerber files}}|
 +^N.B. Self made pc-boards are not supported! ^  ​
 +===== Firmware =====
 +This latest 1_4 version is published, because it has a more accurate timing before resetting the output.\\
 +Timing is close to 80 mSec.\\ ​
 +Version 1_5 has a better startup sequence. It will send all actual sensor positions\\
 +===== Pictures from satisfied customers =====
 +|  {{:​mgv:​hardware:​img_0728.png?​400}} ​ |  {{:​mgv:​hardware:​img_0729.png?​400}} ​ |  {{:​mgv:​hardware:​img_0731.png?​400}} ​ |
 +|  3 wires connected to sensor \\ middle wire isolated ​ |  Drill hole 4,5 mm between sleepers ​ \\  feed sensor through hole \\  bend wires down ( round head sensor at top side ) and fix sensor ​ |  a first functional test with 5 volt \\ connected from any adapter ​  |
gca173-en.txt · Last modified: 2018/11/12 08:56 (external edit)