Thursday, 6 December 2012

FYP 2..WEEK 7:PUSH BUTTON AND RELAY

Objective:to know about push button and relay circuit


Push Button as input for PIC Microcontroller





One I/O pin is needed for one push button as input of PIC microcontroller. The connection of the push button to the I/O pin is shown in Figure 48. The I/O pin should be connect to 5V using a resistor 10K. Other than that, the value range for the resistor can use between 1K until 10K. This configuration will result an active-low input. When the button is being pressed, reading of I/O pin will be in logic 0, while when the button is not pressed, reading of that I/O pin will be logic 1


Relay Circuit




A relay is a simple electromechanical switch made up of an electromagnet and a set of contacts. This is relay Single Pole Single Throw (SPST). Current flow through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be ON or OFF so relay have two switch positions and they are double throw (changeover) switches. Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical. The coil of a relay passes a relatively large current, typically 22.2mA for a 9V relay. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. Relays are usually Single Pole Double Throw (SPDT) or Double Pole Double Throw (DPDT) but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. Besides, the transistor used to amplify the current for the relay is an NPN transistor, C547

No comments: