You are on page 1of 10

A REPORT ON

INTERFACING THE HUMAN DETECTION SYSTEM

Submitted in partial fulfillment of the course

Practice School II

Under the Guidance of

Mr. N. Sampath Kumar

AGM- LRSAM, BDL.

Submitted by:

Abhijith Reddy

Neeti Nayak

BHARAT DYNAMICS LIMITED,

HYDERABAD

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE

October, 2010.

1
INTRODUCTION

The project is divided into various modules, namely,

 Human Detection

 Human Tracking,

 Interfacing the PC with the Door Interlocking System

HUMAN DETECTION

The Human Detection module, has been implemented in Processing.

Processing is an open source programming language and environment for

people who want to create images, animations, and interactions. Initially

developed to serve as a software sketchbook and to teach fundamentals of

computer programming within a visual context, Processing also has evolved

into a tool for generating finished professional work. In this project, the Object

Detection module utilizes the Video capture and analysis available in

Processing to detect motion through frame differencing and thresholding.

INTERFACING

After the program was developed, the design for the Interface was made. The

output would be interfaced with the Arduino software, which programs the

Arduino PCB, which in turns drives the relay. The Pre-existing design of door
2
interlocking system has been covered in the report along with modifications

that we suggest.

Arduino is an open-source electronics prototyping platform based on flexible,

easy-to-use hardware and software. It's intended for artists, designers,

hobbyists, and anyone interested in creating interactive objects or

environments. Arduino can sense the environment by receiving input from a

variety of sensors and can affect its surroundings by controlling lights, motors,

and other actuators. The microcontroller on the board is programmed using

the Arduino programming language (based on Wiring) and the Arduino

development environment (based on Processing). Arduino projects can be

stand-alone or they can communicate with software on running on a computer

(e.g. Flash, Processing, MaxMSP). The boards can be built by hand or

purchased preassembled; the software can be downloaded from the arduino

website. The hardware reference designs (CAD files) are available under an

open-source license.

3
The Designed Door Interlocking System has the following components as
shown in the figure.

AC RELAYS:

Each Door has one switch and each Switch is in series with the AC Coil of the

5A, 230V relay.

BYPASS SWITCH:

This is used to supply the UUT in case of some malfunctioning in the Door

Interlocking System and yet the Test is to be carried out.

EMERGENCY STOP SWITCHES:

This is the emergency control and it overrides the control at both Bypass and

the Door Interlocking System. The working personnel stuck in the MIS will be

able to switch the power off at the Master Switch itself irrespective of the Door

Interlocking System and the Bypass Switch.

Now, the purpose of the project was to detect a Human presence in the MIS

using CCTV surveillance and process that input to immediately stop the Power

supply to the UUT. For that purpose the pre-existing Door Interlocking system

will have to be upgraded to accommodate this new design.

4
The components added would be:

DC RELAYS:

A DC relay is an electromechanical switch. It has a coil that energizes with a

relatively modest current. When it turns on, the coil magnetically pulls on a

spring-loaded lever connected to a set of electrical contacts. When the current

turns off, the lever snaps back to its original position, connecting another set

of contacts.

The relay's coil needs a certain voltage to turn it on. This makes different

relays suited to particular kinds of circuits, such as digital or analog. DC relays

rated for 5, 12 or 24 volts, with other voltages are also available. A relay's

contacts have maximum current and voltage ratings. In this project, we need

the relay to have a minimum rating of 230 V.

These relays would be excited through the 5 V current from the Arduino

output. The relay would be a Single-pole-single-throw kind, i.e. it will have one

switch, which is normally closed. It would be provided in series and in

between the parallel combination of Interlocking System and Bypass , the

Series combination of the emergency switches and the Master Power Switch.

This switch would open as the coil is excited, thus breaking the series

connection. It would have the highest priority amongst the Door, Bypass, and

the emergency switches.

5
STEPS OF OPERATION:

 The first step is to connect the relay to the UUT.

 The next step is getting the microcontroller to control this relay. To do

that we designed the circuit provided.

 Most relays shouldn’t be connected directly to a microcontroller because

they are inductive and require more current that a microcontroller can

safely supply. Since we are using a low current 5 volt relay we may be

able avoid this circuit.

 In this circuit the transistor acts as a switch and it allows you to turn on

the relay. This circuit works for relays using 5, 9, or 12 volts (the

common trigger voltages for relays). We picked a 5 volt relay because

that uses the Arduino board’s 5V volt output thus eliminating the need

for another power source.

 The diode was connected in parallel to protect the microprocessor from

the Back EMF current.

 The code for running this hardware has been provided.

6
#define RELAY_PIN 3

void setup()

pinMode(RELAY_PIN, OUTPUT);

Serial.begin(9600); // open serial

Serial.println("Press the spacebar to toggle relay on/off");

void loop()

static int relayVal = 0;

int cmd;

while (Serial.available() > 0)

cmd = Serial.read();

switch (cmd)

7
case ' ':

relayVal ^= 1; // xor current value with 1 (causes value to toggle)

if (relayVal)

Serial.println("Relay on");

else

Serial.println("Relay off");

break;

default:

Serial.println("Press the spacebar to toggle relay on/off");

if (relayVal)

digitalWrite(RELAY_PIN, HIGH);

else

digitalWrite(RELAY_PIN, LOW);

8
PIN OUT DIAGRAM OF A DC
RELAY

THE INTERFACE CIRCUIT

9
10

You might also like