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
Previous article:Design of CAN node using LPC2292 microcontroller based on EasyJTAG emulator
Next article:Scatter loading in ARM startup
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Download to get a gift! Lots of exquisite gifts are waiting for you!
- Carrier synchronization
- Popular Science Sharing - Detailed Explanation of the Working Principles of Starlink Satellites (Episode 3)
- [Recruitment] Shenzhen foreign companies are urgently recruiting RF antenna engineers, looking forward to your joining
- No more confusion! A guide to choosing a cordless vacuum cleaner
- How to Go from Beginner to Expert in FPGA
- "51 MCU Easy to Get Started Based on STC15W4K Series" 429 pages HD electronic version
- [Raspberry Pi 3B+ Review] GCC Compiles HelloWorld & Lighting Program
- How to improve the hardware delivery cycle
- 【Evaluation of EVAL-M3-TS6-665PN development board】——by landeng1986