<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - prjs:door_light</title>
        <description></description>
        <link>https://www.baszerr.eu/</link>
        <lastBuildDate>Wed, 06 May 2026 09:34:25 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://www.baszerr.eu/</link>
        </image>
        <item>
            <title>door_light</title>
            <link>https://www.baszerr.eu/doku.php?id=prjs:door_light:door_light</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;door_light&quot;&gt;door light&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:img_0495.jpg&quot; class=&quot;media&quot; title=&quot;prjs:door_light:img_0495.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=600&amp;amp;tok=836858&amp;amp;media=prjs:door_light:img_0495.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;door light mounted&quot; alt=&quot;door light mounted&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
it is quite often the on a staircase of a building i live in light is not on, when it should. first thing is that there is no window nearby. second thing is that, for some reason, light bulbs die too often in that place. in order to be able to easily locate keyhole on the door i&amp;#039;ve created a mini-project aiming at providing some extra light when it&amp;#039;s dark. so i came up with a simple infrared (IR) proximity sensor, that when something moves near the sensor, it activates the light for about &lt;a href=&quot;https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%2527s_Guide_to_the_Galaxy#Answer_to_the_Ultimate_Question_of_Life.2C_the_Universe.2C_and_Everything_.2842.29&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%2527s_Guide_to_the_Galaxy#Answer_to_the_Ultimate_Question_of_Life.2C_the_Universe.2C_and_Everything_.2842.29&quot;&gt;42&lt;/a&gt; seconds. not to scare off neighbors it is activated on a close proximity only – moving ones hand few centimeters from the sensor does the trick. :)
&lt;/p&gt;

&lt;p&gt;
since version 2.0.0 whole electronics (including sensors) is located outside, and only powered from the inside (main fuses are on a power supply board). there is also simple option of activating it from the inside. dim-in and dim-out are also available on main light, not to flash user&amp;#039;s eyes and to signal that timeout is approaching and device will turn lights off in a few seconds.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;door light&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;door_light&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-1261&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;hardware&quot;&gt;hardware&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:img_0483.jpg&quot; class=&quot;media&quot; title=&quot;prjs:door_light:img_0483.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=03ed87&amp;amp;media=prjs:door_light:img_0483.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;device - macro photo&quot; alt=&quot;device - macro photo&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:img_0486.jpg&quot; class=&quot;media&quot; title=&quot;prjs:door_light:img_0486.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=8d3d24&amp;amp;media=prjs:door_light:img_0486.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;device and a screw for size comparison&quot; alt=&quot;device and a screw for size comparison&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
hardware part is supplied with +12V that is used to light up the LEDs, power IR sensors and is stabilized to +5V for uC. light from IR LED, when reflected, causes photo-transistor to change voltage on ADC3 pin of &lt;a href=&quot;https://en.wikipedia.org/wiki/AVR&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/AVR&quot;&gt;ATTiny13&lt;/a&gt;. the change is detected and LEDs are turned on for about 42 seconds. uC is clocked with internal RC oscillator, since no real precision is required here.
&lt;/p&gt;

&lt;p&gt;
for users&amp;#039; convenience there is also an RED LED, that makes it easier to locate the sensor.
&lt;/p&gt;

&lt;p&gt;
after applying power supply device lights. this is designed to be able to light up device from the inside, by simply disabling power for a short time. to make this usable, just put on-(off)&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; on type switch on the power supply line.
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:img_0489.jpg&quot; class=&quot;media&quot; title=&quot;prjs:door_light:img_0489.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=4928c3&amp;amp;media=prjs:door_light:img_0489.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;internal light-up button&quot; alt=&quot;internal light-up button&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
schema and PCB layout (yes - single layer!) are attached below.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:dl_schema.png&quot; class=&quot;media&quot; title=&quot;prjs:door_light:dl_schema.png&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=400&amp;amp;tok=38aa9b&amp;amp;media=prjs:door_light:dl_schema.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;board schema&quot; alt=&quot;board schema&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:dl_pcb.png&quot; class=&quot;media&quot; title=&quot;prjs:door_light:dl_pcb.png&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=90bfba&amp;amp;media=prjs:door_light:dl_pcb.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;PCB&quot; alt=&quot;PCB&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;hardware&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;hardware&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;1262-2393&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;power_supply&quot;&gt;power supply&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
board does not have a fuse. it is important to add a protection though, since power is outside of your apartment and someone might short-circuit it, damaging the device. since the device also requires +12V power supply, both are assumed to be external. +12V power supply unit once can buy cheaply in every store. i&amp;#039;ve decided to go a step ahead and make splitter for the power as well, since i plan to connect more devices in the future, as well.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:schema_pwr.png&quot; class=&quot;media&quot; title=&quot;prjs:door_light:schema_pwr.png&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=400&amp;amp;tok=744851&amp;amp;media=prjs:door_light:schema_pwr.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;schema of fuse board&quot; alt=&quot;schema of fuse board&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=prjs%3Adoor_light%3Adoor_light&amp;amp;media=prjs:door_light:pcb_pwr.png&quot; class=&quot;media&quot; title=&quot;prjs:door_light:pcb_pwr.png&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=200&amp;amp;tok=c95258&amp;amp;media=prjs:door_light:pcb_pwr.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;PCB of fuse board&quot; alt=&quot;PCB of fuse board&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
it is of course enough to provide supply directly to the door_light device - just remember to add a proper fuse.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;power supply&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;power_supply&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;2394-3099&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;software&quot;&gt;software&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
source code is written in C++. whole program consists of a main loop that sleeps and reads ADC interchangeably. if the difference of readings between two iterations exceeds predefined threshold, LEDs are being turned off. each time threshold is reached again, timer for LEDs is reset, thus making it longer to be lit up.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;software&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;software&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;3100-3443&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit5&quot; id=&quot;downloads&quot;&gt;downloads&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
full source code and the electronic schematic can be obtained from the &lt;a href=&quot;https://en.wikipedia.org/wiki/github&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/github&quot;&gt;github&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;git clone https://github.com/el-bart/door_light.git&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;downloads&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;downloads&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;3444-&amp;quot;} --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;normally on, off while pressed.&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:50 +0000</pubDate>
        </item>
    </channel>
</rss>
