Design of multi-channel immersion time recording circuit based on C8051F040

Abstract For the self-sinking system of a certain type of aircraft, it is necessary to grasp the length of corrosion of an alloy material in seawater due to different temperature conditions. Modular hardware design, using the water immersion sensor as the detection unit, clock chip DS12887 as the timing module; C8051F040 as the microprocessor and serial M25P80 for the storage module design immersion time recording system. External data communication uses the CAN bus. It has been proved by practice that the DS12887 clock can run normally after power failure, but it takes a long time and requires a new set time for on-time recording.
Key words water immersion sensor; DS12887; serial memory; CAN

In a self-sinking system of an underwater vehicle, an alloy material can work normally in seawater for a certain period of time, but it will be corroded by seawater after normal time; thus achieving the self-sinking function of the aircraft. The circuit was designed to test a plurality of sets of time information of the aluminum-chromium alloy material at different temperatures.

1 system hardware structure based on C8051F040 multi-channel immersion time recording circuit hardware part consists of six main modules: immersion sensor, signal level conversion circuit, reach the clock module, serial memory M25P80 module, single-chip C8051F040 module and CAN communication module. The system hardware block diagram is shown in Figure 1.

This article refers to the address: http://

a.JPG


1.1 Single-chip microcomputer 08051F040
Designed by Silicon Labs of the United States, C8051F040 has greatly modified the original 51 MCU core. It has implemented one instruction from the original 12 clocks, and improved to execute one single-cycle instruction for one clock. The number of clock cycles executed by most instructions and the number of Bytes of instructions. The same, the operating speed of this single-chip microcomputer is greatly improved. The C8051F040 has 64 digital I/O pins and integrates a CAN2.0B controller on-chip. The main features are as follows: (1) 8051-compatible CIP-51 core (up to 25 MI·s-1) with high-speed, pipelined structure. (2) Controller Area Network (CAN 2.0B) controller with 32 message objects, each message object has its own identity. (3) Hardware implemented SPI, SMBus/I2C and two UART serial interfaces. (4) Five general purpose 16-bit timers. (5) Programmable counter/timer array with 6 capture/compare modules.
1.2 Immersion sensor and level conversion circuit The water immersion sensor adopts the self-developed water immersion module. The interface of the module is simple. Only 5 wires are: water immersion sensor test point A, immersion sensor test point B, power supply 24V, power supply Ground, sense output OUT24V. When the water immersion sensor test point A and the immersion sensor test point B are in contact or there is water between them, A and B are turned on, so that the resistance between A and B changes from infinity to several Ω or even zero. The comparison circuit outputs a supply voltage of 24 V, while the C8051F040I/O port of the microcontroller can withstand only 5 V. The level conversion circuit uses the optical isolation chip TLP28 1-4 circuit diagram as shown in Figure 2.

b.JPG


1.3 clock chip DS12887
DS12887 is a clock chip introduced by Dallas Semiconductor of the United States. It is made of CMOS technology and integrates the crystal oscillator required by the clock chip and external lithium battery related circuits inside the chip. The clock circuit designed with the DS12887 chip does not require peripheral circuits and has a good microcomputer interface. The DS12887 chip has the advantages of low power consumption, simple peripheral interface, high precision, stable and reliable operation, and can be widely used in various real-time clock situations requiring high precision. Its main functions are as follows: (1) It contains a lithium battery, and it will not lose data after running for more than 10 years after power off. (2) Countdown, minute, hour, day, week, day, month, year, and have leap year compensation function. (3) Binary digital or BCD code indicates time, calendar and fixed. (4) 12-hour or 24-hour clock, 12-hour clock mode with PWM and AM guidance, with daylight saving time function. (5) Motorola 5 and Inatael bus timing selection.
The DS12887 has four status control registers that are accessible at any time, even if the update cycle is no exception. The specific circuit connection diagram is shown in Figure 3.

c.JPG


1.4 Serial Memory M25P80
Memory M25P80 has a storage capacity of 8 MByte, which communicates using the SPI data bus. The memory has 16 sectors, each sector has 256 pages and 256 Bytes per page. Operating voltage range 2.7 ~ 3.6 V, operating temperature range -40 ~ +85 ° C, maximum clock 75 MHz. It can perform 100,000 erasing and writing, and the data is stored for 20 years. It is a general-purpose memory. The M25P80 supports a total of 12 operation instructions, and the instruction format is as shown in Figure 4.

d.JPG


Among them, the 8-bit command is required, and the presence and length of the address, dummy, and data byte will vary depending on the instruction. Details are listed in Table 1. All command codes, addresses, and serial input/output data are high.

e.JPG


Since the operating voltage of the single chip C8051F040 is 3.3 V, the operating voltage range of the M25P80 is 2.7 to 3.6 V, so the two can be directly connected. The specific circuit diagram is shown in Figure 5.

f.JPG



2 Software design Because the time of the entire immersion corrosion is uncertain, a time to start recording is required. The start recording time is based on the moment when the system is powered on. The software design of the system mainly includes the detection program of the water immersion sensor data, the DS12887 clock data storage program and the CAN communication program.
2.1 Detection program of water immersion sensor data The design of the immersion sensor data is designed to use the timer detection method. When the immersion output signal is continuously detected for 3 s, it is considered that the water is immersed at this moment. The specific design block diagram is shown in Figure 6.

g.JPG


After the detection program of the water immersion sensor data is initialized, the recording start time is recorded; in the 100 ms timing interrupt, the multiplexed water immersion output signal is detected. For different water immersion sensors, the corresponding number is recorded and the time of the moment is recorded.
2.2 DS12887 clock data storage program time reading program design is to initialize the internal four internal registers A, B, C, D of the DS12887 chip and read other register data.
The time data storage program is designed to store time data in the M25P80 via the SPI bus. The SPI bus mode is available in the C8051F040.
2.3 CAN communication program design Because the Bosch CAN controller is integrated in the C8051F040 device, CAN communication can be realized only by initializing and configuring the controller. The operation directly or indirectly accesses the CAN control register in the CAN controller via a special function register.

3 Conclusion The time recording system designed to apply the time record of other occasions. The design has the characteristics of simple structure, complete functions and reliable system operation. It should be noted that the DS12887 clock chip needs to be set after starting up, so that it can be consistent with the standard time. Practice has proved that although the DS12887 clock can run normally after power failure, but the time is long (about 3 months), you need to reset the time to record on time.

The flame control is accurate and belongs to preheating small convection premixed combustion. Specially designed for western food,with automatic flameout protection of high safety

European Gas Hob

Steam Oven,Table Ovens,Electric Steam Oven,Home Steam Oven

Xunda Science & Technology Group Co.ltd , https://www.xundatec.com