Locodoco/Position Tracking: Unterschied zwischen den Versionen

Aus LaborWiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „== Intro == thumb|right|First prototype of the Waypoint transmitter built into the trackIn other model railroad automation …“)
 
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
__NOTOC__
== Intro ==
== Intro ==
[[Datei:Locodoco_Irsender_scheme.png|thumb|left|300px|Fig. 1: Waypoint transmitters in the track]]
[[Datei:Locodoco_Irsender_v1_top.jpg|thumb|right|First prototype of the Waypoint transmitter built into the track]]In other model railroad automation systems, track occupation detection is usually done by occupancy detectors that measure the resistance of the two rails - with magnets and reed contacts - or infrared light barriers. These devices either need some additional wiring back to the controller to give feedback or send their information back to the track - however they all aren't as portable and require extensive (and visible) modifications.
[[Datei:Locodoco_Irsender_v1_top.jpg|thumb|right|First prototype of the Waypoint transmitter built into the track]]In other model railroad automation systems, track occupation detection is usually done by occupancy detectors that measure the resistance of the two rails - with magnets and reed contacts - or infrared light barriers. These devices either need some additional wiring back to the controller to give feedback or send their information back to the track - however they all aren't as portable and require extensive (and visible) modifications.


Zeile 19: Zeile 22:
   [ 2b protocol type, 2b output number, 4b xor checksum | 16b ID Code ]
   [ 2b protocol type, 2b output number, 4b xor checksum | 16b ID Code ]


Assuming the range at which the loco passing the waypoint transmitter is in the correct position for receiving the sequence is 1cm and 32 bits are sent at each broadcast, the maximum speed at which the system can reliably (receiving >= 2 beacons while passing the point) receive information is 6m/s (=21.6 Km/h). - which is more than enough, even for the fastest trains.
Assuming the range at which the loco passing the waypoint transmitter is in the correct position for receiving the sequence is 1cm ('''d''' in Fig. 1) and 32 bits are sent at each broadcast, the maximum speed at which the system can reliably (receiving >= 2 beacons while passing the point) receive information is 6m/s (=21.6 Km/h). - which is more than enough, even for the fastest trains.


----
----


'''This Page is part of the [[Locodoco]] Project.''' [[Locodoco|Return to the Locodoco main page »]]
'''This Page is part of the [[Locodoco]] Project.''' [[Locodoco|Return to the Locodoco main page »]]

Version vom 3. August 2011, 16:44 Uhr


Intro

Fig. 1: Waypoint transmitters in the track
First prototype of the Waypoint transmitter built into the track

In other model railroad automation systems, track occupation detection is usually done by occupancy detectors that measure the resistance of the two rails - with magnets and reed contacts - or infrared light barriers. These devices either need some additional wiring back to the controller to give feedback or send their information back to the track - however they all aren't as portable and require extensive (and visible) modifications.

Since the Locodoco onboard decoder for the locos utilizes a radio transmitter anyway, it is possible for a loco to send this piece of information back to the controller itself. The locos are equipped with an infrared transceiver which makes them able to read the codes that the waypoint transmitters emit.

Waypoint Transmitter

view from the bottom: Attiny45 (left), 78L05 (right) and a bridge rectifier on the right

A waypoint transmitter consists of a tiny AVR microcontroller that continuously transmits the same sequence of bits while it is turned on. An infrared LED connected to one of the AVR's output drivers can be installed in turnouts and normal track to mark a position.

The waypoint transmitter fits underneath (or better said into) a single track brick of the standard LGB track and is visually almost completely hidden (just the transmitter diode peeking out). It consists of an infrared transceiver, an Attiny45 (or pin-compatible processor), a voltage regulator (78L05) and some capacitors. The device is designed to be powered by the track, which also makes it suitable for "mobile" track layouts.

Speed measurement

Given the distance of two waypoints is known and the speed of the loco is constant, one can measure how fast the loco is running. When making this distance very small, slight accelleration or decelleration of the loco running over the two points may be interpolated or ignored. The Waypoint Transmitter has some additional unconnected pins, which may be used for additional transmitter diodes sending a different code.

Protocol

Waypoint transmitters emit the code at a rate of 38400 bit/s. At each sequence, the waypoint transmitter sends out 24 bits containing its unique ID (16 bits) plus 8 additional bits that consist of the type of protocol and checksum. The overhead from the uart protocol adds 6 more bits (1 parity + 1 stop bit for each Byte sent).

In detail, the sequence looks as follows:

 [ 2b protocol type, 2b output number, 4b xor checksum | 16b ID Code ]

Assuming the range at which the loco passing the waypoint transmitter is in the correct position for receiving the sequence is 1cm (d in Fig. 1) and 32 bits are sent at each broadcast, the maximum speed at which the system can reliably (receiving >= 2 beacons while passing the point) receive information is 6m/s (=21.6 Km/h). - which is more than enough, even for the fastest trains.


This Page is part of the Locodoco Project. Return to the Locodoco main page »