Dimmer for the lamp or courtesy light on the ATtiny13 microcontroller
The device must be able to: – when a door is opened, the light in the cabin will turn on smoothly; – when a door is closed, the light will turn off smoothly after 10 sec (by default) if the engine is not running; – when a door is closed, the light will turn off smoothly without delay if the engine is running; – when a door is closed and the light is on, after the engine is started, the light will turn off smoothly without waiting 10 sec; – when a door is left open, the light will automatically turn off after 10 min after the door is opened; – the ability to program a pause from 0 to 60 sec in 5 sec increments; – the ability to program the level
Making a circuit board Took the circuit board from hardlock
Changes in my board
PCB.lay — Изменения в моей плате “Диммер для плафона или вежливая подсветка на микроконтроллере ATtiny13” Изменил, потому что у меня в салоне 5 светодиодов. Это светодиоды мощные на 1Вт, то 5Вт. Расчет по току 5Вт
You just might have simple incandescent bulbs in the lamp shade. For example two light bulbs, 5W each = 10W. To avoid fussing over the spotlight, make sure you have a good supply of up to 5A for example.
To make the board we need 1. An ATtiny13 Microcontroller 2. A L78L05ABUTR SOT-89 voltage regulator 3. An IRLML2402TRPBF SOT-23 transistor 4. Diode 1N4148W (2pc) 5. Chip capacitor (SMD) 1206 1µF (2pc) 6. Chip resistor (SMD) 1206 51 Ohm 7. Chip resistor (SMD) 1206 4.7 kOhm 8. Chip resistor (SMD) 1206 10kOhm (2pc) 9. Chip resistor (SMD) 1206 47kOhm 10. Clock button
Assembling the device
At this point you have finished assembling the device. Now you can load ATtiny13 Microcontroller.
Firmware v0.4.zip – Firmware for microcontroller Firmware v0.5.zip – Source code for autodimmer (CodeVisionAVR) fuz bytes
Now let’s see how to connect this device and how it works.
Connection scheme You can connect it in two ways – without interfering with the plafond and with some modifications of the plafond (if it is possible). Option 1
Without interfering with the plafond. With this connection smooth switching on/off works only when the plafond operates from the door sensor, as well as the light switch off function when working longer than 10 minutes will not work when the light is on all the time.
With the modification of the plafond. Here the device is connected after the switch in the plafond, which allows you to control the lamp not only from the limit switch, but also when you turn on the lamp “all the time”.
All! Our device should already work! We open the door and the light turns on smoothly. We close the door and the light turns off after 10 seconds. If the engine is running, then when you close the door, the light goes out immediately!
If you do not like the duration of the delay, you can change it. To do this, when the door is open (when the lamp is fully lit), press briefly the button. The lamp will start flashing. The duration of the delay depends on the number of blinks (turns off) – each blink except the first = 5 sec. That is: – 1 blink – no delay – 2 blinks – 5 seconds (default) – 3 blinks – 10 seconds … – 13 blinks – 60 seconds (maximum), then comes one blink.
In the same way you can adjust the sensitivity of the input on the detection of the engine running. To do this, when the door is closed (the lamp is completely off), press briefly the button. The lamp will start flashing. Number of flashes corresponds to the sensitivity: – 1 flash – minimum (~12,5V) – 2 flashes – (~12,8V) – default … – 7 flashes – (~14,5V), then again one flash.
Let’s organize the courtesy lighting in the cabin by a simple scheme 2022
From the convenience, comfort inside the cabin depends on the safety of driving a car. A special role is played by quality exterior and interior lighting, which should not tire the eyes of the driver and passengers, effectively performing its function.
Improving the quality of the light inside the cabin can easily be done by the car owner himself. The so-called dimmer with a simple circuit can be made with your own hands. Also a ready-made product is available in car stores.
Why do we need a dimmer
This device is an analogue of the usual switch. Its distinctive feature is the smoothness of switching on and off the light source. This scheme has been successfully used for some time in the salons of cars. In this case, the device due to its small size can be easily placed not only inside the plafond, but even hidden in the trim.
The dimmer is characterized by the following advantages:
- After the doors are closed, the interior lighting dims and smoothly turns off within 10 seconds;
- the very duration of the soft shut-off is 8 seconds;
- when starting the engine the lights go off automatically;
- after the doors are opened, the lights switch on and stay on for 7 minutes.
The bulb starts to light up when the voltage of the car’s on-board electrical network changes. This process is controlled by the ADC of the microcontroller which monitors the reverse current relay of the alternator.
For example, if the voltage is less than 13.6 volts, it indicates that the engine is off. When this reading is high, the car is running.
“Smart light” is positively perceived psychologically, it does not tire the eyes, since there is no sharp inclusion of light immediately after closing the car doors. Smooth operation of the illuminator provides a special electronic board, which is mounted in the electrical circuit of the car interior.
Lighting in the cabin of the car: installation and refinement with their own hands Many motorists love their “iron horse”, so they try to improve its characteristics. This applies not …
How to make a device with your own hands
Taking a simple universal scheme, almost every car owner can make a courtesy light with his own hands.
The following parts and materials will be needed for the work:
- resistors with resistance to 220 K in the amount of 5 pieces;
- stranded wire
- diode SR5100;
- 16 volt capacitors with a capacity of 50-100 uF;
- Various transistors;
- A soldering iron, rosin and solder.
After completing all the mounting work it is necessary to check the resulting device.
Most often, the design is filled with silicone fixer or high-temperature-resistant adhesive. In this condition, it can be installed directly inside the plafond.
In addition, the system can also be powered from the cigarette lighter by fixing the light sources under the trim at various points in the interior. With LEDs can effectively highlight the different areas and elements of the interior.
Adaptive headlights on VAZ: fairy tale or reality? The most important element of the passive safety system of a modern car is the headlights. Progress …
Installation in the plafond
It is possible to install the device inside the plafond according to certain rules. The work must be performed, following the following sequence:
- First, remove the outer cover of the diffuser with a knife, unscrew the fastening screws and remove the plafond by disconnecting its wires from the mains.
- To install the backlight board, remove the standard bulb, unscrew and remove the standard contact clips. Insert the new backlight board inside the plafond and tighten the screws. The red wire coming from the switch is installed on the ear of the board with a contact pad around the hole. The red wire coming from the connector is not used.
- Connect the black and gray wires with “mom” connectors to the corresponding colored pins of the switch.
Charging the battery at home? It’s life-threatening During the cold season, battery problems become more acute. This is caused by the fact that in winter inside the car…
Thus, every driver on their own can significantly improve the comfort of the interior of their car with the installation of courtesy lights.