Smooth switching on/off light in cars, schematic diagram

Electronic relay with light soft switching function


Every driver knows how tiring the yellowing of ordinary incandescent bulbs in the headlights of the car sometimes is. Xenon bulbs are not desirable, even though they have a low consumption and a long life. Due to the high dazzle of oncoming traffic drivers, the probability of accidents increases. Good and not excessively white glow gives halogen lamps.

Their main disadvantage is increased power consumption and heat generation. In addition, like all filament-based lamps, they have half the lifespan of xenon lamps.

The physics of the filament burnout process is simple. Any conductor, when heated, increases its resistance to current flow. The filament in operation heats up and provides the necessary power of glow. At the same time, its resistance provides insufficient current in the circuit to melt the filament metal. When you turn on, the resistance of the cold lamp is 12-13 times less than the working one and, accordingly, the electric current is as much higher. It is at this point that the filament most often burns out.

It would be ideal to smoothly increase the voltage following the heating and correspondingly increasing the resistance. This idea is not new – household lamps have long used electronic devices that ensure smooth switching on and extend the life of incandescent lamps. Examples of schemes of such devices can be found on the Internet in large quantities. Applying them to the car, you should consider that it is better to use the replacement of the regular replacement part fundamentally new without the need to rework the main wiring.

This idea was implemented on a 2008 KIA Cerato LD with Philips CrystalVision H4 halogen bulbs simply by replacing the stock dipped beam control relay with an updated analog in accordance with the new requirements.

The scheme of headlights control with some simplification is shown in the figure.


The red color marked easily removable relay, which requires modification. It is convenient that through the contact “30” there is always power +12 V and through “86” and light switch or through “87” and cold lamps, with practically zero resistance, there is always connection on mass.

The technical requirements were as follows:

– consumption of the electronic relay when the ignition is off within 5-7 mA, providing a small leakage current to protect the battery from discharge; – when the headlights are first turned on, a smooth heating of the lamp filaments for 10-12 sec. should be provided; – when the lights are off for less than 0.5 sec. and then switching it on, if the ignition is not switched off, the delay shall be 0.5 sec. with 80% power output plus 1 sec. to achieve 100% light level; – with the engine on, 0.5 sec. 50% power of dipped beam after it is switched off shall be maintained.

The last point requires explanation. The glass bulbs of the H4 bulbs combine the spirals of the low and high beam. In this case, the wiring diagram of the car is designed so that they can only turn on alternately. The whole construction is kept quite hot after the first switch-on and no longer requires a long delay to warm up the filaments. This is important when flashing the high beam for a short time. After it, the dipped beam will turn on without delay and will not cause inconvenience to the road traffic in the dark time of the day.

Diagram of an electronic relay

The realization of the idea of the new relay is shown in the schematic.


It uses pulse width modulation (PWM) in the control of the key element of the load power supply. The role of electronic switch should be an element providing switching of direct voltage of 12 V with a rated load current of 12 A and short-term pulse current up to 150 A. At the same time it is necessary to have low power drop on it in open state and control voltage not more than 5 V with low currents, working on low capacitive load.

The selected IRF9310 p-channel MOS transistor meets these requirements and has the following characteristics:

– drain-source voltage 30 V; – drain-source current 20 A; – gate-source threshold voltage 2.4 V; – open channel resistance 6.8 mOhm; – gate input capacitance 5250 pF; – maximum power dissipation 2.5 W.

A simple scheme for smooth on/off switching of interior lights

In the schematic this is transistor VT4. The resistor R12 ensures its reliable and fast locking. PWM control is provided by an ATtiny13A microcontroller with an operating frequency of 1.2 MHz. The current consumption of the chip is less than 1 mA. Its maximum output current of 40mA ensures reliable response of the VT4 key element and is limited by a resistor R11 to between 33-35mA.

ATtiny13A is powered by linear regulator 79L05, designed for a load current of 100mA. Capacitor C2 smooths current pulsations at the moments of VT4 transistor actuation. Its capacity is allowed 1,0-2,2µF. This element is the only one that consumes a lot of power in the whole circuit – up to 6 mA quiescent current. The +12V DC power supply for the whole circuit is only provided when the ignition is turned on through VT1. An n-channel n-field transistor, IRLML0030, is used here. You can use any other transistor rated up to 20V with a maximum load current of 5A. The transistor source is connected to the common ground either via cold headlight lamps and diode VD3 or via the headlight switch via VD4 and R6.

