Submit manuscript...
International Journal of
eISSN: 2573-2838

Biosensors & Bioelectronics

Correspondence:

Received: January 01, 1970 | Published: ,

Citation: DOI:

Download PDF

Abstract

There are times one wakes up in the middle of the night with an urgent need to use the rest room or find their way around the room. The individual sometimes feels too tired to locate the light switch or maybe there is a power failure during this period. This problem is resolved in this research work by the use of a motion detector that automatically switches ON an alternating current (AC) powered light bulb or a direct current (DC) powered LEDs (in case of power failure) whenever motion is detected. When the motion ceases, the light bulbs (either AC or DC powered) is switched off. The light bulbs stay ON for approximately two minutes and are only triggered again by new detection. A battery charging circuitry was also incorporated into the design. The system performed favorably well and compared well with the commercially available ones.

Keywords: PIR Sensor, lithium-ion, rechargeable battery, microcontroller, arduino UNO, motion detection

Introduction

A motion sensor is a device that detects moving objects particularly people. It is often integrated as components of systems that automatically performs a task or alert a user of motion in an area).1 The use of motion detectors goes back to ancient societies that developed agriculture. Modern motion detection of people and things can be traced back to the early decades of 20th century with many of the same principle still in use today. The first motion detection system used ‘radar’ as sensor and its technology was sufficiently advancing. The ubiquitous use of radar would lead to other uses for motion detectors after the war.2 Other motion detector that was developed includes a detector that made use of Doppler Effect principle with the use of ultrasonic as sensor developed by Samuel Bagno. Today’s motion sensor work on the same basic principle that Samuel Bagno detector employed but used microwave and infrared sensors which detects motion by distortion in the frequencies they emit. There are two types of motion sensors namely Passive and Active sensors. Each of these types uses different technology to detect motion in the designated area. While Passive sensor does not emit energy, but read change in energy in the surrounding area, active sensor on the other hand emit one of three kinds of energy to identify motion in the surrounding area, infrared light, microwave radiation or sound waves.

Passive infrared (PIR) sensors also known as pyroelectric or IR motion sensors works by detecting body heat (infrared energy) and as such has become the most widely used motion sensors in home security system. PIR sensors are small, inexpensive, low power, easy to use and do not wear out. Researchers such as Syeda et al.,3 & Panchal & Patel4 & Urfaliglu et al.,5 have utilized the PIR sensor for different purposes.

Automatic lightning system is gaining popularity as an intelligent lightning mechanism. It is an electronic device that uses motion based sensors to detect physical movement within a given perimeter or radius. The motion detector may be electrically connected to activate devices such as security lightning, audio, alarms, etc when physical motion is detected. Microcontroller has also been used in motion detection as a major element needed to provide technology innovation. In this research work, PIR motion sensor was used in conjunction with a microcontroller to develop an automatic night lightning system that switches ON an AC powered lightning bulb or DC based LED arrays (when the AC mains is unavailable) triggered when motion is detected. The lightning system (either AC or DC based) is also automatically switched OFF when motion is no longer detected.

Materials and methods

Principle of operation

Figure 1 shows the PIR sensor used in this research work. The PIR sensor has two slots with each slot made of a special material that is sensitive to IR. When the sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from the room or walls or outdoor. When a warm body such as a human being or animal walks in parallel (not towards) the sensor, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected.

Figure 1 A PIR Motion Sensor.

Figure 2 shows the functional block diagram upon which the design is based. The PIR sensor is connected to the microcontroller such that when motion is detected by the sensor, the analogue pin of the microcontroller configured as input is switched HIGH which in turn triggers a relay connected to the microcontroller digital output pin and switches ON either the AC light bulb or DC LEDs. When the PIR sensor no longer senses any motion, it pulls the analogue pin of the microcontroller LOW, thereby turning the digital output pin of the microcontroller LOW which in turn de-energises the relay and switches OFF the lights. Invariably, the light bulb stays ON as long as motion is detected and switches after a pre-set time when motion is no longer detected as determined by the output of the PIR sensor. Since the design is expected to operate both AC and DC lightning systems, the power supply consist of a rectifying circuitry in which 220V AC is rectified using a full-bridge network to provide a regulated and filtered DC voltage. The works of Ben Festus et al.,6 was adapted and modified in this research work for constructing the battery charging circuit for charging the lithium-ion battery used in this work as shown in Figure 3. The 12V lithium-ion battery was used to supply power to the developed system and the LED arrays in the absence of AC mains supply. Figure 4 shows the complete circuit developed in this research work.

