Electromagnetic relay is a commonly used component in automatic control. It uses electromagnetic principles to realize an automatic switch that connects or disconnects one or a group of contacts. It is widely used in electronic equipment, instruments and automation equipment. However, in various automatic control equipment, there is a problem of interconnection between a low-voltage automatic control circuit and a high-voltage electrical circuit: on the one hand, the control signal of the low-voltage electronic circuit can control the actuator of the high-voltage electrical circuit; on the other hand, Provide good electrical isolation for electronic circuits and electrical circuits to protect the safety of electronic circuits and personnel. To this end, using PIC16F87X single-chip microcomputer control electromagnetic relay to try to complete this bridge role.
1 Working principle of electromagnetic relay
An electromagnetic relay is a relay that generates a predetermined response from the relative motion of mechanical components under the action of current in the input circuit. Electromagnetic relays are generally composed of control coils, iron cores, armatures, contact reeds, etc. The control coils and contact groups are insulated from each other, which provides good electrical isolation for the control circuit. It mainly uses the principle of electromagnetic induction to work.When the rated voltage of the coil is added to both ends of the coil of the relay, a certain current will flow through the coil, thereby generating an electromagnetic effect, and the armature will be under the action of electromagnetic force attraction. Overcome the pulling force of the return spring and attract the iron core, so that the moving contact of the armature and the static contact (normally open contact) are attracted; when the coil is powered off, the electromagnetic suction force also disappears, and the armature will be in The reaction force returns to the original position, so that the moving contact is attracted to the original static contact (normally closed contact). The pull-in and release of the relay play the role of switching on and off in the circuit. Choose the electromagnetic relay should pay attention to the following points:
(1) Selection of the rated working voltage of the relay. When using a relay, you should first understand the working power supply voltage in the circuit where the relay is located.The working voltage of the relay should be equal to this voltage, or the circuit power supply voltage is 80% of the working voltage of the relay. The voltage exceeds the rated working voltage of the relay, otherwise the relay coil is easily burned.
(2) Selection of relay contact load. The number and form of contact load should be determined according to the characteristics of the circuit controlled by the relay, and then the size of the contact capacity should be selected according to the type of current, voltage and current in the contact control circuit. The size of the contact capacity reflects the voltage applied to the contact and the ability to pass the contact current. The load of the general contact should not exceed the capacity of the contact.
(3) Selection of relay coil power supply. Under normal circumstances, the circuit design uses DC relays, and the types of relays can also be considered according to the characteristics of the control circuit, as well as the power consumed by the relays.
(4) Selection of relay operation time. The action time and release time of the relay should be selected according to the actual circuit's time requirement for the action of the controlled object. It is also possible to add electronic components to the relay circuit to accelerate or delay the action and release time of the relay to meet different requirements.
(5) Working environment conditions. When choosing a relay, the ambient temperature, working life, and shock and vibration should also be considered.
2 PIC16F87X control circuit design
2.1 Features of PIC16F87X
The PIC16F87X series of 8-bit microcontrollers introduced by Microchip is a high-performance embedded single-chip microcomputer that uses a reduced instruction set (RISC) structure and Flash storage technology.It runs fast, has rich expansion functions, powerful functions, and a clear logical structure. Power-on, power-off reset protection and watchdog functions.
2.2 Principle of relay control circuit
Based on many characteristics of PIC16F87X, the hardware circuit of PIC16F87X control relay is designed (see Figure 1).
Figure 1 Schematic diagram of the PIC16F87X control relay circuitWhen the RD0 pin of the single-chip microcomputer outputs a low level, the optocoupler U1 is cut off, there is no potential difference between the two ends of the relay coil, the relay armature is released, and the normally open contact of the relay is released, which is equivalent to a switch off; when the single-chip microcomputer When the RD0 pin outputs a high level, the optocoupler U1 is saturated and turned on, and 24V power is applied to both ends of the relay coil. The relay pulls in and its normally open contact closes, which is equivalent to a switch close.
At the moment when the optocoupler is cut off, the current in the coil cannot mutate to zero, and a higher voltage induced electromotive force will be generated across the relay coil.A diode D1 should be placed on both ends of the coil to release the induced electromotive force generated by the coil through D1. Protect the triode from breakdown, and eliminate the interference of induced electromotive force to other circuits.
2.3 PIC16F87X control software design
The PIC16F87X control software is developed in C language under the MPLABIDE environment and compiled using the PICC compiler developed by Hitech. The program flow is shown in Figure 2.
The source program of the relay control software is as follows:
After the source program is compiled, it is programmed into the PIC16F87X through ICD2 programming. The control circuit is powered on and the relay is turned on and off repeatedly within the specified time. You can hear the relay ringing continuously, and observe the RD0 output with an oscilloscope. The signal is shown in Figure 3.
3 Conclusion
The electromagnetic relay based on I6X single-chip microcomputer control uses a photocoupler to drive and isolate the relay; the diode freewheel is used to prevent the high back pressure that occurs when the current in the relay coil is cut off, and the device that drives the relay is protected. The circuit is simple in design, reliable in operation, and has certain application value.
Welcome to reprint, this article comes from the electronic enthusiast network (http: //)Which size you prefer when looking for an android tablet for students take online learning? 10 inch android tablet, 8 Inch Tablet , 7 Inch Tablet, or others? Frankly speaking, 8 inch android tablet is the most competitive student tablet, no matter size, lasting time, screen size, cost, etc. Therefore, 8 inch android tablet price is the device balancing quality and cost at top. Of course, 5g android tablet also available as well. As a professional manufacturer, more designs are under-developing, you can also share the design, parameters needed, then our team customs for you.
The another target clients is the reselling or importing wholesales. So if you are doing android tablet deals, this store also brings surprise when take a deep checking, not only different size education tablet, but also windows tablet, or tablet 2 In 1 Laptop with android os or windows OS.
Except tablets, you can also see 14.1 inch celeron Education Laptop, 15.6 inch celeron business laptop, 15 inch Gaming Laptop with intel core i3, i5 or i7, 16.1 inch i7 16gb ram 4gb graphics laptop, etc.
Android Tablet,10.1 Android Tablet,Android Tablet Price,5g Android Tablet,Android Tablet Deals
Henan Shuyi Electronics Co., Ltd. , https://www.shuyilaptop.com