• No results found

CHAPTER THREE: HARDWARE PRELIMINARY IMPLEMENTATION

SmartWatch-existing data-logger

aI SmartWatch

existing data4ogger

The existing data-logger, named SmartWatch by Gallagher, was designed as a means to log the fence voltage at a periodic interval, which it could report back to base when it was requested; so it could be used as a means to find out when the

fence stopped working properly, and possible why. The hardware in the

SmartWatch, when broken down into sub-circuits seems quite simple, although some of the subsystems are in fact a lot more complicated than they would seem. A block diagram is provided in Figure 3.1, below.

mpie and1

[

L

hold circuitry

I

I

EEPROM memorfl

_[

Microcontroller-

1

I

24LC16B 16kB Mitsubishi microcomputers

I

serially loaded M3753 IE4FP IEPROM chip

*

I

GSM interface -__IncludingSIM card

Figure 3.1 : Block Diagram of the SmartWatch System

Fence voltage input-

Rectified and divided down to around 3.8V

External interrupt port, e.g. switch. Includes voltage spike protection

The main power source is a solar panel, which charges a six volt battery for providing power during the night, when the solar panel is effectively rendered useless without any sunlight. The Power supply is a National Semiconductor LM2941 adjustable output voltage LDO Regulator, with the output voltage set to 3.8 volts.

The fence voltage sampling circuit is one of the more complex circuits in the system. Due to the nature of the fence pulses, specifically their high voltage and the very short time the peak voltage is seen, typically ten kilo-volts in a spike

Page

I

29 Solar panel -2W And Battery-6V

I

Power supply- LM2941 adjustable voltage LDO regulator

set to 3.8V

I

r

Chapter Three: Hardware-Preliminary Implementation

lasting for less than 150 micro-seconds, this part of the circuit has to not only

lower the voltage spike to less than 3.8 volts, but also make the spike long enough

for the microcontroller to read the voltage accurately. This is done using a

resistive voltage divider, a rectifier, a sample-and-hold circuit connected to an Analog to Digital Converter ADC pin on the microcontroller, and an interrupt generator connected to one of the microcontroller's external interrupt pins, and will be explained in further detail in a later section.

The external interrupt circuitry is simply a connector with a voltage spike protection circuit around it to prevent the microcontroller getting damaged by being hit by a transient spike. It is connected to the microcontroller on one of the external interrupt pins, so it can generate and interrupt in the control routine when it needs to.

The unit was controlled by a Mitsubishi Microcomputers M3753 1E4FP

Microcontroller, running on a four mega-hertz clock signal, with a Seiko 5-805 series voltage detector for brown-out protection. The memory in the SmartWatch

was an external, 1 6 kilo-byte Microchip 24LC 1 6B Electrically Erasable

Programmable Read Only Memory EEPROM chip, which was controlled by the

microcontroller using an Inter-Integrated circuit 12C Bus interface. This

memory was enough to store over six months worth of data logs, so it could be left for an extended period time without needing to be attended to or downloaded from.

The GSM module that is used to report back to and receive control signals from the base, was an UbiNetics GM400, dual band, GPRS enabled, low power GSM module with data, voice, SMS and fax support. The module is controlled directly by the microcontroller, and was the only link to the Subscriber Identity Module SIM Card.

This circuitry was effective for what it was designed for, however, because it did not have the capability to monitor any environmental parameters such as temperature or humidity, it was often unable to provide the Research and Development team at Gallagher Group Ltd with enough information to formulate a definite reason for any failures, which is why they needed a new one.

New Data-Logger-First Revision

32

New DataLogger

First Revision

This was the first revision of the Data-logger designed for the project. This

revision was designed as a starting point in the project, to give a new data logger that could be used to monitor the fence voltage, the energizers internal battery voltage, and the temperature both inside and outside the energizer enclosure.

Many of the systems have remained the same in this revision of the data-logger as shown in the block diagram in Figure 3.2, as the systems were known to work, and the parts were available in the Gallagher inventory.

Solar panel-2W or 5W

And Battery-6V or 12V

I

[

Rectified and divided

Fence voltage input-

down to around 100V

OSM interface-Motorola

1

External interrupt port,

G20/G24 GSM module e.g. switch. Includes Including SIM card holder

J

voltage spike rotectioJ Figure 3.2: Block Diagram of the first revision of the Data-logger System

The solar panel and the battery were separated by power conditioning circuitry to help protect both from any damaging power surges or reverse connections that could cause damage to either. To protect the solar panel a rectifier diode was put in to prevent any reverse current during the night when the solar panel no longer supplies power, and to help protect both the battery and the solar panel from over-

Power supply-

LM2941 adjustable voltage LDO regulator

set to 3.6V

±1