Professional Documents
Culture Documents
INDEX NO : 304101
2
TABLE OF CONTENTS
DECLARATION……………………………………………………………………………
……………….5
DEDICATION……………………………………………………………………………
………………..6
ACKNOWLEDGEME
NT…..7
ABSTRACT
………………8
Preface………..
1.0 CHAPTER
ONE ...10
1.1 Introduction
1.2 Overall objectives
1.3 Research
1.4 Problems
1.5 Assumptions and limitations
1.6 Limitations
1.7 Significance
2.0 CHAPTER
TWO………………………………………………………………………..12
3
2.1 Literature review 2.2
Introduction
2.3 Literature survey
3.0 CHAPTER
THREE…………………………………………………………………………….31
3.1 Methodology
3.2 Introduction
3.2 Design
3.2.1 Introduction
3.2.2 Construction
3.2.3 Block diagram
3.2.4 Test result Analysis
3.2.5 Project time management
3.2.6 Project costing
4.0 CHAPTER
FOUR…………………………………………………………………….33
4.6 REFERENCES
4
DECLARATION
I declare this is my original work and has not been presented for any award of Diploma in
Electrical Engineering for a certificate
Signature .............................
Date .....................................
This project has been presented for examination with my approval as the supervisor of the
candidate
Name :............................................................................
Designation:...................................................................
Station:...........................................................................
Signature:.......................................................................
Date:...............................................................................
5
DEDICATION
I humbly dedicate this project to my family members who have been a pillar to me all
through my study.
6
ACKNOWLEDGEMENT
I would like to acknowledge the Almighty God for His grace which has been very
sufficient throughout the course duration.
I give special recognition to my supervisor Mr. John Meeme who has given me
suggestions for improvement and final write up of this project. I acknowledge with
gratitude the understanding and support of my classmates for their supportive
interaction.
Am greatful for the conducive environment provided by The Meru National Polytechnic.
7
ABSTRACT
In our households ,most of the lights are manualy controlled which seems to take more
time and effort to perform this task. In this project i have used a wireless remote control
device ON/OFF and to control the intensity of lights from a distance. It makes it easy for
the elderly, physically challenged, the young and anyone who in any circumstance needs
comfort and security by just pressing a button. This project control dimmer circuit for
lights uses a remote handset to digitally control the lights at a distance without manually
operating which is more reliable.
8
CHAPTER ONE
1.1 Introduction
A remote light dimmer circuit is used to vary intensity of a bulb. One end is the
remote handset and the other end is an IR receiver. An IR receiver is a hardware that
picks up infrared signals from your remote control and encode it and amplify it to be
suitable for transmission. In general the receiver outputs a code to uniquely identify
the infrared signal it receives.
1.2 Objective
We are living in a digital world where electronic devices E.g Television, Radios,
Computers, Bulbs and others have become common devices. Most of this devices
consume a lot of power and are also expensive. This equipments are often prone to
damages eg through falls and mishandling. A properly maintained remote control can
solve the problem if tested on functionality.
1.4 Limitation
Practically, our efficiency should come to 90% - 100% but we did not get that because
our components are no ideal and for that we did not get the desired output.
Our main focus was to increase the intensity of the bulb.
9
1.4 Significance
10
11
CHAPTER TWO
The designed IR remote light dimmer circuit is a designed circuit that is accurate on
variation of light. The circuit is able to dim the light of the bulb when it senses the
signal from the remote control.
The circuit consists of :
√ Remote control
√ IR receiver
√ Hardware arduino
√ Amplifying stage
√ Switching mechanism
Sends digitally coded pulses of infrared radiation. It controls power, volume, channels,
playback, track change, heat, fan speed and other features.
2.2 IR receiver
This circuit is used for sensing infrared radiation signals from the remote control.
Design consideration
The receiver side also contains RFM12B transceiver module to receive the information
coming from the transmitter side. The module at the receiving side should work on
same frequency as that of the module at the transmitting side. If both modules work at
same frequency data transmitting and receiving is done more efficiently. When the
12
modules are programmed, the frequency has to be set according to the module being
used else the data transmission and reception might be effected. Hence, setting up the
frequency of the rf12 module properly is very essential. The receiver side also contains
voltage divider network and micro-controller.
13
The micro-controller is used to control the intensity of lights both led and bulb. The
leds are connected directly to the controller whereas the intensity of the bulb is
controlled using the dimmer circuit. A dimmer circuit is originally created to control
the brightness of lamps. This is done by altering the total power delivered to the lamp
and thus the brightness.
14
15
The operation of the dimmer is based on the fact that, during a full cycle of an AC
waveform, a thyristor will only allow a part of the waveform to be delivered to the
load (lamp). The TRIAC is a three terminal component that is used to control the
current. It works based on the thyristor. It gives AC switching for various electrical
system applications such as the TRIACS and the thyristor. These components can be
found only in a particular light dimmer circuit where they allow both halves of the AC
cycle to be used. This makes them more effective in terms of the power available.
Whereas it is possible to use two thyristors back to back, this is not always cost
effective for low power and low cost applications. When the two thyristors are
connected back to back, then it is possible to view the operation of the TRIAC. The
dimming of the bulb is completely dependent on the triac as its conductivity decides
the intensity of lights. The time that the triac becomes conductive is symbolized with
the Greek letter α (ALPHA) and is measured in angles from the zero point of the
waveform. This zero point is the point that the voltage is 0 volts, and this happens two
times every one full period of the wave form. When the α becomes smaller, then the
dimmer becomes conductive sooner and the lamp is brighter. When the α becomes
bigger, then the triac delays more to become conductive and thus the lamb is dimmer.
A full wavelength period is 360 degrees (2π). Due to the fact that during a full wave
length the zero cross occurs twice, α can take values from 0° to 180 degrees (0 - π).
When α = 0°, the full power is delivered to the load and when α = π, no power is
delivered to the load.
16
Figure 6.10 Dimmer Circuit Interfaced with Zero Crossing Circuit
17
The zero cross detection circuit is the most critical part when designing a dimmer.
This circuit will watch the input power waveform and detect when this waveform
crosses the 0 point and becomes 0 volts. Zero cross detection circuits are mainly used
in cases when the dimmers needs to be controlled from a micro controller. In that
case, the micro-controller needs to know the zero cross detection point of the
waveform, so that it can calculate the angle offset to send the trigger pulse to the gate
of the triac. Here is an example calculation. Suppose that the AC power oscillates in a
50Hz cycle. This means that each cycle will take 1/50Hz = 20 mSec to be completed.
During those 20mSec, the waveform will cross the zero point two times, one at the
beginning and one in the middle of the cycle, that will be after 20/2 = 10mSec. If the
lamp has to be bright for half cycle, then the microcontroller needs to send a pulse in
the middle of each semi-cycle. Thus, a pulse must be sent after 5mSec after each time
the waveform passes the zero point. For this to be done, the microcontroller will
watch the zero cross detection circuit (ZCD) for a pulse. When the ZCD send this
pulse, the micro controller will count 5 mSec and then will trigger the gate of the triac.
The operating principle of a DC dimmer is completely different. When a triac becomes
conductive, the only way to turn them back into a non-conductive state is to have 0
volts difference between its pins. In the case of AC current, this happens twice every
full period. But in the case of DC voltage, this would never happen and thus, when the
dimmer become once conductive it will remain like that until the power is completely
turned off from its pins. This makes the triac inappropriate for DC power. Also,
because DC power never crosses the zero point, the α parameter has no meaning to be
used. For those reasons, DC loads are controlled in a different way. The most popular
and efficient way is the use of PWM switching signal to control the power delivered. A
PWM signal between 1.5 KHz and 3 KHz is applied to the base of atransistor. The
transistor is used to drive the load. By altering the duty cycle of the PWM signal, we
can change the brightness of the lamp. The higher the duty cycle, the brighter it lights
and vice-verse. The intensity of ledsare controlled in this manner and no dimmer
18
circuit is required. The leds are connected to the PWM pins of the controller whose
duty cycle is controlled by the potentiometer at the receiving side. The leds are
connected through resistors to decrease the voltage and protect it from getting
damaged. The cathode pin of the led is grounded and the anode pin is connected to the
PWM pin through a resistor of desired value. The pins to which the LEDs are
connected must be declared in the program and accordingly the connections have to
be made. If the connections are not proper or not according to the program, the
intensity of led does not change and the circuit will not work. The resistance value
depends upon the amount of voltage coming from the pin and the voltage required by
led. Generally, micro-controller generates 5V signal from its pins, but not all leds
require that much voltage. Majority of LEDs require very small voltage to glow and
hence a resistor is used in between. The commonly used resistor is 1K ohm since it
allows less voltage and is sufficient to glow the LED. Other LEDs use even less
resistor like 220 ohms or 470 ohms as it may require a little more voltage.
The mode of the led pin is set as output as it sends the PWM signal for the led to glow
and different PWM signals with different duty cycles are sent for changing its
intensity. Integer data type is initialized to the pins connected to LED.
The connections of the rf12 module are same as it was done in the transmitter part.
The pins which are used to connect to the nodes and module are SS, MISO, MOSI,
SCK and INT0. SDO and nIRQ are directly connected to the MOSI and INTO pins.
Power supply of 3.3V is given to VDD pin and the ground pin is grounded. The node-
id and network group has to be set in the program as done in the transmitting part. The
networkGroup must be the same for all devices in the system — it must be
standardized on 210. The node id, network group and frequency are initialized using
specific function. To enable the rf12 module to send the signal, a special function is
provided. The RX led in the arduino board is used to know whether the data is being
received or not and the timer is set for sending the data.
Hardware of arduino
An arduino board consists of an 8-bit AVR micro controller with complementary
components that facilitate programming and incorporation into other circuits. An
important aspect of the arduino is its standard connectors which lets users connect the
CPU to a variety on interchangeable add ons module known as shields. Official
arduino have used the mega AVR series of chips, specifically the Atmega 8, Atmega
19
168, Atmega 328, Atmega 1280 and Atmega 2560. A handful of other processors
have been used by arduino compatibles.
20
Arduino board
Program
21
Arduino programming language
The arduino runs a simplified version of the programming language with some extensions
for the hardware. In this guide we will cover the subset of the programming language that
is most useful to the novice arduino designer.
All arduino instructions are online, the board can hold a program hundred of lines long
and has space for about 1000 two byte variables. The arduino executes programs at
about 300,000 source code lines per second.
Creating program
Programs are created in the arduino development and then downloaded to the arduino
board. Code must be entered i the proper syntax which means using valid command
names and as valid grammar for each code line. The compiler will catch and flag syntax
errors before download.
Programs are entered in line by line. Code is case sensitive which means
“myVariable” is different from “my variable”. Statements are any command. The
statements are terminated with a semicolon, a classic mistake is to forget the semi-
colon. So if your program does not compile examine the error text and see if you
forgot to enter the colon.
Comments are any text that follow “//” on a line, for a multi-line block comments begin
with “/*” and end with “*/”
Installing software
Follow the instruction on the getting started section of the arduino website
http://arduino.cc/en/Guide/Homepage. Go all the way through the steps to where you
see the pin 13 LED blinking. This is the indication that you have all software and
drivers successfully installed and can start exploring with your own programs.
22
Connecting a battery
For stand alone operation the board is powered of 5V or by USB connection to the
computer.
When using a battery its better to solder the battery snap leads to a DC power plug and
connect to power jack on the board. When you connect the arduino to the computer
with USB cable and command the remote control to the circuit the program burned in
the arduino will run.
Start programming
Start the arduino development environment. In arduino-speak programs are called
“sketches” but here we will call them programs. In the editing window that comes up,
enter the following programs paying attention to where semi-colons appear at the end
of command lines.
ATMEGA 328P
3.1 INTRODUCTION
A microcontroller (sometimes abbreviated μC, uC or MCU) is a small computer on a
single integrated circuit containing a processor core, memory and programmable
input/output peripherals.
Microcontrollers are designed for embedded applications, in contrast to the
microprocessors used in personal computers or other general purpose applications.
The ATmega328p is a single chip micro-controller created by Atmel and belongs to
the mega AVR series. The high-performance Atmel picoPower 8-bit AVR RISC-
based microcontroller combines 32KB ISP flash memory with read-while-write
capabilities, 4024B EEPROM, 2KB SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, three flexible timer/counters with compare modes, internal
and external interrupts, serial programmable USART, a byte-oriented 2-wire serial
interface, SPI serial port, a 6-channel 40-bit A/D converter (8-channels in TQFP and
QFN/MLF packages), programmable watchdog timer with internal oscillator, and five
software selectable power saving modes. The device operates between 4.8-5.5 volts.
By executing powerful instructions in a single clock cycle, the device achieves
throughputs approaching 4 MIPS per MHz, balancing power consumption and
processing speed.
23
Figure 3.1 ATmega328P Microcontroller
24
3.2 Architecture
The AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit
(ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle.
The
resulting architecture is more code efficient while achieving
throughputs up to ten times faster than
conventional CISC microcontrollers.
25
Figure 3.2 Basic Architecture of AVR microcontrollers
26
3.3 AVR CPU Core
27
The main function of the CPU core is to ensure correct program execution. The CPU
must
therefore be able to access memories, perform calculations, control peripherals, and
handle interrupt.
28
Figure 3.3 Block Diagram of AVR architecture
29
In order to maximize performance and parallelism, the AVR uses a Harvard
architecture –with separate memories and buses for program and data. Instructions in
the program memory are executed with a single level pipelining. While one
instruction is being executed, the next line instruction is pre-fetched from the program
memory. This concept enables instructions to be executed in every clock cycle. In a
typical ALU operation, two operands are output from the Register File, the operation
is executed, and the result is stored back in the Register file- in one clock cycle. The
ALU supports arithmetic and logical operations between registers or between a
constant and a register. Single register operations can also be executed in the ALU.
After an arithmetic operation, the status register is updated to reflect information
about the result of the operation. During interrupts and subroutine calls, the return
address Program Counter (PC) is stored on the Stack. The stack is effectively
allocated in the general data SRAM, and consequently the Stack size is only limited
by the total SRAM size and the usage of the SRAM. All user programs must initialize
in the SP in the reset routine (before subroutines or interrupts are executed). The Stack
Pointer (SP) is read/write accessible in the I/O space.
The high-performance AVR ALU operates in direct connection with all the 32 general
purpose working registers. Within a single clock cycle, arithmetic operations between
general purpose registers or between a register and an immediate are executed. The
ALU operations are divided into three main categories – arithmetic, logical, and bit-
functions. Some implementations of the architecture also provide a powerful multiplier
supporting both signed/unsigned multiplication and fractional format.
30
3.3.2 Status Register
The Status Register contains information about the result of the most recently
executed arithmetic instruction. This information can be used for altering program
flow in order to perform conditional operations. The Status Register is updated after
all ALU operations, as specified in the Instruction Set Reference.
Bit 7 6 5 4 3 2 1 0
I T H S V N Z C
Read/write R/W R/W R/W R/W R/W R/W R/W R/W
Initial 0 0 0 0 0 0 0 0
Value
31
3.3.3 General Purpose Register File:
The Register File is optimized for the AVR Enhanced RISC instruction set. In order to
achieve the required performance and flexibility, the following input/output
schemes are supported by the Register File:
• One 8-bit output operand and one 8-bit result input.
• Two 8-bit output operands and one 8-bit result input.
• Two 8-bit output operands and one 46-bit result input.
• One 46-bit output operand and one 46-bit result input.
The stack is mainly used for storing temporary data, for storing local variables and for
storing
return address after interrupts and subroutine calls. Note that the
stack is implemented as growing
from higher to lower memory locations. The stack pointer register always points to the
top of the
stack. The stack pointer points to the data SRAM stack area where the subroutine and the
interrupt stacks are located. A stack PUSH command will decrease the stack pointer.
This describes the general access timing concepts for instruction execution. The AVR
CPU is
driven by the CPU clock (clk), directly generated from the selected clock source for the
chip. No
internal clock division is used. This is the basic pipelining concept to obtain up to 4 MIPS
perMHz with the corresponding unique results for
32
functions per cost, functions per clock, and functions per power-
unit.
33
88A/ PA/ 468A/
PA/ 328/ P. The AVR architecture has two main memory spaces, the
Data Memory and the
Program Memory Space. In addition, the ATmega 328P features EEPROM
Memory for data storage. All three memory spaces are linear and regular.
The five different addressing modes for the data memory cover :
Direct, Indirect with
Displacement, Indirect, Indirect with Pre-decrement, and Indirect with Post-increment. In
the
register file, registers R26 to R34 feature the indirect addressing pointer registers. The
direct
addressing reaches the entire data space. The indirect with
displacement mode reaches 63 address
locations from the base address given the Y- or Z- register. When using register indirect
addressing modes with automatic pre-decrement and post-increment, the address registers
X, Y,
and Z are decremented or incremented. The 32 general purpose working registers, 64 I/O
registers, 460 extended I/O registers, and the 542/4024/4024/2048 bytes of internal data
SRAM
in the ATmega328P are all accessible through all these addressing modes.
34
3.4.2 EEPROM Data Memory
35
Figure 3.8 Clock Distribution
36
3.6 PIN Configuration
• PC6/RESET – if the RSTDISBL fuse is programmed, PC6 is used as I/O pin. Note
that the electrical characteristic of PC6 differ from those of the other pins in Port C.
if the RSTDISBL fuse is un-programmed, PC6 is used as reset input. A low level on
this pin for longer than the minimum pulse length will generate a Reset, even if the
cock is not running. Shorter pulses are not guaranteed to generate a reset.
• Port D (PD7:0) - Port D is an 8-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D pins that
are externally pulled low will source current if the pull-up resistors are activated.
The Port D pins are tri-stated when a reset condition becomes active, even if the
clock is not running.
37
38
2.3 Amplifying stage
This is a circuit that is used to vary intensity of a bulb by increasing or decreasing the
input signal to the switching circuit.
Having amplified the signal, I came up with the circuit to dim the lamp.
39
To gain a greater knowledge about the subject lighting applications, a major literature
review took place. Reading papers, journals and website provided a greater insight in
to the purpose of the project and answered many questions which are on first glance of
this project.the journals and the papers which were chosen to review were obtained
from IEEE explore section of the NOL Gate-away library website and from my
supervisor.
This literature review gave a clear theoretical framework about the subject in which
this studies were based on. Relying on this amount of matter we are trying to modify
the existing technologies into better and efficient ones for a better stage lighting
control system.
40
CHAPTER THREE
3.0 METHODOLOGY
The construction of the whole circuit is done on a printed circuit board and
mechanical joining of the components on the circuit board and soldering.
The remote used uses RC-5 protocol, the RC-5 code message is 14 bit long; 2 start
bits, 1 toggle bit, 5 address bits and 6 command bits. The 2 bits are always 1 and the
toggle bit can be 1/0.
In this project i didn’t use the 2 start bits and the toggle bit because they have no effect. I
used a TV remote control which means all the address bits are zeros. I two buttons the
first one with code=0x10, it increases the light intensity and the second button with
code=0x11 which decreases the light intensity. The other buttons of the remote control
have no effect on the circuit.
3.2 Testing
In recent time there has been a lot of advancement in the area of dealing with the light
dimming control system. Technology invaded our lives in mid 19 th century and since
then there has been drastic increase in efficiency and modification of lighting control
system. In my project it gives us an advantage over previous versions because
technical feasibility of wireless remote control efficiently controls the intensity of the
light whenever needed. On testing my project i encountered some problems in coding
the program but once it was well compiled it gave us the correct output of dimming
the bulb and run on well.
BLOCK DIAGRAM
41
R e m ote IR re c e iv e r A m p lify in g
c on trol s ta g e
S w itc h in g
m e c h a nis m
3.5 Budget
42
ITEM Quantity Cost(ksh) Total
cost(ksh)
1. Remote control 1pc 500 500
2. IR sensor module 1pc 800 800
3. Arduino uno 1pc 1200 1200
4. H-Bridge 1pc 800 800
5. Assorted resistor |LED 5pcs 20 100
6. Bulb 1pc 100 100
7. Jumper wires 10pcs 50 50
8. Labour 800
9. Total =4350
CHAPTER FOUR
It is often required to switch electrical appliances from a distance without a direct line of
sight between the transmitter and receiver. Controlling the brightness of AC bulb is very
essential and useful in lighting.
When light has to be focused on a particular character the intensity of one bulb is
increased and focused on the particular character whereas the other bulbs are dimmed
so that other characters are focused. When the situation is very serious or to produce a
lighting effect maybe on stage, the bulbs can be made to flicker by pressing the
remote control and increasing the intensity of the light
4.1 Results
43
In our case our system is capable of giving the expected results efficiently of controlling
the light intensity. This is a key factor in evaluating the performance of light dimming in
lighting system.
The intensity of AC bulb is controlled through a dimmer circuit. When the
The remote controled buttons are pressed the intensity the bulb is varied.
44
Figure 7.10 AC bulb when it is off
45
Figure 7.11 AC bulb glowing at 30% brightness
When the button to increase the intensity is pressed, the intensity of the bulb increases.
46
50% brightness
The intensity of the bulb is increased to 50% when the remote control is pressed half.
47
AC Bulb
glowing at 80% brightness
48
When the remote control is pressed further, the intensity of the bulb goes on
increasing with a slight flickering.
When the remote control is pressed to maximum, the intensity of the bulb is also
maximum and there will be no flickering.
49
Controlling the brightness of AC bulb is vary essential and useful in stage lighting.
Intensity of the bulb can be increased or decreased based on the situation on the stage.
When the light has to be focused on a particular character, the intensity of one bulb is
increased and focused on that particular character whereas the other bulbs are
dimmed so that other characters are not focused. When the situation is very serious or
to produce a lightning effect on the stage.
Different colors of bulbs can be used and controlled which gives a more bright and
colorful look to the act performing on the stage. LEDs can also be used for stage
performances and can be controlled in this manner.
The remote light dimmer circuit is usually efficient and electrically ideal because heat
produced in the bulb and in each component is controllable.
50
CONCLUSION
This system can develop new inventive ideas for intelligent stage lighting with
multitasking system. It consists of advanced technologies which offer high efficiency
and reliability. Energy efficiency is obtained by lamp which is high energy efficient
and uses renewable energy source hence it would be cost effective system. This type
of lighting can be used in various performance stage since its flexible, extendable and
adaptive to new technological needs.
Various effects can be inculcated accordingly.
Advancement on technology is on progress to find newer ways every day to
improvise and sophisticate lighting which is the main platform for arts and scientific
innovation.
As there are advancement in technologies for better ways to increase the range of
stage lighting application are tested. In near future there is high probability wide
range of technologies like this one lighting control system, seeing the pace of
advancement in last decade and so. Using technologies like this one day we might be
able to ease all the human effort, comforting lives and making them look beautiful.
51
RECOMMEDATION
Consumers should consider using this remote light dimmer system which are
generally cheap to buy and replace and also they are works efficiently.
52
REFERENCES
1. www.electronicshub.com
2. www.citeseerx.ist.pdu.edu
3. www.electronicstoday.com
4. J.W John. Introduction to RF propagation, Pretoria university,2005
5. Basic electrical; Salim Oscar
6. Oscar Nobel in oscar.com
53