free amp templates

Smart house lighting

What is Smart house lighting?

Smart house lighting is a system that counts the number of people in every room of a house, using the infrared barrier method. Based on the number of people counted in every room, the luminaries are controlled automatically. This system is meant to help people save energy and make a better life. For the implementation of the project, the team appealed on electronics, mechanics and IT knowledge.

The idea behind our system

The need for a smart energy-saver system led us to the idea to make these sensors. Firstly, we made a scale model of a house and sensors were implemented in it. The achieved result did not satisfy us, because there were a lot of wires which connected all sensors to the controller part, an Arduino board. To resolve this problem, we integrated WI-FI modules (ESP8266) in every sensor board, which are connected to a central server.

The hardware part

The emitter module is a simple electronic circuit composed of four IR emitter diodes, connected in series. We used four IR diodes to relieve the calibration process (between emitter and receptor). This module is supplied at a voltage greater than 5V and it broadcasts IR ray continuously. We integrated a 5V regulator, because every led has the forward voltage at 1.25 V. Also, we used two 100 nF capacitors in the event of a current fluctuation.

The receiver module is designed around the ESP8266 chip, that sends information based on data read on the ADC pin. The IR led receptor acts like a resistor whose value is changing depending on the received light. Based on it, we made a voltage divider with this led and a resistor. This module is powered by a minimum 3.3 V power supply and has a 1117 voltage regulator. The ESP module (ESP 12F) is programmed via RX and TX pins (serial communication), using a FTDI programmer. To flash the chip, is required to use FLASH and RESET push buttons.

The relay controller switches on or off the lights, based on some information received from the server. This module is controlled by the ESP8266 microcontroller and is programmed via TX and RX pins, using a FTDI programmer. This circuit requires a minimum 5V power, because this is the specific voltage for the relay. To drop the voltage, we integrated 5V and 3.3V regulators. The relay is connected to the controller using 3 pins: GND, 5V and the signal pin. The signal pin is the drain of a MOSFET transistor which acts like a switch. The gate receives a logic signal and the source is connected to GND, while the drain is connected to the 5V signal, using a pull-up resistor. The best way to mount this module, is to incorporate it in the luminaries.

The design part

Using Autodesk Fusion360 software, we designed some cases for our sensors. We exported our PCB-s layout from EAGLE to Fusion360 and we integrated them in simple boxes which we then printed, using 3D technology. For this competition, we created a support to simulate a doorframe. The mounting support was designed to be as modular as possible, allowing us to transport it easily.

The programming part

The server is an ASP.NET CORE application which runs on a machine connected to the local network. The machine is meant to be assigned a local domain or to have a static IP, so the ESP can hardcode that value.This piece of software is connected to a local DB using the Entity Framework CORE where we save different data regarding our system in the following tables: Esp, Rooms, Entrances and Settings. 

The ESP code runs on our modules and it differs a little bit between the controller and the receiver. When the module is powered on, it connects to the local network and then it begins a connection with the server.

The application is cross-platform and built with the Xamarin.Forms framework. We used tabs to navigate between 3 child pages. The home page has a switch for setting the mode of our system: automatic or manual. When the manual mode is selected, the application displays a list of every controller module that is connected to the server, and it lets the user select which lights should be on. The rooms page displays a list of the rooms from the database, each showing the current number of people. We can also create a new room by clicking a button from the toolbar. The connections page consists of a list of all the modules connected to the server. A light bulb icon is used for controllers and a sensor icon for the receivers. By tapping an item on the list, we can configure the location of that module. If we don’t know its location, we can press a button that will make a led on our module blink for a couple of seconds.