The control signals of the microcontroller are fed to the inputs PB3 and PB4. Via VT2 the ignition is informed and the headlights have to be switched off. Via VT3 a signal is given to switch on the headlights. Capacitor C1 ensures that after a brief cut off of the dipped beam the lamps are lit at 50% for 0,5 sec. A tantalum small-sized electrolytic capacitor designed for a voltage of 35 V is used. Smaller capacitors, up to 10 µF, can also be used.

Modes of operation of the circuit

Ignition and lights off – transistors VT4 and VT1 are closed.

Ignition is on. Transistor VT1 is opened by a signal through resistor R1 and diode VD1. Through it charges the capacitor C1 through the circuit resistor R4, diode VD3 and cold headlight bulbs. Through resistor R2 and diode VD2 a voltage is applied to transistor VT2 to open it and the ignition signal is applied to microcontroller input PB4. The controller goes into waiting state for the dipped beam to turn on.

The dipped beam headlights are switched on. Transistor VT3 opens with a signal through resistor R9 and the microcontroller receives a signal on input PB3 to turn on the headlights. The controller turns on the power transistor VT4, which ignites the lamps. PWM ensures their smooth heating, for 10-12 seconds. The circuit is switched to power supply by VD4 and R6.

The dipped beam is switched off. The resistor R10 closes transistor VT3 and the microcontroller, having received a signal on input PB3, turns on the PWM in the mode of 50% heating of the lamps. Capacitor C1, periodically recharged through the diode VD3 and the lights at the moments of switching transistor VT4, keeps VT1 this time in the open state.

The ignition is switched off. Through resistor R5 transistor VT2 is closed. The signal on input PB4 forces the microcontroller to close transistor VT4 and go into standby mode. Resistor R3 ensures that transistor VT1 closes, which de-energizes capacitor C1. The headlight is turned off. The ignition is off when the dipped beam switch is on. Transistors VT1 and VT4, when closed, ensure that the headlights turn off. Current leakage occurs only through R9, R10 within 1.7 mA, which does not significantly affect the battery discharge.

Circuit algorithms

Slow heating at first turn on


The following occurs:

– the first 3 sec. smoothly increases the glow of the lamps to 30% due to PWM operation; – the level of glow achieved for 2 sec. is maintained unchanged to warm up the lamps; – the next 3 sec. smoothly increases to 80% and the lamps give a satisfactory light level; – in the last 4 sec. 100% power is achieved

Heat retention after switching off


When the headlights are switched off, for 0.5 sec. 50% power to the lamps is provided. Then in 0.5 sec. the heat sinks gently to zero.

Rapid heating


This mode is only possible if the lamps are at 50% power – in the heating hold state. When you turn on the light, you will reach 80% power in 0.5 seconds – enough power to illuminate the road. After approx. 1.5 seconds the lamps are already at their full power.

Automatic switching off of the parking lights when the turn signal light is on.

In any case if the lamp power is reduced below 50% it goes out. The next time they are switched on, they follow a slow heating cycle. If during the slow or fast heating cycle, the headlight switch opens when the power on the lamps has exceeded 50%, then the hold cycle begins.

Thermal mode of the device

The IRF9310 transistor has a resistance of only 6.8 mOhms in the open state. At the 11A current drawn by the lights, the power dissipation is less than 0.822W. The transistor specification requires a 6.5 cm2 copper plate for heat dissipation. In the small volume of the relay it is difficult to do this and for cooling the relay leg is used, to which the transistor drain is soldered as close as possible. This provides an acceptable heat up to 55-60 °C.

The ATtiny13 controller program

The finite state automaton implemented by the program provides for 6 states: 1. waiting for the lights to turn on with the ignition off; 2. smooth heating; 3. waiting for the next light to turn on; 4. fast heating; 5. full bulbs on; 6. turning off with hold.

The choice of states is determined by interrupt handling at the moment of timer overflow. The PWM control is implemented by the timer in phase-correct PWM mode. The timer and the controller have an operating frequency of 1.2 MHz and the PWM output signal is 2353 Hz. The microcontroller goes into a reset state when the power supply drops below 2.7V. For this purpose the Brown-out detector voltage protection is activated in the settings. A delay of 0.064 sec. is set for resetting the automatism.

