Silicon ChipIntelligent Car Air-Conditioner Controller - January 2007 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Today's hospitals are full of electronics
  4. Review: Yokogawa DL9000 Series Digital Scopes by Peter Smith
  5. Feature: Biolock: Using Fingerprints To Unlock Doors by Ross Tester
  6. Project: A Versatile Temperature Switch by John Clarke & Julian Edgar
  7. Project: Intelligent Car Air-Conditioner Controller by John Clarke
  8. Project: A Remote Telltale For Garage Doors by Jim Rowe
  9. Feature: WiNRADiO: Marrying A Radio Receiver To A PC by Kevin Poulter
  10. Feature: “Degen” Synthesised HF Communications Receiver by Ross Tester
  11. Project: Intelligent 12V Charger for SLA & Lead-Acid Batteries by Branko Justic & Ross Tester
  12. Salvage It: The multi-purpose tape machine by Julian Edgar
  13. Feature: The Boony & Beefy Figurines by Leo Simpson
  14. Vintage Radio: The Philips RF5 Stereogram by Rodney Champness
  15. Advertising Index
  16. Book Store
  17. Order Form

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

You can view 38 of the 104 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 "A Versatile Temperature Switch":
  • Temperature Switch PCB pattern (PDF download) [05car101] (Free)
Items relevant to "Intelligent Car Air-Conditioner Controller":
  • Car Air Conditioner Controller PCB [05101071] (AUD $10.00)
  • PIC16F88-E/P programmed for the Car Air Conditioner Controller (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Car Air Conditioner Controller [Aircon.hex] (Software, Free)
  • PCB pattern for the Car Air Conditioner Controller (PDF download) [05101071] (Free)
  • Car Air Conditioner Controller front panel artwork (PDF download) (Free)
Items relevant to "A Remote Telltale For Garage Doors":
  • Transmitter PCB pattern for the Remote Garage Door Telltale (PDF download) [03101071] (Free)
  • Receiver PCB pattern for the Remote Garage Door Telltale (PDF download) [03101072] (Free)
  • Garage Door Remote Telltale front panel artwork (PDF download) (Free)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)

Purchase a printed copy of this issue for $10.00.

