» Electronics » Arduino »Night light, reacting to a person’s approach

A person’s night light

A person’s night light

The article will consider an example of creating a very interesting nightlight that responds to a person’s approach. The closer a person is to a nightlight, the brighter it starts to glow. This eliminates the need to constantly look in the dark for a lamp and turn it on with a mechanical switch. The nightlight is going quite simply, according to this scheme, you can collect other similar lighting devices. Controls the operation of the device by everyone's favorite and famous controller Arduino Uno.

To prevent the lamp from turning on during the day, a light sensor is provided in the circuit, which can be adjusted to your needs. For example, you can make the lamp turn on only in complete darkness.


Materials and tools for homemade:
- Ikea Vate lamps;
- microcontroller Arduino Uno;
- power supply for the controller 9V, 250mA or more. It can be a battery or any other power source;
- an ultrasonic range meter (the author used Adafruit's LV-EZ0). However, other sensors are also suitable, but this one is able to look at a greater distance and has a wider catchment area;
- photosensitive resistor;
- four resistors 220Ohm;
- one resistor 10 kOhm;
- bread board;
- a small container (it will be installed in it electronics and then placed in a lamp);
- solder;
- Arduino IDE;
- nippers;
- soldering iron;
- USB AB cable.

The process of making a nightlight:

Step one. Assembling the device on a breadboard
You need to start with the preparation of LV-EZ0. It is necessary to solder the seven-pin header to the header, only three pins will be used from it, these are AN, GND, as well as + 5V. Well, then everything is connected to the breadboard as indicated in the diagram, this is done quickly and simply, there is no need for soldering. To connect the LV-EZ0, you need long enough wires to bring the sensor through the lamp and install it externally.



Step Two Software
First, the Arduino controller must be connected to the computer and upload a special code into it. After downloading the code, the system can be checked. The code provides the ability to configure the light sensor. The device can be configured so that it turns on only when the room is dark, or evening comes and just starts to get dark.

Step Three Final build phase
All electronics components are installed inside the lamp, but they are not visible. An ultrasonic sensor is brought out, which will pick up a person’s approach. That's all, the lamp is ready, you can enjoy the work of homemade.




sketch.rar [923 b] (downloads: 299)
9
10
8.5

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

We advise you to read:

Hand it for the smartphone ...