Sunteți pe pagina 1din 5

International Journal of Scientific Research Engineering & Technology (IJSRET)

Volume 2 Issue 10 pp 590-594 January 2014 www.ijsret.org ISSN 2278 0882


IJSRET @ 2014
The Design and Implementation of a Sequence Event Recorder
Module Based on STM32F
Kazem Jamali
1
, Mohammad Hossein Refan
2
1
Department of Electrical Engineering,, Shahid Rajaee University, Iran
2
Department of Electrical Engineering, Shahid Rajaee University, Iran
ABSTRACT
In this work a novel micro-controller based
sequence event recorder module has been
designed and its software has been developed.
By this module, events that are timed-tagged are
monitored and they can be reported to a base
station if a defined event stored in the program
or a query from base station takes place. A
micro SD for data storage, GPS for time
synchronization and GSM for reporting to a
remote base station are used.
Keywords - Event recorder, SD Card, GSM, GPS,
GLCD, STM32F103
I. INTRODUCTION
Event recorder is a device which monitors the
power system parameters and records the
parameter status, assisting substation engineers
to identify the system status. It is usually made
up of high-speed processor, high capacity mass
storage, analog input conditioning circuit, digital
input opto-isolated circuit, accurate analog to
digital converters, real time operating systems
etc[1]. This kind of standalone digital event
recorder has high performance but is too
expensive and inflexible. In this paper, a new
kind of digital event recorder module is
proposed. It can acquire operate parameters from
RS232 bus, record the event in micro SD
memory ,as well as the data may be retrieved by
a local connected laptop or PC Host to monitor
the data.
II. HARDWARE DESIGN
The digital event recorder consists of RTC (Real
Time Clock) circuit, SD card, RS232 serial
communication, GLCD display, keypad and
main controller STM32F103, GSM and GPS
shown in Figure 1. As a standard this module is
designed for 24VDC nominal level input signals
according to the DIN EN standard 61131-2.
Figure 1.The block diagram of event recorder
module
The module can be used for the following
functions:
- High speed acquisition of up to 64 input
signals, each with a 24VDC nominal level.
- Monitoring the input signals
- Generating time-tagged data
- Simulating the logical signal states via the
software
- Module fault display via GLCD on the front
panel
- Electrical isolation by the use of optocoupler
1. Introduction to the STM32F103
The STM32F103x performance line family
incorporates the high-performance ARM
Cortex-M3 32-bit RISC core operating at a 72
International Journal of Scientific Research Engineering & Technology (IJSRET)
Volume 2 Issue 10 pp 590-594 January 2014 www.ijsret.org ISSN 2278 0882
IJSRET @ 2014
MHz frequency, high-speed embedded
memories and an extensive range of enhanced
I/Os and peripherals connected to two APB
buses. All devices offer three 12-bit ADCs, four
general purpose 16- bit timers plus two PWM
timer, as well as standard and advanced
communication interfaces: up to two I2Cs, three
SPIs, two I2Ss, one SDIO, five USARTs, an
USB and a CAN. The STM32F103xx High-
density performance line family operates in the
40 to +105 C temperature range, from a 2.0 to
3.6 V power supply. A comprehensive set of
power-saving mode allows the design of low-
power applications.
2. Isolated Input
This event recorder module is a high-speed,
binary signal input module that provides 64
channels. Following every signal change, the
signal is time-stamped (Time-tagged data, TTD).
The time stamp has a resolution of 1ms. The
time precision for signals, which are acquired
with RTC modules, is typically 1ms. As shown
in Figure 2, the module is equipped with an
interference-suppress function, which suppresses
signal impulses shorter than 1.5ms. To ensure a
correct TTD generation the level after the signal
change must at least last for 10ms.The inputs are
optically isolated from the inboard circuit. With
reference to overvoltage category III and
pollution degree 2 according to DIN EN 50178
and IEC 60664-1 the rated insulation voltage is
100vac (peak voltage 141V) for safe electrical
separation. The electrical isolation test voltage is
1400VDC (1000VAC). The inputs are type 1
digital inputs according to DIN EN 61131-2.
Type 1 digital inputs are not suitable for the
reading-in of signal sources, which have residual
current higher than 0.5mA at low-signal, or
voltage drop (incl.wire) higher than 4.5V at
high-signal.
Figure 2.The block diagram of the event
recorder input
3. Multi Media Card
Typically, an MMC is used as a storage medium
for a portable device, in a form that can easily be
removed for access by a PC. In Figure 3 SD card
connection to the micro-controller is shown.
Figure 3.multi media card circuit
4. Real Time Clock
In event recorder, the accurate time stamp is
necessary to tag the digital event. The STM32
contains a basic real-time clock. This is a 32-bit
counter that is optimized to increment each
second if clocked from a 32.768 KHz clock
source. When configuring the clock tree, the
RTC oscillator can be selected from: the low
speed internal oscillator, the low speed external
oscillator, or the high speed external oscillator
via a fixed divide by 128 prescaler. A further
RTC prescaler allows you to get an accurate
International Journal of Scientific Research Engineering & Technology (IJSRET)
Volume 2 Issue 10 pp 590-594 January 2014 www.ijsret.org ISSN 2278 0882
IJSRET @ 2014
seconds count. The RTC counter itself can
generate three interrupts: a second increment, a
counter overflow and an alarm interrupt. The
alarm interrupt occurs when the RTC counter
reaches the value stored in a matching alarm
register. In Figure 4 RTC block diagram of the
micro-controller is shown.
Figure 4.RTC internal circuit
5. GSM
In the developed micro-controller based
monitoring system, there have to be a network
acting as the data carrier - which the data is the
events saved in the SD card- to and from the
monitoring base station. This type of data carrier
is chosen because it is almost the most wide
spread communication network in any country
and also to make the system scalable for future
development. One of the very useful properties
of GSM networks are the Short Messaging
Systems as known as SMS. SMS basically carry
up to 160 bytes (characters) of data in them,
from one cellular phone to another. Cellular
phones use a special way to send text messages.
First, the text message is converted into PDU
format [2]. Then sender phone adds fields to this
converted string like date and Short Message
Service Centers known as SMSC. By use of
message of the GSM, the module can transmit
saved data in the SD card to the requested user.
In Figure 5 GSM connection to the micro-
controller is shown.
Figure 5.GSM circuit
6. GPS
Known as The Global Positioning System
(abbreviated GPS) is a radio based navigation
system formed worldwide, consisting of an array
of 24 satellites that broadcast radio signals to
GPS receivers[3]. One could consider GPS
receivers are basically radio receivers with serial
communication interfaces as their output
transducers, where the information could be sent
to other independent devices with higher levels
of computational power and larger storage
capabilities than a GPS receiver could have,
such as a computer. the basic operation of a GPS
system actually is measuring distances on
altitudes close to the surface of earth, by means
International Journal of Scientific Research Engineering & Technology (IJSRET)
Volume 2 Issue 10 pp 590-594 January 2014 www.ijsret.org ISSN 2278 0882
IJSRET @ 2014
of referring to the time it takes for radio signals
to travel between the receiver and the satellite.
This method enables the calculation of the
objects latitude, longitude, altitude and three
dimensional speed vectors. GPS module is used
to synchronize the SER time. In Figure 6 GPS
connection to the micro-controller is shown.
Figure 6.GPS circuit
7. OTHER HARDWARE DESIGN
The MAX232 is used as RS232 serial
communication transceiver and connect to the
computer and GPS. The general-purpose
input/output pins (PORTC) of STM32F103
perform the data transfer to GLCD display
module. The PORTB of STM32F103 is
configured as Keypad inputs. The main program
includes peripheral module initialization, GLCD
display. The periodical program includes RTC
timer management, periodical data storage, fault
event distinguish and the fault data storage. The
interrupt service routines perform the
communication task, data analysis and the
storage operate from XGATE to RAM.
III. SOFTWARE DESIGN
The software of the digital event recorder
module consists of three kinds of program, main
program, periodical program, and interrupt
service routine. The main program includes
peripheral module initialization, GLCD display.
The periodical program includes RTC timer
management and data storage. The interrupt
service routines perform the communication
task, data analysis and the storage operation.
IV. RESULTS
In order to test the designed SER, a micro-
controller based system is used; It generates five
square wave output with 2s period; each output
is 1ms different with previous one. Micro-
controller output is applied to 16-25 SER inputs.
The result is shown in Table 1.
Table 1.Stored Data in SD Card
V. CONCLUSION
The hardware circuit shown in Figure 7 is
divided into two parts. The first part contains
the GLCD display, keypad, GSM, GPS, MMC
and the serial communication port and the
other part is 64 isolated input.
Stored Data
in SD Card
Time-tagged Data
Data Time Date
Input:16
0
23:59:00.0
2013-12-20
Input:17
0
23:59:00.0
2013-12-20
Input:18
0
23:59:00.0
2013-12-20
Input:19
0
23:59:00.0
2013-12-20
Input:20
0
23:59:00.0
2013-12-20
Input:16
1
23:59:49.2126
2013-12-20
Input:17
1
23:59:49.3126
2013-12-20
Input:18
1
23:59:49.4126
2013-12-20
Input:19
1
23:59:49.5126
2013-12-20
Input:20
1
23:59:49.6126
2013-12-20
Input:16
0
23:59:51.2126
2013-12-20
Input:17
0
23:59:51.3126
2013-12-20
Input:18
0
23:59:51.4126
2013-12-20
Input:19
0
23:59:51.5126
2013-12-20
Input:20
0
23:59:51.6126
2013-12-20
International Journal of Scientific Research Engineering & Technology (IJSRET)
Volume 2 Issue 10 pp 590-594 January 2014 www.ijsret.org ISSN 2278 0882
IJSRET @ 2014
Figure 7.hardware of designed SER
REFERENCES
[1] Yue Wenlong. Fault Recorder Based on
Digital Signal Processing
(DSP). Power System Engineering, Vol.23,
No.4, 2007.
[2] MC9S12XDP512 Data Sheet Rev.2.17.
Freescale Semiconductor,Inc. July 2007
[3] Feng Zedong, Shao Beibei. Improving Real
Time performance ofuC/OS II by Using
Coprocessor. Microcontrollers &
EmbeddedSystems. No.4, 2008.
[4] [FM22L16 4Mbit F-RAM Memory Data
Sheet Rev.1.2. Ramtron
International Corporation. Dec. 2007.
[5] Steve McAsian. Using XGATE to
Implement a Simple Buffered
SCI. Freescale Semiconductor Application
Note. Oct. 2005.

S-ar putea să vă placă și