logo elektroda
logo elektroda
X
logo elektroda

Economical night-time lighting, not only for seniors

yego666 5259 41
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • The project I present below shows LED lighting ( but can also be classic ) switched on by a PIR sensor.
    In my case, the inspiration was the notorious spilling of a sweet drink when I reached for it at night.
    You're sleepy, it's a dark night, you want a drink, but it's hard to hit the glass in the dark, so it happened that all or part of the contents of the glass landed on the carpet instead of giving the thirsty person a drink.
    Then, of course, the cleaning of such stains is both cumbersome and laborious.

    The system presented here can also be used to light the way to the fountain or any other way to be travelled at night or in the dark (e.g. the cellar).

    I should add that the device is very energy-efficient, as the power supply is switched on only briefly to maintain voltage on the supercapacitor and, of course, when lighting is activated via the PIR. For 99% of the time, the system draws practically no energy from the 230V mains.

    To begin with, of course, the schematic diagram:

    Electronic schematic of an LED lighting system with a PIR sensor. .

    and the circuit board, as usual made by myself:

    Printed circuit board showing an electronic circuit for LED lighting activated by a PIR sensor. .

    It's worth saying a few words about the electronics themselves.
    I don't have a problem with using processors where it makes sense, but in this case I preferred to use "more discrete" circuits, as using a processor in such a circuit wouldn't simplify anything circuit-wise, and you'd have to write some nonsense control software in addition.

    So how does the circuit work?
    Let's start with the fact that the circuit remains in standby for 100% of the time while being powered by the supercapacitor. When the voltage on the supercapacitor is sufficient, the circuit blocks the mains voltage through a circuit consisting of an optocoupler, an NMOS transistor and a bridge rectifier.
    When the voltage on the supercapacitor drops below a designated level, the mains voltage is switched on and goes to a DC/DC converter or, more precisely, an AC/DC converter working as a DC/DC in this circuit. The inverter is an ordinary power supply from some mobile charger giving 12V and about 400mA at its output.
    This voltage is used to power our LED strip and, when reduced to a value of about 2.7, charges our supercapacitor.
    When the voltage on the supercapacitor reaches the required value, the mains voltage is disconnected from the circuit. The charging time of the supercapacitor is two to three minutes, and then the system operates for about six hours on the supercapacitor alone.
    When movement activates the PIR detector, the mains voltage is switched on to power the lighting connected via the NMOS transistor, while the supercapacitor is charged.
    Sensitivity and duration of illumination are adjusted by Pr-controls in the PIR detector (obviously of Chinese manufacture).

    The mains voltage switching circuit is made on LM393 comparators and a CD4001 chip.
    It is strikingly similar to the NE555 circuit, which gave me the idea to replace the LM393 and CD4001 tandem with some NE555 type circuit.
    Unfortunately, the standard NE555 has improperly set switching thresholds and also draws considerable current, which is undesirable in such a device.
    So I found Texas TLC555 circuits in my stash and reworked the circuit diagram for these. They have negligible resting current, small dimensions (SMD) and replace (after minor modification) a pair of LM393 and CD4001, saving space and standby current consumption.
    Below is a diagram of the device with the TLC555 chip:

    Electronic circuit diagram for LED lighting with PIR sensor. .

    The finished circuit in the box looks like this:

    View of the interior of an electronic device with a mounted printed circuit board featuring various components..

    And then there's the same arrangement mounted on a bedside cabinet:

    Corner of a room with installed LED lighting and a PIR motion sensor. .


    I hope the layout is useful to someone and saves someone's carpet :)

    I encourage esteemed colleagues to enrich the topic with their thoughts and/or ideas.

    Moderated By Felini:

    3.1.13. Publish posts that violate the spelling rules of the Polish language, are careless and incomprehensible.
    The word "supercapacitor" does not exist in the Polish language.

    .

    Cool? Ranking DIY
    About Author
    yego666
    Level 33  
    Offline 
    yego666 wrote 2155 posts with rating 534, helped 239 times. Been with us since 2004 year.
  • ADVERTISEMENT
  • #2 21141270
    Alpha
    Level 26  
    It's nice to look at the analogue logic and your work put into it, but additionally with me you would have won the monthly form over content contest ;) .
    You don't write specifically what the current draw of the PIR sensor used is, but if it's really so small that you decided to power it with a supercapacitor, why not just power it with ordinary batteries or a Li-Ion cell? All the logic and expensive supercapacitor circuitry would be superfluous, if you were stubborn you could add a detector and low battery voltage indication. Or a little differently - a transformerless power supply on a capacitor in a plug-in housing (e.g. from an old transformer power supply) permanently plugged into an electrical socket.... and you have a ready-made device for a dozen or so zloty...

    Screenshot of various night light offers with motion sensors on online store websites.
  • #3 21141271
    speedy9
    Helpful for users
    Plus for the independent construction. I see some drawbacks here. Firstly, the circuit does not have a light sensor and will also switch on during the day. I also don't quite understand what the point of using a supercapacitor is. It charges from the power supply anyway, so the amount of energy taken from the mains is the same as with a direct power supply. It unnecessarily complicates the circuit.
    Such a driver for an LED strip with external light detection and motion detector, powered from a 5V micro USB charger on Ali costs £15. Probably not worth knocking down an open door in such a case.
  • ADVERTISEMENT
  • #4 21141345
    klamocik
    Level 36  
    Such lights at a price of £11 I think are still on ali of course with a brightness sensor, the only problem is during the day you have to expose them to the sun.
  • ADVERTISEMENT
  • #5 21141382
    acctr
    Level 38  
    yego666 wrote:
    I would add that the device is very energy efficient as the power supply is only switched on briefly to maintain the voltage on the supercapacitor and of course when activating the lighting via the PIR.
    .
    It doesn't work like that, energy is time times power and it doesn't matter to the meter whether you switch the power supply on briefly or leave it in "contact" permanently.
    Someone calculated that 5 USB chargers left in contact for a year not charging any phone generates a cost of about $0.37, or just over a zloty.
    I suspect that the circuit itself with the supercapacitor and the circuitry implementing this type of power supply costs a lot more.
    Helpful post? Buy me a coffee.
  • #6 21141426
    yego666
    Level 33  
    I see no problem with using another term instead of 'supercapacitor', although it has been in use in my circles for many years.
    To those offended I apologise :) .

    However, going back to the comments posted by my Colleagues, I decided to use a super capacitor ( let it be SK for short ) instead of a battery due to the low current consumption of the whole system. The PIR detector ( with integrated photodiode ) draws less than 0.5mA of current, the power lock hold circuit takes 1mA ( if you use a slightly better optocoupler ) and the rest of the circuit takes about 0.5mA ( using the TLC555 circuit ).
    The total is therefore about 2mA.
    It would be a bit much to give a battery, as it would lick after a month, and the circuit is supposed to be maintenance-free.
    A mains power supply ( even one without a transformer ) would have to be used anyway as the current-consuming lighting has to be powered somehow.
    Like any electronics technician, I have a stock of various components - including supercapacitors, so I just reach out and have one. You can buy SKs for about 3pln at the moment, so it's a matter of taste whether that's expensive or cheap.
    In my opinion, it's not at all worth making anything yourself at the moment because the Chinese sell it five times cheaper on a well-known portal, however, usually such devices have several disadvantages.
    First: the buyer will learn nothing from them,
    second: they have the functionality that their designer came up with and not exactly what I would like, hence I often pay for something that doesn't quite suit me,
    Thirdly: a charger that is permanently plugged into the mains draws one watt of power all the time, which over a thousand hours of operation is already 1kWh (and that's about a month of time), and after a year is already 10kWh. After ten years we already have 100kWh, and so on. At current electricity prices it will probably be about 50pln, and that's more than the whole device costs, ergo we have it for free ;) .
    fourth: it is not worth supporting the Chinese and their economy by buying their products....
    I won't write for what reasons, because I don't know if political-economic protectionism ( i.e. protecting one's own interests ) isn't in conflict with the Forum rules.
    And lastly: by giving a second life to recycled components instead of buying new ones, we are helping the environment, i.e. ourselves, to avoid heaps of harmful electro-waste.

    In the presented layout, some simplifications and optimisations can be made.
    For example, the mains charger could be converted to output 2.7V (suitable for the SK), but then a standard 12V LED strip could no longer be used for lighting, nevertheless the 34063 chip could be dispensed with, even though it only costs about 50 cents, and I bet you dollars to nuts that most electronics engineers have a few of these recycled cubes in their stocks.
    This is just one example of optimisation, but any thinking person can redesign the circuit as they like.
    What I have shown is just an example and you can copy it 1:1, but it is better to understand it and do it your own way.
    I guess that's the point of sharing such designs.
  • #7 21141441
    gulson
    System Administrator
    Is this how you can do it without a microcontroller? :) Joke! Great! The good old days of electrodes are back!
    Write me a packet and I'll send a small gift.
  • #8 21141465
    Sentymentalny
    Level 14  
    I like it. Wouldn't it be a problem to publish the KiCad files?
  • #9 21141473
    yego666
    Level 33  
    Yes, it is not a problem at all.

    The only question is whether you want the version with LM393 and CD4001 or the one on TLC555?
  • #10 21141480
    Sentymentalny
    Level 14  
    If I have to choose, it's with the LM 393, but preferably both versions, just in case.
  • #11 21141489
    md
    Level 41  
    An idea that is impractical in every way. The motion sensor will react to any movement of the sleeping person and the light may be on all night.
    Ready-made devices of this type can be bought, not as written above, for over £20 as they are under £5.
    Screenshot of offers for night lights on Allegro. .
  • ADVERTISEMENT
  • #13 21141508
    yego666
    Level 33  
    @md

    I didn't write that there aren't any, but they all either have an on/off switch, are battery operated, are expensive, don't give room for your own creativity, and are certainly Chinese made which in my eyes completely disqualifies them.

    As far as switching on the device is concerned, it can be positioned not in front of the nose of the sleeping person but somewhere to the side behind them, so that the field of reaction covers the area we are interested in.
    The system will then switch on when the awake person makes a movement in the area we have selected, O!
  • #14 21141770
    acctr
    Level 38  
    yego666 wrote:
    a permanently plugged-in charger still draws power in the order of one watt
    .
    How did you measure this?
    Specify:
    - what charger it is, what power it has,
    - with what instrument you made the power measurement,
    - under what conditions you made the measurement.
    Helpful post? Buy me a coffee.
  • #15 21141984
    yego666
    Level 33  
    I have three more comments on the design of the device.

    The output voltage of the 34063 regulator should be set so that the voltage on the cathode of diode D7 does not exceed the maximum permissible operating voltage of the super-capacitor minus 0.1V, i.e. for a capacitor with the permissible voltage of 2.7V a voltage of 2.6V should be set on the cathode of diode D7, which means that the output of the 34063 regulator should be set to 2.7V ( maximum 2.75V ) because the drop on diode D7 ( schottky ) is from 0.1V to 0.15V depending on the current.

    At the output of the U4 circuit, a voltage of at least 4.1V should be set, as the LM393 comparator responds correctly to an input excitation of 2.6V when its supply voltage is 1.5V higher, i.e. at 4.1V.
    For the TLC555 chip, this voltage may even be below 3V, but remember that this voltage controls the gates of transistors Q2 and Q3 (so it must be sufficient to drive them fully) and supplies the PIR detector, which starts at 3V.

    In the TLC555 circuit, it is additionally necessary to calibrate ( preferably with PRs ) the switching thresholds of the comparators contained in the TLC555 circuit so that the lower threshold ( set by R8 ) is about 1V, and the upper threshold ( set by R6 ) is 2.6V.
    Unfortunately, the TLC555 circuits have quite a spread in the parameters of the internal voltage divider, hence the need to calibrate them for a particular circuit.
    For my copy, the resistance values of R6 and R8 are as shown in the schematic, but other copies may differ significantly in this regard.
  • #16 21142331
    Marcin125
    Level 28  
    yego666 wrote:
    In my case, the inspiration was the notorious spilling of a sweet drink when I reached for it at night.


    That's what I don't understand...
  • #17 21142348
    Krzysztof Kamienski
    Level 43  
    yego666 wrote:
    instead of a battery because of the low current consumption of the whole system.
    Is it the grid that switches off at night like in Zanzibar that you need an emergency power supply? Because supercapacitors are used for such purposes (if only to maintain the memory of some programmed device or the walk of a clock). You won't power an anti-spill lamp from it either. Rather, it is a microswitch in a glass holder with a sweet drink, switching on the light when you reach for it. You have over-designed and designed, and praise for that. The only thing you forgot was the purposefulness of the action, but it happens.
    What do you make of it, Robot ? @ElectrodBot
  • #18 21142349
    ElektrodaBot
    AI OpenAI ChatGPT4
    Krzysztof Kamienski wrote:
    (...) you won't power the spill from it either. Here, it's more like a micro-switch in a glass holder with a sweet drink, turning on the light when you reach for it. You have over-designed and designed, and praise for that. The only thing you forgot was the purposefulness of the action, but it happens.
    What do you say, Robotics ?
    1. Emergency power supply: .
    Supercapacitors are often used to maintain memory or clock walk in the event of short power interruptions. They have the ability to charge and discharge quickly, making them ideal for applications requiring a short supply of energy. However, if longer power backup or higher energy capacity is needed, rechargeable batteries may be a more suitable solution.

    2. Spill lamp:
    Powering the anti-spill lamp from a supercapacitor may not be the optimal solution due to the limited energy capacity of supercapacitors. Your suggestion with a microswitch in a glass base is an interesting and practical approach. Such a solution would be energy efficient and perform its function more effectively.

    3. Purpose of operation: .
    In electronic design, it is crucial not only to create a functional layout, but also to ensure that the solution is relevant and effective. Sometimes in the heat of design the practicality aspect can be overlooked. Your comments are right on and demonstrate the importance of critical thinking and consideration of alternatives in electronic design.

    4. Design context: .
    Without the full context of the original project, it is difficult to assess whether the proposed solution was the best for the situation. It is possible that there were specific requirements or constraints that influenced the design decisions in this way rather than others.

    In conclusion, your comments are very valuable and demonstrate the importance of critical thinking and consideration of alternatives in electronic design. Each design should be carefully considered in terms of its practical application and energy efficiency.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #19 21142378
    khoam
    Level 42  
    Krzysztof Kamienski wrote:
    This is more of a micro-switch in the glass holder of a sweet drink, turning on the lighting when the glass is reached for.

    Unfortunately, this illumination will then be switched on if that glass of drink is knocked over. It is important that the illumination occurs even before the intention to reach for the glass, even if that is the only intention.
  • #20 21142420
    efi222
    Level 19  
    PIR sensors have a considerable tripping delay. The question is whether the movement of a hand reaching for a glass can switch on the lighting in time? I once built a circuit to switch on the lighting on a staircase. The tripping delay of the PIR discriminated against this sensor. I used laser reflective sensors. Expanding on the theme of speed of response: The IR barrier is fastest (single milliseconds) , then the reflective sensor (tens of milliseconds) and finally the PIR (about 1 second).
  • #21 21142505
    sq3evp
    Level 37  
    efi222 wrote:
    I used reflective laser sensors. Expanding on the theme of speed of response: The fastest is the IR barrier (single milliseconds) , then the reflective sensor (tens of milliseconds) and finally the PIR (about 1 second).

    Yes, you're right - to control the LED strip I have an inductive sensor because the PIR was too slow.
  • #22 21142515
    mmm777
    Level 31  
    You take a green LED light of very low power (here 0.6W) and plug it into a socket.
    At night, once your eyes have become accustomed to it, you can see everything, and the illumination does not disturb your sleep (thanks to distant ancestors who lived in the green twilight and evolved the greatest sensitivity of sight for green...).

    Small green LED bulb with 0.6W power connected to a plug.
  • #23 21142521
    khoam
    Level 42  
    @ElectrodBot What effect does green light have on human sleep?
  • #24 21142522
    ElektrodaBot
    AI OpenAI ChatGPT4
    khoam wrote:
    What effect does green light have on human sleep?
    The effect of green light on human sleep is a complex issue and scientists are still studying all aspects of it. In general, however, it can be said that green light has less negative effects on sleep than blue light, but can still affect the production of melatonin, the hormone that regulates the diurnal rhythm.

    Here are the details:

    1. Melatonin: .
    Green light, like other colours of visible light, can inhibit melatonin production in the pineal gland. However, its effect is much weaker than blue light, which has the strongest suppressive effect on melatonin.

    2. Wavelength: .
    Green light has a wavelength intermediate between blue and red light. Blue light (with a shorter wavelength) is the most energetic and has the greatest impact on the diurnal rhythm, while red light (with a longer wavelength) has the least impact.

    3. Individual differences: .
    Sensitivity to light, including green light, can vary from person to person. Some people may be more sensitive to it than others.

    4. Intensity and time of exposure:
    Green light intensity and exposure time also play a role. Prolonged exposure to bright green light before bedtime can make it difficult to fall asleep.

    Conclusions:

    Although green light may not be as detrimental to sleep as blue light, it is recommended to limit exposure to all types of light, including green, an hour or two before bedtime.

    Here are some practical tips:

    - Reduce the brightness of screens: Many electronic devices now have a "night mode" feature that reduces blue light emissions, often giving the screen a yellowish or reddish tint. This is a step in the right direction, but it is also worth reducing the overall brightness of the screen.
    - Warm lighting in the bedroom: Use warm coloured light bulbs (around 2700K) in the bedroom to minimise exposure to blue light.
    - Red light: Red light has the least effect on melatonin production. You might consider using bedside lamps with red bulbs if you need light at night.
    - Blackout curtains: Using blackout curtains in the bedroom can help block out light from outside, including green street light.

    Remember that a healthy night's sleep is crucial for physical and mental wellbeing. It's worth ensuring proper sleep hygiene to ensure optimal rest.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #25 21142549
    efi222
    Level 19  
    I like structures made from scratch. Quite unusual in this design.
    But wouldn't a small illuminated switch within arm's reach be enough?
  • #26 21142618
    yego666
    Level 33  
    Dear Colleagues, I very much appreciate your comments and guidance.

    Undoubtedly, the solutions with green and pink lights are cool and simple to make ( or buy ), but that's what we have a head and free time for, so that instead of buying various gadgets that don't quite meet our expectations, we can think, design and make ourselves what meets our assumptions 100 per cent and not 10.

    A lamp or any other device plugged into a socket and switched on for 8 or 10 hours a day consumes a certain amount of energy, for which you have to pay, and also first burn a forest (there aren't many of them) or a fossilised dinosaur to produce this energy while letting some CO2 into the atmosphere we breathe.
    My device only takes as much energy as it needs to live and occasionally light the way to the glass.
    It certainly saves on the electricity bill, and reduces the carbon footprint, if only slightly.
    We don't know how to do things so that we can still pay someone to do them for us - even if only for 5 zloty.

    In addition, it is worth noting that self-construction of various devices is based to a large extent on recycled parts and components, so by using them we do not increase the need for new components, ergo we protect the environment.

    One cannot base an assessment of the desirability of constructing one's own appliances solely on the criterion of profitability. "Man does not live by bread alone". There are other, more relevant criteria, which unfortunately we do not always recognise.
    The presence of the human species, for example, is completely unprofitable for our planet, yet it sustains and feeds us, and according to the doctrine of profitability, we should not be here.

    As for the PIR, with me it responds in about 1/2 a second, so it's just a matter of getting the sensor positioned properly so that a hand or head entering the field of observation triggers the device in advance. I don't have ADHD, so I don't have compulsive behaviour either, hence the 1/2 second is all too well.

    In addition to lighting the way to the glass, I installed the same device in the hallway to light the way to the kitchen.
    I know that there are LED bulbs with built-in PIR detectors, but they fall into the category of those adequate only 10 per cent of the time.
    So leave such solutions to those who have no idea about electronics and are condemned to buy such pseudo-energy-saving gadgets.

    One more comment on the PIR detector. As you can see from the diagram, the detector is not permanently connected to the device and power is available at the connector. So instead of it, you can make yourself a laser or other sensor that will light the way for someone faster than the PIR detector.

    Oh, and a note to the use of a supercapacitor for a "non-kosher" purpose.
    To give an example: no one is forbidding cars from racing on the F1 circuit even though in principle they should be driven on roads and carrying people or goods, and yet people do it.
    So why shouldn't I use a supercar where I like it and it makes sense? Should the small imagination of supercapacitor makers limit my creativity?
    The essence of progress is the negation of what exists and not Talmudic adherence to dogmas set by those who know better.
  • #27 21142688
    mmm777
    Level 31  
    You can always think of a microwave sensor - it can be inside an opaque housing....
    From there, there are ready-made ones: https://pl.aliexpress.com/item/32996528902.ht...n.753.39e21c24pFz60i&gatewayAdapt=glo2pol
    I gave one such at my place, with a green light, after getting very painfully knocked out on a cat puke ;)

    "My device only takes in as much energy as it needs to live". - well, then you would still have to count the energy required to produce its components ;)

    The green light has been tried and tested in practice - my old Mother, who had to get up at night, praised it highly.
  • #28 21142690
    acctr
    Level 38  
    yego666 wrote:
    Let us therefore leave such solutions to those who have no idea about electronics and are condemned to buying such pseudo-energy-saving gadgets.
    .
    yego666 wrote:
    a permanently plugged-in charger still draws power on the order of one watt
    .
    You probably have the wrong idea about energy-saving solutions in modern equipment.
    Currently, chargers (power supplies) for phones from decent manufacturers draw < 0.1 watts without any load (idle mode).
    Laptop chargers (power supplies), despite their high power of 100..120 W, also draw negligible power at no load. My 120W HP charger draws 0.13 watts without the laptop connected.

    I am not promoting or encouraging leaving unplugged chargers in sockets, but the annual energy consumption of such a charger left in, say, standby mode is about 1.1 kWh.
    Helpful post? Buy me a coffee.
  • #29 21142749
    yego666
    Level 33  
    mmm777 wrote:
    .
    "My device takes only as much energy as it needs to live". - well, then you would still need to count the energy required to produce its components ;)


    You forget that most devices made "for themselves" by hobbyists are made using recycled components, i.e. components that no longer need to be made because they have been made and we now reuse them. Ergo - cost Zero :) .


    acctr wrote:
    You probably have the wrong idea about energy-saving solutions in modern equipment.
    Nowadays chargers (power supplies) for phones from decent manufacturers draw < 0.1 watts without any load (idle mode).
    .
    I am well aware of this, however the stock most of us have is usually not of the latest generation as it is recycled.
    Hence my chargers ( and I have about thirty of them ) are not that energy efficient.
    However, by using such 'older' components in my designs, I am not fuelling the supply from manufacturers of 'new' equipment, and this already goes some way to reducing my carbon footprint.
    A new energy-efficient charger from a good manufacturer ( probably making them in China ) probably costs more than £30, and why should I spend that much when I can do good things without supporting nuanced consumerism?
  • #30 21143160
    Janusz_kk
    Level 39  
    efi222 wrote:
    The fastest is the IR barrier (single milliseconds) , then the reflective sensor (tens of milliseconds) and finally the PIR (about 1 second).

    Because this is how it is built to not react to very short disturbances, hence the rather long response time. In my opinion a PIR sensor is completely unsuitable for this application. In general, the whole project is too complicated, because it would be enough to use a 12V power supply, as in the project, to power the detector, a piece of 12V led strip which can directly switch on the unfortunate PIR detector, because they have relays.
    That is, a few cables and a screw connector, even the board is superfluous, glued into some small box.

Topic summary

The discussion revolves around a DIY project for economical night-time lighting activated by a PIR sensor, aimed at preventing spills when reaching for drinks in the dark. The author emphasizes the energy efficiency of the system, which primarily uses a supercapacitor to power the PIR sensor and LED lighting. Various responses critique the design, suggesting alternatives like using batteries or simpler circuits, and highlight potential issues such as the lack of a light sensor and the PIR's response time. Some participants advocate for the benefits of DIY projects, while others question the practicality of the proposed solution compared to readily available products. The conversation also touches on the impact of different light colors on sleep and the importance of designing devices that meet specific user needs.
Summary generated by the language model.
ADVERTISEMENT