Silicon Chip12/24V Auxiliary Battery Controller - December 2006 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Cheap battery drills are very wasteful
  4. Feature: The Holden Lightship & Its 2321cm Video Screen by Ross Tester
  5. Feature: What’s Happened To Electronic Advances In Cars? by Julian Edgar
  6. Feature: Excellence In Education Technology Awards by Silicon Chip
  7. Feature: Bringing A Dead Cordless Drill Back To Life by Ross Tester
  8. Project: Cordless Power Tool Charger Controller by John Clarke
  9. Project: Build A Radar Speed Gun, Pt.2 by Jim Rowe
  10. Project: A Heartbeat CPR Training Beeper by Jim Rowe & Ross Tester
  11. Project: Super Speedo Corrector by John Clarke & Julian Edgar
  12. Project: 12/24V Auxiliary Battery Controller by Branko Justic & Ross Tester
  13. Project: PICAXE Net Server, Pt.4 by Clive Seager
  14. Salvage It: The good bits in microwave ovens by Julian Edgar
  15. Vintage Radio: The AWA 976A Hybrid Car Radio by Rodney Champness
  16. Book Store
  17. Advertising Index
  18. Outer Back Cover

This is only a preview of the December 2006 issue of Silicon Chip.

You can view 37 of the 112 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 "Cordless Power Tool Charger Controller":
  • Cordless Power Tool Charger Controller PCB [14112061] (AUD $10.00)
  • PIC16F88-I/P programmed for the Cordless Power Tool Charge Controller [CHRGCONT.ASM] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Cordless Power Tool Charge Controller [CHRGCONT.ASM] (Software, Free)
  • PCB pattern for the Cordless Power Tool Charge Controller (PDF download) [14112061] (Free)
  • Cordless Power Tool Charger Controller front panel artwork (PDF download) (Free)
Items relevant to "Build A Radar Speed Gun, Pt.2":
  • PCB patterns for the Radar Speed Gun (PDF download) [DOPPLR1A/DOPPLR1B] (Free)
  • Radar Speed Gun front panel artwork (PDF download) (Free)
Articles in this series:
  • Build A Radar Speed Gun, Pt.1 (November 2006)
  • Build A Radar Speed Gun, Pt.1 (November 2006)
  • Build A Radar Speed Gun, Pt.2 (December 2006)
  • Build A Radar Speed Gun, Pt.2 (December 2006)
