Showing posts with label microcontroller. Show all posts
Showing posts with label microcontroller. Show all posts

Atmel at89c51 Office-Home Security System


Home security project
Securiy is a matter of great concern to all of us in this world. Normally there are four types of security threat to our property.
1 )Thief, an inturder.
2)Fire, so we use fire sensor.
3)Water spilage /over flow, so we use water sensor.
4) Gas leak , we use gas sensor, whenever there is security breach from one of above or any combination of above.
The project takes the following action
1) Sounds an ALARM to attract your home Security project
or public attention .
2) If the reset sw is not pressed within 30 seconds the projects takes further action,
3) It makes an emergency call to deliver an emergency message stored in speech IC.
4) It will make five attempts to call you before it checks the conditions again.



Atmel at89c51 Office-Home Security System
The project presented here is based on world’ s most powerful intel’ s mcs-51 family of microcontroller atmel at89c51. CIRCUIT EXPLANATION: This project is based on 8051 microcontroller.(IC2) IC3 and is used as buffer. IC4 is a one time programmable(otp) chip where messages are stored. This is 21 second speech ic where total of 12 messages can be recorded on eight different locations, but total duration should not be more than 21 seconds. Recorded messages can be played back by setting the trigger pin 10 & 11 to high, making these pin low will stop the message, Setting these pin high will repeatedly replay the same message. IC5 is an audio amplifire . Audio output from speech ic(IC4) pin no 7 cout is coupled to this ic on pin no 3 through VR2 volume control and C10. Amplified output from pin no 5 drives the speaker through capacitor C14. R14 and C13 corrects the tone. .C15 and C16 couples the audio message to telephone line. IC4 needs 3.3v operating voltage .R9 is a voltage dropping resistor, D7 is 3.3v zener diode and C7 is a filter capacitor. These components will always maintain the voltage to3.3v at pin 9,12 of IC4. capacitor C8 is a feed back capacitor.,C9 and R13 connected to pin no 7 of IC 4 are tone corrector.R12 along with the VR1 variable resistor performs the sampling rate adjustment. R10 and R11 connected to pin26 and pin 27 of the microcontroller are voltage dropping resistors. R15 and R16 connected to the base of transister Q1 and Q2 are voltage dropping resistors and drives transistors Q1 & Q2 when set to high logic by microcontroller. Q1 Drives the dial relay RL1and Q2 drives the off-hook relay.

RS-232 Reset for Microprocessor


RS-232 Reset for Microprocessor

Introduction
This circuit allows a remote microprocessor to be reset by a controlling host by sending a break signal over an RS-232 or RS-422 serial line. If the remote machine resets into a simple program loader program, it is possible for the host to halt and restart, or halt and reload/restart the remote machine’s program. This is an ideal way to develop software on older EPROM-based systems. Modern EEPROM/NVRAM systems use JTAG interfaces for similar results.
The remote processor runs its target code out of RAM, allowing the code to be updated easily. The circuit is usually used for developing code on a target processor, but it can also be used for permanent applications where the target program lives on a host system’s disk. This system was once used to load code into a microprocessor-based satellite receiving system in Hawaii from a host system in Colorado using an Internet-based remote serial communications program.
A program loader for the Z80 CPU is available below. The circuit has also been used with the Motorola 68HC11 EVB and the BUFFALO monitor program. See my Linux Cross Assemblers page for more info.

Theory
This circuit detects long duration zero level signals (breaks) on a NRZ (non return to zero) serial data line. Normal serial characters spend a short time in the zero state, and do not cause a reset. Break signals are a exception to this, they hold the line low for an extended period.
The 10K/1N4148 parts keep the 2.2uF capacitor charged up. Low input signals go through the 10K resistor and slowly pull the charge on the 2.2uF capacitor down. High input signals quickly recharge the capacitor through the 1N4148 diode. A break signal lasts long enough to discharge the 2.2uF capacitor to the point where the following gate changes state.
The 1N4148 on the right allows a manual break switch to be used on the target CPU, pressing such a switch does not short out the preceding 74HC14 gate.
This circuit could be built with just 2 schmidt trigger non inverting buffers, the 74HC14 was chosen because it is a common part. The parallel inverters are also optional, single inverters work fine.

Z80 Program Loader
Here is a Z80 assembly language program that functions as a bootstrap loader for use with the Microprocessor RS-232 Reset circuit. This code runs on an ancient SD systems SBC200 Z80 circuit board and can be made to work with other Z80 boards by changing the initialization and serial port functions.

Simple Analog to Digital Converter