Intelligent Car Air-Conditioner Controller This simple device stops the air-conditioner in your car from sapping engine power when going up hills or during overtaking, while still maintaining comfortable temperature levels inside the cabin. It’s based on a PIC microcontroller and is easy to build. By JOHN CLARKE 28  Silicon Chip siliconchip.com.au D URING THE HOT SUMMER months, your car’s air-conditioner works quite hard to keep cabin temperatures cool. As a result, fuel consumption increases due to the extra load imposed on the engine by the air-conditioning system or more specifically, by its compressor. But that’s not all – the extra load imposed on the engine by the compressor is readily noticed when travelling up hills, particularly in smaller 4-cylinder cars. In order to get around this problem, many drivers manually switch off the air-conditioner to ensure extra power during hill climbing or when overtaking. It’s almost like giving the car a mini “turbo boost”. On some new cars, this can even happen automatically. These cars have a “Wide Open Throttle” (WOT) cutout relay and this automatically switches off the air-conditioner’s compressor during high throttle conditions. If you wanted to maximise engine performance, you would only turn the air-conditioner on when going down hills or when slowing down. That way, the air-conditioner compressor could be used as a brake that converts the energy into cooling the cabin rather than being wasted as heat in the brakes or via engine braking. In practice, of course, it’s quite impractical for the driver to continually switch the air-conditioner on and off. In any case, the compressor would also have to run for at least some of the time on a relatively flat road in order to keep the cabin temperature to a comfortable level on very hot days. Doing it electronically But what if the switching could be done electronically? Well, that’s just what this clever little circuit does. Based on a microcontroller, it’s connected to various sensors in your car and automatically switches the air-conditioner off when the car is accelerating or going up hills. It then allows it to switch on again (if needed) when the car is slowing down or going down hills, or when the engine is only lightly loaded (eg, when travelling on the “flat”). So the concept is really quite simple. The circuit overrides the existing air-conditioner control system to turn the compressor off when the engine is heavily loaded. It then allows the airconditioner to operate normally when siliconchip.com.au Fig.1: the basic elements in a car air conditioning system. H ow A n A ir- C o n d it io n e r Wo r k s Fig.1 shows the basic elements of the air conditioning cycle. The system comprises condenser and evaporator coils, a compressor and an expansion valve. In operation, the compressor compresses the refrigerant gas. This causes the gas to become hot and it is then passed through the condenser (essentially a large radiator) to cool. In the process of giving up heat, the refrigerant becomes a liquid (ie, it condenses). This liquid is then passed through an expansion valve and this causes the liquid to expand into a low-pressure gas, significantly cooling it in the process. Following the expansion valve, the low-pressure refrigerant is passed through the evaporator coil. Any air that passes over this coil will be cooled, due to heat absorption by the cold evaporator. This cooling process also reduces the air’s capacity to hold moisture and so this condenses to form moisture on the evaporator coil. As a result, the air is also dehumidified. Lower air humidity allows the human body’s cooling system to work more efficiently by allowing water evaporation from the skin to occur more readily. Along with the lowered air temperature, this reduced humidity gives an additional cooling benefit. engine loads are light. In addition, the system can be set up to switch off the compressor when the vehicle is stationary (engine idling). That’s the basic concept but in practice there’s a lot more control “intelligence” built into the system as we shall see. In theory, this improved control should also reduce fuel consumption. However, we have not done any tests to confirm this. In order to understand how we can improve the operation of the airconditioner, let’s take a look at how we control it. If you are not sure how air-conditioning works, refer to the above panel entitled “How An Air Conditioner Works”. Temperature control Most older air-conditioners control the cabin temperature using a thermostat located in the cabin. This simply switches the compressor on or off, depending on the temperature. By contrast, modern climate control systems are much more complex in their operation. They generally use a thermistor to monitor temperature. Its output is fed to an electronic control January 2007  29 does not require a speed signal to be connected. (3) Low feature mode – used if you only want the controller to provide high-throttle compressor switch off. Alternatively, for this mode, you can ditch the Air-Conditioner Controller and use the Simple Voltage Switch from “Performance Electronics For Cars” instead – see panel. Inputs monitored Fig.2: how a car air-conditioner is wired into circuit. Note the alternative wiring arrangements for the condenser fan. circuit which then acts to direct air (via vents) over the evaporator, control the air-flow speed, maintain humidity levels and control the compressor. Our controller works with both types of air-conditioner systems. Override control One possible drawback to our controller is that the cabin temperature could rise uncomfortably high during extended hill climbs. As a result, we’ve included an optional override switch. By pressing this switch, the controller is disabled for a preset period, so that the air-conditioner operates normally. This preset period can be set anywhere from 2-10 minutes, with each switch press giving a 2-minute increment. In addition, the unit can (optionally) be set so that the compressor comes on for longer that it normally would during deceleration. In other words, the cabin is cooled down further than normal. The idea here is that the compressor then won’t have to come on as much as usual on level stretches of road. Of course, this extended cool-down period also causes wider than normal temperature fluctuations in the cabin temperature, although this can be adjusted to suit individual preferences. Alternatively, you can dispense with this feature altogether, depending on the settings chosen during the set-up procedure. Three operating modes The firmware allows the user to select one of three different operating modes when setting up the Air-Conditioner Controller. These are: (1) Full mode – this includes the highthrottle compressor switch off, the low-throttle extended cool-down period (compressor on) and compressor switch-off when the engine is idling. (2) Medium mode – this is the same as the full mode but does not include compressor switch-off when the vehicle is stationary. This mode Main Features • • • • • • • Automatically switches compressor off when car is accelerating or travelling up hills (high throttle) Compressor may run with low throttle even when the cabin temperature setting has been reached Automatically switches compressor off when car is stationary Standard compressor operation with normal throttle position Override switch Optional speed signal input LED indicators for main functions 30  Silicon Chip In operation, the Air Conditioner Controller monitors the car’s throttle position sensor in order to gauge engine load. In addition, there’s a speed signal input, a compressor “flag” input and the above-mentioned override switch input. The speed signal input applies mainly to city driving conditions, where vehicles invariably spend a lot of time sitting at traffic lights. This input (derived from the speedometer signal) allows the Air Conditioner Controller to automatically switch off the compressor when the vehicle is stationary. Alternatively, if most of your driving is in the country, you may not wish to use this feature since the engine won’t spend much time idling. In that case, it’s simply a matter of leaving the speed input disconnected. Compressor flag input The compressor flag signal is normally used to directly drive the compressor. It goes high (+12V) to turn the compressor on when the cabin requires cooling and low (0V) when the temperature setting is reached. In this application, however, the compressor flag is used as an input. Its job is to indicate to the controller whether the compressor would normally be on or off. Basically, the Air Conditioner Controller intercepts the compressor signal and processes this along with the other inputs. It then switches the compressor on and off via an external relay. Fig.2 shows how the compressor is normally wired, while Fig.3 shows the wiring with the Air Conditioner Controller installed. Logging the flag signal In operation, the on/off duty cycle of the flag signal is logged by the controller. This is done so that the controller can determine the necessary extra compressor turn-on period during desiliconchip.com.au Fig.3: this diagram shows how the wiring is rearranged to include the Air-Conditioner Controller. The compressor and its condenser fan are now switched on and off by the controller via an external relay (Relay1). The second relay (Relay2) is used only if the vehicle uses the alternative condenser fan wiring. celeration and braking. The flag signal isn’t logged continuously though, as this would give an erroneous indication of the overall duty cycle. Let’s take a closer look at this. First, the flag signal isn’t logged if it goes high during high engine load conditions. That’s because the controller will have disabled the compressor and this in turn can cause the flag signal to go high (in a vain attempt to turn the compressor on) for much longer periods than normal. As a result, the duty cycle would quite unrealistic if it was to be measured. Conversely, we do log the flag signal when it is low during high engine load conditions, since it is no longer affected by the actions of the controller. That’s not the end of it. Again, for low-throttle positions, the flag signal is not logged if it is low and the compressor is running, as the controller is again effectively overriding the flag signal. Similarly, there’s no logging when the engine is idling and the compressor flag is high, because the controller prevents the compressor from running. Basically, logging only takes place when the controller is not overriding the flag signal and the air-conditioner is operating “normally”. If there is intervention one way or other by the controller, the logging ceases. siliconchip.com.au Any logging that does take place only begins after the compressor flag signal goes low and then high again, indicating the start of normal thermostatic control by the air-conditioning system. Any logging before then (ie, immediately after the air-conditioner has been turned on) would again give a false result. In operation, the compressor flag signal is actively logged over a period that can be set from 1-16 minutes. This logging time excludes those periods when logging is paused. The extended cool-down function only becomes fully operational when there is a satisfactory log of the flag signal for processing by the PIC microcontroller. The default length of the extended cool-down period is set by the multiplier adjustment. Other settings Apart from the multiplier adjustment, there are three other main settings: the adaptation setting, the logging period and the retrigger period. The adaptation setting modifies the length of the cool-down period according to the driving pattern. At its minimum setting, the extended cooldown period is the same each time it is activated. By contrast, at higher settings, the extended cool-down period is progressively reduced according to the number of times the vehicle slows down (or decelerates) in a given time period. The idea here is that we can afford to reduce the length of the extended cool-down periods if they are occurring quite frequently. The logging period can be set anywhere between 64 seconds to 16 minutes in 64s steps. However, the total number of samples in the whole logging period is always 128. Generally a 4-5 minute logging period will be suitable (ie, the compressor flag will be sampled approximately every 2.5s). However, if the compressor normally switches on and off at a fast rate, it may be necessary to use a shorter logging period to correctly sample the compressor flag signal. Finally, the retrigger setting sets the minimum delay between switching the compressor off and then on again (and vice versa). It only comes into effect during high-throttle switching (compressor off), low-throttle cooldown switching (compressor on) and idle switching (compressor off). Basically, the retrigger period functions as a timer to prevent the compressor from being switched on and off at a rapid rate. It can be set anywhere from 0-15s, although a 2-3s setting will generally be suitable. The retrigger setting does not affect January 2007  31 Specifications • • • • • • • • • • • • Compressor monitor period: adjustable in 64-second steps from 64s to 16 minutes. Compressor sampling period: selected with monitor period from 0.5 to 7.5s Multiplier effect: adjustable in 0.8% steps from x1 to x2 Adaptation adjustment: from standard to full in 16 steps. Throttle input range: 0-5V with R1 out; 0-14.8V with R1 in. Low throttle adjustment: 0-5V or 0-14.8V. High throttle adjustment: 0-5V or 0-14.8V. Compressor retrigger period: adjustable in 1s steps from 0-15s (with 0.5s uncertainty). Compressor flag input: 0-15V. Speed signal input sensitivity: 1.2V (VR4 fully clockwise) to 3V (VR4 at two thirds anticlockwise). Override period: adjustable from 2-10 minutes with 2-minute increments per switch press. Current consumption: 200mA with all LEDs lit and compressor relay on. the time taken to switch the compressor off under high throttle settings. It is also disabled when the compressor is behaving normally in response to the flag signal, since it will be operating within the manufacturer’s specifications. Condenser fan drive As shown in Fig.2, car air-conditioning systems run an electrically operated condenser fan to help transfer heat from the condenser to the ambient air. This fan can be wired so that it either runs only when the compressor is on or so that it runs permanently whenever the air-conditioner is turned on, regardless as to whether the compressor is running or not. Our controller caters for both types of fan wiring. In the first case, the condenser fan is left connected across the compressor and both are controlled via the same output from the controller. In the second case, the fan is driven via a separate controller output (and external relay). This is done because the controller may run the compressor once more after the air-conditioner has been switched off to implement the extended cool-down function. Circuit details Its operation may sound complicated (thanks to the software options) but the circuit itself is really very simple. Fig.4 shows the details. 32  Silicon Chip PIC microcontroller (IC1) is the heart of the circuit. This accepts the various inputs, runs the software program to perform the various functions and drives the relays and several LED indicators. The software is quite involved, with about 1500 lines of code. Much of the programmed code provides the decision logic for the extended cool-down feature. In its basic form, IC1 is programmed to monitor inputs from the speed-o­ meter signal, the throttle position sensor and the compressor flag signal. It processes these inputs and drives the compressor (via Relay1) according to the software logic. In addition, there are inputs from trimpots VR1-VR3 and override switch (S1), with further options provided by links LK1 & LK2 – see Tables 3 & 4. The main outputs from IC1 appear at RA0 and RA1 (pins 17 & 18) and these drive NPN transistors Q2 and Q3, along with indicator LED6 (Compressor On). Additional outputs at RB5, RB7, RA6 & RA7 drive LEDs 2-5 respectively. As shown, the speedometer signal is fed to the base of transistor Q1 via a voltage divider consisting of 10kW and 1kW series-connected resistors and trimpot VR4. Zener diode ZD2 clamps any voltages above 16V, while the associated 10nF capacitor shunts unwanted high-frequency signals. Trimpot VR4 functions as a sensitivity control for the speed sensor signal. When VR4 is set to maximum (10kW), Q1 switches on when the speed sensor signal goes above 1.2V and off when the signal goes below this threshold. Setting VR4 to a lower resistance value attenuates the signal fed to Q1’s base, which means that the speed signal (and thus the vehicle’s speed) must be higher for Q1 to turn on. Q1’s collector is normally held high (at +5V) via a 10kW resistor. When Q1 turns on, the collector voltage is pulled low to about 200mV. A 1nF capacitor provides further high-frequency filtering before the signal is applied to the RB1 input (pin 7) of IC1. The override switch S1 connects to the RB0 input (pin 6) of IC1 via a 1kW resistor. This resistor and its associated 100nF capacitor provides RF filtering, to keep unwanted noise out of the RB0 input. The RB0 input is normally held high via an internal pull-up resistor. However, when S1 is closed, RB0 is pulled low (towards 0V) and this is detected by the software. As a refinement, the software includes a routine that makes sure that very short switch closures or transients are ignored. Throttle position The throttle position is monitored at the AN5 (pin 12) input via a 1MW resistor. This resistor has a high value in order to prevent any loading on the car’s throttle position sensor. ZD3 clamps any transients that exceed 16V, while the 100nF capacitor filters the signal to remove high-frequency noise. Resistor R1 (510kW) is included to attenuate the throttle position sensor output if its voltage range goes up to 14.4V. Alternatively, this resistor is left out for speed sensors with a 0-5V range (the more usual case). IC1 converts the voltage applied to its AN5 input to a digital value. In this case, 0V is converted to “0”, while 5V becomes 255. Voltages between these extremes have values between 0 and 255. Next in line is the compressor flag input and this connects to RB4 (pin 10) via series 100W and 10kW resistors. Zener diode ZD4 and the 100nF capacitor again act to clamp transients and filter the input signal. A high-level compressor flag signal (up to 14.4V) is indicated via LED1 which is connected siliconchip.com.au Fig.4: the circuit is based on PIC microcontroller IC1. This device monitors several input signals and controls the compressor and its condenser fan via external relays. via a 3.9kW current-limiting resistor. Inputs RB2 & RB3 are for links LK1 & LK2. These inputs are normally held high (+5V) via internal pull-up resistors. When a link is installed, its corresponding input is pulled low to 0V. Link LK1 selects the function of trimpots VR1, VR2 & VR3, while LK2 is installed if you want to dispense with the “compressor off when vehicle is stationary” feature in Medium mode (see Table 3). Trimpots VR1, VR2 & VR3 each connect across the 5V supply, with their wipers connected to the AN2, AN3 & AN4 inputs respectively. The voltages on their wipers are converted to digital siliconchip.com.au values in a similar manner to the voltage on the AN5 input. These values then set the multiplier value and the low and high-throttle thresholds when link LK1 is out (Table 4). Alternatively, they set the adaptation value, the logging period and retrigger period when LK1 is installed. Indicator LEDs Indicator LEDs LED2-LED5 are driven by the RB5, RB7, RA6 and RA7 outputs of IC1. These show the speed signal, high throttle, low throttle and override conditions, respectively. In operation, the Speed LED (LED2) flashes at a 1Hz rate when a speed sig- nal is detected. By contrast, the HighThrottle LED (LED3) lights continuously when the throttle position sensor voltage goes above a threshold set by VR3. Conversely, the Low-Throttle LED (LED4) lights when the throttle sensor voltage goes below a threshold set by VR2. LED 5 is the Override indicator. It lights for the duration of the override period when switch S1 is pressed. Finally, LED6 indicates when the compressor is on, which is whenever IC1’s RA0 output goes high. This output also drives the base of transistor Q2 via a 1kW resistor. When RA0 goes high, Q2 turns on and drives Relay1. January 2007  33 Fig.5: install the parts on the PC board as shown here. Resistor R1 is installed only if the throttle sensor output exceeds 6V (see text), This is the fully-assembled PC board. Note how the indicator LEDs are mounted. Transistor Q3 is driven by output RA1 in a similar manner to Q2. This transistor drives Relay2 which in turn controls the condenser fan in some installations. Power supply Power for the circuit is derived from the vehicle’s ignition supply. This is fed to 3-terminal regulator REG1 via diode D1 which provides reverse polarity protection. A 10W resistor and 470mF capacitor decouple the supply following D1, while zener diode ZD1 (16V) protects REG1 from damage due to voltage transients. Pin 4 (MCLR) of IC1 is connected 34  Silicon Chip the REG1’s output via a 1kW resistor. This pin resets the microcontroller each time power is applied. Construction All parts (except the relays) are installed on a PC board coded 05101071 (107 x 61mm) and this is housed in a plastic box measuring 130 x 68 x 44mm. PC-mount screw terminals at either end of the board take care of the external wiring connections. Fig.5 shows the assembly details. As usual, start by carefully checking the PC board for defects (shorted tracks or breaks in the copper pattern, etc). While you’re at it, check the hole sizes. In particular, check the holes for the screw terminals and the four cornermounting holes. Enlarge these holes if necessary. That done, install all the resistors but note that R1 should be left out for the time being. Table 1 shows the resistor colour codes but you should also use a digital multimeter to check the values as some colours can be difficult to decipher. The diodes and IC socket can go in next, taking care to ensure that they are all oriented correctly. Follow these with the capacitors, again taking care to ensure that the electrolytics go in the right way around. Transistors Q1-Q3 are next on the list, after which you can install LEDs16. The latter should be mounted so that the top of each LED is 28mm above the PC board (pushing the LEDs down onto a cardboard spacer between their leads is the best way to achieve this). Make sure that each LED goes in with its anode lead towards the left (the anode lead is the longer of the two). Note that LEDs 1&6 are red while the remaining four LEDs are green. The 3-terminal regulator REG1 is next on the list. As shown, this device is mount­ed with its metal tab flat against the PC board. It’s installed by first bending its leads down by 90°, then slipping it into position and fastening its tab to the board using an M3 x 6mm screw and nut. That done, its leads are soldered to the PC board and cut to length. siliconchip.com.au Don’t solder REG1’s leads before bolting down its metal tab to the board. If you do, this could impose strain on the soldered joints and crack the board tracks. The board assembly can now be completed by installing trimpots VR1VR4, the screw terminal blocks and the link headers for LK1 & LK2. Don’t install IC1 in its socket yet, though – we’ll get to that shortly. Testing The test procedure is quite brief and simply consists of checking the supply rails before IC1 is plugged into its socket. To do this, apply power to the +12V and 0V terminals and check that there is 5V between pins 14 & 5 of IC1’s socket. If this is correct, switch off and install IC1, taking care to ensure it is oriented correctly – see Fig.5. Adjustments Initially, before switching on the Air Step 4: if you have an oscillator connected, set it at about 100Hz (or anywhere between 2Hz and 1kHz) and adjust trimpot VR4 (sensitivity) so that the speed LED flashes. If the LED does not flash, check that the oscillator level is sufficient. When the oscillator is disconnected the LED should stop flashing. Step 5: rotate the external potentiometer fully anticlockwise and check that the Low-Throttle LED lights. Conversely, check that the High-Throttle LED lights when the potentiometer is rotated fully clockwise. Step 6: set the potentiometer mid-way so that neither throttle LED is lit. Now press the compressor flag switch. The compressor flag LED (LED1) should immediately light, followed by the compressor LED (LED6) within 0.5s. Release the switch and both LEDs should extinguish. Step 7: press and hold the compressor flag switch again and check that the compressor LED extinguishes as the pot is rotated clockwise to a high setting. Step 8: check that the signal generator is off and press and hold the compressor flag switch. Check that the compressor LED goes off as the potentiometer is rotated fully anticlockwise. If the signal generator is now connected, then the compressor LED should come on. Note that if link LK2 is installed, the compressor LED should stay lit for low potentiometer settings even when there is no oscillator signal. Step 9: set the potentiometer mid-way Conditioner Controller for the very first time, the programmed settings are: Multiplier – x1.2; Low Throttle Threshold – 1.25V; High Throttle Threshold – 3.75V; Adaptation – minimum; Logging Period – 5 minutes; Retrigger Period 5s. However, these settings will be immediately altered by the settings of VR1, VR2 & VR3 when power is applied. As indicated previously, LK1 also plays a role here. If LK1 is out, then the Multiplier, Low Throttle and High Throttle settings will be set by VR1-VR3. Conversely, if LK1 is in place, then the Adaptation, Logging Period and Retrigger Period will be adjusted by the trimpots – see Table 4. Once a setting is changed, it is remembered unless changed again via the link and trimpot adjustments. You will need to make a note of the settings for VR1, VR2 and VR3 so you can return these to their selected settings whenever the link is changed to make the alternative adjustments. The initial tests can be performed using the test setup shown in Fig.6. You will need a couple of momentarycontact pushbutton switches, a 10kW (or any value up to 100kW) linear potentiometer (to simulate a throttle position sensor) and some hook-up wire. If you have one, a signal generator (or oscillator) can be used to check the speed signal detection. It’s then just a matter of following the procedure set out below. Step 1: install LK1 and adjust VR1, VR2 and VR3 fully anticlockwise. This will set the Logging Period to 64s, the Retrigger Period to 0s and the Adaptation to its minimum setting. Step 2: remove LK1 and adjust VR1 fully clockwise to set the multiplier to x2. Step 3: set VR2 about 1/4 of a turn clockwise and VR3 about 3/4 of a turn clockwise. Table 2: Capacitor Codes Value 100nF 10nF 1nF mF Code IEC Code EIA Code 0.1mF 100n 104 .01mF   10n 103 .001mF   1nF 102 Table 1: Resistor Colour Codes o o o o o o o o siliconchip.com.au No. 1 1 3 1 10 1 1 Value 1MW 510kW 10kW 3.9kW 1kW 100W 10W 4-Band Code (1%) brown black green brown green brown yellow brown brown black orange brown orange white red brown brown black red brown brown black brown brown brown black black brown 5-Band Code (1%) brown black black yellow brown green brown black orange brown brown black black red brown orange white black brown brown brown black black brown brown brown black black black brown brown black black gold brown January 2007  35 Fig.6: this is the test set-up for the controller board. The 10kW potentiometer simulates the throttle sensor, while an external oscillator is used to simulate the speedometer signal input. and press the compressor flag switch for about 16s. At the end of 16s, release it for 16s, then press it again for another 16s and release it for 16s. This will build up an on-off duty cycle log of the compressor flag signal over the 64s logging period. Step 10: release the compressor flag switch during low throttle (ie, low throttle LED lit). Check that the compressor flag LED extinguishes, while the compressor drive LED stays lit for a short period before it too switches Table 3: Modes Mode Link LK2 Speed Signal High Out Required Medium In Not Required Low Out Not Required off. This is the cool down period and will not be initiated again until the compressor drive flag goes from low to high again (ie, by releasing and then pressing the compressor flag switch). Step 11: press the override switch (S1) and check that the override LED lights. The compressor output LED should now light whenever the compressor flag LED lights (ie, when S2 is pressed). This should happen for any potentiometer setting and regardless as to whether the oscillator (speed) signal is on off. This override should continue for two minutes. Assuming that everything checks out, the finished PC board can be installed in a UB3 box by clipping it into the integral side pillars. The indicator LEDs protrude through matching holes in the lid and these can be drilled using the front-panel artwork Table 4: Setting The Trimpots Link LK1 Out In VR1 VR2 VR3 VR4 Multiplier Low throttle High throttle (anticlockwise x threshold (anticlockwise 1, clockwise x 2 (anticlockwise 0V, clockwise 5V in 0.8% steps) 0V, clockwise 5V at pin 12 in 255 at pin 12 in 255 steps) steps) Speed signal sensitivity (Anticlockwise low sensitivity, clockwise maximum sensitivity) Adaptation (anticlockwise no adaptation, clockwise maximum in 16 steps) Speed signal sensitivity (anticlockwise low sensitivity, clockwise maximum sensitivity) 36  Silicon Chip Logging period (anticlockwise 64 seconds, clockwise 16 minutes in 64 second steps) Retrigger period (anticlockwise 0 seconds, clockwise 15 seconds in 1 second steps) as a template – see Fig.7. You will also have to drill holes at either end of the box to pass the external wiring to the terminal blocks. Installation Fig.3 shows the installation details. First, you will need to trace some of the connections in your car’s wiring. The speedometer signal wire will need to be located, as will the throttle position sensor and compressor drive wiring. That means that a copy of your car’s wiring diagram is an absolute necessity. In addition, you will need to locate a +12V ignition terminal (ie, a wiring point that only goes to +12V when the ignition is on). This can easily be located inside the fuse box. If you don’t intend to use the speed signal input in Medium Mode (ie, you don’t want the compressor to automatically cut out when the vehicle stops), install link LK2 on the PC board – see Table 3. Once you’ve located the throttle position sensor lead, use a multimeter to determine its output voltage range. Normally it covers the range from just above 0V at idle throttle position through to about 5V at full throttle. It’s just a matter of turning the ignition on (but not starting the engine) and then adjusting the accelerator position while you make the voltage measurements. If the voltage is above about 6V with high throttle, install resistor R1 on the PC board. If it is around 6V or less, the resistor can be left out. siliconchip.com.au What If The Compressor Runs All The Time? Parts List Some car air conditioners are not thermostatically controlled, which means that the compressor runs continuously while ever the air-conditioner is switched on. In this case, there’s not much point in logging the compressor flag signal since it will be high all the time. As a result, you will not be able to use the controller’s extended cool-down feature. The controller can still be used to automatically switch off the compressor when the vehicle is accelerating (high throttle) and when the vehicle is stopped, however. Alternatively, you might want to consider using the SILICON CHIP Voltage Switch to simply switch off the compressor under high-throttle conditions. This circuit was published in “Performance Electronics for Cars” and is simpler (and cheaper) than the controller featured here. Note, however, that the on-board relay used in the Simple Voltage Switch will NOT be suitable for switching the compressor on and off. Substitute a 30A horn relay as specified in this article. Finally, be sure to set the hysteresis wide enough to prevent the compressor from rapidly switching on and off. 1 PC board, code 05101071, 107 x 61mm 1 UB3 box, 130 x 68 x 44mm 1 SPST momentary panel switch 2 30A SPST horn relays (Relay2 optional; see text) (Jaycar SY4068 or equivalent) 2 30A horn relay bases (one optional; see text) (Jaycar SY4069 or equivalent) 1 3-way PC-mount screw terminal block, 5.08mm spacing 4 2-way PC-mount screw terminal blocks, 5.08mm spacing 4 10kΩ horizontal mount trimpots (VR1-VR4) (code 103) 1 18-pin DIL IC socket 1 M3 x 6mm screw 1 M3 nut In addition, the wiring to the condenser fan needs to be checked out. Fig.2 shows the two possible wiring configurations, while Fig.3 shows how each configuration is connected to the controller. Note that the 85, 86, 30 & 87 numbers in Fig.3 refer to the connections marked on the relay for the coil and the relay contacts. Note also the Relay2 is not required if the condenser fan is connected directly across the compressor and its series pressure switch. Be sure to use 30A automotive horn relays, as specified in the parts list. These can be bolted to the chassis and plugged into the specified bases. The wires from the relay bases are then lengthened and spliced into the car’s wiring using insulated automotive crimp connectors. Similarly, use automotive connectors to make the connections to the sensors, the +12V and 0V (chassis) supply connections and to the override switch. If you have an older car, the latter can be installed on the dashboard. On more modern cars, it can be hidden under the dash but should still be readily accessible. Note that the ignition-switched +12V supply to the controller should not go to 0V when the starter motor is cranked. Pressure switch What ever you do, make sure that the pressure switch is included in series with the compressor – see Fig.2 & Fig.3. It’s there to independently siliconchip.com.au 24V Operation Want to operate this unit from a 24V supply? It’s just a matter of changing a few component values, as follows: ZD1-ZD4 should be 33V 1W zener diodes; the 470mF capacitor at the input to REG1 should be rated at 35V; the 100mF capacitor decoupling the relay supply should be rated at 35V; if R1 is needed it should be 220kW; and finally, the relays must have 24V coils. switch off the compressor to prevent icing when necessary. Note also that you will need to initially wire the Air Conditioner Controller so that it can be accessed for easy adjustment. After you are satisfied with the adjustments, it can later be tucked up out of the way under the dashboard. Adjustments Once the installation is complete, you need to go through the following steps: Step 1: Switch on the ignition so that power is applied to the Air Conditioner Controller. Step 2: Press the accelerator down very slightly and adjust VR2 (with LK1 out) so that the Low-Throttle LED just lights. Step 3: Press the accelerator down to the position you normally use for brisk acceleration (or for going up hills) and Semiconductors 1 PIC16F88 microcontroller programmed with aircon.hex (IC1) 3 BC337 NPN transistors (Q1-Q3) 1 7805 5V regulator (REG1) 3 1N4004 1A diodes (D1-D3) 3 16V 1W zener diodes (ZD1-ZD3) 2 3mm red high-intensity LEDs (LED1,LED6) 4 3mm green high-intensity LEDs (LED2-LED5) Capacitors 1 470mF 16V PC electrolytic 2 100mF 16V PC electrolytic 1 10mF 16V PC electrolytic 4 100nF MKT polyester 1 10nF MKT polyester 1 1nF MKT polyester Resistors (0.25W, 1%) 1 1MΩ 10 1kΩ 1 510kΩ (R1) 1 100Ω 3 10kΩ 1 10Ω 1 3.9kΩ Miscellaneous Automotive wire, connectors. adjust VR3 so the High-Throttle LED just lights. Step 4: Install LK1 and adjust the adaptation control (VR1) to fully anticlockwise, the logging period (VR2) to 5 minutes (about 1/3 of a turn clockwise) and the retrigger (VR3) to mid-way for about 7.5s. For a longer retrigger period, set VR3 fully clockwise. If you are not concerned about the compresJanuary 2007  37 This Unit Doesn’t Suit All Cars Warning! This Air Conditioner Controller is designed to work with cars that have a throttle position sensor that delivers a voltage dependent on throttle position. This type of sensor is normally installed in cars that use electronic fuel injection and engine management. Cars with a carburettor fuel system are unlikely to include a throttle position sensor. Cars with a carburettor could, however, be modified to include a potentiometer that is operated by the throttle. A long life potentiometer would be required, such as one available from Farnell Cat. 469-9518 (www.farnellinone.com. au). This is a Vishay 10kW linear conductive plastic potentiometer rated for five million operations and 125°C. A 5V supply for the high throttle end of the potentiometer could be obtained from the 5V output of REG1. The 0V signal could be obtained from the 0V input or the chassis. The potentiometer’s wiper provides the throttle position voltage. Note that a low voltage output should coincide with a low throttle, while a high voltage output should be produced at high throttle positions. The speed signal must be derived from a signal pulse train that’s fed out of the engine management computer (ECU); eg, the speedometer signal – see warning panel. Alternatively, if the ECU doesn’t have a speed signal input, a signal can be derived directly from the speedometer sensor. A cable-operated speedometer is usually not suitable unless the speedometer outputs a signal for the engine management computer. A speed signal could also be derived from the drive shaft using a magnet and coil in a similar manner to that used in the Speed Alarm published in SILICON CHIP in November and December 1999. Be sure to derive the speed signal for this unit from your car’s speedometer signal – ie, from an output from the engine management computer (ECU). DO NOT tap into a speed sensor signal that’s used as an input to the ECU. The reason for this is that many cars now have anti-lock braking (ABS), traction control, electronic stability control and other systems that rely on speed sensor signals to the ECU. Tapping into one of these signals could upset the operation of these important systems. sor rapidly switching on and off, then set VR3 fully anticlockwise. Test drive It’s now time for a test drive, to see how the controller performs. Here’s the procedure: Step 1: Start the car and turn the airconditioner on, then lift the bonnet and check that the condenser fan runs correctly with its new wiring. Step 2: Drive the car. When the com- pressor flag LED goes out, the cabin will have cooled to the thermostat setting. When it does, press the override switch to allow the compressor flag signal to be logged without the controller’s high load and low throttle settings affecting the compressor drive. Note: the override switch is not normally used to allow the logging of the compressor flag signal. It’s simply used during this initial adjustment procedure to make setting-up much Fig.7: this full-size artwork can be used as a drilling template for the front panel. 38  Silicon Chip faster and more predictable. Step 3: During the override period, watch the compressor action. There may be long periods that the compressor is on and long periods where it is off. You need to set the logging period so that it’s long enough to cover at least several compressor flag on and off cycles. This is done using VR2 with LK1 installed – see Table 4. Step 4: Observe the Low and HighThrottle LEDs. You may need to readjust the settings here to suit your driving style. For example, the high throttle LED may not light at the required acceleration rate. Alternatively, it may light when simply cruising, in which case VR3 should be adjusted further clockwise (LK1 out). If the low throttle LED lights under cruise conditions, turn VR2 further anticlockwise to correct this. Step 5: If you needed to alter the logging period in step 3, press the override switch again. When the override period expires, check the cool down operation on low throttle. Adjust VR1 for the required multiplier effect (LK1 out). Note: setting VR1 fully anticlockwise disables the cool down feature, while fully clockwise gives a long cool down period. Step 6: Set the adaptation level for personal preference using VR1 (LK1 in). And that’s it, although you may need to do some further fine-tuning later on based on further driving experience. In the meantime, you can enjoy the performance benefits of your new “intelligent” air-conditioner. SC siliconchip.com.au