» Electronics » Arduino »Night light, smoothly turning on when approaching

Nightlight smoothly turning on when approaching



Typically, automatic lights and nightlights are turned on abruptly by a signal from a motion sensor, photo relay, or both devices simultaneously. The author of Instructables under the nickname Sake of Making came up with a different algorithm. The brightness of the night light glows smoothly depending on the distance to it. When the room is already so light, it remains off, despite the approach.

The wizard takes everything necessary for homemade Components. He gets a folding lampshade in the Ikea store, but you and I know that the same ones are sometimes found in Fix Price stores.



You can break spears for a long time on the theme "Fritzing vs the usual way of making diagrams." And you can use both. Here's what the wizard does:




The wizard collects the circuit. As always, a breadboard takes up a lot of space. It is better, of course, to use it for its intended purpose - when you need to debug the circuit. And then reassemble it by soldering. But the master does not share this opinion.



The master writes an additional short sketch and uploads it here.

Nightlight smoothly turning on when approaching


Throughout electronics places in the lampshade from below, and only the range finder - above the lampshade from above. The Adafruit rangefinder LV-EZ0 has slightly better characteristics than the more common HC-SR04, but it is also ultrasonic. In the diagram, it is incorrectly designated as optical.



It turned out a nightlight, eliminating sudden changes in illumination, then it is shown in the off and on states.




And he vaguely resembles the pepelats of Etsilopp, not least due to the range finder above the lampshade, as well as the characteristic legs.
9
7
6

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose
9 comments
I did not understand the algorithm of work. It is dark in the empty room, and when I stumble and swear closer I will joyfully (maliciously) begin to glow so that I will not even take it down? Interestingly, he will react to cats, and if so, how long will it take them to understand and turn this into a game? scratch
Valery
And the face remained ... And the beatings on it
I just answered your suspicions of a dirty trick on my part, then I read about the beatings, I thought ... black_eye
with his sore eye read "rub"
Well, I wrote from memory ... So, I do not remember ...
I only remember that the walls with wallpaper ...)))))
P.S.
And the face remained ... And the beatings on it
... Well, where are you going to go, beaten up? )))
Valery
"Oh, where was I yesterday?
I don’t understandeven kill ....
nea
Oh, where I was yesterday - I will not findeven kill!
yes
ABOUT! He already has badoon .... Dodger.

P.S.

"Oh, where was I yesterday?
I don’t understand, at least kill .....

.....

..If it's true ...
Well, at least, by a third
.. One thing remains -
Only lie down, die! "(C) V.S. Vysotsky.
Yes it is full of them, google "nalivator")))
that would be smoothly pouring beer
Good afternoon, author.

We advise you to read:

Hand it for the smartphone ...