Measuring the Speed and Acceleration of a Loco

Robert Gauld

This article is an amalgamation (and re-edit) of two articles which I wrote for the MERG newsletter (August 05 & November 05?). I've made an excel file which does the maths and displays the intermediate values, download it (13.5 KB).

Wanting to occasionally double head locos using DCC the setting of speed steps to coincide with the same speed from one to the other is vital. This idea expands on a simple method of measuring speed. Here two light gates are placed a known distance (say 1m) apart and the time between the first gate being activated and the second being activated is measured. We then divide the distance by the time and get the speed. For increased accuracy simply increase the distance between the light gates, however you need to be careful that your timing system can cope with the larger numbers (especially for low speeds).

The Setup

The setup is based on three light gates placed equi-distant apart. Fig. 1 shows this setup. I've also labelled (using the symbols below and subscripts) the vales at five points - the three light gates (A, B and C) and the point halfway (by time NOT distance) between each pair (1 and 2).

Diagram of the setup

Where a is the acceleration, x the distance travelled, t the time taken and v is speed.

Assumptions

I'll assume that acceleration is constant. It should be noted that by adding another light gate and/or using more in-depth maths the case of non-constant acceleration can be treated.

The Maths

Calculating the average speed of an object between two point is relatively simple, take the distance travelled and divide it by time (v = d ÷ t). Assuming the distance is in metres and the time in seconds the speed will be in metres per second. If we do this between light gates A and B and again between light gates B and C then we have two speeds.

Going from these two speeds to an acceleration is also easy, acceleration is simply the change in speed divided by the time taken (a = Δv ÷ t). The change in speed is easy enough to work out (1st speed minus 2nd speed) but which time do we use? Well as we are working out average speeds and assuming constant acceleration, the loco is travelling at the calculated average speed when it is half way (time wise) between the two light gates. So the time we need is half of time 1 added to half of time 2 - or their average.

Final Thoughts

Note that the PIC, PC or whatever doing the maths only needs to be programmed with two constants:

  • x - the distance (in meters) between light gates
  • the scale multiplier (see table 1)
Table 1: Multipliers for different scales
Scale Multiplier
1:1 2.237
1:43 7mm O 96.19
1:72 4mm OO 161.1
1:148 2mm N 331.1