AUTOMATED HOUSE WITH PENGUIN CARD.
The project is structured in two main stages; the control stage and power stage.
In the control stage there is the microcontroller, the bluetooth module and the mobile application developed in AppInventor, which are in charge of controlling the devices. The microcontroller number is PIC18F45K50 and the bluetooth module is HC-06. First, you have to link an Android device that is capable of running applications (cell phone, Tablet) with the bluetooth module, in the user interface you can see the different actions that can be done in each room or room of the house. Then the user presses a button that has been defined for some specific function (lights, fan, etc).
In the application, the options for using each element can be selected, therefore, they can be freely selected for their operation.
Solid state relays with the MOC3021 optocoupler and the TRIAC BT138 as transistor arrays have been developed for the power stage. Solid state relays with respect to conventional relays have certain advantages such as switching speed and not having moving and / or mechanical components (hence its name), although it can present disadvantages such as having to replace the parts in case of damaged and sensitive to sudden voltage changes.
The transistors used are of the number 2N2222 which are conventional transistors for low power and simple switching. We have arranged these so that when the signal is received at the base, it switches to activate the fans.
The solid state relays work with an input current sent by the microcontroller that turns on the internal led of the optocoupler that triggers an opto DIAC that is its output stage; then the signal from the opto DIAC is received by the gate (or gate) that saturates the terminals of the TRIAC, functioning as an electronic switch.
For the servomotors the three pins are connected to Vcc, GND and the control pin respectively; then in the mobile application a button is pressed to rotate at respective angles.
In the programming, an input variable has been declared to receive the data from the bluetooth module, it is configured to receive input characters that are compared with each structure of the buttons. For example, if the bluetooth module receives an “a” value, this variable will be converted to the lowercase letter a and will execute a function, which in this case is to turn on a bulb. For the other functions the structure is similar, but with the difference of changing the input character so that it can perform other functions.