A sports altimeter is required which provides the following information to the user:
A fully configured sports altimeter will include a barometer unit which records atmospheric pressure, an altimeter unit which records height above sea level, a variometer which records the current vertical speed and a timer unit which records trip duration.
After system reset or power on, the altimeter will show atmospheric pressure on the 8-character display. Pressing the Mode button causes the altimeter to cycle through the following modes:
The barometer is required to display the atmospheric pressure derived from the pressure sensor module.
The units of measurement for atmospheric pressure should be millibars (mb).
The following figure shows the expected output on the 8-character display for a atmospheric pressure of 1013mb.
The units of measurement altitude should be metres (m).
The following figure shows the expected output on the seven-segment display for a height of 8849m above sea level.
The trip timer is required to display the cumulative time for a journey.
The trip timer will be zeroed at power on by an RC circuit which will operate the system reset. The trip timer will also be zeroed whenever the Trip button is pressed. (N.B. This causes a SYNCHRONOUS resetting of this unit and is totally separate from the nReset input that causes an ASYNCHRONOUS reset of all registers).
The units of measurement for time should be hours, minutes and seconds.
The following figure shows the expected output on the seven-segment display for a trip time of 1 hour, 59 minutes and 30 seconds.
Note that the trip timer and the trip button are most useful when they support the display of additional measurements related to a trip.
The units of measurement for vertical speed should be metres per second (m/s).
The following figure shows the expected output on the seven-segment display for a vertical speed of -0.08m/s (note that a negative value here indicates descent rather than ascent)
Typically aerial sports (e.g. skydiving) require a larger range of vertical speed than mountain sports (e.g. skiing or hill walking). Aerial sports also involve much greater acceleration and hence require more rapid update of the display. On the other hand, mountain sports require a higher resolution and a stable display. An altimeter designed both for aerial sports and mountain sports will need to seemlessly support all of these the requirements.
At power on, the sports altimeter should assume that the atmospheric pressure at sea level is 1013.25mb. With knowledge of the atmospheric pressure at sea level and the atmospheric pressure at the current location, it is possible to perform a calculation to estimate the altitude.
Note that many embedded systems will avoid the use of complex calculations using floating point numbers because these need a lot of resources and are slow. Instead, integer calculations are preferred along with the use of approximation techniques such as look-up tables and interpolation.
A fully configured sports altimeter will include the ability to set the atmospheric pressure at sea level. Sea level pressure initialisation is achieved by pressing the Trip and Mode buttons simultaneously in the atmospheric pressure display mode. There are six sub-states withinthis mode:
A fully configured sports altimeter will include the ability to set the current altitude (this offers an alternative method of calibrating the system to take account of changes in the atmospheric pressure at sea level). The altitude initialisation is achieved by pressing the Trip and Mode buttons simultaneously in the altitude display mode. There are four sub-states withinthis mode:
For each of the sports altimeter modes, you should choose suitable values for range, resolution and accuracy.
The range tells us the minimum and maximum values for the measurement.
e.g. when measuring a distance you might choose 00.0km - 99.5km for the range.
The resolution tells us the increment used between adjacent values.
e.g. a resolution of 500m gives us distance values:
00.0km, 00.5km, 01.0km, 01.5km ...
The accuracy of a measurement will be affected by a number of factors such as the accuracy of the clock input (you can assume that this is within 0.01% of the specified value), the accuracy and resolution of any sensors involved, the resolution used for any calculation and the algorithm that you use to produce your final result.
For low values, the maximum error of a well made measurement should be comparable to the resolution (for this reason it is not appropriate to set an overly small resolution that cannot be supported by the system).
For high values, percentage errors are likely to dominate over fixed errors. For this reason the error might be stated as "no more than X units or Y% (whichever is the larger)".
In particular, a proper estimation of the accuracy of your altimeter demonstrates that you have a good understanding of its limitations and is essential if you are to get a good mark for the design exercise.
When designing a system to detect the buttons being pressed, you should be aware that the time that a button will be held down is unpredicable and that the switch may bounce when it is pressed and/or when it is released. You may assume that the switch bounce does not last for more than 25ms.
While operation with a BMP 390 Digital Pressure Sensor via its I2C (Inter-Integrated Circuit) connection would be ideal, it is recognised that this device is difficult to use. For this reason, it is suggested that all teams start by targetting a simplified I2C pressure sensor which also uses an I2C connection. While the former module supports a number of different commands and returns results of varying lengths, the simplified slave supports just one 8-bit command (0x00) which causes it to return a 24-bit integer value representing the current atmospheric pressure in Pascals (100 Pascals = 1 millibars).
The display will be a NHD-0108BZ-RN-YBW type (or a 3.3v version of the same).
For the sake of common test vectors you must use the signal names given below in your design.
Clock (32.768 kHz with active rising edge) nReset (Active Low) Test (Active High) SDI (Active High) nMode (Active Low) nTrip (Active Low)
SDO (Active High) RS (Active High) RnW (Active High) E (Active High) SCL (Active High)
DB[7:0] (Active High) SDA (Active High Open Drain with Pull-Up Resistor)
The arrangement of pads is provided below.
Iain McNally
28-1-2025 (v1.0)