# Home Automation System Based on Intelligent Transducer Enablers
## 7 HASITE: Hardware and Implemented ITNs  
It is first important to note that the selection of hardware components mentioned in this section was aimed at minimizing the total cost of the system and the power consumption, whilst covering different basic functionalities of a home automation system.  
HASITE's subsystems were implemented by using the following components:  
* Control and management subsystem: This subsystem made use of a Raspberry Pi 2 Model B, which has an ARM-Cortex A7 quad-core processor running at 900 MHz and 1 GB of RAM. The operating system used was Raspbian, a Linux distribution based on Debian adapted to run on the Raspberry Pi.
* Communications subsystem: The ITN connectivity is provided by an ESP8266, a Wi-Fi module based on a low cost SoC that supports IEEE 802.11 b/g/n communications at 2.4 GHz, Wi-Fi Protected Access (WPA/WPA2) and IPv4. The power consumption of these modules is very low: 10 \(\upmu\)A in deep sleep mode and between 70 mA and 240 mA in active mode. Although the ESP8266 offers different operating modes and communication protocols, the ITNs made use of AT Commands through Serial TTL.
* Transducers subsystem: To test HASITE's features, several sensors and actuators were selected considering the most common sensing and actuation needs in home automation appliances. The selected sensors were the following: a basic low-cost digital temperature and humidity sensor (DHT22), a digital ambient light sensor (BH1750 FVI), a Passive infrared sensor (PIR) motion sensor module (HC-SR501) and a voltage and current sensor (INA219). A couple of actuators were also tested: a SRD-05 VDC-SL-C relay and a light dimmer based on a TRIAC TIC206 and optocouplers.
* ITNs: Each ITN receives and processes the data either using an ATmega328P or an ATmega32U4 microcontroller, which operate at 16 MHz, provide 14 digital inputs/outputs and six analog inputs and have 32 KB of Flash memory, 2 KB of RAM and 1 KB of EEPROM. They support the acquisition  
Figure 8: Android application in default (**A**) and BLE (**B,C**) modes and the BLE beacon.  
of analog and digital signals via protocols like Serial Peripheral Interface (SPI), I2C (Two Wire Interface (TWI)), TTL serial communications or PWM, allowing for the integration of regular COTS inexpensive sensors and actuators in our ITNs, without needing further development or support by manufacturers and integrators. A single ITN with only one microcontroller may have several transducers and can be defined by only one ITE.
* Gateways/Wi-Fi APs: The connections among the different Wi-Fi devices were tested while using two different APs: the main Access Point (AP) was a Linksys WRT54G V2.2 router with a DD-WRT v24-sp2 (08/07/10) micro (SVN Revision 14896), while an SMCWEB-N with a 1.0.2.6 (6 July 2007) firmware version was used as the secondary AP.  
Figure 9 shows, for illustration purposes, the disassembled version of an ITN prototype. It can be observed that the node is composed of an ATmega328P microcontroller (Figure 9A), a breadboard (Figure 9B), a power supply module (on the left in B), an ATmega32U4 microcontroller for the dimming driver control (on the right in Figure 9B), an ESP8266 module (Figure 9C) and a dimming driver for an adjustable LED bulb (Figure 9D). All of these components can be miniaturized and integrated into a household power socket. The miniaturized result, still in a prototype form factor, is shown in Figure 10. Due to the smaller form factor, the socket version of the ITN replaces the ATmega328P of the original prototype in Figure 9 with an ATmega32U4. In addition, the breadboard and the power supply module were replaced by direct connections and a USB mobile phone charger, respectively.