Silicon ChipDigital Instrument Display For Cars, Pt.2 - September 2003 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Internet newsgroups can be a mixed blessing
  4. Weblink
  5. Feature: Robots Wars: The Tech Sport Of The New Millenium by Brett Paulin
  6. Project: Very Bright., Very Cheap Krypton Bike Light by Julian Edgar
  7. Project: Portable PIC Programmer by Peter Smith
  8. Project: Current Clamp Meter Adaptor For DMMs by John Clarke
  9. Project: The PICAXE, Pt.8: A Datalogger & Sending It To Sleep by Stan Swan
  10. Feature: New Technologies In Automotive Lighting by Julian Edgar
  11. Product Showcase
  12. Project: Digital Instrument Display For Cars, Pt.2 by John Clarke
  13. Vintage Radio: Vibrators: the death knell of expensive dry batteries; Pt.1 by Rodney Champness
  14. Back Issues
  15. Notes & Errata
  16. Market Centre
  17. Advertising Index
  18. Book Store
  19. Outer Back Cover

This is only a preview of the September 2003 issue of Silicon Chip.

You can view 24 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Portable PIC Programmer":
  • Portable PIC Programmer PCB pattern (PDF download) [07109031] (Free)
Items relevant to "Current Clamp Meter Adaptor For DMMs":
  • Current Clamp Meter Adaptor PCB pattern (PDF download) [04109031] (Free)
  • Panel artwork for the Current Clamp Meter Adaptor (PDF download) (Free)
Articles in this series:
  • PICAXE: The New Millennium 555? (February 2003)
  • PICAXE: The New Millennium 555? (February 2003)
  • The PICAXE: Pt.2: A Shop Door Minder (March 2003)
  • The PICAXE: Pt.2: A Shop Door Minder (March 2003)
  • The PICAXE, Pt.3: Heartbeat Simulator (April 2003)
  • The PICAXE, Pt.3: Heartbeat Simulator (April 2003)
  • The PICAXE, Pt.4: Motor Controller (May 2003)
  • The PICAXE, Pt.4: Motor Controller (May 2003)
  • The PICAXE, Pt.5: A Chookhouse Door Controller (June 2003)
  • The PICAXE, Pt.5: A Chookhouse Door Controller (June 2003)
  • The PICAXE, Pt.6: Data Communications (July 2003)
  • The PICAXE, Pt.6: Data Communications (July 2003)
  • The PICAXE, Pt.7: Get That Clever Code Purring (August 2003)
  • The PICAXE, Pt.7: Get That Clever Code Purring (August 2003)
  • The PICAXE, Pt.8: A Datalogger & Sending It To Sleep (September 2003)
  • The PICAXE, Pt.8: A Datalogger & Sending It To Sleep (September 2003)
  • The PICAXE, Pt.8: The 18X Series (November 2003)
  • The PICAXE, Pt.8: The 18X Series (November 2003)
  • The PICAXE, Pt.9: Keyboards 101 (December 2003)
  • The PICAXE, Pt.9: Keyboards 101 (December 2003)
