Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Appendix B: Examples
the change, it means that a switch/push-button has changed its position. The advantages of such solution are obvious: it is
free of charge, effects of noises are eliminated and it can be applied to the poorer quality contacts as well.
RELAY
A relay is an electrical switch that opens and closes under the
control of another electrical circuit. It is therefore connected to
output pins of the microcontroller and used to turn on/off high-
power devices such as motors, transformers, heaters, bulbs, etc.
These devices are almost always placed away from the boards
sensitive components. There are various types of relays, but all
of them operate in the same way. When a current flows through
the coil, the relay is operated by an electromagnet to open or
close one or many sets of contacts. Similar to optocouplers,
there is no galvanic connection (electrical contact) between
input and output circuits. Relays usually demand both higher
voltage and current to start operation but there are also
miniature ones that can be activated by a low current directly
obtained from a microcontroller pin.
This figure shows the most
commonly used solution.
In order to prevent the
appearance of high voltage self-
induction caused by a sudden
stop of current flow through
the coil, an inverted polarized
diode is connected in parallel
to the coil. The purpose of this
diode is to "cut off" the voltage
peak.
LED DIODES
You probably know all you need to know about LED diodes, but we should also think of the younger generations...How to
destroy a LED?! Well...Very simple.
http://www.mikroe.com/en/books/picmcubook/appb/ (6 of 54)5/3/2009 11:36:02 AM