Konbanwa project

KONBANWA (“Good evening” - こ ん ば ん は).



This is an LED strip that is mounted on the top of the window and is used to lengthen daylight hours. Since the source of daylight and additional does not change its position, comfortable lighting is obtained in the room. In addition, in fact, street lighting curtains does not allow you to see what is happening inside the room.



The konbanwa project takes into account astronomical twilight by transmitting the latitude and longitude of the device. By shifting latitude south or north, you can control the time and duration of dawn / sunset.



For each astronomical twilight, you can set your color and brightness of lighting.

From sunset to civil sunset, the brightest period of work. At this time, the person usually does not sleep. You can choose a color close to the setting sun (shades of red), and the brightness is as comfortable as possible. It is very unusual when there is slush, rain on the street, and the rays of the setting sun on the walls. At night, night mode is activated. At this time, the brightness is minimal, it is better to choose shades of blue or green. With dawn, orange-yellow hues with minimal brightness. Day off.



All this works in automatic mode, just adjust the brightness and color once. The only condition is that wifi is working. As the “brain” applied node-red, which can be installed on the Raspberry PI inside the local network, or on external servers. For data transport used mqtt broker mosquitto. Geolocation is not automatically detected. This function is assigned to the node-red server, where it is manually registered.



node-red
image



Scope: from the northern territories, where it gets dark early in the winter, to the southern ones, where the dark comes almost immediately after sunset. The main application is window installation. It can also be installed on the front door to automatically illuminate the entrance so as not to look for the keyhole in the dark.



A bit of history:

In 2018, the first prototype was assembled, which turned out to be workable. It was assembled on the basis of esp01 and address ws2812b LEDs. Degree of protection IP30. The light turned on in time and the inclusion was constantly in need of correction. The device is installed in the nursery and is still used as a nightlight.



The second prototype on esp01 was assembled for the front door, but the degree of protection IP30 did not allow working on the street and after winter the LEDs became unusable.



At the beginning of 2019, a rethinking took place and the project received a continuation of konbanwa 2.0, which took into account astronomical twilight. Also, the brightness of the dawn is reduced almost to the nightlight mode.



Konbanwa 3.0 is assembled on esp12e with an optional DHT22 temperature and humidity sensor and an LED strip of 60 LEDs per meter. It was at this time that it became clear that the tapes were very dependent on the manufacturer. And they have different color rendition.



Konbanwa 4.0 was continued in mid-summer 2019. The DHT22 has been replaced with a BME280 temperature, humidity and atmospheric pressure sensor. Connected 2 channels for LED strip. Additionally, two relays with optical isolation controlled by a single-key switch without latching are connected. The firmware was rewritten, the printed circuit board was divorced, and the manufacture of boards was ordered on JLCPCB. The esp12e module has been replaced by NodeMCU v3.



Circuit and PCB
image

image



All these changes in the future will make it easy to mount the device on the ceiling under a suspended or suspended ceiling or in a chandelier. Inside the chandelier, a 5 volt power supply is mounted, to which power is constantly supplied from one channel of the switch. With a single-key switch, it is possible to control two channels of the chandelier. LED strips are connected by six thin wires (cable), which can be easily glued to the ceiling or removed to the ceiling. A loop of three wires per channel. +5 volts, -5 volts and data. LED strip mounted on the window. Maximum two in the number of channels. The logic of the circuit breaker is simple. Click - 1st channel, click - 2nd channel, click - both channels. If 10 seconds have elapsed between clicks, then no matter what operating mode is selected, the internal relays are de-energized. Between clicks there must be at least 500 milliseconds and no more than one second. All work is controlled by the mqtt broker. Data, temperature, humidity, atmospheric pressure, which color to light on the LEDs and which channel to turn on the chandelier. All of this can be controlled or read remotely. Bme280, by sending data to the broker, will subsequently allow you to control the climate of the system.



Photo backlight
Day.



image



Sunset



image



Civil twilight



image



Nautical twilight



image





There is nothing interesting in the source code. Standard subscriptions and publications in mqtt topics.

The project is home-based, so I deal with it as interest arises in it.



Sources. Not recommended for viewing. Take care of your nerves.
An early version of the source code for vscode (PlatfornIO) can be viewed on github

A diagram of the first device on easyeda




All Articles