1 Technical requirements
According to relevant information, the light spectrum uses red, green and blue lights to stimulate the eyes and acupuncture points around the eyes in different time periods. The general requirements are: red light uses weak (bright 1 s), medium (bright 1 s), strong (bright 1 s), stop 3 s, and cycle for 3 rains; red (bright 1 s, off 1 s), red (bright 1 s, off 1 s), blue (bright 1 s, off 1 s) cycle for 1.5 rain; red (bright 0.3 s), green (bright 0.3 s), blue (bright 0.3 s) cycle for 1.5 min.
2 Controller ASM flow chart
According to the above technical requirements, the controller ASM flow chart can be drawn as shown in Figure 1. The system is in TO (0000) state, receives the MF command, s1=1, control signal CLR=1, the clock signal is cleared, starts timing, and enters T1.
Cycle 1: TI (0001) state, the red light is weak; when time t=1 s, state signal S2=1, control signal CLR1=1, 1 s is cleared, enter T2 (0010) state, the red light is medium; when time t=1 s, enter T3 (0011) state, the red light is strong; when time t=1 s, enter T4 (0100) state, the red light is off; when time t=3 s, state signal S3=1, control signal CLR2=1, 3 s is cleared; at this time, if time t<3 min, enter T1 (0001) state cycle; if t≥3 min, state signal S4-1, enter T5 state, control signal CLR=1, clock signal is cleared.
Cycle 2: T5 (0101) state, the red light is bright; when time t=1 S, state signal S2-1, control signal CLR1=1, 1 S is cleared, enter T6 (0110) state, the red light is off; when time t=1 S, enter T7 (0111) state, the red light is bright; when time t=1 S, enter T8 (1000) state, the red light is off; when time t=l S, enter T9 (1001) state, the blue light is bright; when time t=1 S, enter T10 (1010) state, the blue light is off for 1 S; at this time, if time t<1.5 min, enter T5 state cycle; if t≥1.5 min, state signal S5=1, enter T11 state, control signal CLR=1, clock signal is cleared.
Cycle 3: T11 (1011) state, red light on, when time t = 0.3 S, state signal S6 = 1, control signal CLR3 = 1, 0.3 S cleared, enter T12 (1100) state, green light on; when time t = 0.3 S, enter T13 (1101) state, blue light on 0.3 S; at this time, if time t < 1.5 min, enter . T11 state cycle; if t ≥ 1.5 rain, state signal s5 = 1, enter TO state.
The controller design can use the ASM method, according to the ASM diagram to draw the state transition table, write the drive equation and output equation, and then use the trigger, data selector and decoder for design. The MDS method can also be used, because there are more states and more input variables, it is easier to use the MDS method.
3 Controller MDS state diagram
Draw the MDS state diagram according to the ASM diagram, as shown in Figure 2.
4 Hardware Implementation
4.1 Component Selection
According to the MDS diagram, the four-bit binary counter 74161 is selected as the basic component. The logic diagram of 74161 is shown in Figure 3, and the function table is shown in Figure 4.
74161 has three operations: counting, holding and preset. In order to make the combination part of the circuit as simple as possible, the counting and holding functions are given priority. According to the MDS diagram and the 74161 function table, the 74161 operation table can be drawn as shown in Figure 5.
4.2 Find the excitation function of the function control terminal and the setting terminal
. The function control terminals are: Cr, LD, P, T; the setting terminals are: D, C, B, A. To obtain the excitation function of each channel, draw the Karnaugh map of each channel excitation function as shown in Figure 6.
Cr is the clear terminal. Because there is no clear operation, Cr=1 in each cell of the Karnaugh map. T and P are the counting and holding function control terminals. When P=1 and T=1, count. When one of P and T is zero, hold. Therefore, T=1 in each cell of the Karnaugh map. P fills in the corresponding conditions in each cell of the Karnaugh map; for example, when P is in the TO state, it counts when S1=1, so fill in S1 in the TO cell, and fill in the corresponding conditions in the other cells. LD is the counting and setting function control terminal. When LD is zero, it sets the number, and when it is 1, it counts. The number is set only in the T4, T10, and T13 states, and the other states are all counting. In order to simplify the circuit, LD is used to represent it in the Karnaugh map, so 0 is filled in other tables, and the corresponding conditions are filled in the T4, T10, and T13 cells respectively.
Set the number: At T4, when S3=1, S4=0, transfer to T1, set the number to (0001), so fill in 0, O, O, 1 in D, C, B, A respectively; at T10, when s2=1, S5=0, transfer to T5, set the number to (0101); at T13, when S6=1, S5=1, transfer to TO(0000), when S6=1, S5=0, transfer to T11, (1011), so fill in D, B, A respectively, and fill in C with S5. According to the Karnaugh map, each activation function can be written:
In order to simplify the circuit, the circuits of CLR being cleared at S4=3 min and S5=1.5 min and CLR1 being cleared at S2=1 s are drawn in the clock circuit.
5 Controller logic diagram
Based on the MDS diagram, excitation function and output function, the controller logic diagram can be drawn as shown in Figure 7; the controller simulation waveform diagram is shown in Figure 8.
Previous article:BAE develops field-oriented control research on three-phase brushless permanent magnet motor
Next article:Implementation of thermal system optimization control and remote monitoring based on Advantech WebAccess
- 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!
- 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
- Which characters cannot appear in double quotes in C language? Can anyone tell me?
- The control board mPython 0.3.6 was released yesterday
- Please help me look at the relationship between IL and Vo of this current detection circuit. I have been looking at it for a long time but still can't understand the relationship.
- [MCU] W806 Lianshengde 9.9 yuan development board experience 2 --- littlevgl8.0 transplantation
- XuetangX Hardware Blazar a-Board Open Source Hardware Board Review
- AUTOSAR software development learning complete set of materials
- Murata Tmall flagship store officially opened: 20% off on all items in the first month of opening!
- Today's live broadcast: NXP's embedded human-machine interface solutions explained
- Practical sharing: about Qinheng microcontroller CH55X-example source code sharing
- Disassembly of ANENG AN550A out-of-print infrared thermometer