Items relevant to "Digital Instrument Display For Cars, Pt.2":
  • PIC16F84A-20(I)/P programmed for the Digital Instrument Display for Cars [INSTRUM.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware for the Digital Instrument Display for Cars [INSTRUM.HEX] (Software, Free)
  • Digital Instrument Display for Cars PCB patterns (PDF download) [05108031/2] (Free)
  • Panel artwork for the Digital Instrument Display for Cars (PDF download) (Free)
Articles in this series:
  • Digital Instrument Display For Cars, Pt.1 (August 2003)
  • Digital Instrument Display For Cars, Pt.1 (August 2003)
  • Digital Instrument Display For Cars, Pt.2 (September 2003)
  • Digital Instrument Display For Cars, Pt.2 (September 2003)
Articles in this series:
  • Vibrators: the death knell of expensive dry batteries; Pt.1 (September 2003)
  • Vibrators: the death knell of expensive dry batteries; Pt.1 (September 2003)
  • Vibrators, the death knell of expensive dry batteries; Pt.2 (October 2003)
  • Vibrators, the death knell of expensive dry batteries; Pt.2 (October 2003)

Purchase a printed copy of this issue for $10.00.

Last month, we gave the circuit details for our new Digital Instrument Display and showed you how to build it. This month, we describe how to connect different sensors to the unit and give the calibration details. Digital Instrument Display For Cars Pt.2: By JOHN CLARKE F IG.4 SHOWS THE TYPICAL sensor and meter connections that are found a vehicle. Generally, the sensor is grounded and the existing analog meter connects in series with this to a regulated supply. The other possible configuration is when the meter itself is grounded and the sensor connects to the regulated supply instead. In either case, you can connect to the junction of the sensor and the meter (marked with an ‘x’) to obtain a signal to drive the Digital Instrument Display. Alternatively, the sensor can be rewired as shown in Fig.5, using a fixed resistor (R1) to replace the meter. Note that R1 can be installed on the microcontroller board. It is important to note that the Digital Instrument Display is designed to accept a signal voltage at its input which is within a certain range. So you will 78  Silicon Chip need to make some measure­ments to check whether the voltage range from the sensor is suitable. If the signal voltage is outside the limits, it can be tailored using several adjustments at the input to make it suit. The voltage limits for the Digital Instrument Displays input are as follows: (1) with R3 out of circuit, the unit can be used with voltages ranging from 0.5-4.5V. (2) with R3 in circuit and VR1 adjusted so that the unit can read down to 0V, the Digital Instrument display can measure up to 2.7V when VR2 is fully clockwise (250kΩ) and up to 3.4V when VR2 is fully anticlockwise (0Ω). Attenuating the input voltage The value of R1 (see Fig.5) needs to be selected so that the voltage across the sensor remains within the allow- able rang­e. Typically, R1 would be a 330Ω (0.25W) resistor and the cir­cuit would be configured with VR2 fully anticlockwise, R3 in circuit and R2 omitted. However, if the sensor voltage goes above 2.7V, you can adjust VR2 so that signal voltages up to 3.4V can be monitored. Higher input voltages will need to be attenuated by fitting resistor R2. R2 can be calculated if the maximum input voltage (Vin max.) to be applied to the input is known. The circuit for the attenuator is shown in Fig.6. If VR2 is set at its mid-position, the value for R2 = 30kΩ/(Vin max. - 3). For example if the maximum input voltage is 8V, R2 will be 30kΩ/5 or 6kΩ. A 5.6kΩ resistor would be suitable. VR2 is then used to adjust the range of the signal voltage that can be ap­plied to the circuit. Trimpot VR1 will require adjustwww.siliconchip.com.au Fig.4: typical sensor and meter connections as found in a vehicle. Fig.6: resistor R2 is necessary only if the signal voltage (ie, from the sensor) goes above 3.4V. Its value is calculated as described in the text. ment if resistor R3 is in­stalled. Also, this adjustment will need to be redone if VR2 is altered. In practice, VR1 is adjusted by connecting the input to the Digital Instrument Display to 0V and selecting the input mode by pressing the Mode switch four times (ie, four times from the normal display position mode). Note, however, that trimpot VR1 is NOT adjusted for a display reading of 0 (if it does show 0, then trimpot VR1 is too far clockwise). Instead, you have to adjust VR1 so that the display shows a reading between about 97 and 110. Fig.7 shows how to use the Digital Instrument Display with an LM335 temperature sensor. Typically, the output from the sensor varies by 10mV/°C, with the output at 2.73V at 0°C. Calibration We have already described how the calibration modes are accessed by pressing the Mode switch. As previwww.siliconchip.com.au Fig.7: how to use the Digital Instrument Display with an LM335 temperature sensor (see text). ously stated, calibration is performed at two different points and the instru­ ment then calculates the readings for the remaining input voltag­es. Before starting calibration, you must first decide on the display readings that are required at these two points. For example, for a temperature gauge, you might select 0°C and 100°C for the two calibration points. Alternatively, for a fuel gauge, you could calibrate the unit at 10 litres and 50 litres. These values are then entered as the Fig.5: R1 needs to be selected so that the voltage across the sensor remains within the allowable rang­e. Typically, R1 would be a 330Ω (0.25W) resistor and the cir­cuit would be configured with VR2 fully anticlockwise, R3 in circuit and R2 omitted. Fig.8: a 1kΩ trimpot connected between the +5V rail and ground can be used to set input voltages to calibrate the unit. first and second cali­bration numbers. Note that the first calibration number must correspond to the lower of the two vol­tages applied to the instrument during calibration. So, taking our first example, if the sensor gives a lower signal voltage at 0°C than at 100°C, then the 0 is entered into the first calibration position and the 100 is entered into the second calibration position. Alternatively, if the sensor gives a lower voltage at 100°C compared to that at 0°C, the 100 must be entered Installing The Unit In A Vehicle Use automotive cable and connectors when installing the Digital Instrument Display into a vehicle. The +12V supply connection is derived via the ignition switch and a suitable connection point will usually be found inside the fuse­ box. Be sure to choose the fused side of the supply rail, so that the existing fuse is in series with the unit. The ground connection can be made by connecting a lead to the chassis via an eyelet and self-tapping screw. Similarly, use automotive cable to connect to the chosen vehicle sensor or sender unit. September 2003  79 Fig.9: here’s how to use the alarm output: (A) low current piezo siren; (B) driving an ex­ternal 5V relay; and (C) driving an external 12V relay. Note that in (C), the alarm sense must be reversed (during calibration) so that a high alarm output drives the relay (see text). into the first calibration position and the 0 into the second calibration posi­tion. The same applies for a fuel gauge or oil pressure gauge – ie, use the figure that gives the lowest signal voltage in the first calibration position and the figure that gives the highest signal voltage in the second position. Calibration signals In order to calibrate the unit, you need to feed in a signal voltage that’s the same as that provided by the sensor at each calibration point. To do this, you can either use the actual sensor itself or you can use a 1kΩ trimpot which is connected to the input as shown in Fig.8. As mentioned before, the two calibration positions are selected using the Mode switch. If the first calibration position is to be calibrated, apply the 80  Silicon Chip calibration voltage, then select this position by pressing the Mode switch once after the “normal” mode. Now wait for several seconds for the voltage at the input to be measured by the Digital Instrument Display. Now press the Up switch and then the Down switch, so that the value is the same as before. This needs to be done as calibration can only take place when the calibration value is changed. Simply select­ing the calibration value with the Mode switch will not calibrate the Digital Instrument Display. The second calibration voltage is then applied and the Mode switch pressed again to show the second calibration number. Wait a few seconds, then press the Up and Down switches to calibrate this value. Note that there is no need to feed in both calibration values at the same time – calibration can be done for either the first or second position at any time (even weeks apart if that’s more convenient). In fact, if you are calibrating the unit for a fuel sensor, the best approach is to calibrate it for one value when the tank is full and then wait until the tank is almost empty to feed in the other calibration number. Alternatively, you can do this the other way around – ie, feed in one calibration number when the tank is empty, then fill up and feed in the other calibration number. Note that the “normal” readings will not be correct until both calibration values have been entered. Checking signal levels It’s important to check that the voltages applied to the Digital Instrument Display are not beyond its range. This can be done by pressing the Mode switch four times from its normal display mode to select the input reading mode. The display should show a value between about 100 and 940. Values much below 100 will go to “0” and values much above 940 will show “FUL” on the display. A “0” or “FUL” indicates that the vol­tage applied to the Digital Instrument Display is out of range and the voltage will need to be altered as previously described using R1, R2, VR1 and VR2. Measuring sensor voltages Calibration of the instrument with a fuel or oil pressure sensor can initial- ly be done by measuring the voltage across the sensor in its standard form when connected to the original analog meter. You will need to connect your multimeter so that the measurement can be made over the full range of outputs from the sensor during normal running of the car. That way, you will gain a good idea of the voltages that are produced by the sensor. During this time, record two voltages that correspond to two particular markings on the meter. The further apart the voltages are, the more accurate the calculation for other values will be. Be sure to check the voltages obtained during this process against the allowable limits. You can attenuate the level using R2 if the voltage range from the sensor is too great. Similarly, if the voltage goes below 0.5V, you will need to install R3 and then adjust VR1 as detailed above. You can then calibrate the instrument using the voltages found by measurement and by using a 1kΩ trimpot connected as shown in Fig.8. That done, disconnect the car instrument from its sensor and measure the instrument’s resistance to determine the value of R1. It’s then just a matter of installing R1 on the microcontroller board, as shown in Fig.5. Temp. sensor calibration Calibrating the unit for use with a temperature sensor can be done at 0°C and at 100°C The 0°C calibration is done using freshwater ice which is stirred in a small amount of cold fresh water. Stir the solution with the sensor immersed in it to ensure it reaches the 0°C of the water/ice solution before entering “0” for the first calibration number. Note that if you connect a multi­ meter across the sensor, it will stop changing value when it reaches 0°C – ie, it will reach either a minimum or maximum output. By contrast, the 100°C calibration is done by immersing the sensor in boiling fresh water. Again ensure that the sensor output has stabilised in the boiling water by monitoring its output voltage before entering in the calibration number. Just remember that the calibration number corresponding to the lowest sensor voltage goes in the first calibration position. So if the sensor voltage www.siliconchip.com.au Fig.10: here are the full-size patterns for the two PC boards, together with the full-size front-panel artwork which can be used as a drilling template. Check your PC boards carefully for defects before installing any parts. at 0°C is lower than at 100°C, then “0” goes in the first calibration position and vice versa. Once calibrated the instrument will display values based on a calculation that assumes a straight line (linear) relationship between the two calibration points. It will also calculate the values outside the two calibration points, again assuming a linear relationship. For example, when connected to a temperature sensor, the display will show temperatures below 0°C when the sensor is colder than this and also above 100°C if the sensor is hotter than this value. In fact, the display can show values between -99 and 999 but, in practice, may be restricted to a range that’s less than this, depending on the signal voltages applied to the unit and the voltage excursion of the sensor. Using the alarm output The alarm is set to the required value by first pressing the Mode switch three times from the “normal” mode position. You then set the value using the Up and Down switches and select the sense as described earlier. The latter determines whether the alarm activates as it goes above or below the calibrated value. www.siliconchip.com.au The alarm output goes low under alarm conditions and this lights the alarm decimal point in DISP3. In addition, a low-cur­rent piezo siren could be connected between the +5V supply and the alarm output if an audible alarm is required – see Fig.9(a). The Jaycar AB-3462 piezo siren would be suitable, as it draws less than 15mA when used at 5V. External relay Fig.9(b) shows how to connect an external relay to the alarm output. You need to build up a small circuit consisting of a 10kΩ resistor, a BC327 PNP transistor and a diode. The relay needs to be a 5V or 6V type since it is powered from a 5V supply. Alternatively, the circuit shown at Fig.9(c) can be built. This circuit can drive a 12V relay but note that the alarm sense will have to be reversed (ie, during calibration), so that a high alarm output drives the relay rather than the normal low output level. In addition, you will have to delete the visual alarm indication, since this will no longer be valid. This simply involves removing resistor R6 to disable the decimal point indication in display DISP3. SC KALEX PCB Makers! • High Speed PCB Drills • 3M Scotchmark Laser Labels • PCB Material – Negative or Positive Acting • Light Boxes – Single or Double Sided; Large or Small • Etching Tanks – Bubble • Electronic Components and Equipment for TAFEs, Colleges and Schools • Prompt Delivery We now stock Hawera Carbide Tool Bits 718 High Street Rd, Glen Waverley 3150 Ph (03) 9802 0788 FAX (03) 9802 0700 ALL MAJOR CREDIT CARDS ACCEPTED September 2003  81