Silicon ChipA LED Bargraph Ammeter For Your Car - January 1999 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Wind power and marketing hype
  4. Feature: The Y2K Bug & A Few Other Worries by Bob Dyball & Greg Swain
  5. Project: High Voltage Megohm Tester by John Clarke
  6. Feature: Satellite Watch by Gary Cratt
  7. Project: Getting Going With BASIC Stamp by Ross Tester & Bob Nicol
  8. Feature: 4.8MW - Blowing In The Wind by Leo Simpson
  9. Product Showcase
  10. Order Form
  11. Project: A LED Bargraph Ammeter For Your Car by Rick Walters
  12. Project: Keypad Engine Immobiliser by John Clarke
  13. Serviceman's Log: How long is a couple of months? by The TV Serviceman
  14. Feature: Electric Lighting; Pt.10 by Julian Edgar
  15. Back Issues
  16. Feature: Radio Control by Bob Young
  17. Feature: How To Listen To Community AM Radio by Rick Walters
  18. Vintage Radio: Improving AM broadcast reception, Pt.3 by Rodney Champness
  19. Notes & Errata: Use Your old PC Power Supply For High Current Outputs / Thermocouple Adaptor for DMMS / Improvements to AM Broadcast Band Reception
  20. Book Store
  21. Market Centre
  22. Advertising Index
  23. Outer Back Cover

This is only a preview of the January 1999 issue of Silicon Chip.

You can view 34 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 "High Voltage Megohm Tester":
  • High Voltage Megohm Tester PCB pattern (PDF download) [04301991] (Free)
Articles in this series:
  • Satellite Watch (January 1996)
  • Satellite Watch (January 1996)
  • Satellite Watch (February 1996)
  • Satellite Watch (February 1996)
  • Satellite Watch (March 1996)
  • Satellite Watch (March 1996)
  • Satellite Watch (June 1996)
  • Satellite Watch (June 1996)
  • Satellite Watch (August 1996)
  • Satellite Watch (August 1996)
  • Satellite Watch (October 1996)
  • Satellite Watch (October 1996)
  • Satellite Watch (December 1996)
  • Satellite Watch (December 1996)
  • Satellite Watch (February 1997)
  • Satellite Watch (February 1997)
  • Satellite Watch (April 1997)
  • Satellite Watch (April 1997)
  • Satellite Watch (May 1997)
  • Satellite Watch (May 1997)
  • Satellite Watch (June 1997)
  • Satellite Watch (June 1997)
  • Satellite Watch (December 1997)
  • Satellite Watch (December 1997)
  • Satellite Watch (April 1998)
  • Satellite Watch (April 1998)
  • Satellite Watch (January 1999)
  • Satellite Watch (January 1999)
  • Satellite Watch (June 1999)
  • Satellite Watch (June 1999)
Items relevant to "Getting Going With BASIC Stamp":
  • BASIC Stamp source code (Software, Free)
  • BASIC Stamp PCB pattern (PDF download) [11301991] (Free)
Items relevant to "A LED Bargraph Ammeter For Your Car":
  • Automotive LED Bargraph Ammeter PCB pattern (PDF download) [05101991] (Free)
Items relevant to "Keypad Engine Immobiliser":
  • Keypad Engine Immobilser PCB patterns (PDF download) [05401991, 05412981] (Free)
Articles in this series:
  • Understanding Electric Lighting; Pt.1 (November 1997)
  • Understanding Electric Lighting; Pt.1 (November 1997)
  • Understanding Electric Lighting; Pt.2 (December 1997)
  • Understanding Electric Lighting; Pt.2 (December 1997)
  • Understanding Electric Lighting; Pt.3 (January 1998)
  • Understanding Electric Lighting; Pt.3 (January 1998)
  • Understanding Electric Lighting; Pt.4 (February 1998)
  • Understanding Electric Lighting; Pt.4 (February 1998)
  • Understanding Electric Lighting; Pt.5 (March 1998)
  • Understanding Electric Lighting; Pt.5 (March 1998)
  • Understanding Electric Lighting; Pt.6 (April 1998)
  • Understanding Electric Lighting; Pt.6 (April 1998)
  • Understanding Electric Lighting; Pt.7 (June 1998)
  • Understanding Electric Lighting; Pt.7 (June 1998)
  • Understanding Electric Lighting; Pt.8 (July 1998)
  • Understanding Electric Lighting; Pt.8 (July 1998)
  • Electric Lighting; Pt.9 (November 1998)
  • Electric Lighting; Pt.9 (November 1998)
  • Electric Lighting; Pt.10 (January 1999)
  • Electric Lighting; Pt.10 (January 1999)
  • Electric Lighting; Pt.11 (February 1999)
  • Electric Lighting; Pt.11 (February 1999)
  • Electric Lighting; Pt.12 (March 1999)
  • Electric Lighting; Pt.12 (March 1999)
  • Electric Lighting; Pt.13 (April 1999)
  • Electric Lighting; Pt.13 (April 1999)
  • Electric Lighting, Pt.14 (August 1999)
  • Electric Lighting, Pt.14 (August 1999)
  • Electric Lighting; Pt.15 (November 1999)
  • Electric Lighting; Pt.15 (November 1999)
  • Electric Lighting; Pt.16 (December 1999)
  • Electric Lighting; Pt.16 (December 1999)
