Chap 1
Chap 1
1.1 Introduction
Controlling devices using switches are common. From a few decades controlling devices using remote control switches like infrared remote control switch, wireless remote control switches, light activated switches are becoming popular. But these technologies have their own limitations. Laser beams are harmful to mankind. And use of telephone is also having some limitation of goes at particular place to operate a lighting system by using it there some lengthy process. Some technologies like IR remote control are used for short distance applications. In such case if we have system which does not require any radiations or which is not harmful, long remote control switch! Yes here is the solution. Here we are introducing such a system which does not require any radiations, any laser beam which has no limitation of range using a Wireless Device Control using PC with RS 232. In this wireless generation operation through wireless devices is a very comfortable among all. Here we are using a PC as a media, which serves main part of this system, by using PC with RS 232 connection or extra controlling circuit as a transmitter. Wireless Device Control using PC with RS 232 system can be used for intelligent houses or offices or industries in large domain. With this implemented system, it is possible to safely control electricity operated domestic devices. As in recent days PCs are one of the fundamental requirement of human being at every sector to use PC is wisdom to save energy. Now a days PCs are used at home to large scale industries so it`s beneficial. This system is use at the either home/offices or at any industries to operate lighting system by using a wireless control.
1.1 Features We can control many devices. It may be any electric or electronic appliances or devices
with simple to heavy appliances. It makes accurate switching, any false switching of device are not done.
Using 434 / 315MHZ RF Frequency Using Amplitude-shift keying (ASK) Modulation Long range (>400 meters) Eight 12V relay For up to eight device to be connected
1.3 Application
Home automation system In Offices Wireless Devices Control Road light controlling In hospital Industrial control system Railway signal controlling.
What Is Modulation?
Modulation is the process where a Radio Frequency or Light Wave's amplitude, frequency, or phase is changed in order to transmit intelligence. The characteristics of the carrier wave are instantaneously varied by another "modulating" waveform. There are many ways to modulate a signal: Amplitude-shift keying (ASK) Frequency-Shift Keying (FSK) Amplitude Modulation (AM) Frequency Modulation (FM) Phase Modulation Pulse Modulation
Amplitude-shift keying (ASK): ASK is a form of modulation that represents digital data as variations in the amplitude of a carrier wave. The amplitude of an analog carrier signal varies in accordance with the bit stream (modulating signal), keeping frequency and phase constant. The level of amplitude can be used to represent binary logic 0s and 1s. We can think of a carrier signal as an ON or OFF switch. In the modulated signal, logic 0 is represented by the absence of a carrier, thus giving OFF/ON keying operation and hence the name given. Like AM, ASK is also linear and sensitive to atmospheric noise, distortions, propagation conditions on different routes in PSTN, etc. It requires excessive bandwidth and is therefore a waste of power. Both ASK modulation and demodulation processes are relatively inexpensive. The ASK technique is also commonly used to transmit digital data over RF Transmitter. RF transmitter data input, low level pulse represents binary 0, while high level pulse represents binary 1.
Figure 1: Simple block diagram of system As shown in block diagram this system in divided in two subsystem section as following: 1) Transmitter section 2) Receiver section This both sections are illustrated in next chapters.
Figure 2.3 Block diagram of transmitter section As shown in block diagram transmitter section is operated through PC as input, Microcontroller as serial to BCD converter, RF encoder and 434 MHZ ASK Tx module for transmit data.
2.1.1 PC as input
As input for system PC is used. For requirement of pc any processor after P3 processor can be used like P4, Core 2 Duo, i3, i5, i7 etc. As operating system win 95, 98, 2000, XP, 7 can be used. There is an application on pc which has 8 switches for different device which we want to operate. When we select any switch then corresponding code is generated which will transmitted through serial port and RS 232 serial cable to microcontroller of transmitter kit for further process.
Up to 10 I/O points with easy to connect standard headers RS232 Connection with MAX232 LCD Connection with Contrast Adjustment One 16-bit Timer with Two 8-bit Timers Power and Programming LED Reset Button Ideal as an Interchangeable Controller for Real-Time Systems.
Microcontroller
Microcontroller : PIC16F628A-I/P Main Crystal : 10.000MHz Speed : 2.5MHz Processor Language : PIC
Memory Program Flash Memory (Internal) : 2kBytes RAM Memory (Internal) : 224 Bytes EEPROM Memory (Internal) : 128 Bytes
Input/output
A/D
A/D Comparators : 2
Timers Timers : One 16-bit Timer and Three 8-bit Timers Capture/Compare : 1 Module with PWM
Auxiliary Communication RS232 Communication Auxiliary Features In-Circuit Programming Power-On Led : Red Programming Led : Green Reset Button
Power Supply Power-Supply : 5 V dc Dimensions l x w x h : 82mm x 62mm x 25mm (Including mounting supports)
2.1.4.1 Features
SAW chip on board technology Low power consumption Wide range of operation voltage: 1.5 ~ 15 Volts.
Output Power : 4~16dBm
Easy for application RF output -10 ~ +16dBm at 3V DC operation voltage Available frequency at follows: 315/433.92 MHz Frequency : 433.92 MHZ Modulation: ASK Circuit Shape: SAW Date Rate: 8K bps Supply Voltage: +5V Power Supply range for I/O pins: 0 to 5 V Non-Operating Case Temperature: -20 to +85 C Soldering Temperature ( 10 Seconds ) : 230 C
CHAPTER 3
RECEIVER SECTION
Easy for application. On-Chip VCO with integrated PLL using crystal oscillator reference. Integrated IF and data filters. Operation temperature range : 2085 Operation voltage: 5 Volts. Available frequency at : 315 /434 MHz
Output type of the 212 series of decoders, the HT12F has no data output pin but its VT pin can be used as a momentary data output. The HT12D, on the other hand, provides 4 latch type data pins whose data remain unchanged until new data are received.
3.1.2.1Features Operating voltage: 2.4V~12V Low power and high noise immunity CMOS technology
Low standby current Capable of decoding 12 bits of information Binary address setting Received codes are checked 3 times Address/Data number combination 8 address bits and 4 data bits Built-in oscillator needs only 5% resistor Valid transmission indicator Easy interface with an RF or an infrared transmission medium Minimal external components Pair with Holteks 212 series of encoders 18-pin DIP, 20-pin SOP package. 3.1.2.2 Block Diagram
The full circuit of the receiver section is shown in schematic diagram of the receiver section is the brain of the receiver is the Pre programmed micro controller PIC 16F628 use as BCD Decoder. The function of the micro controller is to receive commands (four bit BCD data) (through port RA0 to RA3) from the RF decoder IC HT12D and control eight relays via relay driver IC ULN2803. RA0 to RA3 as BCD input, it connect with the RF encoder with 10K pullups resistor. A 4 MHZ Resonator Connect with OSC1 and OSC2 PIN (15 and 16). It generates the clock pulse, which fixes the operation speed. Putting the capacitors the crystal (or ceramic) oscillator outside does the oscillation operation. When having the oscillation with the high stability, it uses the crystal. Generally, the circuit becomes simple when using the resonator, which incorporated the ceramic and the capacitors into the one.
will glow to show that this relay is on. When the relay is switch on it is cut-off and signals are directly provided to the connected device through AC power supply.
The ULN2803 contain eight Darlington transistors with common emitters and integral suppression diodes for inductive loads. Each Darlington features a peak load current rating of 600mA (500mA continuous) and can withstand at least50V in the off state. Outputs may be paralleled for higher current capability. Five versions are available to simplify interfacing to standard logic families:
The ULN2801Ais designed for general purpose applications with a current limit resistor TheULN2802Ahas a 10.5kW input resistor and Zener for 14-25VPMOS TheULN2803Ahas a 2.7kW input resistor for 5V TTL and CMOS The ULN2804A has a 10.5kW input resistor for 6-15V CMOS and The ULN2805A is designed to sink a minimum of 350mA for standard and Schottky TTL where higher output current is required. All types are supplied in an 18-lead plastic DIP with a copper lead from and feature the convenient input opposite-output pin out to simplify board layout.
3.1.5 RELAY
A relay is an electrical switch that opens and closes under the control of another electrical circuit. In the original form, the switch is operated by an electromagnet to open or close one or many sets of contacts. It was invented by Joseph Henry in 1835. Because a relay is able to control an output circuit of higher power than the input circuit, it can be considered to be, in a broad sense, a form of an electrical amplifier.
Figure 3.3 sugar cube relay Despite the speed of technological developments, some products prove so popular that their key parameters and design features remain virtually unchanged for years. One such product is the sugar cube relay, shown in the figure above, which has proved useful to many designers who needed to switch up to 10A, whilst using relatively little PCB area.
Since relays are switches, the terminology applied to switches is also applied to relays. A relay will switch one or more poles, each of whose contacts can be thrown by energizing the coil in one of three ways: 1. Normally - open (NO) contacts connect the circuit when the relay is activate d; the circuit is disconnected when the relay is inactive. It is also called a FORM A contact or make contact. 2. Normally - closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is connected when relay is inactive. It is also called FORM B contact or break contact 3. Change-over or double-throw contacts control two circuits; one contact. normally open contact and one normally closed contact with a common terminal. It is also called a Form C transfer
"C" denotes the common terminal in SPDT and DPDT types Fig. 3.4 Different types of Relays
1) SPST - Single Pole Single Throw These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity. 2) SPDT - Single Pole Double Throw
A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total. 3) DPST - Double Pole Single Throw: These have two pairs of terminals. Equivalent to two SPST switches or relays actuated by a single coil. Including two for the coil, such a relay has six terminals in total. It is ambiguous whether the poles are normally open, normally closed, or one of each. 4) DPDT - Double Pole Double Throw These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals, including the coil. 5) QPDT - Quadruple Pole Double Throw Often referred as Quad Pole Double Throw or 4PDT. These have four rows of changeover terminals. Equivalent to four SPDT switches or relays actuated by a single coil or two DPDT relays. In total fourteen terminals including the coil.
9,600 bps, but today cables up to 1,000 feet are used successfully. The interface is single ended (connecting only two devices with each other), the data rate is less than 20 kbps.
TRANSMITTER (PCB 1)
U1 - 434 / 315 MHZ ASK RF TRANSMITTER MODULE U2 - PIC16F628 PRE PROGRAMMED MICRO CONTROLLER (TX) U3 - HT12E RF ENCODER U4 - LM7805 5V VOLTAGE REGULATOR CN1 - 9 PIN D CONNECTOR 18 PIN IC SOCKET [2 NOS.] Y1 - 4MHZ RESONATOR RESISTORS R1, R2, R4, R6 - 1K R3 - 22K R5 - 680K CAPACITORS C1, C3 - 100nF C2 - 100 F / 16V DIODE D1 - 1N4007 LED L1 - 5mm OR 3mm RED LED L1 - 5mm OR 3mm GREEN LED RS232 DATA CABLE
RECEIVER (PCB 2)
U1 - 434 / 315 MHZ ASK RF RECEIVER MODULE U2 - PIC16F628 PRE PROGRAMMED MICRO CONTROLLER (RX) U3 - HT12E RF DECODER U4 - LM7805 5V VOLTAGE REGULATOR 18 PIN IC SOCKET [2 NOS.] Y1 - 4MHZ RESONATOR RESISTORS R1, R2, R3, R4, R5 - 10K R6 - 47K R7 - 1K CAPACITORS C1, C3, C4 - 100nF C2 - 1000 F / 16V DIODE D1, D2, D3, D4 - 1N4007 LED L1 - 5mm OR 3mm GREEN LED
Resistors are common elements of electrical networks and electronic circuits and are appearing in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickelchrome). Electronic symbol
or
The ohm (symbol: ) is the SI unit of electrical resistance, named after Georg Simon Ohm. An ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured over a very large range of values, the derived units of milliohm (1 m = 103 ), kilo ohm (1 k = 103 ), and mega ohm (1 M = 106 ) are also in common usage.
Color Coding: The electronic color code is used to indicate the values or ratings of electronic components, very commonly for resistors. The electronic color code was developed in the early 1920s by the Radio Manufacturers Association (now part of Electronic Industries Alliance (EIA)), and was published as EIA-RS-279. Color bands were commonly used (especially on resistors) because they were easily printed on tiny components, decreasing construction costs. However, there were drawbacks, especially for color blind people. Overheating of a component, or dirt accumulation, may make it impossible to distinguish brown from red from orange. Advances in printing technology have made printed numbers practical for small components, which are often found in modern electronics. The standard color code per EN 60062:2005 is as follows: Table 2: color codes for resistor Color Significant figures 0 1 2 3 4 5 6 7 8 9 Multiplier Tolerance Temp. Coefficient (ppm/K) 250 U F G D C B 100 50 15 25 20 10 5 1 J K S R P Q Z Z M K
Black Brown Red Orange Yellow Green Blue Violet Gray White Gold Silver None
100 10 10 10 10 10 10 10 10 10
1 2 3
104
5 6
107
8 9 -1 -2
0.05% (10%) A
For Example: To distinguish left from right there is a gap between the C and D bands.
band A is first significant figure of component value (left side) band B is the second significant figure
band C is the decimal multiplier band D if present, indicates tolerance of value in percent (no color means 20%)
For example, a resistor with bands of yellow, violet, red, and gold will have first digit 4 (yellow in table below), second digit 7 (violet), followed by 2 (red) zeros: 4,700 ohms. Gold signifies that the tolerance is 5%, so the real resistance could lie anywhere between 4,465 and 4,935 ohms.
3.2.2 Capacitors
A capacitor (formerly known as condenser) is a passive two-terminal electrical component used to store energy in an electric field. The forms of practical capacitors vary widely, but all contain at least two electrical conductors separated by a dielectric (insulator). Capacitors are used as parts of electrical systems, for example, consist of metal foils separated by a layer of insulating film. Electronic symbol
A typical electrolytic capacitor When there is a potential difference (voltage) across the conductors, a static electric field develops across the dielectric, causing positive charge to collect on one plate and negative charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them. Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating current to pass, in filter networks, for smoothing the output of power
supplies, in the resonant circuits that tune radios to particular frequencies and for many other purposes.
Charge separation in a parallel-plate capacitor causes an internal electric field. A dielectric (orange) reduces the field and increases the capacitance.
A capacitor consists of two conductors separated by a non-conductive region. The nonconductive region is called the dielectric. In simpler terms, the dielectric is just an electrical insulator. Examples of dielectric mediums are glass, air, paper, vacuum, and even a semiconductor depletion region chemically identical to the conductors. A capacitor is assumed to be self-contained and isolated, with no net electric charge and no influence from any external electric field. The conductors thus hold equal and opposite charges on their facing surfaces, and the dielectric develops an electric field. In SI units, a capacitance of one farad means that one coulomb of charge on each conductor causes a voltage of one volt across the device. The capacitor is a reasonably general model for electric fields within electric circuits. An ideal capacitor is wholly characterized by a constant capacitance C, defined as the ratio of charge Q on each conductor to the voltage V between them:
Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to vary. In this case, capacitance is defined in terms of incremental changes:
3.2.3 Relay
A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are
used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another. Relays were used extensively in telephone exchanges and early computers to perform logical operations. A type of relay that can handle the high power required to directly control an electric motor is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern electric power systems these functions are performed by digital instruments still called "protective relays". Basic design and operation
Simple electromechanical relay A simple electromagnetic relay consists of a coil of wire surrounding a soft iron core, an iron yoke which provides a low reluctance path for magnetic flux, a movable iron armature, and one or more sets of contacts (there are two in the relay pictured). The armature is hinged to the yoke and mechanically linked to one or more sets of moving contacts. It is held in place by a spring so that when the relay is de-energized there is an air gap in the magnetic circuit. In this condition, one of the two sets of contacts in the relay pictured is closed, and the other set is open. Other relays may have more or fewer sets of contacts depending on their function. The relay in the picture also has a wire connecting the armature to the yoke. This ensures continuity of the circuit between the moving contacts on the armature, and the circuit track on the printed circuit board (PCB) via the yoke, which is soldered to the PCB. When an electric current is passed through the coil it generates a magnetic field that attracts the armature and the consequent movement of the movable contact either makes or breaks (depending upon construction) a connection with a fixed contact. If the set of contacts was closed when the relay was de-energized, then the movement opens the contacts and breaks the connection, and vice versa if the contacts were open. When the current to the coil is switched off, the armature is returned by a force, approximately half as strong as the magnetic force, to its relaxed position. Usually this force is provided by a spring, but gravity is also used commonly in industrial motor starters. Most relays are manufactured to operate quickly. In a
low-voltage application this reduces noise; in a high voltage or current application it reduces arcing. When the coil is energized with direct current, a diode is often placed across the coil to dissipate the energy from the collapsing magnetic field at deactivation, which would otherwise generate a voltage spike dangerous to semiconductor circuit components. Some automotive relays include a diode inside the relay case. Alternatively, a contact protection network consisting of a capacitor and resistor in series (snubber circuit) may absorb the surge. If the coil is designed to be energized with alternating current (AC), a small copper "shading ring" can be crimped to the end of the solenoid, creating a small out-of-phase current which increases the minimum pull on the armature during the AC cycle.
3.2.4 Diodes
In electronics, a diode is a type of two-terminal electronic component with a nonlinear currentvoltage characteristic. The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward direction), while blocking current in the opposite direction (the reverse direction). Thus, the diode can be thought of as an electronic version of a check valve. This unidirectional behaviour is called rectification, and is used to convert alternating current to direct current, and to extract modulation from radio signals in radio receivers. However, diodes can have more complicated behaviour than this simple onoff action. Semiconductor diodes do not begin conducting electricity until a certain threshold voltage is present in the forward direction (a state in which the diode is said to be forward biased). The voltage drop across a forward biased diode varies only a little with the current, and is a function of temperature; this effect can be used as a temperature sensor or voltage reference. Semiconductor diodes have nonlinear electrical characteristics, which can be tailored by varying the construction of their PN junction. These are exploited in special purpose diodes that perform many different functions. For example, diodes are used to regulate voltage (Zener diodes), to protect circuits from high voltage surges (Avalanche diodes), to electronically tune radio and TV receivers (varactor diodes), to generate radio frequency oscillations (tunnel diodes, Gunn diodes, IMPATT diodes), and to produce light (light emitting diodes). Tunnel diodes exhibit negative resistance, which makes them useful in some types of circuits. Semiconductor diodes
Typical diode packages in same alignment as diode symbol. Thin bar depicts the cathode.
Currentvoltage characteristic
3.2.5 LEDs
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness. Passive, optoelectronic Type Electroluminescence Working principle Nick Holonyak Jr. (1962) Invented Electronic symbol
Pin configuration
Parts of an LED, Although not directly labelled, the flat bottom surfaces of the anvil and post embedded inside the epoxy act as anchors, to prevent the conductors from being forcefully pulled out from mechanical strain or vibration.
When a light-emitting diode is forward biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. LEDs are often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater durability and reliability. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. Light-emitting diodes are used in applications as diverse as replacements for aviation lighting, automotive lighting (particularly brake lamps, turn signals and indicators) as well as in traffic signals. The advantages of LEDs mentioned above have allowed new text and video displays and sensors to be developed, while their high switching rates are also useful in advanced communications technology. Infrared LEDs are also used in the remote control units of many commercial products including televisions, DVD players, and other domestic appliances.
3.2.6 Transformer
A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled conductors the transformer's coils. A varying current in the first or primary winding creates a varying magnetic flux in the transformer's core and thus a varying magnetic field through the secondary winding. This varying magnetic field induces a varying electromotive force (EMF), or "voltage", in the secondary winding. This effect is called mutual induction. If a load is connected to the secondary, an electric current will flow in the secondary winding and electrical energy will be transferred from the primary circuit through the transformer to the load. In an ideal transformer, the induced voltage in the secondary winding (Vs) is in proportion to the primary voltage (Vp) and is given by the ratio of the number of turns in the secondary (Ns) to the number of turns in the primary (Np) as follows:
By appropriate selection of the ratio of turns, a transformer thus allows an alternating current (AC) voltage to be "stepped up" by making Ns greater than Np, or "stepped down" by making Ns less than Np. Ideal power equation
The ideal transformer as a circuit element If the secondary coil is attached to a load that allows current to flow, electrical power is transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly efficient; all the incoming energy is transformed from the primary circuit to the magnetic field and into the secondary circuit. If this condition is met, the incoming electric power must equal the outgoing power:
Transformers range in size from a thumbnail-sized coupling transformer hidden inside a stage microphone to huge units weighing hundreds of tons used to interconnect portions of power grids. All operate with the same basic principles, although the range of designs is wide. While new technologies have eliminated the need for transformers in some electronic circuits, transformers are still found in nearly all electronic devices designed for household ("mains") voltage. Transformers are essential for high-voltage electric power transmission, which makes long-distance transmission economically practical.
Basic principles
The transformer is based on two principles: first, that an electric current can produce a magnetic field (electromagnetism), and, second that a changing magnetic field within a coil of wire induces a voltage across the ends of the coil (electromagnetic induction). Changing the current in the primary coil changes the magnetic flux that is developed. The changing magnetic flux induces a voltage in the secondary coil.
An ideal transformer, the secondary current arises from the action of the secondary EMF on the (not shown) load impedance. An ideal transformer is shown in the adjacent figure. Current passing through the primary coil creates a magnetic field. The primary and secondary coils are wrapped around a core of very high magnetic permeability, such as iron, so that most of the magnetic flux passes through both the primary and secondary coils. If a load is connected to the secondary winding, the load current and voltage will be in the directions indicated, given the primary current and voltage in the directions indicated (each will be alternating current in practice).
3.2.7 Transistor
A transistor is a semiconductor device used to amplify and switch electronic signals and power. It is composed of a semiconductor material with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals. Because the controlled (output) power can be much more than the controlling (input) power, a transistor can amplify a signal. Today, some transistors are packaged individually, but many more are found embedded in integrated circuits. The transistor is the fundamental building block of modern electronic devices, and is ubiquitous in modern electronic systems. Following its release in the early 1950s the transistor revolutionized the field of electronics, and paved the way for smaller and cheaper radios, calculators, and computers, among other things. A Transistor having many applications a few of them are as shown as below: Versatile three lead semiconductor devices whose applications include electronic switching and modulation (amplification) Transistors are miniature electronic switches. Configuration of circuit determines whether the transistor will serve a switch and amplifier Building blocks of the microprocessor, which is the brain of the computer. Have two operating positions- on and off. Binary functionality of transistors enables the processing of information in a computer.
PNP
NPN
BJT About BJTs Three Layers in a BJT Collector Base (very thin) Emitter Two Types of BJTs PNP (figure on left) (Operates with outgoing base current) NPN (figure on right) (Operates with incoming base current)
IB or VCE Char.
BC and Junctions
BE Mode
IB = Very small
Open Switch
VCE = Moderate
VCE = Large
Beyond Limits
3.2.8 ICs
An integrated circuit or monolithic integrated circuit (also referred to as IC, chip, or microchip) is an electronic circuit manufactured by the patterned diffusion of trace elements
into the surface of a thin substrate of semiconductor material. Additional materials are deposited and patterned to form interconnections between semiconductor devices.
Integrated circuits are used in virtually all electronic equipment today and have revolutionized the world of electronics. Computers, mobile phones, and other digital appliances are now inextricable parts of the structure of modern societies, made possible by the low cost of production of integrated circuits. Integrated circuits were made possible by experimental discoveries showing that semiconductor devices could perform the functions of vacuum tubes and by mid-20th-century technology advancements in semiconductor device fabrication. The integration of large numbers of tiny transistors into a small chip was an enormous improvement over the manual assembly of circuits using discrete electronic components. The integrated circuits mass production capability, reliability, and building-block approach to circuit design ensured the rapid adoption of standardized ICs in place of designs using discrete transistors. There are two main advantages of ICs over discrete circuits: cost and performance. Cost is low because the chips, with all their components, are printed as a unit by photolithography rather than being constructed one transistor at a time. Furthermore, much less material is used to construct a packaged IC die than to construct a discrete circuit. Performance is high because the components switch quickly and consume little power (compared to their discrete counterparts) as a result of the small size and close proximity of the components. As of 2006, typical chip areas range from a few square millimetres to around 350 mm2, with up to 1 million transistors per mm2. Integrated circuit originally referred to a miniaturized electronic circuit consisting of semiconductor devices, as well as passive components bonded to a substrate or circuit board. This configuration is now commonly referred to as a hybrid integrated circuit. Integrated circuit has since come to refer to the single-piece circuit construction originally known as a monolithic integrated circuit.
3.2.8.1 IC Socket
3.2.9 IC 7805
The LM7805 is three terminal positive 5V regulators are available in the TO-220/DPAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, hence devices can be used with external components to obtain adjustable voltages and currents.
Features Output Current up to 1A Output Voltages of IC 5V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection
CHAPTER 4
1.
CHAPTER 5
1.
CHAPTER 6
EXPECTED OUTCOME
A wireless Control for Electrical Appliance At Home, offices or industries, like the one implemented here, is suitable for residential and/or industrial applications. Such a system would typically provide a control of operating the electric system. Thus a system such as this can be deployed easily with little connection between electric appliance and external source to operate electrical Appliance. Hence, after interacting with industry and knowing about that process of working in industry (as well as home too) in small scale (in single office/ room) and limitation of recent technology like to operate their circuit with external source as well as circuitry is more complicated and system is very costly etc. After interacting with industry we have made one simplest model based on Low frequency by PC through RS 232 which is economical, simplest circuitry etc. This way we have make them and home users to in knowledge and interacted with recent technology and modern demand to the market as engineer work for them.
FUTURE SCOPE
Here we explain the system which is use to operate an electric system at home and at industries is simple sample model with any application either lamp or fan or any other application. By some changes it also use for the multi application. By the use of microcontroller and some changes this system is ready for the use of multi application. Here we use a PC to operate the model system. Hence a system so many scope for the future expansion.
include P16F628.lib
GOTO Label_1 Label_3 CLRWDT CALL Label_2 BTFSC STATUS , C GOTO Label_3 CALL Label_4 CLRF 0x28 MOVLW 0x08 MOVWF 0x23 Label_6 CALL Label_5 CALL Label_2 BTFSC STATUS , C INCF 0x28 BTFSS 0x2B CLRF 0x28 RRF 0x22 ,f ,f ,f , 05
, 05 , 07
Label_2
,W
,W , 07 ,f , 07 ,W , 06 ,W
ADDLW 0x2D GOTO Label_8 ADDLW 0x0A BTFSS STATUS , C GOTO Label_8 Label_A MOVWF 0x22 BCF RLF STATUS , C 0x24 ,W
ADDWF 0x24
BTFSC STATUS , C
INCF 0x21 MOVF 0x21 ADDWF 0x25 RLF RLF 0x24 0x25
,f ,W ,f ,f ,f ,W
MOVF 0x22
BTFSC STATUS , Z GOTO Label_9 CALL Label_7 ADDLW 0xC6 BTFSC STATUS , C GOTO Label_9 ADDLW 0x0A BTFSC STATUS , C GOTO Label_A Label_9 BTFSS 0x33 , 05
BTFSC STATUS , Z INCF 0x25 Label_B MOVF 0x24 GOTO Label_C Label_2C MOVWF 0x26 MOVF 0x36 MOVWF FSR MOVLW 0x80 ANDWF 0x33 MOVLW 0x08 MOVWF 0x27 BCF STATUS , C ,f ,W ,f ,W
, 05 ,W
BTFSS 0x2B
GOTO Label_11 MOVF INDF IORWF 0x34 BTFSS 0x2B XORWF 0x34 MOVWF INDF BSF FSR , 07 ,W ,W ,W ,W , 06 ,W
,W ,W
BTFSS STATUS , C XORWF 0x34 BTFSC 0x2B XORWF 0x34 MOVWF INDF BSF FSR , 07 ,W ,f ,W , 06 ,W
, 06 ,W
Label_5 MOVF 0x2B ANDLW 0x1F ADDLW 0xFF MOVWF 0x21 MOVF 0x2A ADDLW 0xF5
,W
MOVWF 0x20 MOVLW 0x02 CALL Label_13 GOTO Label_12 Label_1C BSF STATUS , RP0
Label_20 BSF
STATUS , RP0
MOVLW 0x55 MOVWF EECON2 MOVLW 0xAA MOVWF EECON2 BSF EECON1 , 01
GOTO Label_C Label_1B CLRF 0x23 Label_10 MOVWF 0x22 Label_15 MOVLW 0xFF ADDWF 0x22 ,f
BTFSS STATUS , C GOTO Label_C MOVLW 0x03 MOVWF 0x21 MOVLW 0xDF CALL Label_12 GOTO Label_15 CLRF 0x21 Label_12 ADDLW 0xE8 MOVWF 0x20 COMF 0x21 MOVLW 0xFC BTFSS STATUS , C GOTO Label_16 ,f
,f
BTFSC STATUS , C GOTO Label_17 Label_16 ADDWF 0x20 CLRWDT INCFSZ 0x21 ,f ,f
Label_13 ADDLW 0xFF BTFSC STATUS , C GOTO Label_1A MOVF 0x20 GOTO Label_C Label_7 MOVWF FSR MOVF 0x31 ,W ,W
MOVWF PCLATH MOVF 0x30 MOVWF PCL Label_C BCF BCF BCF STATUS , IRP STATUS , RP1 STATUS , RP0 ,W
Label_F CLRWDT
RETURN
MOVLW 0xFE MOVWF TRISA CLRF TRISB MOVLW 0x64 BCF STATUS , RP0
CALL Label_1B MOVLW 0x00 CALL Label_1C MOVWF 0x38 CLRWDT MOVLW 0xFA SUBWF 0x38 ,W
BTFSS STATUS , C GOTO Label_1D GOTO Label_1E GOTO Label_1F Label_1D INCF 0x38 BSF ,f
STATUS , RP0
, 04
BCF BSF BSF BCF BCF BSF BSF BCF BCF BSF BSF BCF BCF BSF BSF BCF BCF Label_2D BCF BSF BCF BCF BSF BSF BCF
MOVWF 0x36 MOVLW 0x02 MOVWF 0x34 MOVLW 0x54 MOVWF 0x2A MOVLW 0x40
MOVWF 0x2B Label_21 CALL Label_3 SUBLW 0x44 BTFSS STATUS , Z GOTO Label_21 CALL Label_3 SUBLW 0x41 BTFSS STATUS , Z GOTO Label_21 CALL Label_3 SUBLW 0x54 BTFSS STATUS , Z GOTO Label_21 CALL Label_3 SUBLW 0x41 BTFSS STATUS , Z GOTO Label_21 CLRF 0x29 MOVLW 0x01 MOVWF 0x30 CLRF 0x31 CALL Label_22 MOVWF 0x39 BSF BSF BCF PORTB , 07
MOVLW 0x01 MOVWF 0x39 GOTO Label_24 Label_23 CLRWDT MOVF 0X39 SUBLW 0x02 BTFSS STATUS , Z GOTO Label_25 MOVLW 0x02 MOVWF 0x39 GOTO Label_24 Label_25 CLRWDT MOVF 0x39 SUBLW 0x03 BTFSS STATUS , Z GOTO Label_26 MOVLW 0x03 MOVWF 0x39 GOTO Label_24 Label_26 CLRWDT MOVF 0x39 SUBLW 0x04 BTFSS STATUS , Z GOTO Label_27 MOVLW 0x04 MOVWF 0x39 GOTO Label_24 Label_27 CLRWDT MOVF 0x39 SUBLW 0x05 BTFSS STATUS , Z GOTO Label_28 ,W ,W ,W ,W
MOVLW 0x05 MOVWF 0x39 GOTO Label_24 Label_28 CLRWDT MOVF 0x39 SUBLW 0x06 BTFSS STATUS , Z GOTO Label_0029 MOVLW 0x06 MOVWF 0x39 GOTO Label_24 Label_29 CLRWDT MOVF 0x39 SUBLW 0x07 BTFSS STATUS , Z GOTO Label_2A MOVLW 0x07 MOVWF 0x39 GOTO Label_24 Label_2A CLRWDT MOVF 0x39 SUBLW 0x08 BTFSS STATUS , Z GOTO Label_2B MOVLW 0x08 MOVWF 0x39 GOTO Label_24 Label_2B MOVLW 0x05 MOVWF 0x36 MOVLW 0x01 MOVWF 0x34 MOVLW 0x54 ,W ,W ,W
MOVWF 0x2A MOVLW 0x40 MOVWF 0x2B CLRF 0x2E CLRF 0x2F MOVLW 0x45 CALL Label_2C MOVLW 0x52 CALL Label_2C MOVLW 0x52 CALL Label_2C MOVLW 0x4F CALL Label_2C MOVLW 0x52 CALL Label_2C MOVLW 0x2E CALL Label_2C MOVLW 0x2E CALL Label_2C MOVLW 0x2E CALL Label_2C MOVLW 0x2E CALL Label_2C MOVLW 0x0D CALL Label_2C MOVLW 0x0A CALL Label_2C MOVLW 0x32 CALL Label_1B GOTO Label_2D Label_24 BTFSC 0x39 BSF PORTB , 00 , 00
, 00 , 00 , 01 , 01 , 01 , 01 , 02 , 02 , 02 , 02 , 03 , 03 , 03 , 03 , 04
STATUS , RP0
STATUS , RP0
END
MOVLW 0x55 MOVWF EECON2 MOVLW 0xAA MOVWF EECON2 BSF EECON1 , 01
GOTO Label_2 Label_C CLRF 0x23 Label_13 MOVWF 0x22 Label_5 MOVLW 0xFF ADDWF 0x22 ,f
MOVLW 0xDF CALL Label_4 GOTO Label_5 CLRF 0x21 Label_4 ADDLW 0xE8 MOVWF 0x20 COMF 0x21 MOVLW 0xFC BTFSS STATUS , C GOTO Label_6 Label_7 ADDWF 0x20 ,f ,f
BTFSC STATUS , C GOTO Label_7 Label_6 ADDWF 0x20 CLRWDT INCFSZ 0x21 ,f ,f
GOTO Label_9 NOP GOTO Label_9 Label_9 RETURN Label_E MOVWF 0x22 MOVLW 0x04 GOTO Label_A Label_A MOVWF 0x28 MOVF 0x23 SUBWF 0x21 ,W ,W
,W ,W
BTFSC STATUS , C MOVLW 0x01 BTFSC STATUS , Z BTFSS STATUS , Z MOVLW 0xFF GOTO Label_2 Label_2 BCF BCF BCF STATUS , IRP STATUS , RP1 STATUS , RP0
CLRWDT RETURN Label_1 MOVLW 0x07 MOVWF CMCON BSF STATUS , RP0
MOVLW 0xFF MOVWF TRISA CLRF TRISB MOVLW 0x64 BCF STATUS , RP0
CALL Label_C MOVLW 0x00 MOVF 0x39 MOVWF 0x21 MOVLW 0x0F MOVWF 0x23 MOVLW 0xA0 CALL Label_E ,W
BTFSS STATUS , Z GOTO Label_F GOTO Label_10 GOTO Label_11 Label_F INCF 0x38 ,f
STATUS , RP0
MOVF 0x38 CALL Label_12 MOVLW 0x01 MOVWF 0x23 MOVLW 0xF4 CALL Label_13 BCF PORTA
, 04
Label_16 CLRWDT BTFSS PORTA GOTO Label_14 GOTO Label_15 Label_14 GOTO Label_16 Label_15 BTFSC PORTA BSF 0x3A , 00 , 04
, 00 , 00 , 00 , 01
, 01 , 01 , 01 , 02
, 02
, 02 , 02 , 03
, 03 , 03 , 03
MOVLW 0x64 CALL Label_C CLRWDT MOVF 0x3A SUBLW 0xF1 BTFSS STATUS , Z GOTO Label_17 CLRWDT BTFSC PORTB GOTO Label_18 BSF BSF BCF BCF PORTB , 00 , 00 ,W
STATUS , RP0
STATUS , RP0
Label_19 MOVLW 0x14 CALL Label_C GOTO Label_1A Label_17 CLRWDT MOVF 0x3A SUBLW 0xF2 BTFSS STATUS , Z ,W
GOTO Label_1B CLRWDT BTFSC PORTB GOTO Label_1C BSF BSF BCF BCF PORTB , 01 , 01
STATUS , RP0
STATUS , RP0
Label_1D MOVLW 0x14 CALL Label_C GOTO Label_1A Label_1B CLRWDT MOVF 0x3A SUBLW 0xF3 BTFSS STATUS , Z GOTO Label_1E CLRWDT BTFSC PORTB GOTO Label_1F BSF BSF BCF BCF PORTB , 02 , 02 ,W
STATUS , RP0
BCF
STATUS , RP0
Label_20 MOVLW 0x14 CALL Label_C GOTO Label_1A Label_1E CLRWDT MOVF 0x3A SUBLW 0xF4 BTFSS STATUS , Z GOTO Label_21 CLRWDT BTFSC PORTB GOTO Label_22 BSF BSF BCF BCF PORTB , 03 , 03 ,W
STATUS , RP0
STATUS , RP0
Label_23 MOVLW 0x14 CALL Label_C GOTO Label_1A Label_21 CLRWDT MOVF 0x3A SUBLW 0xF5 BTFSS STATUS , Z GOTO Label_24 CLRWDT BTFSC PORTB GOTO Label_25 , 04 ,W
PORTB
, 04
STATUS , RP0
STATUS , RP0
Label_26 MOVLW 0x14 CALL Label_C GOTO Label_1A Label_24 CLRWDT MOVF 0x3A SUBLW 0xF6 BTFSS STATUS , Z GOTO Label_27 CLRWDT BTFSC PORTB GOTO Label_28 BSF BSF BCF BCF PORTB , 05 , 05 ,W
STATUS , RP0
STATUS , RP0
Label_27 CLRWDT MOVF 0x3A SUBLW 0xF7 BTFSS STATUS , Z GOTO Label_2A CLRWDT BTFSC PORTB , 06 ,W
STATUS , RP0
STATUS , RP0
Label_2C MOVLW 0x14 CALL Label_C GOTO Label_1A Label_2A CLRWDT MOVF 0x3A SUBLW 0xF8 BTFSS STATUS , Z GOTO Label_2D CLRWDT BTFSC PORTB GOTO Label_2E BSF BSF BCF BCF PORTB , 07 , 07 ,W
STATUS , RP0
STATUS , RP0
Label_2F MOVLW 0x14 CALL Label_C GOTO Label_A Label_2D GOTO Label_16 Label_1A MOVLW 0x01 MOVWF 0x23 MOVLW 0xF4 CALL Label_13 GOTO Label_16 Label_10 MOVLW 0xFF MOVWF PORTB Label_11 GOTO Label_10 Label_30 SLEEP GOTO Label_30
ORG
0x2100
DATA 0x01
END
Private Sub Command1_Click () Led1.Visible = True MSComm1.Output = Chr (1) Else Led1.Visible = False MSComm1.Output = Chr (1) End Sub
Private Sub Command2_Click () Led2.Visible = True MSComm1.Output = Chr (2) Else Led2.Visible = False MSComm1.Output = Chr (2) End Sub
Private Sub Command3_Click () Led3.Visible = True MSComm1.Output = Chr (3) Else Led3.Visible = False MSComm1.Output = Chr (3) End Sub
Private Sub Command5_Click () Led5.Visible = True MSComm1.Output = Chr (5) Else Led5.Visible = False MSComm1.Output = Chr (5) End Sub
Private Sub Command6_Click () Led6.Visible = True MSComm1.Output = Chr (6) Else Led6.Visible = False MSComm1.Output = Chr (6) End Sub
Private Sub Command7_Click () Led7.Visible = True MSComm1.Output = Chr (7) Else Led7.Visible = False MSComm1.Output = Chr (7) End Sub
Private Sub Form_ Load () PWR.Status = False PWR.blink = False Option1.Value = True
Led1.Visible = False Led2.Visible = False Led3.Visible = False Led4.Visible = False Led5.Visible = False Led6.Visible = False Led7.Visible = False Led8.Visible = False End Sub
End Sub
Private Sub QUIT_ CMD_ Click () If MSComm1.PortOpen = True Then MSComm1.PortOpen = False PWR.blink = False End If End End Sub
If MSComm1.PortOpen = False Then If Option1.Value = True Then MSComm1.CommPort = 1 PWR.Status = True PWR.blink = True End If
If Option2.Value = True Then MSComm1.CommPort = 2 PWR.Status = True PWR.blink = True End If End If End Sub
Appendix C: Datasheet
Decoder Timing: