Documentation : Hardware | Software | Tutorials    Wardrobe : Jackets | Applications
Papers : Notes | Proposals | Research    Administration : Stock | Minutes | Progress

Indoor Location Sensing - Page under development!

This report describes a low cost indoor location sensing system based on an updated Pinger design and ultrasonic transmitters. It uses four ceiling mounted transmitters to provide coverage over a 8m x 8m area. As well as determining position within a room, it is designed to enable a wearable computer to determine the relevant web server for a building, and which floor and room the user is in. It is not designed as a tracking system, but could easily be extended to provide this facility.

lcups.gif (5897 bytes)


There are three technologies commonly used for indoor location systems - ultrasonics, infrared and R.F. These can be supplemented by inertial systems which are generally used for prediction. Infrared systems tend to rely on the user taking explicit actions to identify their presence; and R.F. systems require sophisticated (and often cumbersome) aerials - ultrasonics offer a low cost solution which can operate without any user interaction. The disadvantages of an ultrasonic system are loss of signal due to obstruction; false signals due to reflections; and interference from high frequency sounds such as keys jangling, rustling paper etc. These disadvantages can be minimised and systems produced by commercial suppliers such as Intersense and AT&T have successfully implemented ultrasonic location detection with impressive results. These commercial systems are too expensive for use by the average researcher - typically costing over 10,000. We describe a system which can be implemented for around 100, and gives results which can be used for a variety of purposes.



Four ultrasonic transmitters are mounted, facing vertically downwards, on the ceiling of the room to be covered. They are placed at the corners of a 2m square (see fig.1). They are connected to a battery powered transmitter module which contains the ultrasonic drivers, a microcontroller and a RF transmitter.

fig. 1 - Room Layout

(view the actual MiniMack test room)


Position determining systems require three measurements to determine location in a 3D space. Triangulation applied to these measurements produces the required coordinates. In this system we use a R.F. signal - or 'ping' - as a synchronising pulse followed by four precisely timed ultrasonic signals - or 'chirps' - which enable the distances to four transmitters to be determined. We use four to increase the range of the system and to compensate for occasions when one signal is lost - it also considerably simplifies the geometric calculations.

uspingtm.gif (5064 bytes)

The ping consists of an eight byte packet containing a identifier byte, an I.P. address, floor and room number bytes and a spare byte which can be dynamically assignable to assist with two way communication e.g. for a tracking system which requires each new user entering the room to register with the system by echoing an identifiable byte. A 418MHz F.M. transmitter is used along with a Milford Instruments NKM2401 chip which encodes the eight bytes.

The chirps consist of 48 cycles - ~1ms - of 40kHz generated by a PIC16F84 at precise times as shown in the timing diagram above. We use 48 cycles/1ms chirps as we have found that we achieve maximum sound levels after 48 cycles; 1ms of signal is also relatively easy to identify using simple test equipment. Theoretically it should be possible to reduce this to ~3 cycles however we have not tested this (yet!). Polaroid 'L' series open face piezo transducers (see order) have been selected to give optimum results. These devices provide the widest possible transmission angle combined with high sensitivity(rx)/high output(tx). Maplin also supply devices (with a poorer range) and Farnell supply alternatives including miniature devices which may be appropriate where aesthetics are a consideration. Another option is to use enclosed devices (k-series also manufactered by Polaroid) - these are particularly suitable for adverse environments, though the transmitter sound levels are 18dB down compared to open devices.


Construction | Program

A PIC16F84 microcontroller is programmed to generate the 8 byte code at 2,400bps, as well as the chirps. A 10MHz crystal provides stability as well as fine control over the timing of the signals. The NKM2401 calculates a checksum on the eight bytes before Manchester coding them, and then passing the packet containing a header, the code and the checksum for transmission by the TX2-5v RadioMetrix module.

