Arab J Sci Eng (2014) 39:8793–8810 DOI 10.1007/s13369-014-1443-6
RESEARCH ARTICLE - COMPUTER ENGINEERING AND COMPUTER SCIENCE
Developing an Open Architecture and Intelligent System for Speed and Direction Controlling (PC-SDC) of DC Motors Mokhtar A. A. Mohamed · Ahmed M. Elmahalawy · Hani M. Harb
Received: 12 February 2014 / Accepted: 31 August 2014 / Published online: 14 November 2014 © King Fahd University of Petroleum and Minerals 2014
Abstract This paper presents a practical PC-based speed and direction controller (PC-SDC) for controlling DC motors. Developing PC-SDC is dependent on open architecture and intelligence features. Open architecture feature refers to apply the same firmware components of this PC-SDC with different types of DC motors and sensory systems. Intelligence feature is achieved by applying the collect-processdecide-deliver-instructions (CPDDI) model. The suggested CPDDI model is the real software implementation of moment perspective of a new intelligence model called “Accumulative Intelligence”. CPDDI can control DC motor via bi-directional communication channels with two practical inhouse designed firmware systems. The first system is µCbased feedback speed monitoring module (FSMM) system which collects speed data (i.e., pulses count) for this DC motor by using a PIC µC-based encoder sensory system. The second system is µC-based motor control module (MCM) to control this DC motor via different intelligent rules. These rules control DC motors according to previous moving state and next required moving state. Real-time feature is investigated via two performance metrics; ART and SMT. Also, the effectiveness of the proposed PC-SDC system is investigated by a comparison between pulses count that is measured practically by FSMM system and real pulses count that is gathered from an oscilloscope.
M. A. A. Mohamed (B) · A. M. Elmahalawy Computer Science and Engineering Department, Faculty of Electronic Engineering, Menofia University, Menofia, Egypt e-mail:
[email protected] H. M. Harb Computer Engineering and Information Systems Department, Faculty of Engineering, Al Azhar University, Cairo, Egypt
Keywords DC motor · Speed control · Direction control · Accumulative intelligence model · Microcontroller
1 Introduction DC motors have been popular in motion control systems for a long time. They have been widely used in many applications in industrial, medical, consumer, robotics, space, and auto-
123
8794
Arab J Sci Eng (2014) 39:8793–8810
motive applications. Reliable motion control application entails controlling or deriving its employed DC motors through one or more of its controlling aspects such as speed and direction. Speed and direction control of DC motors were and still a vital research topic of control theory because DC motors are the most important physical parts in any motion application. A huge number of researches have been and still proposed to produce control techniques for DC motors. They are different in the strategy used to tackle the speed control problem. For example, proportional and integral (PI) [1] and proportional, integral and derivative (PID) controllers handle the speed control problem from mathematical perspective. They present mathematical models to depict and formulate DC motor operation and to tackle the speed control problem in mathematical equations [2]. Mathematical models of speed controllers have been and still inoculated by several mathematical techniques such as fuzzy logic [3–5] and neural network [6] to add intelligence features to such controllers. For example, PID controller has been combined with different methods such as fuzzy control [7,8], neural network [9], and adaptive control algorithms [10]. These inoculated techniques and algorithms require heavy computation loading which makes PID controller may not achieve a satisfactory control performance [11]. Also, some scientists present speed controllers that are inoculated with mathematical algorithms that inspired from nature such as genetic algorithms (GAs) [12,13], bacterial foraging algorithms [14], or particle swarm optimization (PSO) [15,16]. These natural inspired algorithms make the computation loading problem becomes heavier. A lot of previous algorithms deal only with mathematical parameters of the DC motor’s mathematical model. Matlab/Simulink is one of the powerful simulation platforms for evaluating performance of mathematical speed controller models that are mentioned previously. The main shortcoming of Matlab/Simulink is that it cannot give real results based on the hardware implementation, real-time hardware analysis, and real components operations and performance. As a result of the Matlab/Simulink shortcoming, a group of scientists go toward handling the speed control problem from practical perspective. They presented direct PWM firmware drivers in which µCs or digital signal processor (DSP) [17– 20] represents the core of hardware circuits of these drivers. µCs and DSPs are low-cost chips but they have limited capabilities of memory space and computation time. So, they cannot encompass the whole software program of any mathematical speed controller model. It also cannot handle and process huge data that will be generated during runtime of such programs. To overcome limited capabilities in µCs and DSPs, some scientists are employing field programmable gate array (FPGA) chips [21,22]. FPGA has appealing characteristics of fast computation time because it consists of more than
123
thousands of logic gates. Also, versions of FPGA kits are provided with variable memory space to meet different minimum requirements of each application. But the cost of FPGA kits with a large memory space is so expensive rather than small memory space kits. Also, FPGA chips can be developed only and just only by very high integrated circuit hardware description language (VHDL). Some other scientists are supporting the idea of employing personal computer (PC) within µCs (such as PIC, Atmel, or 8051) to construct what is called “PC-based Speed and Direction Controller (PC-SDC)” [23,24] for DC motors. Due to using PCs, developers of SDC can select freely the programming language among multiple ones to develop the main deriving program such as Java, C++, C#, Visual Basic, etc. capabilities of large memory space and very fast computation time in recent PCs enable these developers to overcome easily the heavy computation loading problem. One of the most formidable relevance advantages of PC-SDC is that it does not require knowledge of the parameters of DC motor and can provide the effective speed and direction control characteristics on-line against various drive condition. The aim of this paper is developing and releasing an open architecture and intelligent PC-SDC. Open architecture feature implies that the same hardware and software module of PC-SDC should drive or control different types of physical DC motors. Intelligence feature implies applying a new intelligence model called “Accumulative Intelligence” [25]. Briefly, accumulative intelligence refers to the ability of taking decisions that enable PC-SDC of self-intelligent auto control of its DC motors without interference of human operator especially during emergency situations. The rest of this paper is organized as follows. Section 2 briefly explains related work for monitoring and controlling speed, position, and/or direction of DC motors. Architecture of suggested PC-SDC and its firmware components; FSMM and motor control module (MCM) is described in Sect. 3. Also in Sect, 3, CPDDI model and its general software components are discussed in details. The practical experimental results of such PC-SDC are shown in Sect. 4. Finally, a conclusion is briefly described in Sect. 5.
2 Related Work This section is devoted to shed some light on the most related researches in the topic of monitoring and controlling speed, position, and/or direction of DC motors. Some of these researches employed only µCs to perform processes of monitoring and controlling while the other presented prototypes that join both PCs with in µCs to perform the previous tasks. Table 1 shows a brief comparison between the following researches.
Not determined
N/A
Not determined
GUI programming language on PC
Interface between core chip and PC
Specification and type of tested motor
Not determined
Development platform of core chip
N/A
PIC 16f8770
Core driving chip
Not determined
Speed
Measured parameters
Display output
Shaft encoder + Photo sensor
Used sensors
PC support
Sharan et al. [26]
Refer number
Not determined
NI USB-6008 interface card
LabView
Four 7-segment display + LabView-based GUI on PC
Available
Not determined
8,051
Speed, + PID gain parameters (K P , K I , KD)
Shaft encoder + photo sensor
Huang et al. [24]
Table 1 Brief comparison between related work researches
Not determined
Serial communication (RS458, RS232)
Visual Basic (VB)
Microsoft Windows GUI software
Available
Not determined
ATMEL AT89C52
Voltage, current, speed, frequency, power factor
Hall sensor (HS), zero crossing detector (ZCD), and proximity sensor (PS)
Datta et al. [27]
EMG30 and 719RE385 brushed DC motor
NI USB-6008
Matlab
Matlab R2009a GUI platform
Available
Not determined
NI USB-6008
Current, speed, position
Current sensor (20 m shunt resistor)
Sánchez et al. [28]
MikroC compiler for PIC
KEIL µVision 4 software
(12 V, 1,000 rpm) No device number is determined
N/A
Not determined
Not determined
DMM-F019A0-F01 from KITASHIBA
In-house USB interface card using PIC18F2550
C#
C# Windows application GUI software
Available
PIC 16F877A + PIC 18F452
8,051 µC (AT89C51)
N/A
Speed, direction
Shaft encoder + photo sensor
Our PC-SDC
Speed
Tachogenerator
Mondal et al. [29]
Arab J Sci Eng (2014) 39:8793–8810 8795
123
8796
Arab J Sci Eng (2014) 39:8793–8810
Sharan et al. [26] presented a PIC µC-based speed feedback system for low-speed DC motor control to be used for robotics applications. The feedback transducer used for measuring speed is an incremental shaft encoder with 16 slots. PIC 16F877 represented the core chip of a pulse width modulator and motor control circuitry. There are many shortcomings in this research. First of all, specifications of tested motors were not included. Secondly, there was no advanced and centralized device, such as a PC or embedded PC to facilitate monitoring and controlling DC motors via a friendly GUI. A PC-based PID controller was presented in Huang et al. [24] to supervise and control the speed of the DC motor. This controller employed 8051 µCC as the core chip of drive circuit of the DC motor. 8051 chip receives feedback and interrupted signal which produced from photo sensor and shaft encoder and show measured speed on local four 7-segment display. Also, measured speed was transmitted momentarily to a LabVIEW-based GUI via the NI (National Instrument) USB-6008 interface card. LabVIEW-based GUI was used also to control the DC motor by measuring and adjusting the appropriate values of three gain parameters of PID controller. These gain parameters are proportional gain (KP), integral gain (KI), and differential gain (KD). This research did not mention the specification of tested DC motors. In addition, it did not give a brief description about how processes of information collection (i.e., speed, KP, KI, and KD) and control instructions were transferred between 8051 chip and LabVIEW-based GUI. There was no description about driving program of the NI USB-6008 interface card. Datta et al. [27] developed a PC-based centralized remote monitoring system to monitor and control multi-three phase induction motors. In this system, each motor was interfaced with a µC-based Dedicated Hardware Unit (DHU). DHU was designed around 8-bit µC chip (ATMEL AT89C52) which is used to estimate different motor management viz. input voltage, input stator current (Hall sensor “HS”), supply frequency (two zero crossing detector “ZCD”), power factor, and motor speed (proximity sensor “PS”). Microsoft Windows GUI software was developed using Visual Basic (VB) programming language on a PC. Interfacing between DHU and PC was made by developing serial communication bus between RS458 module in each DHU and RS232 port on PC through TTL-to-458 converter. Sánchez et al. [28] presented a new method based on the ripple component for speed and position estimation in brushed DC motors using support vector machine (SVM). This sensorless technique measured only the current and detects the pulses in this signal. SVM is a learning machine based on statistical theory, and it was used for classification and regression. SVM theory was initially developed by Vapnik. Tests, in this research, were done with two brushed DC motors; the EMG30 and the 719RE385. Current of each mo-
123
tor is measured by using a current sensor which was a 20 m shunt resistor. A low-cost data acquisition card (NI USB6008) was used to measure and digitize the signal that was received from current sensor. Then, NI USB-6008 directed digitized current signal to a Matlab R2009a-based development platform on a PC. This Matlab platform was responsible for processing current signal by SVM algorithm to estimate the speed and position of connected brushed DC motors. 8051 µC (AT89C51)-based embedded closed-loop speed control of DC motor was presented in Mondal et al. [29]. In this system, DC motor of 12 V, 1000 rpm, zero crossing detector (ZCD) for zero reference, and a tachogenerator as a speed sensor has been used. This system controlled the speed of its tested DC motor through optically coupled half controlled SCR bridge rectifier used as a motor driver circuit. The used tachogenerator gives a back EMF in the range of 0–10 V corresponding to the speed attained by the DC motor. This output voltage of the tachogenerator is then given as input to the signal conditioning circuit which converts the output voltage from 0–10 to 0–5 V. This analog value of voltage obtained after signal conditioning is fed to ADC converter which gives the corresponding digital values. The controller unit will sense this digital data of output voltage of the tachogenerator and will compare to the desired level of voltage corresponding to the set-point speed. The error obtained is reduced by proportional (P) control algorithm during which the controller continuously sends triggering pulses through the opto-coupler circuit to the SCRs of the motor driver circuit which controls the voltage applied and hence the speed of the DC motor. Then, the error signal is updated and the cycle is thus repeated. Thus, the desired speed is attained. This system of closed-loop control was developed by using KEIL µVision 4 software as the C compiler. The KEIL µVision debugger accurately simulates on-chip peripherals of the 8051 µC.
3 PC-Based Speed and Direction Controller (PC-SDC) PC-SDC is a closed-loop controller that consists of three main parts: (1) µC-based feedback speed monitoring module (FSMM), (2) µC-based motor control module (MCM), and (3) CPDDI software program on the PC. CPDDI refers to “Collect—Process—Decide—Deliver—Instructions” terminology. Each module of FSMM or MCM is subdivided into hardware and software. All modules of PC-SDC are completely in-house designed circuits as shown in Fig. 1. 3.1 µC-Based Feedback Speed Monitoring Module (FSMM) The purpose of FSMM is measuring and sending periodically information about the speed of a DC motor to CPDDI
Arab J Sci Eng (2014) 39:8793–8810
8797
Fig. 1 Parts of PC-SDC
CPDDI
MCM
FSMM
Encoder
by using sensor system. FSMM operation depends on four firmware (i.e., hardware and software) parts such as; incremental shaft encoder sensor, speedo-meter circuitry (SMC), seven-segment display circuitry (SSDC), and FSMM-USB interface card (FSMM-USB). Practical four parts of FSMM are shown in Fig. 2a. Incremental shaft encoder contains a thin spinning disk that has slots cut in it. This disk is mounted on the output rotor shaft of a DC motor or an axle. An infrared emitter is placed on one side of the disk’s slots and a phototransistor detector on the other side as shown in Fig. 2a. As the disk spins, the light passing through the disk is interrupted by the moving slots. Phototransistor receives the interrupted light and converts it to a digital signal in the form of a pulse train. In this paper, shaft encoder uses a disk with a resolution of 100 slots and device number of both emitter, and phototransistor is H9700 from Avago Technologies [30]. The main employed hardware component of SMC is PIC 18F877A µC which is developed by Microchip [31]. PIC 16F877A performs many tasks; firstly, it receives periodically pulse train from phototransistor. Secondly, it counts
“ON” pulses at a fixed time interval called “Pulse Count Sending Interval (PCSI)” and displays counted Pulses on SSDC via 7-segment connector. Thirdly, it composes a speed message before counting pulses at next PCSI. Speed message includes data of pulse count between start and end characters for synchronization. Format of speed message is shown in Fig. 2b. Finally, it transfers speed message to FSMM-USB via its built-in serial communication pins. FSMM-USB is an in-house designed USB I/O interface card [32,33] which employs PIC 18F2550 that developed by Microchip [34] especially to meet requirement of USB communication with PCs. FSMM-USB is developed and programmed by using MikroC compiler from Mikroelectronika [35] because it has been supplied with a USB HID library and USB descriptor tool. PIC 18F2550 receives speed message from SMC and extracts pulse count data by eliminating start and end characters. It then builds a bi-directional communication channel with CPDDI by using its device name and two other important values; VID (Vendor ID) and PID (Product ID). VID and PID form a unique identifier for any USB device [32,36]. Data transfer between two endpoints
123
8798
Arab J Sci Eng (2014) 39:8793–8810
FSMM - USB
LCD Connector
Spinning disk
Shaft
USB PIC 18F2550
Encoder LCD Connector
Serial pins
SMC to encoder
7-seg Connector
phototransistor
PIC 16F877A
SSDC Encoder connector
7-seg Connector
(a)
(b)
(c)
Fig. 2 a Four firmware parts of FSMM module (shaft encoder, SMC, FSMM-USB, SSDC) parts of PC-SDC, b format of speed message, c format of USB-PC message
of that channel depends on constructing two buffers on each endpoint. Two buffers are write buffer and read buffer. Each buffer can in the size of three types [37]: 8-byte size for lowspeed communication, 64-bytes for full-speed communication, and up to 1024-bytes for high-speed communication. In this research, size of buffer is chosen to be 64 bytes as shown in Figs. 2c or 5b to provide peer-to-peer (P2P) and full-speed USB-based communication. In addition, USB descriptor tool reserves 64 bytes as the maximum size for each one of such buffers. After establishing bi-directional channel, FSMM-USB composes USB-PC message which consists of a command type and followed by the actual data to be sent as the format in Fig. 2c. The command is a mean that enables CPDDI or FSMM-USB how to deal with data which is passed within the command. The final step is assigning USB-PC message to write buffer of FSMM-USB. Figures 3 and 4 show pseudo code of driving programs for SMC and FSMM-USB, respectively.
123
3.1.1 Modularity and Open Architecture of FSMM Modularity and open architecture features are taken into consideration during developing and designing of FSMM. Dividing FSMM system into four firmware parts gives the ability of fast and ease troubleshooting and debugging overall FSMM system when it performs an improper operation which achieves modularity. An external LCD screen can be connected to the SMC via LCD connector as shown in Fig. 2a. SMC works properly if and only if pulses count appears on the LCD. Also, FSMM-USB has LCD connector to make sure if the correct speed message has been received from SMC or not. The Open architecture feature is achieved within FSMM-USB. It is designed and developed to be connected with any sensory system if this sensory system sends its sensory data with an identical format of speed message via serial pins as shown in Fig. 2a. In addition, 20-byte size of speed data (i.e., sensory data) supports open architecture feature
Arab J Sci Eng (2014) 39:8793–8810
8799
Parameters: Pulse_counter, Time_counter, Temp_res Interrupt algorithm [Step 1] Test if speedometer is not ready to count pulses, goto [Step 4] [Step 2] Test if interrupt source is not from external interrupt pin (RB0) (i.e. phototransistor is connected to RB0), goto [Step 3] {1} Increment Pulse_counter variable, reset interrupt flag (INTF), goto [Step 4] [Step 3] Test if interrupt source is not Timer0, goto [Step 4] {1} Increment Time_counter variable {2} Display value of Pulse_counter on SSDC circuit {3} Test if Time_counter is not equal to PCSI value , goto [Step 3 – {3} – (ii)] (i) Reset Time_counter, assign Pulse_counter to Temp_res variable, and reset Pulse_counter (ii) Reload Timer0 with its intial value and reset its interrupt flag [Step 4] Exit Interrupt algorithm Main Algorithm: [Step 1] Initialize ports, interrupt, LCD, serial communication [Step 2] Prepare and send Speed message via serial communication pins [Step 3] Goto [Step 1]
Fig. 3 Pseudo code of deriving program of SMC
to accommodate and encompass variable sensory data from any sensory system. Sensory system can consist of only one sensor or more than one sensor (i.e., often called sensor network). Developers can expand or reduce this size of speed data (i.e., sensory data) according to requirement of their sensory system. 3.2 µC-Based Motor Control Module (MCM) MCM is a direct PWM driver that is designed to control speed and direction of DC motors. It consists of two firmware parts; MCM-USB interface card and Basic Controller Circuitry (BCC) as shown in Fig. 5a. MCM-USB is identical in design and operation to FSMM-USB. It receives a PC-USB message from CPDDI via its read buffer which its format is shown in Fig. 5b. If the command of PC-USB message is 0x83, this means that MCM-USB will prepare a control message and send it to BCC via its built-in serial communication pins of PIC 18F2550 as shown in Fig. 5c. Another role of MCM-USB is forwarding the acknowledgment that will come from BCC as a response to this PC-USB message BCC is an in-house designed circuit that consists of two main hardware components; L298N dual full bridge (H-bridge) IC from STMicroelectronics [38] and PIC 18F452 µC from Microchip [39]. Figure 6 shows the schematic diagram of BCC as the driving system for DC motors. L298N is
Fig. 4 Pseudo code of deriving program of FSMM-USB or MCMUSB firmware
an electronic chip that enables a voltage to be applied across a load in either direction. These chips are often used in robotics and other motion application to allow DC motors to run forward (i.e clockwise “CW”) and backward (i.e., counter clockwise “CCW”) which achieve direction control ability of DC motor. It has the ability to drive two DC motors simultaneously because it consists of two full bridges. In this paper, PIC 18f452 is used to drive only one brush DC motor with DMM-F019A0-F01 device number from KITASHIBA [40]. Specifications of employed DC motor are listed in Table 2. PIC 18F452 receives a control message from MCM-USB and then eliminates start, command, and stop characters. It then sets an update flag as an indication
123
8800
Arab J Sci Eng (2014) 39:8793–8810
Fig. 5 a Firmware parts of MCM module (BCC, MCM-USB), b format of PC-USB message, c format of control message
LCD Connector
MCM-USB
USB PIC 18F2550
Serial pins
BCC
Motor 1
Motor
LCD Connector to Motor 1
PIC 18F452 Motor 2
L298N
Vm
(a)
(b)
(c)
Table 2 Specification of tested DC motor
Rated power
25 W
Rated Speed
3,000 rpm
Rated DC voltage
24 V
Rated current
0.2 A
that this is a new control message. New direction and new duty cycle information within control message are assigned to Nd and DCn parameters, respectively. After applying physically control commands in Nd and DCn on the DC motor, BCC will send an acknowledgment to CPDDI. The acknowledgment can be one of three types; positive, warning, or negative acknowledgment. Positive acknowledgment depicts that BCC received successfully new control message and applied its control commands on DC motor. Warning acknowledg-
123
ment depicts that BCC received control message but control commands cannot be applied to this DC motor because it will cause problems with it as it will be discussed in Sect. 3.2.1. Negative acknowledgment means that BCC waited for a specific time period without receiving control message. So, it sends this acknowledgment to check and refresh connectivity with CPDDI via MCM-USB. There are five important parameters which have been used within BCC driving program to achieve intelligent speed and direction control of a DC motor. They are current motor state (CMS), old direction of motor (Od), new direction (Nd), duty cycle old (DCo), and duty cycle new (DCn). CMS flag determines whether the motor is in moving state (CMS = 1) or is in stop state (CMS = 0). Od holds the code that determines current rotation direction of the DC motor while Nd holds the code of next desired rotation direction the motor should
Arab J Sci Eng (2014) 39:8793–8810
realize it at the next moment after getting new direction data from control message. When the motor rotates at a new direction, instruction code in Nd is transferred to Od. A similar discussion can be applied to DCo and DCn which are used to control speed of the motor. Any one of them can take a value between 0 to 255. This value represents the duty cycle ratio that is used to produce a PWM signal from built-in PWM hardware module of PIC 18F452 µC. This required PWM signal outputs an average voltage amplitude that is required to make motor rotates with a specific speed. 3.2.1 BCC Control Rules Rules that are used to control DC motor in different movement states are summarized and listed in Table 3. All of these rules depend primarily on testing what is the instruction code of Nd. These instruction codes are 0 × 41 (to represent stop rotation of motor), 0 × 45 (to represent continuing with the same old direction and speed), 0×46 (to represent forward direction), and 0 × 42 (to represent backward direction). There is a specific scenario of control action for each rule if it is realized. 3.2.2 Modularity and Open Architecture of MCM Two firmware parts of MCM confirm achieving its modularity. Each part of MCM is provided by LCD connection for fast troubleshooting. It is noticed from Figs. 2a and 5a that the same design of USB I/O interface card of FSMM-USB is used within MCM which confirms open architecture feature of the USB I/O interface card as discussed previously in Sect. 3.1.1. Also, open architecture feature is considered during design of BCC. Due to using L298N IC, maximum operating supply voltage is 46 V and maximum required DC current is 4 amperes. So, BCC has the ability to drive any DC motor that its supply voltage and its required current flow do not exceed the maximum operating supply voltage and maximum DC current. Supply voltage of any DC motor type can be connected via “Vm” connection pins on BCC, and its corresponding physical DC motor can be connected through “Motor 1” or “Motor 2” connection pins as shown in Fig. 5a. 3.3 Collect-Process-Decide-Deliver-Instruction (CPDDI) Model CPDDI is an open-source model that represents software implementation of moment perspective of accumulative intelligence model [25]. Moment perspective emphasizes those steps of sensory data collection, processing, deciding, and generating proper control instructions are done momentarily over consecutive fixed time intervals. Current and future purpose of presenting concept of CPDDI model is producing
8801
a USB-based system which is capable of collecting sensory data from homogenous or heterogeneous network of sensors. Also, the same system can control different types of actuators alongside with a network of sensors. Figure 7a depicts the general software components of CPDDI. It consists of two basic software components; the first is main data collector/instruction distributor (MDCID). The second component is processing and decision rules (PDR). Each device (i.e., sensor or actuator) communicates with CPDDI via a private GUI (PGUI) by calling a clone of Generic USB Communication Library (GUCL) version 2.0.0.0 [33]. PGUI can be designed by any developer according to sensory data nature that any device will provide or according to types of control instructions which this device can receive. PDR is responsible for performing many tasks. Firstly, it receives all sensory data from all PGUIs and saves them in short-term storage. Secondly, it processes these sensory data according to predefined rules to take proper decisions. Thirdly, it translates these decisions to format of control instructions. The format of each control instruction differs according to the type of device that attached to CPDDI system. Finally, control instruction is transferred to its corresponding PGUI to be transferred to its device. All PGUIs send its updated connectivity status and sensory data to Main GUI (MGUI) to display them to the user of CPDDI. In this paper, CPDDI model is employed to deal only with collecting pulse counts from FSMM and sending control instructions to MCM. Pulse counts are used to calculate speed of DC motor according to Eq. (1) if speed is displayed as meters per seconds (m/s) or according to Eq. (2) if it is displayed as kilometers per hours (km/h). “Tp” represents total pulses that CPDDI receives from FSMM with PCSI “t”. “d” is the diameter of spinning disk attached to the motor shaft. “N” represents number of cutting slots on spinning disk. 3.14 ∗ d ∗ T p N ∗t 11.3 ∗ d ∗ T p Vm = N ∗t Vm =
(1) (2)
Figure 7b depicts and shows communication methodologies between SMC, FSMM-USB, CPDDI, MCM-USB, and BCC. Communication between CPDDI and FSMM, CPDDI and MCM-USB, or SMC and FSMM-USB was designed and developed to be happening at the same time which makes PC-SDC possesses parallelism feature. SMC sends speed message to FSMM-USB over consecutive fixed time intervals “PCSIs”. FSMM-USB saves received speed message in short-term buffers which are updated continuously as soon as receiving new speed message. Also, CPDDI is responsible for the periodic sending of speed request to FSMM-USB and PC-USB message to MCM-USB over consecutive time intervals called speed request interval (SRI) and PC-USB interval (PUI), respectively. FSMM-USB sends a USB-PC message
123
8802
Arab J Sci Eng (2014) 39:8793–8810
Table 3 Intelligent rules to control DC motor in different movement states Rule no.
Rule
Sub-rules
Motor movement state
1
Nd = 0 × 41
No sub-rules
Stop state
Stop motor gradually
2
Nd = 0 × 45
No sub-rules
Continue with old move state (COM)
Continue moving motor with its same CMS in its old direction and old speed
3
Nd = 0 × 46
CMS = 0, Od = 0 × 41, DCo = 0, and DCn > 0
Stop—to—forward move state (SFM)
Convert its motion from stop to forward Apply new duty cycle “DCn” to generate new speed gradually
CMS = 1, Od = 0 × 46, and DCn ! = DCo
Forward—to—forward move with new speed state (FFMNS)
Continue moving motor in forward (CW) direction Apply new duty cycle
CMS = 1, Od = 0 × 46, and DCn = DCo
Forward—to—forward move with same speed state (FFMSS)
It is similar to COM state
CMS = 1, Od = 0 × 42, and DCn ! = DCo
Backward–to—forward move with new speed state (BFMNS)
Convert motor direction from backward (CCW) to forward (CW) Apply duty cycle old “DCo” until motor reach to stop state (DCo = 0) Apply duty cycle new “DCn” gradually
CMS = 1, Od = 0 × 42, and DCn = DCo
The motor will not respond to this state
Send a warning acknowledgment to CPDDI to tell it that this is Not Allowed state
CMS = 0, Od = 0 × 41, DCo = 0, and DCn > 0
Stop—to—backward move state (SBM)
Convert its motion from stop to backward Apply new duty cycle “DCn” to generate new speed gradually
CMS = 1, Od = 0 × 42, and DCn ! = DCo
Backward—to—backward move with new speed state (BBMNS)
Continue moving motor in backward (CCW) directionApply new duty cycle
CMS = 1, Od = 0 × 42, and DCn = DCo
Backward—to—backward move with same speed state (BBMSS)
It is similar to COM state
CMS = 1, Od = 0 × 46, and DCn ! = DCo
Forward—to—backward move with new speed state (FBMNS)
Convert motor direction from forward (CW) to backward (CCW) Apply duty cycle old “DCo” gradually until motor reach to stop state (DCo = 0) Apply duty cycle new “DCn” gradually
CMS = 1, Od = 0 × 46, and DCn = DCo
The motor will not respond to this state
Send a warning acknowledgment to CPDDI to tell it that this is Not Allowed state
4
Nd = 0 × 42
which contains data of pulse count as a response to speed request of CPDDI. MCM-USB reformates the PC-USB message to a control message. After that, it sends the control message, which contains required control instructions of DC motor, to BCC. It then forwards acknowledgment that is received from BCC to CPDDI as shown in Fig. 7b.
123
Scenario of control actions
4 Experimental Results In this section, experimental results obtained from PC-SDC system are presented. These collected experimental results are averaged over multiple runs. Each run is executed for 300 s. Real-time feature as a quality of service (QOS) for the
Arab J Sci Eng (2014) 39:8793–8810
8803
Fig. 6 Schematic diagram of BCC as the driving system for the DC motors
PC-SDC system is measured and discussed via two performance metrics. These metrics are acknowledgment receiving time (ART) and speed message time (SMT). ART refers to sum of time that PC-USB message takes to be constructed by CPDDI and consumed time between sending PC-USB message which contains control instructions to BCC until receiving acknowledgment from BCC. SMT represents consumed time between sending speed request from CPDDI until receiving speed message. Also, the effectiveness of proposed PC-SDC system is investigated by a comparison between pulses count that is measured by FSMM and pulses count that is gathered from GDS.1000.U oscilloscope [41]. Figure 8a shows practical results of ART at different PUI intervals beginning from PUI = 5 ms to PUI = 100 ms. Results of Fig. 8a proved that CPDDI-MCM part of PC-SDC is a real-time system. It is observed that maximum ART value equals to 24.21 ms at PUI = 60 ms, while minimum ART value is 21.35 ms at PUI = 5 ms. The difference between minimum and maximum ART values is quite small, but it is preferable in this real-time system to take into consideration worst time response case. So, PUI is selected to be 60 ms overall next experiments. Figure 8b shows practical results of SMT at different SRI intervals. Figure 8b confirms that CPDDI-FSMM part of PCSDC system is a real-time system because the maximum SMT value is 8.14 ms. So, SRI is selected to equal 90 ms
overall next experiments. It is observed that the maximum SMT response time is faster than maximum ART response time. The secret behind that is which firmware part replies CPDDI. In PC-SDC, BCC is responsible for replying CPDDI by sending acknowledgment when CPDDI sends a PC-USB message. The role of MCM-USB is forwarding both reformatted PC-USB message from CPDDI as a control message and forwarding acknowledgment from BCC. It is a long communication journey between CPDDI, MCM-USB, and BCC. On the other side, FSMM-USB takes the responsibility of replying CPDDI when it sends speed request. The main communication role of SMC is sending periodically pulses count to FSMM-USB which stores it in special short-term buffers. These buffers are updated periodically according to each new coming speed message. When CPDDI sends a speed request, FSMM-USB replies with last saved pulses count. There is no direct communication between CPDDI and SMC but they are communicating through FSMM-USB. To evaluate effectiveness of PC-SDC system, phototransistor’s output of shaft encoder is connected to both SMC to give measured pulses (MP ) and oscilloscope to calculate real pulses (RP ). Figure 9a, b shows results of MP and RP . They depict that DC motor does not work when applying duty cycles from 0 to 70. These duty cycles cannot produce enough average voltage to be applied for running such the DC motor. Variable number of pulses are generated due to
123
8804
Arab J Sci Eng (2014) 39:8793–8810
Fig. 7 a General software components of CPDDI, b communication methodologies between SMC, FSMM-USB, CPDDI, MCM-USB, BCC
applying different duty cycles. These variable pulses represent rotation speed of the DC motor that used with in this paper. From duty cycle = 90 to duty cycle = 150, speed of DC motor increases sharply until it reaches the maximum rotation speed at duty cycle = 150 as shown in Fig. 9a. After
123
that speed decreases to be slightly varied to give a steadystate speed status at duty cycle range from 170 to 255. This previous behavior happens at any PCSI from 10 to 60 ms. But from PCSI = 70 ms to PCSI = 100 ms, the behavior is changed and become similar to DC motor behavior in Fig. 9b.
Arab J Sci Eng (2014) 39:8793–8810
8805
Fig. 8 a Practical results of ART at different PUI intervals, b practical results of SMT at different SRI intervals
This new behavior depicts that speed of DC motor increases sharply from duty cycle 90 to 110 in Fig. 9a and from duty cycle 90 to 250 in Fig. 9b. After these previous duty cycles, speed of DC motor tends to behavior of steady state. Figure 10 shows an example of real pulses from oscilloscope at PCSI = 100 ms and duty cycle = 210. In Fig. 10, there are 11 pulses appeared on oscilloscope screen at total time equal to 2.38 ms. So, what is real pulses that should be counted when PCSI = 100 ms? The answer is that real pulses equals to 462 pulses for such duty cycle. Figure 9b confirms the previous result while in Fig. 9a, MP equals to 145 pulses for the same previous duty cycle and PCSI. This means that SMC has the ability to count only 145 pulses from 462 real pulses. The reason behind that is the problem of miscounting of pulses (MCP). MCP problem happens, when a pulse interrupts SMC and enforces it to enter in its interrupt
algorithm. Some of other next pulses pass quickly without being able to interrupt SMC. This situation occurs because SMC already enters in its interrupt algorithm at the same time period of these passed pulses, often called ghost pulses. Generally, when a PIC microcontroller enters in its interrupt algorithm due to a specific interrupt, it prevents itself from responding and handling any other interrupts until finishing its current interrupt. For our experiments, PCSI intervals from 30 to 60 ms are considered intermediary time periods, while PCSI intervals from 70 to 100 ms are considered long-time periods. As a result, it is normally to deduce that number of real pulses at these intermediary time periods is lower than real pulses at long-time periods. Miscounting of pulses problem becomes worst, since number of real pulses is increased. Also, increasing of duty cycle is another parameter which causes
123
8806
Arab J Sci Eng (2014) 39:8793–8810
Fig. 9 a Measured pulses (MP) by FSMM versus different duty cycles at different PCSIs, b real pulses (RP) from oscilloscope versus different duty cycles at different PCSIs
Fig. 10 An example of real pulses from oscilloscope at PCSI = 100 ms and duty cycle = 210
123
large number of real pulses as shown in Fig. 9b. Duty cycle 150 is also an intermediate value between duty cycles from 0 to 255. In this duty cycles, SMC circuit fluctuates between two response scenarios. The first response scenario is related to its ability of sensing and counting some of ghost pulses at PCSI intervals from 30 to 60 ms. The second response scenario is related to its failure of sensing these ghost pulses at PCSI intervals from 70 to 100 ms as shown in Fig. 9a. To sum up, sensing of ghost pulses results in increasing of measured pulses. So gap (i.e., error percentage “ε”) between measured pulses value and its corresponding real pulses value is reduced. On contrast, the gap becomes larger in case of failure of sensing ghost pulses. This description is elucidated in Fig. 11a especially at duty cycle 150. Figure 11a shows the error percentage (ε) between MP and RP versus different PCSI at different duty cycles. ε is used to evaluate performance of FSMM, and it is calculated
Arab J Sci Eng (2014) 39:8793–8810
8807
Fig. 11 a Error percentage (ε) versus different PCSI intervals at different duty cycles, b average error percentage (ε) versus different duty cycles
by using Eq. (3). It is noticed that FSMM performance is the best at low duty cycle as 90 because ε value is the minimum. Figure 11b confirms the previous result because it depicts that average ε between MP and RP at such duty cycle 90 is 3.4 %. ε reaches to values from 63.41 to 76.1 % at duty cycles from 170 to 255, respectively. At medium and high duty cycles, FSMM performance in counting pulses becomes worst due to MCP problem. Also, Fig. 11a depicts that PCSI = 90 ms achieves a minimum value of ε at most of duty cycles as 90, 170, 210, 250, and 255. Also, it is very close to minimum values at some other duty cycles as 130, 190, and 230. So, PCSI is selected to equal 90 ms for such PC-SDC system. Figure 12 shows speed parameter of DC motor versus different PCSI intervals at four duty cycles: 90, 130, 190, and 255. It is noticed from Fig. 12a that measured speed is close to real speed at duty cycle 90. Figure 12b, c confirm that gap between measured and real speed is enlarged when driving such DC motor by increasing sequentially duty cycle value. This gap becomes the worst at duty cycle 255 as shown in
Fig. 12d due to previously discussed MCP problem. To sum up, Fig. 12 confirms strongly results of Fig. 11. Current parameter versus time is shown in Fig. 13. To reiterate, each experimental run is executed for 300 s. Figure 13 elucidates that the start current of such DC motor reaches to 2.82 A at 24 ms, while rated current of it ranges from 0.12 to 0.29 A after 80 ms. Average rated current from Fig. 13 is close to rated current in Table 2. Also, it is noticed that start current (equal to 2.82 A) confirms the key benefit of employing L298N chip with in MCM, as discussed previously in Sect. 3.2.2 to support driving different DC motors up to 4 A. There are three scenarios that can be suggested to solve MCP problem. The first scenario is mounting different spinning disks with different resolution of cutting slots. It is noticed from the oscilloscope result as in Fig. 10 that time of one pulse ranges from 260 to 280 µs because spinning disk which is used with this paper has 100 cutting slots. So, such PC-SDC system should be evaluated in the future by applying spinning disks with a lower variable number of slots. The second scenario is using very fast and accurate counting ICs
123
8808
Arab J Sci Eng (2014) 39:8793–8810
Fig. 12 a Speed versus PCSI for duty cycle 90 (represent duty cycle = 35 %), b speed versus PCSI for duty cycle 130 (represent duty cycle = 51 %), c speed versus PCSI for duty cycle 190 (represent duty cycle = 74.5 %), and d speed versus PCSI for duty cycle 255 (represent duty cycle = 100 %)
(Ampere)
3
5 Conclusion
2.5 2
Current
1.5 1 0.5 0 0
20
40
60
80 100 120 140 160 180 200 220 240
Time
(msec)
Fig. 13 Current versus time at duty cycle 255 (represent duty cycle = 100 %)
such as microprocessor which will cost more. The last scenario is using values of MP that are measured by FSMM and ε value that is evaluated by this paper. These values are applied with Eq. (4) to calculate RP s when applying a specific duty cycle. (Rp − Mp ) ∗ 100 Rp 100 ∗ Mp Rp = (100 − ε)
ε(%) =
123
(3) (4)
This paper proposed a new practical PC-based speed and direction controller (PC-SDC) for DC motors. PC-SDC is a closed-loop controller that consists of three main parts: (1) µC-based feedback speed monitoring module (FSMM), (2) µC-based motor control module (MCM), and (3) CPDDI software program on PC. Modules of such PC-SDC are completely in-house designed circuits. The purpose of FSMM is measuring and sending information about speed (i.e., pulses count from an encoder) of a DC motor to CPDDI over consecutive time intervals called pulses count sending interval (PCSI). MCM is a direct PWM driver that is designed to control speed and direction of DC motor. CPDDI refers to the terminology of “Collect—Process—Decide—Deliver— Instruction”. CPDDI is a general open-source solution that represents software implementation of the concept of moment perspective of accumulative intelligence model. Current and future purpose of CPDDI is producing a USB-based network. This network is capable of collecting sensory from homogenous or heterogeneous network of sensors. Then, it processes and takes decisions according to predefined rules for such networks. At last, the same USB-based network can
Arab J Sci Eng (2014) 39:8793–8810
deliver these decisions as instructions. These instructions enable USB-based network from controlling different or similar types of actuators alongside with network of sensors. Open architecture, intelligence, modularity, and parallelism are taken into consideration during designing and developing hardware and software parts of such PC-SDC system. In this paper, general model of CPDDI is employed to deal only with collecting pulses counts from FSMM and sending control instructions to MCM. PC-SDC and its firmware parts are investigated by running multiple practical experiments. Acknowledgment receiving time (ART) and speed message time (SMT) metrics are used to evaluate real-time feature of such PC-SDC. Also, the effectiveness of such PC-SDC is investigated by a comparison between pulses count that is measured by FSMM (MP ) and real pulses count that is gathered from an oscilloscope (RP ). Practical experimental results proved that two firmware parts FSMM and MCM are real-time systems because maximum ART value is 24.21 ms and maximum SMT value is 8.14 ms. It is observed that MP is nearly close to its corresponding value of RP at low duty cycles as 90 and 110. But the difference between MP and its respective RP became worst at medium and high duty cycles as from 130 to 255 due to mis-counting of pulses (MCP) problem. This paper suggests three scenarios to solve the MCP problem in future. The first scenario is mounting spinning disks with a lower variable number of slots to such PC-SDC. The second scenario is using very fast and accurate counting ICs such as microprocessor. The last scenario is using values of MP and ε to calculate RP s when applying a specific duty cycle.
References 1. Kumar, P.; Agrawal, V.: A study of conventional and fuzzy PI controller CSI fed induction motor. In: Inter. Conf. on Power, Control, and Embedded Systems (ICPCES), pp. 1–5 (2010). doi:10.1109/ ICPCES.2010.5698619 2. Nise, N.S.: Control System Engineering, 6th edn. Wiley, New York (2011) 3. Jantzen, J.: Foundation of Fuzzy Control. Wiley, New York (2007) 4. Muruganandam, M.; MadhesWaran, M.: Modeling and simulation of modified fuzzy logic controller for various types of DC motor drives. In: IEEE Inter. Conf. on Control, Automation, Communication, and Energy Conversion, pp. 1–6 (2009) 5. Emhemed, A.A.A.; Mamat, R.B.: Modelling and simulation for industrial DC motor using intelligent control. Int. Symp. Robot. Intell. Sens. 41, 420–425 (2012) doi:10.1016/j.proeng.2012.07.193 6. Liu, Z.; Zhuang, X.; Wang S.: Speed control of a DC motor using BP neural networks. In: Proc. of IEEE Conf. on Control Applications, vol. 2, pp. 832–835 (2003). doi:10.1109/CCA.2003.1223117 7. Arulmozhiyal, R.; Kandiban, R.: Design of fuzzy PID controller for brushless DC motor. In: Inter. Conf. on Computer Communication and informatics (ICCCI), pp. 1–7 (2012). doi:10.1109/ICCCI. 2012.6158919
8809 8. Chetate, B.; Zamoun, R.; Fegriche, A.; Boumdin, M.: PID and novel approach of PI fuzzy logic controllers for active surge in centrifugal compressor. Arab. J. Sci. Eng. (AJSE) 38(6), 1405– 1414 (2013) doi:10.1007/s13369-013-0601-6 9. Ren, T.J.; Chen, T.C.; Chen, C.J.: Motion control for a two wheeled vehicle using a self-tuning PID controller. Control Eng. Pract. J. 16(3), 365–375 (2008) doi:10.1016/j.conengprac.2007.05.007 10. Chang, W.D.; Yan, J.J.: Adaptive robust PID controller design based on a sliding mode for uncertain chaotic systems. Chaos Solitons Fractals J. 26(1), 167–175 (2005) doi:10.1016/j.chaos.2004. 12.013 11. Ang, K.H.; Cheng, G.; Li, Y.: PID control system analysis, design, and technology. IEEE Trans. Control Syst. Technol. 14(4), 559– 576 (2005) doi:10.1109/TCST.2005.847331 12. Allaoua, B.; Laoufi, A.; Gasbaoui, B.; Nasri, A.; Abderrahmani, A.: Intelligent control design for DC motor speed control based on fuzzy logic-genetic algorithms optimization. Leonardo J. Sci. 7(13), 90–102 (2008) 13. Srikanth, S.; Chandra, G.R.: Modeling and PID control of the brushless DC motor with the help of genetic algorithms. In: Inter. Conf. on Advances in Engineering, Science, and Management (ICAESM), pp. 639–644 (2012) 14. Bhushan, B.; Singh, M.: Adaptive control of DC motor using bacterial foraging algorithm. J. Appl. Soft Comput. 11(8), 4913– 4920 (2011) doi:10.1016/j.asoc.2011.06.008 15. Payakkawan, P.; Klomkarn, K.; Sooraksa, P.: Dual-line PID controller based on PSO for speed control of DC motors. In Proc. of Inter. Symp. on Communication and Information Technology (ISCIT), pp. 134–139 (2009). doi:10.1109/ISCIT.2009.5341272 16. Milani, M.M.R.A.; Cavdar, T., Aghjehkand, V.F.: Particle swarm optimization-based determination of Ziegler-Nichols parameters for PID controller of brushless. In: Inter. Symp. on Innovations in Intelligent Systems and Applications (INISTA), pp. 1–5 (2012). doi:10.1109/INISTA.2012.6246984 17. Wuxiong, X.: Control of brushless DC motor with an AVR microcontroller. In: Inter. Conf. on Consumer Electronics, Communication, and Networks (CECNet), pp. 2078–2081 (2011). doi:10. 1109/CECNET.2011.5768671 18. Xu, H.; King, K.; Jani, Y.: High performance DC chopper speed and current control of universal motors using a microcontroller. In IEEE Conf. on Industry Applications, pp. 701–705. (2007) doi:10. 1109/07IAS.2007.111 19. Ali, Y.S.E.; Noor, S.B.M.; Bashi, S.M.; Hassan, M.K.: Microcontroller performance for DC motor speed control system. In: Proc. of National Conf. on Power Engineering (PECON), pp. 104–109 (2003). doi:10.1109/PECON.2003.1437427 20. Viswanathan, V.; Jeevananthan, S.: A novel space-vector current control method for commutation torque ripple reduction of brushless DC motor drive. Arab. J. Sci. Eng. (AJSE) 38(10), 2773– 2784 (2013) doi:10.1007/s13369-012-0490-0 21. Ali, F.H.; Mahmoud, H.M.; Ismael, S.M.B.: LabView FPGA implementation of a PID controller for DC speed motor. In: Inter. Conf. on Energy, Power, and Control (EPC-IQ), pp. 139–144. (2010) 22. Hsu, C.F.; Lee, B.K.: FPGA-based adaptive PID control of a DC motor driver via sliding-mode approach. J. Expert Syst. Appl. 38(9), 11866–11872 (2011) doi:10.1016/j.eswa.2011.02.185 23. Duma, R.; Dobra, P.; Trusca, M.; Betea, B.; Sita, I.V.: Embedded control of electrical motors. In: Inter. Conf. on System Theory, Control, and Computing, pp. 1–6 (2012) 24. Huang, G.; Lee, S.: PC-based PID speed control in DC motor. In: Inter. Conf. on Audio, Language, and Image Processing (ICALIP), pp. 400–407 (2008). doi:10.1109/ICALIP.2008.4590052 25. Elmahalawy, A.H.; Ali, M.A.; Harb, H.M.: Trends and differences of applying intelligence to an agent. J. Telecommun. Inf. Technol. (JTIT) 4, 119–123 (2011)
123
8810
Arab J Sci Eng (2014) 39:8793–8810
26. Sharan, R.V.; Onwubolu, G.C.; Singh, R.; Reddy, H.; Kumar, S.: A simple speed feedback system for low speed DC motor control in robotics applications. In: Innovative Algorithms and Techniques in Automation, Industrial Electronics and Telecommunications, pp. 397–399 (2007). doi:10.1007/978-1-4020-6266-7_71 27. Datta, J.; Chowdhuri, S.; Bera, J.; Sarkar, G.: Remote monitoring of different electrical parameters of multi-machine system using PC. J. Meas. 45(1), 118–125 (2012) doi:10.1016/j.measurement. 2011.09.009 28. Sánchez, E.V.; Gil, J.G.; Real, J.C.G.; Higuera, J.F.D.: A new method for sensorless estimation of the speed and position in brushed DC motors using support vector machines. IEEE Trans. Ind. Electron. 59(3), 1397–1408 (2012) doi:10.1109/TIE.2011. 2161651 29. Mondal, R.; Mukhopadhyay, A.; Basak, D.: Embedded system of DC motor closed loop speed control based on 8051 microcontroller. Procedia Technol. 10, 840–848 (2013) doi:10.1016/j.protcy. 2013.12.429 30. Avago Technologies, Small optical encoder module (HEDS9780#A54). http://www.avagotech.com/docs/AV02-1747EN 31. Microchip Technology Inc., http://www.microchip.com/TechDoc. aspx?type=datasheet 32. Elsaqaa, A.; EL-Ganzoury, A.; Mohammed, K.; Mahmoud, H.; El-Sobky, A.: Automatic Traffic Ticket System (ATTS). Technical Report of Final Year project to Dept. of Computer Engineering & Science, Faculty of Electronic Engineering, Menofia University (2011)
123
33. Simon Inns, http://www.waitingforfriday.com/index.php/Open_ Source_Framwork_for_USB_Generic_HID_devices_based_on_ the_PIC18F_and_Windows 34. Microchip Technology Inc., http://ww1.microchip.com/ downloads/en/DevicesDoc/39632c.pdf 35. MikroElectronica, http://www.mikroe.com/mikroc/pic 36. Axelson, J.: USB Complete: The Developers Guide, 4th edn. Lackview Research LLC, UK (2009) 37. Kumar, A.; Kim, H.; Hancke, G.P.: Environmental monitoring systems: a review. IEEE Sens. J. 13(4), 1329–1339 (2013) doi:10. 1109/JSEN.2012.2233469 38. STMicroelectronics, http://www.st.com/st-web-ui/static/active/ en/resources/technical/document/datasheet/CD00000240.pdf 39. Microchip Technology Inc., http://ww1.microchip.com/ downloads/en/DevicesDoc/39564c.pdf 40. KITASHIBA Electric Co. Ltd., Japan. http://www.kitashiba.co.jp/ english/ 41. Good Will Instruments Co., Ltd. http://www.gwinstek.com.tw