1. Introduction :
Figure 1: Schematic diagram of car entry control |
2. Overview:
In the actual environment, we set up a ground sensor A in front of the barrier arm at the entrance of the parking lot. When a vehicle wants to enter the parking lot, it must pass through the ground sensor A set in front of the arm of the parking lot. The vehicle interferes with the ground sensor at the ground sensor A, and the ground sensor generates a signal. At this time, the intelligent function board based on the single-chip P89c58 as the core can quickly realize the acquisition of the signal generated by it. When the signal of ground sensor A is collected, it is known that there is currently a vehicle requesting to enter the parking lot, as shown in Figure 1. Then, it sends a command to the 320 X 240 LCD screen to drive the display of "Please read the card" to prompt the user, and at the same time opens the contactless induction card reader for the user to allow the user to read the card. When the user reads the card, the function board can also quickly collect the card number information sent by the contactless card reader, and forward the information to the upper PC for processing. The PC judges whether the card number is valid and returns the result to the function board. The function board can judge the information returned by the PC. When the card number is invalid, it sends a command to drive the LCD screen to display "This card is invalid or the payment has expired, and entry is not allowed" to prompt the user. Otherwise, when the function board receives valid card number information, it will issue a command to control the execution of the arm-raising action, allowing the current vehicle to move forward, and at the same time, the driven LCD screen will prompt "Entry is allowed, please enter". In order to complete the arm-closing action, the function board will collect the signal of the ground sensor B set behind the arm to determine whether the vehicle has successfully entered the parking lot. When the vehicle allowed to enter passes through the ground sensor B, the ground sensor B has the same working principle as the ground sensor A, generating a signal and transmitting it to the function board. When the function collects the signal sent by the ground sensor B, it confirms that the vehicle has successfully entered, and the function board issues a command to close the card reader and start the arm-closing action. This completes the management of vehicle entry.
In the management of vehicle exit in the parking lot, the function board uses the same working method and principle. The function board collects the card number information from the card reader and sends it to the upper PC. The PC returns the result of whether the card number is valid. If the card number is invalid, the function board drives the LCD display to display "This card is invalid or the payment has expired, and exit is not allowed" to prompt the user; when the card number is valid, the function board controls the arm action and drives the LCD display to display "Exit is allowed, have a safe trip".
3. Signal scheme:
Figure 2: Communication interface unit |
1. MCU->host computer data (user information)
byte |
ASCII |
Hexadecimal number |
explain |
First |
|
02H |
Data Header |
second |
P~_ ` ~o |
50H~5FH 60H~6FH |
Address code: MCU address code, determined by MCU hardware 50H~5FH: Entry address code (16 addresses in total) 60H~6FH: export address code (16 addresses in total) |
third |
H |
48H |
Instruction type: MCU->host computer data (user information) |
fourth |
0~9 |
3XH(X=1~10) |
Card number bytes 1~10 |
fifth |
|
00H~99H |
Year, represented by BCD code, such as: 03H represents 2003 |
sixth |
|
01h~12h |
Month, represented by BCD code, such as: 03H represents March |
seventh |
|
01h~31h |
Day, represented by BCD code, such as: 15H represents the 15th |
eighth |
|
00H~23H |
The BCD code indicates the time, such as: 16H means 16:00 p.m. |
ninth |
|
00H~59H |
Minutes, expressed in BCD code, such as: 04H means 4 minutes |
tenth |
|
00H~59H |
Seconds, expressed in BCD code, such as: 50H means 50 seconds |
eleventh |
|
00H~FFH |
Check code low byte; all previous codes (including STX>) Check code high byte; add and take the last two bytes |
twelfth |
|
00H~FFH |
|
thirteenth |
|
03H |
Data tail |
2. Data communication between MCU and host computer (status information)
byte |
ASCII |
Hexadecimal number |
explain |
First |
|
02H |
Data Header |
second |
P~_ ` ~o |
50H~5FH 60H~6FH |
Address code: MCU address code, determined by MCU hardware 50H~5FH: Entry address code (16 addresses in total) 60H~6FH: export address code (16 addresses in total) |
third |
I |
49H |
Instruction type: MCU->host computer data (status information) |
fourth |
H~W I P Q R S T U |
48H~57H |
Fault code: 48H means no fault or the received data is correct 49H indicates that the data received is incorrect and a resend is requested 50H means the boom cannot be raised 51H means the landing rod cannot land 52H means the first ground sensor may be damaged 53H means the second ground sensor may be damaged 54H indicates that the card reader may be damaged 55H means the card machine may be damaged |
fifth |
|
00H~FFH |
Check code low byte; all previous codes (including STX>) Check code high byte; add and take the last two bytes |
sixth |
|
00H~FFH |
|
seventh |
|
03H |
Data tail |
According to the above signal scheme, the car arrives at ground sensor A, which is the entrance, and the address is 52H (R). The microcontroller waits to receive the card number. The card number read is 30H, 31H, 32H, 33H, 34H, 35H, 36H, 37H, 38H, 39H (0123456789). After receiving the card number, the current time is recorded: March 25, 2003, 13:12:30 p.m. The microcontroller sends data information (H):
02H,52H,48H,30H,31H,32H,33H,34H,35H,36H,37H,38H,39H,03H,03H,25H,13H,
12H, 30H, 03H, 29H, 03H After the host computer receives the data, it sends back as follows:
Allowed to send: 02H,52H,50H,03H,03H,25H,13H,12H,30H,01H,24H,03H
Not allowed to send: 02H,52H,51H,03H,03H,25H,13H,12H,30H,01H,25H,03H
Request the microcontroller to send data again: 02H, 52H, 52H, 03H, 03H, 25H, 13H, 12H, 30H, 01H, 26H, 03H
The host computer sets the MCU time: Assuming the current time is 2003/5/13, 9:42:20 in the morning, the host computer sends data: 02H, 52H, 54H, 03H, 05H, 13H, 09H, 42H, 20H, 01H, 2EH, 03H. The MCU receives the data correctly and returns the status: 02H, 52H, 49H, 48H, 00H, E5H, 03H; the MCU receives the data incorrectly and requests retransmission: 02H, 52H, 49H, 49H, 00H, E6H, 03H.
The host computer queries the status of the microcontroller: Assume that the current time is 9:42:20 am on May 13, 2003. The host computer sends data: 02H, 52H, 53H, 03H, 05H, 13H, 09H, 42H, 20H, 01H, 2DH, 03H. The microcontroller returns the status: 02H, 52H, 49H, 48H, 00H, E5H, 03H (48H means no fault, and the others are similar). The host computer queries the card number and time recorded by the microcontroller for the last time: Assume that the current time is: 2003/5/13, 9:42:20 in the morning, the time when the microcontroller last recorded and processed the card number is: 2003/5/12, 16:30:59 in the afternoon, the host computer sends data: 02H, 52H, 52H, 03H, 05H, 13H, 09H, 42H, 20H, 01H, 2CH, 03H; the microcontroller returns: 02H, 52H, 48H, 30H, 31H, 32H, 33H, 34H, 35H, 36H, 37H, 38H, 39H, 03H, 05H, 13H, 09H,
42H,20H,03H,2FH,03H.
IV. Conclusion
The hardware of the parking management system currently used is complex, large in size, and expensive. It is difficult to check and maintain when a fault occurs. The parking management function board based on the P89c58 core has a simple structure. The innovation of the author of this article is to fully develop the functions of P89c58 in the process of hardware and software design, achieving the highest cost performance; the software design is more thoughtful, making the communication smooth, the functions complete, the management humanized, and the performance stable and the monitoring data accurate. The actual test results are very good.
Previous article:Modeling and design of pressure regulation system for tethered balloon
Next article:Design and implementation of authority control for regional space resource integrated management system
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Using ir2110 driver to make a buck circuit
- Methods for solving faults in FPGA design and development based on EDA simulation technology.pdf
- Tuya Sandwich Wi-Fi & BLE SoC NANO Main Control Board WBRU+ Simple Development (Zero Code Solution)
- Belling Products MEQ6310 Low Dropout Low Noise Voltage Regulator
- Desktop assistant based on GD32F350 - Part 1
- Super brain-burning question, about electric fishing? !
- Op amp applications - What are the main applications of op amp integration and differentiation circuits?
- Teach you how to play with various motors
- 【Beetle ESP32-C3】VI. OLED, AHT10 and TCP (Arduino)
- Using Kangaroo Core as Remote Control Car Wireless Chip NRF24L01