Process of relay making

Kia uses a non-uniformized relay, and it is supplied to the stores on demand at considerable cost.

Its output legs are symmetrical. For the coil and work pins, they are in pairs diagonally. Therefore, it makes no difference which way the device is plugged into the sockets. For a new electronic relay, the polarity of the connection is important, so markings must be made on the housing for proper installation. The wrong position will lead to failure of the electronic part.

The original relay does not need to be disassembled. The fact is that this car has a shunt for the daytime running lights option. This shunt is the same as the dipped beam relay in terms of shape and connection.


They are interchanged, and the modification of this shunt is done with less effort. In addition, it is inexpensive and can be purchased in stores just in case.

Next, the metal shunt is sawed out, leaving the feet to attach the future board.


The board itself is made of double-sided foil-faced fiberglass with dimensions that allow it to be mounted in the new relay. For the same purpose, a double-sided assembly using small radio elements was used. The board measures 19.70 X 18.00mm.

Here is a picture of it from both sides.



Laser Etching Technology (LUT) was used for the fabrication. For the pattern we use glossy photo paper, on which the picture is printed by a laser printer. The pencil pattern is transferred to a grease-free textolite surface after etching with fine sandpaper using a hot iron.

After etching, drilling and tinning the board will have the following appearance.

When tinning you have to be careful not to overheat and damage the tracks. It is better to use minimal heat of soldering iron and solder with low melting point – PSPB 33, Rose or Wood alloy.

The radio elements are soldered onto the board.



Then it is installed in the relay housing.



On top of the housing must be placed a label for proper installation in the car.


The radio elements used for manufacturing are:

– AVR microcontroller – ATtiny13A; – stabilizer 79L05 (MC79L05ACD); – transistors VT1, VT2, VT3, VT4 – IRLML0030, 2N7002, IRLML5103, IRF9310 respectively; – diodes BAS321; – capacitor C1 – tantalum electrolytic 10-22 µF at 35 V; – capacitor C2 – ceramic 1,0-2,2 µF ; – resistors OMLT 5% 0. 125W.

To implement the device according to the required algorithm it is necessary to program the microcontroller with firmware before installing it on the board. Programming is done with any programmer that supports ATtiny13A chip. From industrial models such as PICPROG, ChipProg+ or “Master” will do.

Auto electrics. Thermostat for the auto fan

It is easy to use Sprint-Layout program to print out the printed circuit board. The board layout for this program is presented in this file.

The text of the controller program you are using can be found at the address. It can be opened with Atmel Studio 6.0.

The idea of soft headlights can be applied to any vehicle. You only need to adjust the technical solutions according to the electronics used.

Smooth switching on and off of lights

As you know, incandescent bulbs burn out mostly at the moment of switching on. This is because the electrical resistance of the cold filament is much lower than that of the glowing filament. Therefore, at the moment of switching on, a current far in excess of the rated value passes through the filament. If the lamp is no longer new and its filament has become thinner over time, this increased current is sufficient to cause the lamp to burn out at the moment of switching on.

To prolong the life of an incandescent lamp, you should ensure that the filament of the lamp heats up smoothly by gradually increasing the voltage applied to the lamp. You can do this by including a “soft starter” in the power circuit of the lamp.

On the Internet you can find a lot of circuits for the soft start of lamps. On sale there are also ready-made solutions, for example, relay 405.3787-02 produced by JSC “Energomash”, Kaluga (photo 2, 3):

This relay provides smooth increase of supply voltage on load from zero to the nominal 12V within 1 second. When switched off, voltage is also smoothly reduced to zero for 1 second. Maximum load current consumption is 25A (photo 4, 5). The current consumption of a standard car halogen 12V/55W lamp is about 5A. As you can see, the characteristics of the relay 405.3787-02 are enough to provide smooth ignition of up to four headlight bulbs.

21 Mar 2017 | Chapter: Reader Works

Hello, dear readers of the website Looking through the article about the soldering iron power regulator, I immediately remembered a long assembled and well-recommended circuit of soft on and off lights, which was published in Radio magazine #10 1981, p.54.