Articles in this series:
  • Radio Control (January 1999)
  • Radio Control (January 1999)
  • Radio Control (February 1999)
  • Radio Control (February 1999)
  • Model R/C helicopters; Pt.3 (March 1999)
  • Model R/C helicopters; Pt.3 (March 1999)
Articles in this series:
  • Improving AM broadcast reception; Pt.1 (November 1998)
  • Improving AM broadcast reception; Pt.1 (November 1998)
  • Improving AM broadcast reception; Pt.2 (December 1998)
  • Improving AM broadcast reception; Pt.2 (December 1998)
  • Improving AM broadcast reception, Pt.3 (January 1999)
  • Improving AM broadcast reception, Pt.3 (January 1999)

Purchase a printed copy of this issue for $10.00.

A LED bargraph ammeter for your car Keep an eye on the charging and discharge of your car’s battery with this LED ammeter. It has 10 rectangular LEDs and will indicate charge and discharge currents up to 25 amps. No alterations need to be made to your car’s wiring as it monitors the voltage drop across the negative strap to the battery. Design by RICK WALTERS Very few cars these days have a “proper” ammeter; they just have a single idiot light to indicate that the battery is being discharged. But when it goes out, you have no idea of how much current is going into the battery and nor, for that mat­ter, do you ever 54  Silicon Chip know how much current is being pulled out. Even when cars did have ammeters they were not what you would call a precision meter movement; they gave a very rough approximation of what was happening. Well, now you can im- prove on this situation with this LED ammeter. It has 10 rectangular LEDs, five green to indicate that the battery is being charged, and one yellow and four red to show discharge conditions. Each LED covers a range of 5A, so the display indicates from -25A (discharge) to +25A (charge). We used a yellow LED for the 0-5A discharge indicator as this will most likely be the one normally illuminated when the motor is not running or at idle. Every ammeter needs a shunt which is placed in the current path. In effect, the ammeter measures the voltage drop across the shunt which is a very low resistance. The question is “How do you install a suitable shunt in series with the battery?” The answer is that you don’t. There is already a shunt there in the form of the negative lead Fig.1: the circuit of this LED Ammeter works by monitor­ing the voltage drop across the negative battery strap. This will have a resistance of a few milliohms and so a current of say 20A will produce a voltage of around 40mV or so. This is amplified by IC1a and IC1b and then fed to the LM3914 to produce a LED dot display. from the battery to the car’s chassis. This lead will typically have a resistance of only a couple of milliohms but this is enough to produce a voltage to be meas­ured by our circuit. It amplifies the voltage across the “shunt” and feeds it to a LED bargraph driver IC. Circuit details Fig.1 shows the circuit. Op amp IC1a monitors the voltage across the negative battery strap and amplifies by a factor of between 10 and 210, depending on the setting of trimpot VR1. The amplified voltage at the output of IC1a is fed to the inverting input of IC1b via a 2.2kΩ resistor. This op amp stage has a gain of 10 and the output is fed to the input of IC2, an LM3914 LED bar/dot linear display driver. IC2 needs an input voltage increasing from zero to 1.25V to sequentially light each LED at its outputs (pins 1 & 10-18). With that voltage range, the LEDS will switch for every 125mV increase in input voltage. The only problem is, we want to measure posi­tive and negative currents so we effectively need a centre-zero display. This would correspond to the voltage where the fifth LED is about to turn off and the sixth LED is about to turn on. This “centre-zero” voltage corresponds to +625mV (ie, 5 x 125mV) so we need the output of IC1b to be sitting at this vol­tage when the battery is not being charged or discharged. This is done by feeding a portion of the 1.25V internal reference of IC2, which is available at pin 7, to pin 5, the non-inverting input of IC1b. The amount of this input offset to pin 5 is set by the voltage divider resistors, 22kΩ, 1kΩ and 160Ω. Another offset voltage which must be dealt with is the DC voltage at the output of IC1a when it has no input voltage (ie, no charge or discharge current to the battery). This output voltage will change over a wide range as trimpot VR1 is altered. Accordingly, trimpot VR2 is included to inject an equal and opposite voltage into the inverting input of IC1b (pin 6) to cancel this effect. To recap, with the battery receiving no charge or dis­charge, the input to IC1a will be zero volts and the voltage at the non-inverting input of IC2 will be half the reference voltage at pin 7 of IC2. This will cause LEDs 5 and 6 to light. When the battery is being charged, one of LEDs 6 to 10 will illuminate depending on the charging current. Conversely, if the battery is being discharged, one of LEDs 1 to 5 will light, depending on the current being drawn. Actually, there will be times when there is a transition from one LED to the next and so two adjacent LEDs can be on. At night the LED display is dimmed, whenever the car’s headlights are turned on. PNP transistor Q1 has its 8.2kΩ base resistor connected to the headlight switch. When the headlights are turned, Q1 turns off to reduce the current flowing through the LEDs. The initial brightness of the LEDs is set by the 680Ω resistor from pin 6 of IC2 to the emitter of Q1. The night-time brightness is reduced by switching off Q1, which puts the 2.2kΩ resistor in series with the 680Ω resistor. Negative supply rail So far, the circuit should seem relatively straightforward but you may wonder why the 555 timer is included. Does it really need to be there? Well, yes it does. Since the current into or out of the battery can be negative or positive, it stands to reason that the input voltage to IC1a can be negative or positive as well. This means that the output of IC1a and IC1b can swing below the 0V line and for this to be possible, IC1 needs a nega­tive supply rail. This is what the 555 is used for. IC3 is set up as an oscilla­tor running at around 9.5kHz and its output at pin 3 drives a “diode pump” consisting of diodes D1 & D2, together with the two 10µF capacitors. The circuit produces January 1999  55 a negative rail of about -5V which is adequate to run IC1. Assembling the PC board Fig.2: this is the component overlay for the PC board. Do not get the colours of the LEDs mixed up. LEDs 1-4 are red, LED5 is yellow and the remainder (LEDs 6-10) are green. The entire circuit, including the 10 LEDs used in the display, is accommodated on a PC board measuring 74 x 59mm and coded 05101991. The component overlay is shown in Fig.2. Before you install any components, check the PC board against the artwork of Fig.4 for any defects such as broken tracks, shorts between tracks or undrilled holes. Fix any faults and then proceed by inserting and soldering the resistors and diodes, then the ICs and the 10 LEDs followed by the capacitors. The diodes, LEDs and capacitors are polarised and must be insert­ed the correct way, so double check them before soldering. Finally, fit and solder the five PC stakes. We used thin figure-8 flex to connect to the battery and the car electrics. This flex had a striped black lead which is handy when wiring DC circuitry. When wiring the input, you can use the plain lead to the battery negative pole connection and the black striped lead for the connection to the earth strap at the car’s chassis. For the 12V supply, you can use the plain lead for the connection to D3 and the striped lead for the earth connection. The DIM connection can be a single length of hookup wire. Make one final check of the diode and capacitor polarities, before the big test. Bench-testing the ammeter Fig.3: here’s how two adjustable DC power supplies can be used to bench-test the LED Ammeter. Effectively, what we are doing is to use supply one (PSU1) to simulate the voltage drop across the negative battery strap while the second power supply (PSU2) provides power to the circuit in place of the 12V battery. PSU2 should be set to deliver 12V while PSU1 can be set to provide anywhere between 0V and 12V. 56  Silicon Chip If you have two DC power supplies it is far easier to do the initial test in your workshop. If you don’t, then skip to the in-car test. If you do have two DC supplies, Fig.3 shows how to connect them for the bench test. Effectively, what we are doing is to use supply one (PSU1) to simulate the voltage drop across the negative battery strap while the second power supply (PSU2) provides power to the cir­cuit in place of the 12V battery. PSU2 should be set to deliver 12V while PSU1 can be set to provide anywhere between 0V and 12V. Connect the accessories switch wire to the positive termi­nal on the PSU2 supply and connect the other wire of the pair to the common or negative terminal of PSU2 (depending on how the supply is marked). Set the output to +12V. Fig.4: this is the actual size artwork for the PC board. Check your board carefully before installing any of the parts. You can either mount the LEDs directly on the PC board as shown here or you can mount them separately and connect them via rainbow cable. Wire the resistors across PSU1 as shown in Fig.3 and con­nect the leads as shown. You will need to connect the negative terminals of the two supplies together with a length of hookup wire. Set the output voltage of PSU1 to 12V, turn the supply on, and adjust VR2 until the leftmost red LED (LED1) is illuminated. Wind the output voltage of PSU1 down and the LEDs should light in sequence. Connecting the DIM wire to the accessories lead should reduce the LED brightness. In-car testing Connect the plain lead marked ‘to accessories switch’ to the battery positive, the black lead of the pair to the chassis. Connect the plain lead of the other pair to the battery negative terminal and the striped We mounted the unit in a small plastic case but you will probably want to mount the LEDs on the dashboard. Resistor Colour Codes  No.   1   2   1   1   1   1   2   3   1   1 Value 100kΩ 22kΩ 10kΩ 8.2kΩ 6.8kΩ 2.7kΩ 2.2kΩ 1kΩ 680Ω 160Ω 4-Band Code (1%) brown black yellow brown red red orange brown brown black orange brown grey red red brown blue grey red brown red violet red brown red red red brown brown black red brown blue grey brown brown brown blue brown brown 5-Band Code (1%) brown black black orange brown red red black red brown brown black black red brown grey red black brown brown blue grey black brown brown red violet black brown brown red red black brown brown brown black black brown brown blue grey black black brown brown blue black black brown January 1999  57 Table 1: Typical Lamp Ratings In Cars Parking lights (front)............................................................................... 5W Tail lights................................................................................................ 5W Licence plate.......................................................................................... 5W Dashboard parking indicator............................................................... 1.4W Reversing lights.................................................................................... 21W Brake lights.......................................................................................... 21W High level brake light......................................................................... 18.4W Dashboard brake indicator.................................................................. 1.4W Headlights (high beam/low beam)................................................ 60W/55W Dashboard high beam indicator.......................................................... 1.4W Table 2: Total Load When Lights On Parking Lights + licence plate.................................................26.4W (2.2A) Reversing Lights.........................................................................42W (3.5A) Brake Lights............................................................................61.8W (5.2A) Headlights (low beam + parking + licence plate)................136.4W (11.4A) Headlights (high beam + parking + licence plate)...............256.4W (21.4A) ground lead to the chassis end of the bat­tery strap. Turn trimpot VR1 fully anticlockwise and adjust trimpot VR2 until the green and yellow LEDs are both alight. Turn on the parking lights and adjust VR1 until the yellow LED is illuminated. Now turn on the headlights and the second or third red LED should illuminate (depending on the current drawn by them and the setting of VR1). Connect the DIM lead to the battery positive and the LED’s brightness should reduce. Turn off the headlights. Final calibration To do the final calibration, you will need to know the wattage of the various lights in your vehicle. You should be able to find this information in your owner’s handbook or in the service manual. For example, find out the total wattage drawn by You don’t have to modify the car’s wiring to monitor the current. Instead, the unit operates by monitoring the voltage across the main earth strap between the negative terminal of the battery and the vehicle chassis, as shown in this temporary lash up. 58  Silicon Chip the parking lights, brake, reversing lights and headlights (low and high beams). Knowing the wattage, you can calculate the current drain for various light combinations. For example, you can operate the reversing and parking lights separately and together and then you can add the headlights, in low and high beam settings. Do not forget that when you switch to high beam, low beam will still be on. Current calculations Typical lamp ratings in cars are as shown in Table 1. Except for the dashboard indicators, these lamps come in pairs, so the total load for the following lights on is as shown in Table 2. From this, you can see that if you switch on the headlights to low beam, as well as the reversing lights, you will get a total current drain of 14.9A and this is close enough to 15A to be used as a load current for the 15A indication. Similar­ly, if you switch the headlights to high beam, as well as the reversing lights, you will get a total current drain of 24.9A and this is close enough to 25A to be used as the full load current for the 25A indication. Naturally, the current can be expected to vary depending on the battery’s charge but it will be close enough for this cali­bration job. The Ammeter will have to be installed in the car and the five wires connected as indicated in Fig.1. You may mount the PC board directly behind the dashboard, or elect to fit it in the small plastic box we have specified in the parts list. If you do use the box, mount the PC board on the lid using a 3mm nut as a spacer and bring the leads out through the hole. VR1 will have to be adjusted to get the correct LED lit for the particular load. Don’t forget that the currents are only nominal and can probably vary by ±10% or more depending on the battery voltage. There is no need to step the LEDs in 5A increments, as the setting of VR1 will determine the step size. Once VR1 is set, VR2 must be readjusted to light the two centre-scale LEDs with no battery drain; ie, with all lights off. Troubleshooting If your unit doesn’t appear to work properly, check the following voltag- Parts List 1 PC board, code 05101991, 75 x 60mm 1 plastic case, Jaycar HB-6075 or equiv. 3 6mm x 10mm countersunk screws 6 3mm hex nuts 3 3mm spring washers 5 PC stakes 1 200kΩ multiturn trimpot (VR1) Altronics R-2390 or equiv. 1 10kΩ multiturn trimpot (VR2) Altronics R-2382 or equiv. Semiconductors 1 LM358 dual op amp (IC1) 1 LM3914 LED bar/dot linear display driver (IC2) 1 555 timer (IC3) 1 LM7808 or LM7809 TO-220 voltage regulator (REG1) 1 BC558 PNP transistor (Q1) 2 1N914 silicon diodes (D1,D2) 1 1N4004 silicon diode (D3) 4 5mm x 2mm red LED (LED 1-4), Jaycar ZD-1760 or equiv. 5 5mm x 2mm green LEDs (LED 6-10), Jaycar ZD-1765 or equiv. 1 5mm x 2mm yellow LED (LED 5), Jaycar ZD-1770 or equiv. 14 Model Railway Projects Shop soiled but H ALF PRICE! Our stocks of this book are now limited. All we have left are newsagents’ returns which means that they may be slightly shop soiled or have minor cover blemishes. Otherwise, they're undamaged and in good condition. SPECIAL CLEARANCE PRICE: $3.95 + $3 P&P (Aust. & NZ) This book will not be reprinted Yes! Please send me _____ copies of 14 Model Railway Projects at the special price of $A3.95 + $A3 p&p (p&p outside Aust. & NZ $A6). Enclosed is my cheque/money order for $­A__________ or please debit my  Bankcard    Visa Card    MasterCard Card No. Capacitors 2 100µF 25VW PC electrolytic 2 10µF 16VW PC electrolytic 1 0.1µF MKT polyester 2 .01µF MKT polyester Signature­­­­­­­­­­­­___________________________ Card expiry date______/______ Resistors (0.25W, 1%) 1 100kΩ 1 2.7kΩ 2 22kΩ 2 2.2kΩ 1 10kΩ 3 1kΩ 1 8.2kΩ 1 680Ω 1 6.8kΩ 1 160Ω Suburb/town_________________________________ Postcode_________ Name ______________________________________________________ PLEASE PRINT Street ______________________________________________________ Send your order to: SILICON CHIP, PO Box 139, Collaroy, NSW 2097; or fax your order to (02) 9979 6503; or ring (02) 9979 5644 and quote your credit card number (Bankcard, Visa Card or MasterCard). Silicon Chip Binders es. IC1a pin 8 +8V (or +9V with 7809), IC1a pin 4 -5V, IC2 pin 3 +12V, IC3 pin 6 +1.25V. If you are within 20%, everything is probably fine. If the negative voltage is missing or low then the problem is around IC3.  Heavy board covers with 2-tone green vinyl covering Dimming  SILICON CHIP logo printed in goldcoloured lettering on spine & cover If the dimmed LED intensity is not to your liking vary the value of the 2.2kΩ resistor at the emitter of Q1. Making it smaller will increase the dimmed brightness, increasing it will SC do the opposite.  Each binder holds up to 14 issues REAL VALUE AT $12.95 PLUS P &P Price: $12.95 plus $5 p&p each (Aust. only) Just fill in & mail the handy order form in this issue; or fax (02) 9979 6503; or ring (02) 9979 5644 & quote your credit card number. January 1999  59