Documente Academic
Documente Profesional
Documente Cultură
ABSTRACT
METAL DETECTOR
Aim: The main aim of this project is to design a metal detector using AT 89c51 micro controller. Description: By using this project we can detect the presents of metal, to detect metal we are using metal sensor. Metal sensors are used to detect metals. Whenever a metal is detected the robot will automatically indicates. here we are using AT 89c51 micro controller ,by using software programming it can be detect the metel. By continuous monitoring for that pulse controller yields the corresponding alert signal. To get alert indication we can use either buzzer or siren or light as per availability. Here this project is coming with Buzzer as alert indicator. This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 230/12V step down transformer. Components used: o AT89C51 Controller o 11.0592 MHz Crystal o Metal detecting sensor o Buzzer
: : : :
Embedded Systems, Robotics, Embedded C, Keil V.4, +5V, 500mA Regulated Power Supply industries
BLOCK DIAGRAM
Metal Sensor
Buzzer 8051
ROBOT CONTROL USING RF AIM: To design a Robot using RF communication. DESCRIPTION: This project deals with the design of a robot using RF communication. In this project we are using RF transmitter and RF receiver. The board containing RF transmitter works as remote. Four switches are connected to the transmitter section. Four switches indicate direction. DC motors are used as robotic wheels. In this project we use two DC motors which connected to receiver section through ULN 2003 driver. The motors will rotate according to the data received at receiver. In transmitter section we use a RF encoder HT12E and in receiver section we use RF decoder HT12D.This project uses regulated 5V, 500mA & 12V, 500mA power supply. 7805 and 7812 three terminal voltage regulators are used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 230/12V step down transformer. Requirements: o AT89C51 Controller. o 11.0592 MHz Crystal. o DC motors o RF module
Electronics & Communications 3
Power Supply
RF TX
Reset
HT12D DC motor
Crysta l
At89c5 1
ULN2003 DC motor
Domain Software
: :
Embedded Systems, wireless Communication, Embedded C, Kiel v.4, +5V, 500mA Regulated Power Supply : Industries.
Bridge Rectifier
Filter Circuit
Regulat or
4
LIST OF FIGURES
1. BLOCK DIAGRAM OF METAL DETECTOR 2. BLOCK DIAGRAM OF RF TRANSMISSION 3. MEMORY TYPES 4. CONNECTION FOR 8051 WITH KEYPAD 5. INTERFACING LCD TO 8051 6. POWER SUPPLY PROCESS 7. TRANSFORMER 8. BRIDGE RECTIFIER 9. REGULATOR 10. RS 232 PIN CONFIGURATION 11. INTERFACING FOR 8051 WITH METAL SENSORS 12. DC MOTOR FF-030-PN MOTOR 13. RF COMMUNICATION 14. HT12E & HT12D PIN ASSIGNMENT 15. KEIL FINAL LOOK
----------------------------------------------
02 04 15 27 31 34 35 38 39 40 42 47 50 51 52
LIST OF TABLES 1. ADDRESING MODES 2. SETTING THE SERIAL MODE 3. INTERRUPT PRIORITY 4. REGISTER SELECTION 5. INSTRUCTIONS OF LCD 6. RS 232 PIN ASSIGNMENT ------------------20 23 25 30 31 40
INDEX S.No
1.
Contents
Introduction of the Project 1.1 System definition 09. 1.2 Software requirement 11. 1.3 ANALYSIS 12.
Pg.No.
09.
2.
8086 Hand Book 14. 2.0 Intro 14. 2.1 Types of memory 15. 2.2 Special function register (SFR) memory 16. 2.3 Basic Register 18. 2.4 Addressing Modes 20. 2.5 Timers 2.6 Serial Communication 22. 2.7 Interrupts 24. 21.
3. 26.
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION 2. Embeds main application software generally into flash or ROM and the application software performs concurrently the number of tasks. 3. Embeds a real time operating system ( RTOS), which supervises the application software tasks running on the hardware and organizes the accesses to system resources according to priorities and timing constraints of tasks in the system.
Hard Real-Time Systems - systems with severe constraints on the timeliness of the response. Soft Real-Time Systems - systems which tolerate small variations in response times. Hybrid Real-Time Systems - systems which exhibit both hard and soft constraints on its performance.
11
ELECTRONICS - complete over and inner view of the project details and working and should be able to rectify any problem if occurred User: User should know the projects capabilities and should be able to use it according to the specifications provided i.e should be able to identify differences between metals & mines
:
:
12
1.3 ANALYSIS
1.3.1 Feasibility Study Economic Feasibility
Economic feasibility attempts 2 weigh the costs of developing and implementing a new system, against the benefits that would accrue from having the new system in place. This feasibility study gives the top management the economic justification for the new system. A simple economic analysis which gives the actual comparison of costs and benefits are much more meaningful in this case. In addition, this proves to be a useful point of reference to compare actual costs as the project progresses. There could be various types of intangible benefits on account of automation. These could include increased customer satisfaction, improvement in product quality better decision making timeliness of information, expediting activities, improved accuracy of operations, better documentation and record keeping, faster retrieval of information, better employee morale.
Technical Feasibility
Evaluating the technical feasibility is the trickiest part of a feasibility study. This is because, .at this point in time, not too many detailed design of the system, making it difficult to access issues like performance, costs on (on account of the kind of technology to be deployed) etc. A number of issues have to be considered while doing a technical analysis.
13
2.1.
2.2.
2.3.
BASIC REGISTERS
18.
2.4.
ADDRESSING MODES
20.
2.5.
TIMERS
21.
2.6.
SERIAL COMMUNICATION
22.
2.7.
INTERRUPTS
23.
14
2.0 Introduction:
The8051 is the original member of the MCW-51 family, and is the core for allMCS-51 devices. The features of the 8051 core are o 8-bit CPU optimized for control applications o Extensive Boolean processing (Single-bit logic) capabilities o 64K Program Memory address space o 64K Data Memory address space o 4K bytes of on-chip Program Memory o 128 bytes of on-chip Data RAM o 32 bidirectional and individually addressable 1/0 lines o Two 16-bit timer/counters o Full duplex UART o 6-source/5-vector interrupt structure with two priority levels o On-chip clock oscillator
15
fig 2.1(memory types) On-Chip Memory: refers to any memory (Code, RAM, or other) that physically exists on the Microcontroller itself. On-chip memory can be of several types, but we'll get into that shortly. External Code Memory: is code (or program) memory that resides off-chip. This is often in the form of an external EPROM. External RAM is RAM memory that resides off-chip. This is often in the form of standard static RAM or flash RAM. Code Memory : Code memory is the memory that holds the actual 8051 program that is to be run. This Memory is limited to 64K and comes in many shapes and sizes: Code memory may be found On-chip, either burned into the microcontroller as ROM or EPROM. External RAM: As an obvious opposite of Internal RAM, the 8051 also supports what is called External RAM. As the name suggests, External RAM is any random access memory which is found off-chip. Since the memory is off-chip it is not as flexible in terms of accessing, and is also slower. For example, to increment an Internal RAM location by 1 requires only 1 instruction and 1 instruction cycle. To increment a 1-byte value stored in External RAM requires 4 instructions and 7 instruction cycles. In this case, external memory is 7 times slower! What External RAM
16
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION loses in speed and flexibility it gains in quantity? While Internal RAM is limited to 128 bytes the 8051 supports External RAM up to 64K. 2.1.1 On -Chip Memory: As mentioned at the beginning of this chapter, the 8051 includes a certain amount of on chip memory. On-chip memory is really one of two (SFR) memory. The layout of the 8051's internal memory is presented in the following memory map:
As is illustrated in this map, the 8051 has a bank of 128 bytes of Internal RAM. This Internal RAM is found on-chip on the 8051 so it is the fastest RAM available, and it is also the most flexible in terms of reading, writing, and modifying its contents. Internal RAM is volatile, so when the 8051 is reset this memory is cleared. The 128 bytes of internal ram is subdivided as shown on the memory map. The first 8 bytes (00h - 07h) are "register bank 0".
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION user to set the serial baud rate, control and access timers, and configure the 8051s interrupt system. When programming, SFRs have the illusion of being Internal Memory. 2.2.1 What Are SFRs? The 8051 is a flexible microcontroller with a relatively large number of modes of operations. Your program may inspect and/or change the operating mode of the 8051 by manipulating the values of the 8051's Special Function Registers (SFRs). SFRs are accessed as if they were normal Internal RAM. Each SFR has an address (80h through FFh) and a name. The following chart provides a graphical presentation of the 8051's Rs, their names, and their . `
configuration of some aspect of the 8051. P0 (Port 0, Address 80h, Bit-Addressable): This is input/output port 0. Each bit of this SFr corresponds to one of the pins on the microcontroller. For example, bit 0 of port 0 is pin P0.0, bit 7 is pin P0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.own use.
18
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION SP (Stack Pointer, Address 81h): This is the stack pointer of the microcontroller. This SFR indicates where the next value to be taken from the stack will be read from in Internal RAM. If you push a value onto the stack, the value will be written to the address of SP + 1. That is to say, if SP holds the value 07h, a PUSH instruction will push the value onto the stack at address 08h. This SFR is modified by all instructions which modify the stack, such as PUSH, POP, LCALL, RET, RETI, and whenever interrupts are provoked by the microcontroller. PCON (Power Control, Addresses 87h): The Power Control SFR is used to control the 8051's power control modes. Certain operation modes of the 8051 allow the 8051 to go into a type of "sleep" mode which requires much less power. These modes of operation are controlled through PCON. Additionally, one of the bits in PCON is used to double the effective baud rate of the 8051's serial port. P1 (Port 1, Address 90h, Bit-Addressable): This is input/output port 1. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 1 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. SCON (Serial Control, Addresses 98h, Bit-Addressable): The Serial Control SFR is used to configure the behavior of the 8051's on-board serial port. This SFR controls the baud rate of the serial port, whether the serial port is activated to receive data, and also contains flags that are set when a byte is successfully sent or received. P2 (Port 2, Address A0h, Bit-Addressable): This is input/output port 2. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 2 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.
19
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION the most versatile register the 8051 has due to the shear number of instructions that make use of the accumulator. More than half of the 8051s 255 instructions manipulate or use the accumulator in some way.
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-byte) value. The Stack Pointer is used to indicate where the next value to be removed from the stack should be taken from. When you push a value onto the stack, the 8051 first increments the value of SP and then stores the value at the resulting memory location.
Table2.1
21
2.5 Timers:
The 8051 comes equipped with two timers, both of which may be controlled, set, read, and configured individually. The 8051 timers have three general functions: 1) Keeping time and/or calculating the amount of time between events, 2) Counting the events themselves, or 3) Generating baud rates for the serial port. The three timer uses are distinct so we will talk about each of them separately. The first two uses will be discussed in this chapter while the use of timers for baud rate generation will be discussed in the chapter relating to serial ports.
22
2.5.3 The TMOD SFR: The individual bits of TMOD have the following functions:
As you can see in the above chart, four bits (two for each timer) are used to specify a mode of operation. The modes of operation are:
23
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION Timer mode "3" is a split-timer mode. Timer 1 as a baud rate generator and use TH0/TL0 as two separate timers.Upon executing these two instructions timer 0 will immediately begin counting, being incremented once every machine cycle (every 12 crystal pulses).
mode and baud rate. Once configured, all we have to do is write to an SFR to write a value to the serial port or read the same SFR to read a value from the serial port. The 8051 will automatically let us know when it has finished sending the character we wrote and will also let us know whenever it has received a byte so that we can process it. We do not have to worry about transmission at the bit level--which saves us quite a bit of coding and processing time.
Table 2.2
Electronics & Communications 24
2.7 Interrupts:
As stated earlier, program flow is always sequential, being altered only by those instructions which expressly cause program flow to deviate in some way. However, interrupts give us a
Electronics & Communications 25
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION mechanism to "put on hold" the normal program flow, execute a subroutine, and then resume normal program flow as if we had never left it. This subroutine, called an interrupt handler, is only executed when a certain event (interrupt) occurs. The event may be one of the timers "overflowing," receiving a character via the serial port, transmitting a character via the serial port, or one of two "external events".
2.7.1 What Events can trigger interrupt, and where do they go? We can configure the 8051 so that any of the following events will cause an interrupt:
Timer 0 Overflow. Timer 1 Overflow. Reception/Transmission of Serial Character. External Event 0. External Event 1.
2.7.2 Polling Sequence:The 8051 automatically evaluates whether an interrupt should occur after every instruction. When checking for interrupt conditions, it checks them in the following order: External 0 Interrupt, Timer 0 Interrupt, External 1 Interrupt, Timer 1 Interrupt, Serial Interrupt
26
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION The 8051 offers two levels of interrupt priority: high and low. By using interrupt priorities you may assign higher priority to certain interrupt conditions.The IP SFR has the following format:
table 2.3
3. KEYPAD INTERFACING
3.0.1Introduction:
Keypads are a part of HMI or Human Machine Interface and play really important role in a small embedded system where human interaction or human input is needed. Matrix keypads are well known for their simple architecture and ease of interfacing with any microcontroller.
27
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION So keeping this outline we can construct a keypad using simple PST Switch shown below:
Now our keypad is ready, all we have to do is connect the rows and columns to a port of microcontroller and program the controller to read the input.
28
Liquid Crystal Display also called as LCD is very helpful in providing user interface as well as for debugging purpose. The most common type of LCD controller is HITACHI 44780 which provides a simple interface between the controller & an LCD. These LCD's are very simple to interface with the controller as well as are cost effective. The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16 characters),2x16 (Double Line & 16 character per line) &4x20 (four lines & Twenty characters per line). The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on data lines depends on the mode of operation. If operated in 8-bit mode then 8 data lines + 3 control lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4 data lines + 3 control lines i.e. 7 lines are required. How do we decide which mode to use? Its simple if you have sufficient data lines you can go for 8 bit mode & if there is a time constrain i.e. display should be faster then we have to use 8-bit mode because basically 4-bit mode takes twice as more time as compared to 8-bit mode.Most projects you create with the 8051 CPU require some form of display. The most common way to accomplish this is with the LCD (Liquid Crystal Display). LCDs have become a cheap and easy way to get text display for embedded system Common displays are set up as 16
29
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION to 20 characters by 1 to 4 lines .When RS is low (0), the data is to be treated as a command. When RS is high (1), the data being sent is considered as text data which should be displayed on the screen .When R/W is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively reading from the LCD. Most of the times there is no need to read from the LCD so this line can directly be connected to Gnd thus saving one controller line .The ENABLE pin is used to latch the data present on the data pins. A HIGH LOW signal is required to latch the data. The LCD interprets and executes our command at the instant the EN line is brought low. If you never bring EN low, our instruction will never be executed.
30
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION Used to latch the data present on the data pins. A high-to-low edge is needed to latch the data.
In the above memory map, the area shaded in black is the visible display (For 16x2 display) .For first line addresses for first 15 characters is from 00h to 0Fh. But for second line address of first character is 40h and so on up to 4Fh for the 16th character. So if you want to display the text at specific positions of LCD , we require to manipulate address and then to set cursor position accordingly .
Table 3.1
RS
31
0 0 1 1
0 1 0 1
IR write as an internal operation (display clear, etc.) Read busy flag (DB7) and address counter (DB0 to DB6) DR write as an internal operation (DR to DDRAM or CGRAM) DR read as an internal operation (DDRAM or CGRAM to DR)
Instruction Function set (8-bit interface, 2 lines, 5*7 Pixels) Function set (8-bit interface, 1 line, 5*7 Pixels) Function set (4-bit interface, 2 lines, 5*7 Pixels) Function set (4-bit interface, 1 line, 5*7 Pixels) Entry mode set Scroll display one character right (all lines) Scroll display one character left (all lines) Home (move cursor to top/left character position) Move cursor one character left Move cursor one character right Instruction Turn on visible underline cursor Turn on visible blinking-block cursor Make cursor invisible
Electronics & Communications
Blank the display (without clearing) Restore the display (with cursor hidden) Clear Screen Set cursor position (DDRAM address) Set pointer in character-generator RAM (CG RAM address)
fig 3.1
The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data bus is used, the LCD will require a total of 7 data lines.If an 8-bit data bus is used, the LCD will require a total of 11 data lines.The three control lines are EN, RS, and RW. CODE EXAMPLE: It is easy (and clean tech. ) to make different subroutines and then call them as we need.
33
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION Data write Routine data: mov P1, A ;move acc. data to port setb P3.6 ;RS=1 data clr P3.5 ;RW=0 for write setb P3.7 ;H->L pulse on E clr P3.7 lcall ready ret Initialization mov A, #38H ; Initialize, 2-lines, 5X7 matrix. lcall Command mov A, #0EH ; LCD on, cursor on lcall Command mov A, #01H ; Clear LCD Screen lcall Command mov A, #06H ; Shift cursor right lcall Command Note- As we need to clear the LCD frequently and not the whole initialization , it is better to use this routine separately. Displaying "HI" lcall initialization lcall clear mov A,#'H' acall data mov A,#'I' lcall data Let's now try code for displaying text at specific positions.
Electronics & Communications 34
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION I want to display "MAHESH" in message "Hi MAHESH" at the right corner of first line then I should start from 10th character. So referring to table 80h+0Ah= 8Ah. So below is code and I don's think that you will need explanation comments.
ASSEMBLY LANGUAGE
lcall lcall mov lcall mov lcall mov lcall mov lcall mov lcall mov lcall data Initialization clear a,#'H' data a,#'I' data a,#8ah command a,#'M' data a,#'A' data a,#'H'
4. Power Supply
There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. For example a 5V regulated supply:
Fig 4.1(process)
35
Transformer - steps down high voltage AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smooths the DC from varying greatly to a small ripple. Regulator - eliminates ripple by setting DC output to a fixed voltage.
Power supplies made from these blocks are described below with a circuit diagram and a graph of their output:
Transformer only Transformer + Rectifier Transformer + Rectifier + Smoothing Transformer + Rectifier + Smoothing + Regulator
Dual Supplies Some electronic circuits require a power supply with positive and negative outputs as well as zero volts (0V). This is called a 'dual supply' because it is like two ordinary supplies connected together as shown in the diagram. Dual supplies have three outputs, for example a 9V supply has +9V, 0V and -9V outputs.
The low voltage AC output is suitable for lamps, heaters and special AC motors. It is not suitable for electronic circuits unless they include a rectifier and a smoothing capacitor. 4.1.2 Transformer + Rectifier
The varying DC output is suitable for lamps, heaters and standard motors. It is not suitable for electronic circuits unless they include a smoothing capacitor. 4.1.3 Transformer + Rectifier + Smoothing
37
T he smooth DC output has a small ripple. It is suitable for most electronic circuits. 4.1.4 Transformer + Rectifier + Smoothing + Regulator
The regulated DC output is very smooth with no ripple. It is suitable for all electronic circuits.
Transformer:Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage (230V in UK) to a safer low voltage.The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core.Transformers waste very little power so the power out is (almost)
Electronics & Communications 38
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION equal to the power in. Note that as voltage is stepped down current is stepped up.The ratio of the number of turns on each coil, called the turns ratio, determines the ratio of the voltages. A stepdown transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage.
Vp = primary (input) voltage Np = number of turns on primary Ip = primary (input) current coil
4.2 Rectifier:There are several ways of connecting diodes to make a rectifier to convert AC to DC. The bridge rectifier is the most important and it produces full-wave varying DC. A full-wave rectifier can also be made from just two diodes if a centre-tap transformer is used, but this method is rarely used now that diodes are cheaper. A single diode can be used as a rectifier but it only uses the positive (+) parts of the AC wave to produce half-wave varying DC. 4.2.1 Bridge rectifier:A bridge rectifier can be made using four individual diodes, but it is also available in special packages containing the four diodes required. It is called a full-wave rectifier because it uses all the AC wave (both positive and negative sections). 1.4V is used up in the bridge rectifier because each diode uses 0.7V when conducting and there are always two diodes conducting, as shown in the diagram below..
39
fig 4.3(bridge rectifier) Bridge rectifier the connections so the alternating directions of AC are converted to the one direction of DC. 4.3 Smoothing:-
Alternate pairs of diodes conduct, changing over (using all the AC wave)
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output. Smoothing is not perfect due to the capacitor voltage falling a little as it discharges, giving a small ripple voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory and the equation below gives the required value for the smoothing capacitor. A larger capacitor will give less ripple. The capacitor There is more information about smoothing on the Electronics in Meccano website. value must be doubled when smoothing half-wave DC.
5 Io Vs f
Io = output current from the supply in amps (A) Electronics & Communications 40
4.4 Regulator:Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in dual supplies. Most Fig 4.4 Many of the fixed voltage regulator ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. They include a hole for attaching a heatsink if necessary. Please see the Electronics in Meccano website for more information about voltage regulator ICs. Zener diode regulator For low current power supplies a simple voltage regulator can be made with a resistor and a zener diode connected in reverse as shown in the diagram. Zener diodes are rated by their breakdown voltage Vz and maximum power Pz (typically 400mW or 1.3W). The resistor limits the current (like an LED resistor). The current through the resistor is constant, so when there is no output current all the current flows through the zener diode and its power rating Pz must be large enough to withstand this. Please see the Diodes page for more information about zener diodes. Choosing a zener diode and resistor:
1. The zener voltage Vz is the output voltage required
regulators
include
some
automatic
protection from excessive current ('overload protection') and overheating ('thermal protection').
41
5. RS 232 INTERFACE
5.1 OVERVIEW:
Table 5.1 RS232 Pin Assignments (DE9 PC signal set) Received Line Pin 1 (Data Carrier Detect) Pin 2 Received Data Pin 3 Transmit Data Pin 4 Data Terminal Ready Pin 5 Signal Ground Pin 6 Data Set Ready Pin 7 Request To Send Pin 8 Clear To Send Pin 9 Ring Indicator
Signal
Detector
3. The connector on the PC has male pins, therefore cable needs to terminate in a DE9/F (Female pin) connector.
the
mating
fig 5.1 Wiring up something nice and simple, for instance a plain old "dumb terminal", is just a matter of connecting Tx, Rx and Ground, right?
42
connected, most driver software will wait forever for one of the handshaking lines to go to the correct level. Handshake looping a PC serial connector 5. When the lines are handshake looped, the RTS output from the PC immediately activates the CTS input - so the PC effectively controls its own handshaking.
The PC loopback plug is a useful diagnostic tool. The loopback plug connects serial inputs to serial outputs so that the port may be tested. There is more than one way to wire up a loopback plug - but this is the most common.
6. Metal Detector
6.1 Introduction to Metal Detectors: Metal detector is a device that can detect metal, the basics can make a sound when it is near some metal, and the more advanced can tell what kind of metal and how deep it is down, they are using different detecting principles. We got the assignment to built a detector there could detect a 10kr coin at 5cm. The device had to be battery operated and transportable. We used these principles:
43
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION 6.1.1 BFO Detector: The basic way the Beat Frequency Oscillator (Later only BFO) works, when the detector coil is above some metal, it will change the frequency in the detector oscillator, which has the detector coil in the frequency depended circuit. The detected frequency is compared to a reference oscillator in a mixer, so there will be both the different and the sum of the 2 frequencies. The detector we has made isnt really a real BFO, while the reference is internal in a Micro Controller (Later only C) and the signal from the detector oscillator is connected directly to the Cs external timer pin In the code for the C there is implemented an average function, so if the ground has high magnetic fields it will compensate for it after some seconds. The output is indicated by Light Emitted Diodes (Later only LED) and by a sound in different locked frequencies. 6.1.2 PI Detector: The Pulse Induction (Later only PI) uses a totally different way of sensing the metal, it sends out a very short magnetic pulse. Just after the pulse is finished the coil makes a spark (Later Reflected pulse). The reflected pulse is changing shape when metal comes near the coil. A part of the reflected pulse is amplified and put into some kind of a pulse detector.
44
45
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION on the speaker and pushes a little to the membrane, the speaker generates some energy. If the terminals on the speaker are shorted, the membrane is hard to push, the coil cant make the energy, and the coil is locked. But the difference between the speakers and the earth is that the speakers have big magnetic part to help the membrane to move, otherwise in the metal detector it is normally not a magnetic object there has to be detected, so the coil has to produce it own magnetic field. When the detectors magnetic beams are reaching a metal, the metal start to induct the fields, and reply the magnetic field in another direction / time, this change can be seen in the frequency / pulse response of the coil. There are big different
Active
46
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION detectors uses the coil to transmit a pulse or a continually waveform, some uses the same coil to receive with, and others have 1 or 2 receiving coils. The PI loads the coil with some current in a narrow pulse, and when it releases the coil it make a reflective pulse the duration of the reflected pulse is only a few S, and the pulse can be several 100v high. When some metal are coming close to the coil the amplitude of the reflective pulse is getting little lower and the duration of the pulse a little longer, almost like the metal behaves like a capacitor for magnetic energy, in the top of the reflective the metal collect magnetic energy, and when the pulse is falling in voltage it returns the energy slowly. Different metal, have different reaction time. Just after the normal duration time of a spike, the measurement has to be done, like in Figure 2 illustrates, the pulse will rise a little when some metal comes near. The sampled signal has to be amplified up to a signal that can be used. Positive: Not sensitive to electro magnetic noise Long distance detect Detection near wires / high magnetic fields in the earth / water Negative: High Current / Voltage
7. DC MOTOR
7.1 Principles of operation: In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external
Electronics & Communications 47
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION magnetic field to generate rotational Motion.Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization, while green represents a magnet or winding with a "South" polarization).
48
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that BEAMers will see), the external magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotate with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -with the rotor inside the stator (field) magnets.The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue rotating. In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount of torque it could produce is cyclic with the position of the rotor). So since most small DC motors are of a three-pole design, let's tinker with the workings of one via an interactive animation (JavaScript required):
49
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION You'll notice a few things from this -- namely, one pole is fully energized at a time (but two others are "partially" energized). As each brush transitions from one commutator contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this occurs within a few microsecond direct result of the coil windings' series wiring:
There's probably no better way to see how an average DC motor is put together, than by just opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a perfectly
Fig 7.1
good motor. Luckily for you, I've gone ahead and done this in your stead. The guts of a disassembled Mabuchi FF-030-PN motor (the same model that Solarbotics sells) are available for you to see here (on 10 lines / cm graph paper). This is a basic 3-pole DC motor, with 2 brushes and three commutator contacts.
The use of an iron core armature (as in the Mabuchi, above) is quite common, and has a number of advantages2. First off, the iron core provides a strong, rigid support for the windings -- a particularly important consideration for high-torque motors. The core also conducts heat away from the rotor windings, allowing the motor to be driven harder than might otherwise be the case. Iron core construction is also relatively inexpensive compared with other construction types.
50
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION But iron core construction also has several disadvantages. The iron armature has a relatively high inertia which limits motor acceleration. This construction also results in high winding inductances which limit brush and commutator life. In small motors, an alternative design is often used which features a 'coreless' armature winding. This design depends upon the coil wire itself for structural integrity. As a result, the armature is hollow, and the permanent magnet can be mounted inside the rotor coil. Coreless DC motors have much lower armature inductance than iron-core motors of comparable size, extending brush and commutator life.
The coreless design also allows manufacturers to build smaller motors; meanwhile, due to the lack of iron in their rotors, coreless motors are somewhat prone to overheating. As a result, this design is generally used just in small, low-power motors. BEAMers will most often see coreless DC motors in the form of pager motors. Again, disassembling a coreless motor can be instructive -- in this case, my hapless victim was a cheap pager vibrator motor. The guts of this disassembled motor are available for you to see here (on 10 lines / cm graph paper).
It is a rate of oscillation in the range of about 3 kHz to 300 GHz, which corresponds to the frequency of radio waves, and the alternating currents which carry radio signals. RF
Electronics & Communications 51
usually refers to electrical rather than mechanical oscillations, although mechanical RF systems do exist (see mechanical filter and RF MEMS). 8.1 Special properties of RF current Electric currents that oscillate at radio frequencies have special properties not shared by direct current or alternating current of lower frequencies. The energy in an RF current can radiate off a conductor into space as electromagnetic waves (radio waves); this is the basis of radio technology. RF current does not penetrate deeply into electrical conductors but flows along their surfaces; this is known as the skin effect. For this reason, when the human body comes in contact with high power RF currents it can cause superficial but serious burns called RF burns. RF current can easily ionize air, creating a conductive path through it. This property is exploited by "high frequency" units used in electric arc welding, which use currents at higher frequencies than power distribution uses. Another property is the ability to appear to flow through paths that contain insulating material, like the dielectric insulator of a capacitor. When conducted by an ordinary electric cable, RF current has a tendency to reflect from discontinuities in the cable such as connectors and travel back down the cable toward the source, causing a condition called standing waves, so RF current must be carried by specialized types of cable called transmission line.
8.2 Radio communication In order to receive radio signals an antenna must be used. However, since the antenna will pick up thousands of radio signals at a time, a radio tuner is necessary to tune in to a particular frequency (or frequency range).[1] This is typically done via a resonator in its simplest form, a circuit with a capacitor and an inductor forming a tuned circuit. The resonator amplifies oscillations within a particular frequency band, while reducing oscillations at other frequencies outside the band. 8.3 Frequencies Main article: Radio spectrum Frequency 3 - 30 Hz 30 - 300 Hz 300 - 3000 Hz 3 - 30 kHz 30 - 300 kHz 300 kHz - 3 MHz 3 - 30 MHz
Designation Extremely low frequency Super low frequency Ultra low frequency Very low frequency Low frequency Medium frequency High frequency
Very high frequency VHF Ultra high frequency UHF Super high frequency SHF Extremely high frequency EHF
18 PIN DIP Operating Voltage : 2.4V ~ 12V Low Power and High Noise Immunity CMOS Technology Low Standby Current and Minimum Transmission Word Built-in Oscillator needs only 5% Resistor Easy Interface with and RF or an Infrared transmission medium
General Description The 212 encoders are a series of CMOS LSIs for remote control system applications. They are capable of encoding information which consists of N address bits and 12_N data bits The HT 12E Encoder ICs are series of CMOS LSIs for Remote Control system applications. They are capable of Encoding 12 bit of information which consists of N address bits and 12-N data bits. The HT 12D ICs are series of CMOS LSIs for remote control system applications. This ICs are paired with each other. For proper operation a pair of encoder/decoder with the same number of address and data format should be selected.
54
MINE/METAL DETECTION ROBOT WITH RF COMMUNICATION In October 2005, KEIL (KEIL Elektronik GmbH in Munich, Germany, and KEIL Software, Inc. in Plano, Texas) was acquired by ARM
55
As the technology emerges, it is possible to upgrade the system and can be adaptable to desired environment.
Because it is based on object-oriented design, any further changes can be easily adaptable like activating GPS system into it.
Based on the future security issues, security can be improved using emerging technologies.
BIBLIOGRAPHY
Books
Microprocessors & interfacing [pgno.326] Embedded systems [pg 1-10 intro] Orcioni The c idea book [article no.26]
Jan Axelson
Web Sites
57
58