In the above design, the light turns on in 1.5 to 2 seconds smoothly to the maximum, and when turned off, it goes out as smoothly (like in a movie theater) in 1.5 to 2 minutes. This design is very well suited for a night light, sconce or chandelier, but only incandescent lamps should be used in the fixtures. It is very important that the use of the proposed scheme greatly increases the service life of incandescent lamps, because they have a characteristic feature very often burn out at the moment of normal inclusion.

I repeated this circuit with the same resistor rating, but instead of germanium transistors and diodes I used silicon ones.

I used a thyristor VD5 PCR406J from a Chinese Christmas tree, so the dimensions of the circuit board is 40x30mm, which fits perfectly to the size of the Christmas tree control box.

I also used a diode bridge VD6 – VD9 made of the domestic rectifier diodes KD105V to make my circuit work in the whole voltage range from 0 to 220V. I used KD522B diodes in the isolators VD1 – VD3, but you can use an imported analogue 1N4148. Power of the damping resistor R7 is reduced to 0,5W, and the nominal value is increased to 68 kOhm, all other resistors are MLT 0,125.

The increase of extinguishing resistor R7 rating provides a stabilizing current of VD4 , the main load element of the circuit, in the range of 10-15mA, which is its rated stabilizing current. In this case the circuit works in normal mode without any heating of resistor R7.

The supply voltage after the extinguishing resistor corresponds to the stabilization voltage of VD4 (you can use D814 stabilitrons with letter indices A – D and a stabilization voltage of 7 – 12 V). I used a KC210B – a two-channel regulator, when using which you do not need to observe the polarity, but when using a regular regulator to observe the polarity is very important, because if you make a mistake, then the stabilized voltage will not.

Stealth Subwoofer in Skoda Octavia

When repeating the circuit, the task was to use silicon based transistors, as well as to reduce the dimensions of the circuit board as much as possible. In this version, the circuit started up with a half turn, that is, I want to note that with proper installation and serviceability of the applied radio elements, everything should work at once.

Adjustment is minimum and consists only in selection of ratings of capacitors C1 and C2. Increasing the capacitor C1 increases the time of soft extinguishing of the lamps, and decreasing the capacitor C2 increases the time of soft ignition of the lamps. A table lamp with an incandescent lamp power of 40 W was used as a load.

Assembled and tested in the design attached to the photo, but it is purely a test case, as when you create your own design, you may have to use your wits and adapt the circuit to your lamp. If the board is packed in a box from a Christmas tree garland, you can place it near a switch or hide it somewhere nearby. Four wires come out of the box – two to the new switch and two to the already installed one.

If you need up to 60W of power, the thyristor and diodes I suggested will do, but for 200W or more you should use a rectifier bridge and a thyristor designed for a higher current according to the luminaire power. In my first version, the load circuit was chandelier total power of 360 W and used diodes D245 and thyristor KU202N, and thus no radiators are not needed. Now on sale there are many powerful diodes, as well as diode bridges, such as KBL406.

In order to start the installation to work with the already connected chandelier you need two pins of the diode bridge, going to AC (these pins of the diode bridge are marked with the sign “

“), connect to the terminals of the switch, which should be in the open state, as well as install an additional switch that controls the circuit.

I want to say a little about the transistors used. The circuit can use almost any transistors. If you have domestic versions, KT502, KT503, KT3102, KT3107 with any letter index will do. I have to save space involved VT1, VT4 – KT315 and VT3 KT361. The transistors gain doesn’t have a special value, though I used VT2 KT3107, which controls the pulse generator, with a little bit more gain h21e. It is more for reinsurance, but KT502 or KT361 should also work reliably.

We used sPlan 6.0 program to make the schematic diagram and Layout40 program to layout the printed circuit board. The PCB file can be downloaded from this link.

IMPORTANT! This design has a transformerless power supply, so all operations must be performed with the mains disconnected to avoid electric shock!

I wish you success in making the construction! Alexey Zhevlakov, Moscow.

Despite the popularization of LED lamps, their filament predecessors still illuminate millions of homes, largely due to the lower retail price. In this category we can include not only the usual incandescent bulbs, but also halogen light sources with a GU4 and GU5.3 socket, etc.