pingloc.gif (11370 

The ultrasonic output stages are designed to use the full 18v supply rail without regulation. The BC141 has been selected as a suitable medium power transistor without very high gain which might cause unwanted ringing. The ultrasonic transducers have not been specially selected - though we intend to carry out further research into their properties once alternative suppliers can be found. In particular we are searching for transducers with the widest possible transmission angles.

n.b. A test signal, "TEST 123", is generated when Pin 5 on the NKM2401 is grounded. If this function is required, a push-to-test switch can be inserted between this pin and 0v.


Construction | Program | Compass

The receiver uses a matching RX2 and NKM2401 to receive and decode the eight byte packet. This is passed to another PIC16F84 which uses the packet as a timing reference for the ultrasonic chirps. Though it is possible to connect an ultrasonic receiver transducer directly to a PIC using a self biasing arrangement, we have chosed to use a dual op amp - a LM358 - to provide additional control over how the incoming signal is processed. After experimenting with multiple devices, envelope detection, bandpass filters and various gain settings we have opted for the simple arrangement shown in the diagram below. We found that multiple devices were prone to picking up reflections; envelope detection introduced both delay and uncertainty; and bandpass filters were unnecessary as the sensing device is highly resonant.

ping_rx.gif (12258 bytes)

The PIC is programmed to measure the number of 100us delay units occuring between transmission and reception of each chirp. These delay units correspond to 3.4cm, giving an optimum resolution of 3.4cm one metre below the centre of the transmitter square. The delay units are combined with the eight bytes from the pinger and passed through a DS275 RS232 level convertor at 2,400bps to a RS232 output. The output string consists of 14 unsigned chars: "R:P:IP1:IP2:IP3:IP4:Floor:Room:Spare:DLA1:DLA2:DLA3:DLA4:Spare", repeated at a rate of ~2Hz.

A MkII version is under development incorporating a Precision Navigation Vector 2X electronic compass. Two additional output bytes are generated indicating magnetic heading. The opportunity has also been taken to considerably reduce battery consumption by switching off the R.F. receiver while the chirps are being received.

Legal Requirements (R.F. Transmitter)

Conformance to MPT1340 requires that:

  1. "All transmitters shall use integral antennas only. Receivers may use an external antenna or an integral antenna". In this specification, an integral antenna is defined as one which is designed to be connected permanently to the transmitter or receiver without use of an external feeder. (MPT1340 Dec 1987).
  2. The equipment in which the module is used MUST carry an inspection mark located on the outside of the equipment and be clearly visible. The minimum dimensions of the inspection mark shall be 10x15mm, the letter and figure height must be no less than 2mm. The wording shall read "MPT1340 W.T. LICENCE EXEMPT".
  3. The trimmer control on the module must not be easily accessible to the end user. This control is factory set and must never be adjusted.

MPT1340 is the type approval specification issued by the RA (DTI) and may be obtained from the RA's library service on 0171 215 2072.


Work is contiuning on deriving the most appropriate data analysis algorithms for our applications. Listed below are some of the techniques that have been employed:-

Figure 4, below, shows 100 readings obtained when the receiver was placed at x=0, y=0. The maximum error is 10cm - with the 95% accuracy of below 7cm.

origin.gif (6897 bytes)

fig. 4 - Readings at Origin - x/y in mm

Figure 5, below, shows readings taken around a 4.2m x 6.4m test room. The receiver was placed at x = -1.2,0,+1.2; y=-1,0,+1,+2,+3,+4. Errors can clearly be seen due to the misalignment of the transmitters and receivers (x = +/-1.2); and secondly due to signal loss (y=4).(n.b. y is horizontal axis).

roomplot.gif (9855 bytes)

fig. 5 - Test Room coverage - x/y in mm


Treasure Hunt, Lens, Museums ....

UCL Workshop

Nottingham Atrium: plan & cabling | anticipated coverage | PingLoc6.asm | Ping_Rx6.asm

Glasgow: Mack Room | Vee's Jacket | Test Tour




It works! Ceiling height is critical. Good for locating virtual objects - not so good for augmented reality.

This page last updated April 23, 2002
The material displayed is provided 'as is'. Contents may not be reused without prior permission.
For problems or questions regarding this web contact Cliff Randell.