Professional Documents
Culture Documents
by means of these development tools: Code Composer Studio
provide these people certain degree of tranquility.
(CCStudio) IDE, IAR Systems, KEIL ARM Tools by,
There is a need for accessible and affordable tools that
Sourcery Codebench from Mentor Embedded GNU
enable people to monitor various kinds of devices in order to
Atollic TrueSTUDIO and Energia.nu. This variety of tools
contribute to energy saving, comfort, and remote control of
gives the developer the ability to adapt to any application.
domestic facilities.
Regarding the electrical characteristics required by the
The progress of information and communication
analog or digital signals to be properly acquired and processed
technologies (lCT), and their penetration in practically all
by the microcontroller, they must meet the same technical
areas of life have generated frequent conversations about
specifications, which define that the nominal input voltage
intelligent buildings and smart houses driven by three main
should be 3.3V GPIO and the current should be in the range
factors: technological development, social changes and
of 2mA to 12mA depending on the type of configuration used
business opportunities [1].
by the GPIO pin. Regarding the use of the ADC, the analog
The home automation devices are counted in large numbers
signals should be in the range of OV to VDDA to operate in
and have a high degree of heterogeneity. Additionally, the
full scale with internal reference voltage, and in the range of
constant technological improvement and the frequent
2.4V to VDDA to operate in full scale and external reference
innovations introduce constant changes in these devices.
voltage.
These are the reasons for us to present in this article an
intuitive and more general classification of home automation
devices, distinguishing four categories: sensors, actuators,
III. DOMOTICS
smart appliances, and electronic equipment [2, p.20].
To show the usefulness of cloud services and home The Spanish association of automation defines "Domotics" as
automation in the comfort of users, we show the design of a the addition of simple technology to houses and buildings in
system that allows for the control and monitoring of the speed rde to manage their devices and systems (heating, washing,
hghtmg, etc [1, p.5] in an energy efficient, safe and
comfortable way for the user. Domotic devices are classified
978-1-5090-0228-3/15/$31.00 @2015 IEEE
in four main categories:
physical systems. In this case, the behavior of the systems are
A. Sensors represented by a set of state variables, showing how the state
The sensors or detectors are devices capable of collecting of the system evolves. For a linear system, the compact
information about various parameters and transmit it notation that represents the system is formed by a state
information for its processing. differential equation or state equation and an output equation.
The state equation describes the rate of change of the system
B. Actuators state and the input signals given at time t. [5, p. l]
Actuators are devices capable of receiving an order from a
control system and perform an action that changes the state of dx
a particular equipment or system: on or off, up or down, = Ax + Bu (1)
dt
opening or closing. For example, at nightfall you can Y = ex + Du (2)
automatize the closing of a blinder. A control system can emit
a signal a signal to a relay to turn on the engine that makes the
Input
blinder close. Plant: Output
.,.
comparator ,-----,-----,
Input
Signal
__M -
If-----.. I Process Output
Signal Fig. 4. PID Control
. '
Sensor V. UBIDOTS
>[ D
UFrequencyfunction UZerosandpoles
____
_ ____
D_ ata
It ____
Caracterization
____________-J
Trash
V&IIirbtlnn nl;l
DNoiSespectrum
Matematical model
Fig. 8. Tool TDENTT
90
80
70
C. Controller Design
60
50
Sisotool MATLAB is a tool that allows for the construction
40
of the mathematical models of dynamic systems from Input
30
Output data, facilitating the design of control systems.
20 This Toolbox has a graphical interface that uses the root locus
10 (LGR) method, allowing for the variations of the system
a response to be displayed in real-time when the user makes
a 1 2 3 4 5 6
changes to the poles and zeros of the system.
Fig. 7. DC motor Graphical Step response
B. Plant Characterization
The IDENT MATLAB tool allows getting the transfer
function of a system without knowing it, since only the C_>O '!M!rn'!_! .. .II ModI Yarn'_our", "M'<I_ ....... .
experimental data obtained from the plant are required. I 1-ocpca>1'9r ...... I'Ho"pdas...,
I
conf9.1.odd'I..-qofa
,_...o._.._.
Fig. 9. SISOTOOL
The first thing we must have is the transfer function of the point value the difference equation is evaluated. The necessary
plant, since this is the basis for the design of the controller. code can be found in [17].
Once the tool has the design parameters of the controller IX. ELECTRONIC CIRCUIT
(settling time, overshoot percentage) and the equation of the
With selected materials, we designed an electronic circuit to
discretized plant, and the PID controller has been tuned, it
control the speed and rotation of the motor through a H bridge
yields the following result: acting as power driver, a RJ-45 connector for Ethernet and
1
Kp + Ki* + Kd*(z-l) (7)
-- encoder connection.
z-l
Kp 0,551 Ki -0,021 Kd 0,02
= = = Fig 12 energy code fragment
r :v i\}"-----T-----T-----
. .
100
. .
------------ ------ -
";;1.. -""'"'-....-,.. . . .
: tilri-r-LT1 II
Fig 10 code energy
Source: The Authors
The code in energy consists of two main parts:
: : : : : : : 1--
..
ent.rada
Ethernet communication with the page 40 ... --. --..-- : .--.-- : ..--.. : --..--:.--.--..--..--. .--. :---..--:..--..
, .
.
,
.
, .
.
, .
.
.
www.ubidots.com. where the authentication is performed by , .
.
"
, .
.
.
,..
. .
,. . . ,.
- .. - - - r - ----- ; . --.. -r -.---- ; - - - - - - ' - -.. - r' ---. ,--. --- - -.. -T'
. . .
the token and by identifying the transmission and reception of 20 , , . , , , . , ----
i
data [9]. , ,
, .
,, , .
T.
,,.
.
. ,' .
.
.
.
XII. ACKNOWLEDGMENTS
XIII. REFERENCES