Items relevant to "A Heartbeat CPR Training Beeper":
  • CPR Trainer PCB [04112061] (AUD $5.00)
  • PIC16F628A-I/P programmed for the Heartbeat CPR Training Beeper [CPRTRAIN.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F628A firmware for the Heartbeat CPR Training Beeper [CPRTRAIN.HEX] (Software, Free)
  • PCB pattern for the Heartbeat CPR Training Beeper (PDF download) [04112061] (Free)
  • Heartbeat CPR Training Beeper front panel artwork (PDF download) (Free)
Items relevant to "Super Speedo Corrector":
  • PIC16F628A-I/P programmed for the Super Speedo Corrector [speedcor.hex] (Programmed Microcontroller, AUD $10.00)
  • PIC16F628A firmware for the Super Speedo Corrector [speedcor.hex] (Software, Free)
  • PCB pattern for the Super Speedo Corrector (PDF download) [05112061] (Free)
Items relevant to "PICAXE Net Server, Pt.4":
  • PICAXE-28X BASIC source code for the PICAXE Net Server temperature controller example (Software, Free)
Articles in this series:
  • PICAXE Net Server, Pt.1 (September 2006)
  • PICAXE Net Server, Pt.1 (September 2006)
  • PICAXE Net Server, Pt.2 (October 2006)
  • PICAXE Net Server, Pt.2 (October 2006)
  • PICAXE Net Server, Pt.3 (November 2006)
  • PICAXE Net Server, Pt.3 (November 2006)
  • PICAXE Net Server, Pt.4 (December 2006)
  • PICAXE Net Server, Pt.4 (December 2006)

Purchase a printed copy of this issue for $10.00.

SILCHIP Going bush in the 4WD or camper? Want to add a second battery for security and safety? Here’s the safe way to do it. 12/24V Auxiliary Battery Controller for 4WD/Campers/Cars/Trucks/etc I t’s common practice to add a second battery to motor homes, 4WDs, caravans and so on, so that any electrical or electronic devices used while stationary do not drain the main vehicle battery. It’s important at the best of times but can become a matter of life and death half way up the Oodnadatta Track! There have been all manner of schemes “invented” to connect the second battery, ranging from simple permanent paralleling (definitely not recommended!), isolating switches and many “electronic” solutions. 80  Silicon Chip This is one of the latter but it is different to most, in that it uses a latching relay – which we’ll explain shortly – to do the switching. This results in a very low standby current – less than 500mA – which can be even further reduced, to just 50mA, by eliminating the indicator LED. If, for example, you are using solar cells for long-term battery charging and you’re the other side of Woop-Woop, every microamp is sacred Design by Branko Justic* Words by Ross Tester (with apologies to Monty Python). By the way, the reason that permanent paralleling is not recommended is that it is all-too-easy to flatten both batteries to the point where they won’t start the vehicle. And a manual isolating switch is not an ideal solution to the problem because it is just that: manual. Too many times we’ve heard of flat main batteries because someone forgot to disconnect them, or flat auxiliary batteries because someone forgot to connect them. Our circuit does it automatically for you by connecting the two batsiliconchip.com.au siliconchip.com.au + – Let’s assume you turn on the ignition and your main battery is a bit on the low side. The L4949 would sense this but in fact, it doesn’t matter because very little happens in the circuit, apart from an indicator which we’ll get to shortly. It’s only when the main battery voltage rises to the IC’s threshold that the action starts! With the engine started, the main battery voltage rises. When the voltage at pin 2 reaches IC1’s threshold (1.34V), an internal transistor at the output (pin 7) is turned off. Pin 7 there- + FUSEHOLDER MAIN BATTERY – AUXILIARY BATTERY HEAVY DUTY QC CLIPS – + + + CON1 TO CHASSIS + TO CHASSIS c oatleyelectronics.com + + + K227 We’ll assume this is a 12V system but the same explanation holds for a 24V system (simply double the figures!). To understand how the circuit works, you need to remember that the unloaded voltage of a charged vehicle battery that is at normal ambient temperature and has not been used for some time is usually around 12.6V. When the vehicle is started, the alternator charges the battery and the voltage rises to around 14V. The circuit is shown in Fig.2. Starting from the top left, Q1 is a simple regulator which prevents the supply to IC1 (L4949) spiking above about 15.5V, which is quite possible in a vehicle. IC1 is the heart of the circuit and is described as a monolithic integrated 5.0V voltage regulator with a very low dropout voltage and additional functions such as power-on reset and input voltage sense. We’re not using it exactly as the manufacturer intended – in this circuit only the voltage sensing comparator and the 5V regulator sections are used. Pin 8 provides the regulated 5V output used by the rest of the circuit. Pin 2 is the input for the voltage sensor section of the IC. It is connected to a voltage divider across the main battery supply, consisting of four resistors (six for 24V) and a 2kW trimpot (VR1), which sets the trigger voltage. The 22nF capacitor filters out any spikes or noise, which are highly likely in vehicle wiring. + How does it work? Just connect this between your main and auxiliary batteries and never be caught with a flat main battery again! + teries whenever the main battery is charged to a high enough voltage – say 13.5V – to allow this to be done safely. Almost invariably, that is when the motor is running and the main battery is being charged from the alternator. (It could, of course, also be when the main battery is connected to a battery charger.) If you connect a charged main battery to a relatively flat auxiliary battery, a quite large current can flow for a short time from one to the other, resulting in a short-term voltage drop in the main battery. Normally, this might cause a protection circuit such as this to drop out, stopping the current flow and bringing the main battery voltage back up, resulting in the circuit connecting the two batteries again, resulting in a voltage drop, resulting in . . . The result can be relay chatter (and lots of contact arcing – not good!) as it rapidly switches on and off. This circuit precludes this by putting in a 30-second delay (via a monostable based on IC2). The adaptor can be used with either 12V or 24V systems, so it suits both small and large vehicles. As a bonus, it can protect the main battery by acting as a low-voltage dropout – lead-acid vehicle batteries do not like being discharged too far and this will stop that happening Fig.1: here’s how the Auxiliary Battery Controller fits into the system. It won’t connect the auxiliary battery if the main battery doesn’t have enough charge. December 2006  81 82  Silicon Chip siliconchip.com.au SC 2006 VR1 2k 120k (91k* ) 22k 120k (91k* ) 30A FUSE 22nF B 2 S 1 µF 16V E 1 5 GND SO +5V IC1 L4949 IN 7 8 100 µF 16V 470k A K A K 100k D2 IC2d IC2a 14 D3 9 8 6 5 12 7 IC2c IC2b 10 4 A K 100 µF 16V 13 3 IC2: 4001B 11 2 1 D1 AUXILIARY BATTERY CONTROLLER 1k 12k 6.8k LINK FOR 12V, REMOVE FOR 24V ZD1 15V + * FOR LOW VOLTAGE CUTOUT CHANGE THESE RESISTORS TO 91k 100 µF 35V 22k C Q1 2N5551 ZD1 + 6 5 2 1 K A IC3b IC3a IC3: 4093B 1 µF 16V 470k 100 µF 16V +5V 1 µF 16V D6 D5 4 3 D7 470k 100k K A K λ A A 1N4148 A K 2.2k LED1 K A D8 K 470k 1 µF 16V D4 A K Fig.2: the circuit is based on an L4949 precision 5V source and low-dropout regulator. Only one of Q2 or Q3 can conduct at any one time and then it’s only for half a second or so, just enough time to flip over the latching relay. – MAIN BATTERY + MAIN BATTERY 13 12 9 8 14 11 D9 10 C B E 2N5551 7 IC3d A K +5V IC3c 470k 22 Ω 1W G G G D S 2SK700 S Q2 2SK700 D 22 Ω 1W D S Q3 2SK700 D AUXILIARY BATTERY RLY1 80A LATCHING RELAY Q2 2SK700 # NOT REQUIRED FOR 12V USE Q1 2N5551 VR1 LED1 4148 D2 4148 D1 470k 4001 IC2 + 100k 4148 D3 2k 100 µF * + 2.2k * 470k D7 4148 4148 100k 4148 D5 470k D6 4148 + 1 µF 470k 470k 100 µF D4 K227 IC3 4093 + D9 D8 4148 4148 + 1 µF c oatleyelectronics.com 1 µF 1 µF IC1 L4949 RLY1 80A RELAY JMX-94F * 100 µF + Q3 2SK700 CON1 35V 120k # 1k 22k# 120k 6.8k 22nF 12k 15V ZD1 22k LINK FOR 12V USE + 22Ω 1W 22Ω 1W + – 100 µF + * 16V Fig.3: there’s nothing particularly tricky about soldering the PC board – except perhaps getting all the diodes around the right way! You can solder direct to the relay terminals or use appropriate heavy-duty crimp connectors. Note the link for 12V use. fore goes to logic high via the 100kW pullup resistor. IC2a and IC2d, along with the 100mF capacitor, 470kW resistor and diodes D3 and D2, form a monostable. It is triggered by IC2a’s input while the output is pin 11 of ICd. The monostable’s input pins 1 & 2 are normally pulled low by the 100kW resistor to 0V and the output at pin 11 of IC2d is also low since IC2d’s inputs are pulled high via the 470kW resistor to +5V. When the battery voltage goes high, so does pin 7 of IC1 and this pulls pin 6 of IC2b directly high and pins 1 & 2 high via diode D1. This causes pin 11 of IC2d to go high for about 30 seconds while the 100mF capacitor charges up. This stops the circuit from hunting up and down quickly if the battery voltage varies substantially. So with IC2b’s inputs high, its output goes low, forcing the output of IC2c to go high. This in turn sends IC3a’s inputs high and its outputs low. The 1mF capacitor between IC3a and IC3c now charges, quite quickly, meaning IC3c’s input goes from low to high, in about half a second. IC3c’s output does the opposite – it goes from high to low in the same time. While high, it turns on Mosfet Q2, briefly energising the relay coil and closing the contacts. Because it is a latching relay, the contacts stay closed. This connects the auxiliary battery directly across the main battery, allowing it to charge. OK, so what happens if the voltage at pin 2 of IC1 falls below the threshold (1.24V)? Much the opposite, in fact. This time, both of IC2b’s inputs are taken low, quickly charging the 1mF capacisiliconchip.com.au tor between IC2c’s output and IC3d’s inputs. IC3d’s output goes briefly high, switching on Q3 and energising the relay coil, with current flowing in the opposite direction. Therefore the latching relay switches its contacts over, disconnecting the auxiliary battery from the main battery so that the main battery won’t discharge into the auxiliary battery. Latching relay The relay contacts are rated at 80A, 250V AC, so it is capable of switching in even a relatively discharged auxiliary battery. The relay contacts would not normally be subjected to anything like this punishment because when they break (the worst-case scenario when arcing normally occurs) it would almost always be with either a fully charged (or mostly charged) auxiliary battery, so the charging current would be very much reduced, probably to only a couple of amps, if that. As we mentioned before, RLY1 is not a “normal” relay. It’s a latching relay, which can be changed over by reversing the current flow in its coil. Q2 and Q3 power the relay coil from opposite sides. In Q3’s case, it can be Where from, how much This project was designed by Oatley Electronics, who hold the copyright. A complete kits of parts (Cat K227) is available for $19.00 plus $7.00 pack & post within Australia. Contact Oatley Electronics, PO Box 89, Oatley NSW 2223, or via their website, www. oatleyelectronics.com Parts List – Auxiliary Battery Controller 1 PC board, 80 x 58mm, coded OE-K227 1 SPST latching relay, 12V 80A contacts 1 2-way screw terminal block, PC mounting 1 8-pin IC socket 2 14-pin IC sockets Semiconductors 1 L4949 IC (IC1) 1 4001 quad NOR gate (IC2) 1 4093 quad NAND gate (IC3) 1 2N5551 NPN transistor (Q1) 2 2SK700, P239 N-channel Mosfets (Q2, Q3) 1 high-intensity red LED (LED1) 1 15V 400mW zener (ZD1) 9 1N4148 diodes (D1-D9) Capacitors 1 100mF 35V electrolytic 3 100mF 16V electrolytic 4 1mF 16V electrolytic 1 22nF polyester Resistors (0.25W 5%) 5 470kW 2 120kW 2 100kW 2 22kW 1 12kW 1 6.8kW 1 2.2kW 1 1kW 2 22W 1W 2 91kW (for low voltage dropout) 1 2kW horizontal trimpot (VR1) Not supplied in the Oatley kit: 1 high-current fuseholder and 30A fuse Heavy-duty (200A) battery cabling in red and black Connectors to suit Suitable mounting case * Oatley Electronics December 2006  83 What is a latching relay? These shots are of the actual latching relay used in this project, with the one on the right removed from its case so you can see what makes it tick. The two leads welded to the terminals should be cut off as they are not used. We thought a brief explanation of this component would be in order because a latching relay is not something that you come across every day. In fact, even those “in the trade” may not understand the operation nor purpose of a latching relay. First, a conventional relay: this has an electromagnet, formed by a coil wound on a soft iron core. While current flows through the coil, a magnetic field is created which attracts a spring-loaded steel armature towards the iron core. The armature either pushes or pulls electrical contacts towards or away from each other, making or breaking a circuit (and in most relays, both – breaking one circuit then making another). When the current stops, the magnetic field collapses, so the armature springs back and the contacts revert to their normal state. A latching relay is much the same, except that once the armature has switched over to the opposite position, it will stay there, even when the current through the coil stops. It will only switch back the other way when told to by the controlling circuit. You could even disconnect the latching relay from the circuit completely and it would still stay in the last-set position. A good analogy is a standard switch: you push the lever one way and it stays there until you push it the other way. The difference is that instead of a finger pushing or pulling a lever, you have the magnetic field pushing or pulling the armature. The armature may be held in place by a permanent magnet or it may be mechanically latched, based on a spring and detent system (which, incidentally, is how most switches stay in the selected position). Another analogy is a bistable multivibrator or flipflop – it has two stable states, neither of which has any pre-eminence over the other. Latching relays may have two coils – one switching to one position, the second switching to the other – or it may have a single coil, where the current is reversed through the coil to switch to the opposite state. This is the type of latching relay used in this project. It is a common misconception that latching relays do not consume power when energised. Although current is not required through the coil to hold the armature in position, current will still flow if applied, negating the reason for using a latching relay over a conventional relay. Therefore, a short pulse of current is normally used to actuate it, just as in this project. Where conventional relays have a “normally open” (NO) and “normally closed” (NC) position, latching relays with changeover contacts don’t – because there is no “normal” position. In our case, the relay is a SPST type so, like a switch, the contacts are either open or closed (off or on, if you like). Finally, no relay coil suppression diodes can be used on a single-coil latching relay because of the polarity reversal. Therefore the voltage rating of any switching transistor (or Mosfet in this case) must be high enough to safely handle the spike which occurs when current ceases and the magnetic field collapses. 84  Silicon Chip regarded as “conventional”: current flows through the 22W resistor, through the relay coil, is switched by Q3 and thence to earth. But Q2 is connected to the top side of the coil – so when Q2 turns on current flows in the opposite direction through the coil. This of course changes the polarity of the magnetic field and it is this which makes the relay change to the opposite position. There’s more information on latching relays in the separate panel. Just in case you were wondering what happens to IC3d and Q3 while this is going on, the answer is nothing! The 1mF capacitor between IC2c and IC3d is discharged but IC3d’s inputs are held high by the 470kW resistor to +5V. Therefore its output stays low and Mosfet Q3 is turned off. LED indicator We haven’t yet mentioned IC3b and the components around it. This lights the LED to indicate charging (a continuous glow) or not charging (flashing). IC3b, the diodes and resistors between its output and pin 6 input, and the associated 1mF capacitor form a low-frequency (4Hz) oscillator. If IC3a’s output goes low, as it does when the master battery voltage is high, LED1 is connected to earth via D7 and IC3a, so it glows continuously. This indicates that the auxiliary battery is charging. But if IC3a’s output goes high, which occurs when the main battery voltage is low, LED1 flashes at about 4Hz via isolation diode D4, indicating that the auxiliary battery is not charging. Putting it together All components except (of course!) the auxiliary battery and the in-line fuse, mount on a single PC board which measures 80 x 58mm. The same board is used for the 12V and 24V versions – a link on the PC board shorts out the appropriate pads for the 12V version. As usual, start with a visual inspection of the PC board – just in case. Problem boards are very unusual these days but it is possible. Start with the resistors – their values are shown in the resistor colour code table but for 100% assurance, check them with a digital multimeter before soldering them in. Use one of the pigtails for the 12V link. The two 22W 1W siliconchip.com.au Resistor Colour Codes No. Value 4-Band Code (1%) 5-Band Code (1%) o 5 470kW yellow purple yellow brown yellow purple black orange brown o 2 120kW brown red yellow brown brown red black orange brown o 2 100kW brown black yellow brown brown black black orange brown o 2 22kW red red orange brown red red black red brown o 1 12kW brown red orange brown brown red black red brown o 1 6.8kW blue grey red brown blue grey black brown brown o 1 2.2kW red red red brown red red black brown brown o 1 1kW brown black red brown brown black black brown brown o 2   22W (1W) red red black brown red red black gold brown o 2 91kW* white brown orange brown white brown black red brown * if used – see text resistors mount end-on, as shown in the photos. Next to go in are the diodes, including the zener – normally we leave semiconductors to near last but these are fiddly little things so get them out of the way now. Be careful with polarity – most face one way but some are opposite! Now solder in all the capacitors; again, the electrolytic variety are all polarised. Fortunately, all bar one (the large 100mF 35V unit) are oriented on the PC board the same way. From here, it’s just a case of populating the rest of the board – the input socket, trimpot, IC sockets (if used), the LED and transistor and finally the two Mosfets. Once again, the IC sockets, LED, transistor and Mosfets are all polarised – follow the component overlay (and the silk screen on the PC board surface) carefully. The thicker line on the overlay and silk screen denotes the metal side of the Mosfets. Heatsinks are not required on the Mosfets given their low duty cycle. That leaves one thing – the relay. It will only go on one way. There are normally a couple of short lengths of heavy wire welded to the relay contacts (as shown in our photos) – cut these off as they are not required. You can solder the heavy-duty leads to the batteries direct to these contacts or you can use appropriate-sized automotive quick connect terminals. Make sure the cable you use is rated at 20A or higher – we measured peak currents of 15A Capacitor Codes Value (mF value)   IEC    EIA      Code     Code 22nF 0.022mF 22n 223 siliconchip.com.au with a “flat” auxiliary battery and a fully-charged main battery. To avoid I2R losses, the leads between the batteries should be kept as short as possible. We’d be inclined to mount the adaptor closer to the main battery than the auxiliary if there was a preference. Naturally, it should be mounted in some form of box to keep moisture away and the box mounted in a wellventilated area away from the radiator, moving belts, etc. Don’t forget the 30A fuse between the relay and main battery – the fuseholder should be one rated to take the current (ordinary “appliance” type in-line 3AG fuseholders will probably melt!). In use Once you have the trimpot set up with the voltage you want it to switch over at, operation is completely automatic. When your main battery reaches the threshold, the relay clicks over to connect the auxiliary battery and main battery; when the voltage drops down, the relay clicks over again to disconnect the two. You can confirm these actions with a variable power supply and multimeter before final installation – you don’t even need to connect an auxiliary battery. Serial-to-TCP/IP Converters from TRUSYS Trusys BF-430 & BF-450 universal serial device servers allow your industrial serial devices – such as PLCs, flow meters, gas meters, CNC machines and biometric identification card readers – to be monitored from your network. They support web management & firmware upgrade, while PPPoE & DDNS protocol allows Internet connection without static IP. Event alarm trigger is supported using e-mail & SMS (Short Message Service) to do real-time management for your system. Applications: ] Factory automation ] Hospital automation ] PLC instrument control ] Access control and security ] Time recording system For more information, call, fax, email or visit our website! TRUSYS 95 McCanns Rd Mt Duneed Vic 3216 Tel: 0428 282 222 Fax: 03 5264 1275 Email: sales<at>trusys.com.au www.trusys.com.au WHERE can you buy SILICON CHIP You can get your copy of SILICON CHIP every month from your newsagent: in most it’s on sale on the last Wednesday of the month prior to cover date. You can ask your newsagent to reserve your copy for you. If they do not have SILICON CHIP or it has run out, ask them to contact Network Distribution Company in your state. SILICON CHIP is also on sale in all Low voltage dropout protection stores . . . again, you can ask the store manager to reserve a copy for you. This project can double-up as a low voltage drop-out for a 12V or 24V battery. Simply by changing the two 120kW resistors in the voltage divider string to 91kW, the drop-out voltage is adjustable between 10V and 11.7V. The drop-in voltage is about 0.6V above SC these figures. Or, to be sure that you never miss an issue and save money into the bargain, why not take out a subscription? The annual cost is just $89.50 within Australia or $96 (by airmail) to New Zealand. Subscribers also get further discounts on books, and other products we sell. December 2006  85