Normally analogue-to-digital con-verter (ADC) needs interfacing through a microprocessor to convert analogue data into digital format. This requires hardware and necessary software, resulting in increased complexity and hence the total cost.
The circuit of A-to-D converter shown here is configured around ADC 0808, avoiding the use of a microprocessor. The ADC 0808 is an 8-bit A-to-D converter, having data lines D0-D7. It works on the principle of successive approximation. It has a total of eight analogue input channels, out of which any one can be selected using address lines A, B and C. Here, in this case, input channel IN0 is selected by grounding A, B and C address lines.
Usually the control signals EOC (end of conversion), SC (start conversion), ALE (address latch enable) and OE (output enable) are interfaced by means of a microprocessor. However, the circuit shown here is built to operate in its continuous mode without using any microprocessor. Therefore the input control signals ALE and OE, being active-high, are tied to Vcc (+5 volts). The input control signal SC, being active-low, initiates start of conversion at falling edge of the pulse, whereas the output signal EOC becomes high after completion of digitisation. This EOC output is coupled to SC input, where falling edge of EOC output acts as SC input to direct the ADC to start the conversion.
As the conversion starts, EOC signal goes high. At next clock pulse EOC output again goes low, and hence SC is enabled to start the next conversion. Thus, it provides continuous 8-bit digital output corresponding to instantaneous value of analogue input. The maximum level of analogue input voltage should be appropriately scaled down below positive reference (+5V) level.
The ADC 0808 IC requires clock signal of typically 550 kHz, which can be easily derived from an astable multivibrator constructed using 7404 inverter gates. In order to visualise the digital output, the row of eight LEDs (LED1 through LED8) have been used, wherein each LED is connected to respective data lines D0 through D7. Since ADC works in the continuous mode, it displays digital output as soon as analogue input is applied. The decimal equivalent digital output value D for a given analogue input voltage Vin can be calculated from the relationship

Circuit : Telephone operated remote control using PIC16F84A microcontroller



Circuit : Telephone operated remote control using PIC16F84A microcontroller

Telephone operated remote control using PIC16F84A microcontroller

This design controls up to 8 devices using a PIC microcontroller (PIC16F84A) connected to the phone line. The unique feature here is that unlike other telephone line based remote control, this device does not need the call to be answered at the remote end so the call will not be charged. This device depends on number of rings given on the telephone line to activate/deactivate devices.

Instructions for the telephone operated remote switch:

A) While constructing the main circuit, make sure you use 18pin sockets (base) for the PIC16F84A. Do not solder the IC directly to the board since you may have to remove it for programming. Before you use the PIC on the main circuit, you have to first program it.

B) To program the PIC16F84A microcontroller:

There are lots of programmers on the Internet available to program PIC microncontrollers. Given below are links to some free PIC programmer hardware/software:

  • http://www.covingtoninnovations.com/noppp/
  • http://www.picallw.com/
  • http://www.lpilsley.uklinux.net/software.htm

Note: Programm the chip with the hex file attached above and remember to set the fuse bits to use "EXTERNAL HS OSCILLATOR" mode!

C) Remove the PIC from the programmer socket and put it into the main circuit socket.

Set the DIP SWITCH as follows:

Switch3 Switch4 No. of initial rings to Switch ON(activate half of the board)

OFF OFF 5

ON OFF 4

OFF ON 3

ON ON 2

The number of initial rings to Switch OFF is one more than the number of rings to switch ON. For example, if you have set switch3 OFF & Switch4 ON then number of initial rings to activate half of the board to switch ON the relays is 3 and number of initial rings to activate half of the board to switch OFF the relays is 3+1 = 4

Switch1 Swtich2 Delay before making the second set of rings

OFF OFF 20sec

ON OFF 15sec

OFF ON 10sec

ON ON 5sec

This is the maximum delay the board can take after it is half activated. It will reset after this delay.

D) Now connect the circuit to the phone line and switch on its power supply.

E) You can test the board now. For example set the DIP switch to Switch1 ON, Switch2 OFF (15 sec delay) & switch3 ON, switch4 OFF (4 rings to activate half for switching ON). If you want to switch ON relay 1 (connected to RB0 of main circuit) then you have to do the following:

  1. Give 4 rings and put down the receiver
  2. Wait 5 seconds (this 5 seconds wait is required to prevent the board from detecting continous rings)
  3. then within 15 seconds give 1 ring (1 ring for relay1, 2 rings for relay2 and so on) and put down the receiver
  4. then within 5 sec the relay1 will switch ON

To switch off relay1:

  1. Give 5 rings and put down the receiver
  2. Wait 5 seconds (this 5 seconds wait is required to prevent the board from detecting continous rings)
  3. then within 15 seconds give 1 ring (1 ring for relay1, 2 rings for relay2 and so on) and put down the receiver
  4. then within 5 sec the relay1 will switch OFF

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls