Design Tasks
Design and make a sailboard control system, which can adjust the wind force and change the sailboard turning angle θ by controlling the fan speed, as shown in Figure 1. The sailboard form and specific manufacturing dimensions are shown in Figure 2.
Figure 1 Schematic diagram of windsurfing control system
Figure 2: Dimensions of sailboard production
According to the requirements of the topic, the design task is to achieve that when the distance between the fan and the sailboard changes within a certain range, the sailboard is automatically adjusted to reach the preset angle set by the keyboard (hereinafter referred to as: preset parameters) within the specified time, and the relevant data in the control process is processed and displayed in real time.
Design idea: With AVR single-chip microcomputer as the core, closed-loop control is adopted. The angle sensor detects the actual rotation angle of the windsurfing board. The single-chip microcomputer collects the data at a fixed time and compares it with the preset parameters of the windsurfing board to generate a PWM signal for regulating the fan motor. The LCD screen is used to display the preset parameters, the rotation angle of the windsurfing board, the PWM signal used for adjustment, and the time when the regulation process is completed.
System hardware design and implementation
Hardware Overview
The system consists of the following basic modules: power module, single chip control module, motor drive module, display and sound and light alarm module, keyboard module and angle detection module. The whole system block diagram is shown in Figure 3.
Figure 3 System block diagram
(1) Control module: AVR microcontroller control;
(2) Angle detection module: using ADXL345 angle sensor;
(3) Fan type: Axial flow hair dryer fan;
(4) Motor drive mode: using L298 motor drive chip;
(5) Display module: LCD1602 liquid crystal module is used for display;
(6) Power module: uses LM2576 switching step-down voltage regulator chip.
Angle detection circuit
The angle sensor uses the three-axis accelerometer ADXL345. Its output data is in 16-bit binary complement format and can be accessed through SPI (3-wire or 4-wire) or I2C digital interface. The data of ADXL345 is sampled 50 times cumulatively and the average value is taken as the result. This method successfully solves the problem of unstable sail swinging. The microcontroller calculates the value and preset parameters based on the value, and finally generates a PWM signal to adjust the speed of the fan motor.
ADXL345 communicates with the microcontroller in I2C mode, and the circuit is shown in Figure 4. The angle detection circuit consists of IC1, IC3, R15, and R16.
Figure 4 Angle detection circuit
Drive circuit
The motor driver module L298 contains a 4-channel logic drive circuit. It is a dedicated driver for two-phase and four-phase motors. It contains two H-bridge high-voltage and high-current dual full-bridge drivers, receives standard TTL logic level signals, and can drive dual motors. The motor drive wiring circuit is shown in Figure 5.
Figure 5 Motor drive circuit
In the circuit, the fan motor is connected to the OUT1 and OUT2 output ports of L298. The two input pins for controlling the forward and reverse rotation of the motor, pin 7 is connected to the power supply through resistor R4, and pin 9 is directly grounded. The PWM signal for controlling the speed of the fan motor is output by the PD5 pin of the microcontroller and connected to the enable control terminal pin 8 through the isolation optocoupler IC5. The on-off time of the L298 output is controlled by the change of PWM, which enables the microcontroller to adjust the speed of the fan motor and ultimately controls the strength of the wind that blows the sailboard to rotate. D1~D4 in the circuit act as freewheeling diodes.
Sound and light alarm and button circuit
An audible and visual alarm circuit is designed in the system, as shown in Figure 6. When the sailboard rotates to the preset parameters, the single-chip microcomputer controls its operation and the alarm lasts for 5 seconds. It consists of resistors R5, R18, light-emitting diode D5, transistor Q1 and speaker LS1. When the PA5 pin of the single-chip microcomputer outputs a low-level signal, the diode emits light and the buzzer sounds, realizing the audible and visual alarm.
Figure 6 Sound and light alarm, keyboard circuit
The key functions in the system are to control the movement of the sail motor and set the angle parameter value of the sailboard. The functions of each key are as follows:
S1: Start button, after pressing, the motor starts;
S2: Stop button, after jogging, the motor stops;
S3: Confirmation key, first operation, allows setting preset parameters, second operation, exit, and store parameters (preset parameters are stored in the EEPROM of the microcontroller);
S4: Add 1 key, jog once, the value of the preset parameter's unit digit increases by 1;
S5: Add 1 key, press once, and the tens digit of the preset parameter will increase by 1.
power supply
The efficiency of the LM2576 switching regulator is much higher than that of the three-terminal linear regulator, and it has excellent linearity and load adjustment capabilities. It contains a frequency compensator and a fixed frequency oscillator, which can reduce the number of external components to a minimum and is easy to use. The power supply circuit is shown in Figure 7.
Figure 7 Power supply circuit [page]
Design Tasks
Design and make a sailboard control system, which can adjust the wind force and change the sailboard turning angle θ by controlling the fan speed, as shown in Figure 1. The sailboard form and specific manufacturing dimensions are shown in Figure 2.
Figure 1 Schematic diagram of windsurfing control system
Figure 2: Dimensions of sailboard production
According to the requirements of the topic, the design task is to achieve that when the distance between the fan and the sailboard changes within a certain range, the sailboard is automatically adjusted to reach the preset angle set by the keyboard (hereinafter referred to as: preset parameters) within the specified time, and the relevant data in the control process is processed and displayed in real time.
Design idea: With AVR single-chip microcomputer as the core, closed-loop control is adopted. The angle sensor detects the actual rotation angle of the windsurfing board. The single-chip microcomputer collects the data at a fixed time and compares it with the preset parameters of the windsurfing board to generate a PWM signal for regulating the fan motor. The LCD screen is used to display the preset parameters, the rotation angle of the windsurfing board, the PWM signal used for adjustment, and the time when the regulation process is completed.
System hardware design and implementation
Hardware Overview
The system consists of the following basic modules: power module, single chip control module, motor drive module, display and sound and light alarm module, keyboard module and angle detection module. The whole system block diagram is shown in Figure 3.
Figure 3 System block diagram
(1) Control module: AVR microcontroller control;
(2) Angle detection module: using ADXL345 angle sensor;
(3) Fan type: Axial flow hair dryer fan;
(4) Motor drive mode: using L298 motor drive chip;
(5) Display module: LCD1602 liquid crystal module is used for display;
(6) Power module: uses LM2576 switching step-down voltage regulator chip.
Angle detection circuit
The angle sensor uses the three-axis accelerometer ADXL345. Its output data is in 16-bit binary complement format and can be accessed through SPI (3-wire or 4-wire) or I2C digital interface. The data of ADXL345 is sampled 50 times cumulatively and the average value is taken as the result. This method successfully solves the problem of unstable sail swinging. The microcontroller calculates the value and preset parameters based on the value, and finally generates a PWM signal to adjust the speed of the fan motor.
ADXL345 communicates with the microcontroller in I2C mode, and the circuit is shown in Figure 4. The angle detection circuit consists of IC1, IC3, R15, and R16.
Figure 4 Angle detection circuit
Drive circuit
The motor driver module L298 contains a 4-channel logic drive circuit. It is a dedicated driver for two-phase and four-phase motors. It contains two H-bridge high-voltage and high-current dual full-bridge drivers, receives standard TTL logic level signals, and can drive dual motors. The motor drive wiring circuit is shown in Figure 5.
Figure 5 Motor drive circuit
In the circuit, the fan motor is connected to the OUT1 and OUT2 output ports of L298. The two input pins for controlling the forward and reverse rotation of the motor, pin 7 is connected to the power supply through resistor R4, and pin 9 is directly grounded. The PWM signal for controlling the speed of the fan motor is output by the PD5 pin of the microcontroller and connected to the enable control terminal pin 8 through the isolation optocoupler IC5. The on-off time of the L298 output is controlled by the change of PWM, which enables the microcontroller to adjust the speed of the fan motor and ultimately controls the strength of the wind that blows the sailboard to rotate. D1~D4 in the circuit act as freewheeling diodes.
Sound and light alarm and button circuit
An audible and visual alarm circuit is designed in the system, as shown in Figure 6. When the sailboard rotates to the preset parameters, the single-chip microcomputer controls its operation and the alarm lasts for 5 seconds. It consists of resistors R5, R18, light-emitting diode D5, transistor Q1 and speaker LS1. When the PA5 pin of the single-chip microcomputer outputs a low-level signal, the diode emits light and the buzzer sounds, realizing the audible and visual alarm.
Figure 6 Sound and light alarm, keyboard circuit
The key functions in the system are to control the movement of the sail motor and set the angle parameter value of the sailboard. The functions of each key are as follows:
S1: Start button, after pressing, the motor starts;
S2: Stop button, after jogging, the motor stops;
S3: Confirmation key, first operation, allows setting preset parameters, second operation, exit, and store parameters (preset parameters are stored in the EEPROM of the microcontroller);
S4: Add 1 key, jog once, the value of the preset parameter's unit digit increases by 1;
S5: Add 1 key, press once, and the tens digit of the preset parameter will increase by 1.
power supply
The efficiency of the LM2576 switching regulator is much higher than that of the three-terminal linear regulator, and it has excellent linearity and load adjustment capabilities. It contains a frequency compensator and a fixed frequency oscillator, which can reduce the number of external components to a minimum and is easy to use. The power supply circuit is shown in Figure 7.
Figure 7 Power supply circuit
Previous article:Research on bridge monitoring system based on wireless sensor network
Next article:Design of automatic tracking control system for dish-type Stirling solar system
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- Nuvoton Solution Sharing: IoT Development Based on NUC472 Development Board and Connected to Gizwits
- [Project Source Code] Altera SOPC FrameBuffer System Design Tutorial
- What is FRAM?
- Can 1N4007 be used to isolate 220V mains?
- W5500 TCP Client Network Debug Assistant cannot connect
- Analog circuits are much more difficult to learn than digital circuits. China’s real weak spot is actually analog chips.
- DIY a server for 5 dollars?
- [Project source code] AHT10 temperature and humidity sensor experiment based on FPGA
- Transformer and Inductor Design Handbook (4th Edition)
- Ripple test