It is no secret that incandescent bulbs tend to burn out when turned on, when the coil has the lowest electrical resistance. To change the situation and prolong the life of the lighting fixture will help the device of soft switching on of incandescent lamps (PSI). The task of FCLD is to gradually increase the voltage on the load, avoiding sudden current surges for the first fraction of a second after switching on.

With FVCL you can not be afraid of frequent short-time switching on.

It is easy to organize the smooth switching of lights in your home. It is enough to buy a ready-made soft starter or make it yourself, based on the practical experience of radio amateurs. Consider both options.

Ready-made assemblies

There are many reliable devices from domestic and foreign manufacturers that allow you to implement a smooth switching on and off of incandescent lamps. They are not difficult to find in the electrical goods store in the form of small boxes labeled: “Soft-start device for halogen lamps” or “Protection unit for halogen and standard incandescent lamps”. The emphasis on halogen lights is due to their high cost compared to conventional bulbs, which should attract more customers. For example, UPVL on 220V the size of a matchbox, can withstand loads up to 300 watts for a long time and costs about 300 rubles. Smooth start of incandescent lamps can be realized through the so-called phase regulator. In essence, this is the same UPVL, but designed for a larger load and having a more complex control system. Its dimensions are determined by the size of the heat sink, which is needed to remove heat from the power element of the circuit (usually a triac). You can buy a decent quality phase regulator for 1000 W for about 600 rubles.

The voltage at the output of the unit for soft switching of lights is a few volts lower than the mains voltage, which further prolongs the life of the lamp.

Each of the devices, providing soft switching of incandescent lamps, is included in series in the electrical circuit, that is, in the gap of one of the wires: phase or zero. In this case, the time of voltage rise in the load is fixed and not regulated. It is set by the manufacturer and can range from tenths to three seconds.

A good adapter for a laptop from 12 volts

For those who doubt the quality of industrial VCRs (especially those of Chinese origin), there are many simple, reliable schemes suitable for self-assembly. Let’s take a look at one of them.

A simple scheme for the self-assembly.

The following circuit is easy to assemble, reliable and noteworthy for the fact that it is designed not only for the smooth switching on of incandescent lamps on 220V, but also for their smooth switching off. And it is also worth noting that the flash and fade delay is set at the stage of assembly at your own discretion.

Schematic at

The schematic diagram of the soft starters is shown in the figure below. It is based on a chip KR1182PM1 (DIP8), inside of which there are two thyristors and two control systems to them. Capacitor C3 and resistor R2 set the duration of soft on and off respectively. Triac VS1 is needed to separate the power and control parts, and resistor R1 sets the current of the control electrode. C1, C2 are external capacitors needed to control the thyristors inside KR1182PM1. The R4, C4 circuit protects circuit elements from line noise.

Principle of operation

In the home position the contacts of the switch SA1 must be closed. This nuance must be considered when connecting the board to the wall switch. At the moment of opening of SA1 contacts the capacitor C3 begins to gain capacity, thereby triggering the thyristor control system. At the output of the IC through resistor R1 there is a gradual increase of current, which controls the operation of the power switch. The result of the control system is a soft start of the triac VS1 and the light bulb EL1 in series with it.

The rate of current rise on the control electrode depends on the rating of capacitor C3. For the lamp to light up gradually within 3 seconds, the capacitance of C3 must be 100 µF. To increase the time to 10 seconds, you would have to set C3 to 470 uF. The duration of the soft switch-off is set with resistor R2. It is recommended to start with a value of 2 kOhm.

Printed Circuit Board and Assembly Parts

You can download the finished 40x45mm single sided textolite PCB in Sprint Layout 6.0 file here. To increase protection, a 1A FU1 fuse has been added to the circuit. The board is designed for the following ratings of radio elements:

  • DA1 – KR1182PM1;
  • С1,С2 – 1 uF-16V (polar);
  • С3 – 470 uF-16V (polar);
  • С4 – 0,1 uF-630V (non-polar);
  • R1 – 470 Ohm-0,25W±5%;
  • R2 – 3 kOhm-0,25 W±5%;
  • R4 – 51 Ohm-0,25 W±5%;
  • VS1 – KU208G.

The use of devices that provide smooth switching of incandescent lamps has benefited people for several decades. With the help of UPVL, the service life of filament bulbs is increased by at least 40%. As for the above circuit, its efficiency and reliability have been tested on my own experience.

( No ratings yet )
Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: