Based on Songle RD-5VDC-SL-C relay and circuit diagram

Publisher:沭阳小黄同志Latest update time:2023-03-14 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Experimental purpose

Master the programming method of LPC2378 chip

Master LCD driver and display methods


2. Experimental materials

A computer with serial communication

ADS1.2 development environment

A J-Link-ARM emulator

One LPC2378 node board

One relay sensor module


3. Experimental principles

The DC motor experimental environment consists of a PC (installed with Windows XP operating system, ADS1.2 integrated development environment and J-Link-ARM-V410i emulator), J-Link-ARM emulator, NXP LPC2378 experimental node board, DC motor experiment The module and LCD display experimental module are composed of modules, as shown in Figure 3.4.1.

Figure 3.4.1 Sensor experimental environment

(1) Purpose of relay

Microcontrollers, embedded systems, etc. are weak current devices. Under normal circumstances, most of them work at 5V or even lower, and the driving current is below the mA level. But it is obviously not possible to use it in some high-power situations, such as controlling motors. Therefore, there must be a link to connect it, and this link is the so-called "power drive". Relay drive is a typical and simple power drive link. Here, relay driving has two meanings: one is to drive the relay, because the relay itself is a power device for the microcontroller; the other is the relay to drive other loads, for example, the relay can drive an intermediate relay or directly drive a contact device. Therefore, the relay driver is the interface between the microcontroller and other high-power loads.

(2) Circuit composition and component functions of relays

The relay used in this test is Songle relay. Electromagnetic relays are generally composed of iron core, coil, armature, contact reed, etc. As long as a certain voltage is applied to both ends of the coil, a certain current will flow through the coil, thereby producing an electromagnetic effect. Under the action of electromagnetic attraction, the armature will overcome the pulling force of the return spring and be attracted to the iron core, thereby driving the armature to The moving contact and the static contact (normally open contact) are closed. When the coil is powered off, the electromagnetic attraction also disappears, and the armature will return to its original position under the reaction force of the spring, releasing the moving contact from the original static contact (normally closed contact). In this way, it is attracted and released to achieve the purpose of conducting and cutting off in the circuit. For the "normally open and normally closed" contacts of the relay, they can be distinguished as follows: the static contact in the disconnected state when the relay coil is not energized is called the "normally open contact"; the static contact in the connected state is called It is a "normally closed contact". Relays generally have two circuits, a low-voltage control circuit and a high-voltage working circuit.


The circuit diagram of Songle RD-5VDC-SL-C relay is shown in Figure 3.4.2.

Figure 3.4.2 Songle SRD-5VDC-SL-C relay circuit diagram

As shown in Figure 3.4.2 below, transistor Q2 is very important. The triode is a very important component in electronic circuits. The triode has two functions: one is the amplification function; the other is the switching function (strictly speaking, the switching function is the limit of the amplification function). To make it easier to understand, first think of the triode as a faucet. The VCC above is the pool. The relay is a water turbine and the GND below is any point lower than the pool. The triode is the faucet, and its handle is the pin with the resistor.


When a certain output pin of J-LINK-ARM needs to control the relay circuit, it is a "hand". When this pin of the microcontroller outputs a low level, it is like a "hand" opening the triode "faucet", and the water Just flow from top to bottom. The relay "water turbine" began to rotate. On the contrary, if the output is high, the "hand" will start to turn off the "faucet", and the relay "turbine" will stop because there is no water flowing down.


This is the switching function of the triode. A simple understanding and memory is: the triode is a switching device, but it is not controlled by hand, but by voltage (current). Therefore, triodes are sometimes also called electronic switches (to distinguish them from mechanical switches).


(3) The internal composition of the relay and the circuit connection of each pin

Figure 3.4.3 Relay internal circuit diagram

Figure 3.4.3 Relay pin logic diagram

A relay is a switch controlled by a coil. The switch has 2-3 terminals. As shown in Figure 3.4.3 of the relay, when there is no 5V between AC and the coil is out of power, at this time, B and E are connected, but B and D are disconnected.

When there is 5V between AC, the coil is powered, the switch inside operates, B and E are disconnected, and B and D are connected.

The relay voltage and current cannot exceed the values ​​determined by the relay model, which is generally AC 220V, and the current does not exceed 3A. DC 125V, current does not exceed 5A.

(4) Structural schematic diagram of small power relay

Figure 3.4.4 Structural diagram of small power relay

(5) Example of relay wiring

Figure 3.4.5 Example of connecting a relay to a light bulb

4. Experimental content

1. Experimental equipment wiring

The physical diagram of the relay module used in this experiment is shown in Figure 3.2.6.


Figure 3.4.4 Relay module

Install the relay module on the development board (install with power off), then use one end of the AK100 or JLINK emulator to connect to the computer using the USB interface. The 20Pin JTAG pin on one end is connected to J2 of the NXP LPC2378 node board, and connects to the NXP LPC2378 Power on the node board, as shown in Figure 3.4.5.

Install the relay sensor module on the development board (installation with power off), then use one end of the J-LINK emulator to connect to the computer through the USB interface, the 20Pin JTAG pin on one end is connected to J2 of the NXP LPC2378 node board, and give the NXP The LPC2378 node board is powered on, as shown in the figure below:

Figure 3.4.5 Relay test interface circuit


Reference address:Based on Songle RD-5VDC-SL-C relay and circuit diagram

Previous article:Design of CAN node using LPC2292 microcontroller based on EasyJTAG emulator
Next article:Scatter loading in ARM startup

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号