Figure 2 Functional block diagram of the Automatic Night Light System.

Figure 3 Battery Charger Circuit.

Figure 4 The complete circuit diagram of the automatic night lightning system.

Printed circuit board (PCB) development

For effective performance and commercial viability of the automatic night lightning system developed in this work, the circuit was designed and developed on a printed circuit board. Express PCB (available as license free PCB design software on the internet) was used in drawing the PCB circuit connections shown in Figure 5. The laser-toner transfer and ironing method was used in producing the PCB board for this work while ferric chloride was used to etch unwanted copper from the board leaving only the toner transfer trace or outline. Thinner solution was used to wipe away toner traces from the board to reveal the copper connections. Subsequently, a drilling machine was used to make components holes on the board after which the electronic components were laid and soldered onto the board.

Figure 5 PCB developed for the automatic night lightning system.

Programming the microcontroller

The microcontroller used in this research work is an Ardunio uno microcontroller whose design is based on the ATmega328 schematic with digital input/output pins, analog inputs, 16MHz ceramic resonator, USB connection, power jack, ICSP header and a reset button. The program was written using the Arduino C++ language structure. The program syntax written for this research work is described below:

/********************************************************** Program for MOTION BASED LIGHTNING SYSTEM
********************************************************** Version:        PIR.1.1
Version Details: This version uses a PIR motion sensor and controls DC and AC lightning bulbs
*************************************************************/ int ac_light = 9;
int dc_light = 8;
//int light = 12;
void setup() {
// put your setup code here, to run once: pinMode(ac_light, OUTPUT); pinMode(dc_light, OUTPUT);
// pinMode(light, OUTPUT); Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly: int motion = analogRead(A0);
int ac_source = analogRead(A1); delay(1000); Serial.println(motion); Serial.println(ac_source);

if(motion > 550)
{
if(ac_source > 900){ digitalWrite(ac_light, LOW); digitalWrite(dc_light, HIGH);
}
else{
digitalWrite(ac_light, HIGH); digitalWrite(dc_light, LOW);
}
}
else{
digitalWrite(ac_light, HIGH); digitalWrite(dc_light, HIGH);
}`
}

Results and discussion

Plate 1 shows the prototype of the completed automatic night lightning system developed in this research work. The result of the continuity test on the PCB yielded good result as well as the earthing test. Movement was made by waving a hand in front of the sensor to indicate motion, the device responded by triggering the relay which in turn switched ON the AC powered light bulb. The AC mains was disconnected and this time the DC powered LED arrays came ON automatically. When the AC mains were reconnected, the DC LEDs automatically switched OFF while the AC bulbs came ON simultaneously. For both cases, the bulb stayed on for approximately two minutes and was only triggered ON again by new detection.

Plate 1 Prototype of the Developed Automatic Night Lightning System.

Conclusion

An automatic night lightning system incorporating a motion detector and dual power source was developed in this research work. The device uses a PIR motion sensor which has a wider view range than other types of motion sensors. The device on detecting human motion triggered on the related bulbs when powered using the appropriate power source. The developed system is reliable, durable, low-cost and incorporates a dual power supply source. It also incorporates a rechargeable lithium-ion battery which served as a DC power source to the system and the LED arrays.

Acknowledgements

None.

Conflict of interest

Authors declare that there is no conflicts of interest.

References

Creative Commons Attribution License

© . This is an open access article distributed under the terms of the, which permits unrestricted use, distribution, and build upon your work non-commercially.