1. Hardware circuit and principle
To make the electric fan send out natural wind, it is necessary to change the strength of the fan, that is, to change the voltage and current of the fan motor, thereby changing its speed. As shown in Figure 1, the fan socket is connected in series with the thyristor TREAC. By changing the thyristor control angle α, that is, controlling the time when the thyristor is turned on, the voltage and current of the fan motor can be changed. Figure 2 shows the relationship between the α angle and the motor load voltage.
The change of angle α can be achieved by changing the charge and discharge time of capacitor C1. The PIC16F84 microcontroller selects resistor Rx according to a certain rule to change the charge and discharge time of capacitor C1, thereby changing the conduction time of 2N2646. By changing the conduction angle of TREAC, the purpose of changing the strength of the fan is achieved. The relationship between the control angle α and the strength of the wind is shown in Figure 3.
If the mains frequency f = 50 Hz, then we can get the following formula: α/360° = t/0.02………………(1)
According to the RxC1 charging circuit shown in Figure 1, it can be inferred that
α=t·360°/0.02 ={RxC1ln1[1/(1-n)]}·360°/0.02 ……………(2)
Where η = VP / VBB, Vp is the voltage value of C1 after charging, VBB is the charging power supply voltage, and η = 0.63 is generally taken. If the capacitor C is 0.047μF, according to the value of (2), the Rx value table corresponding to different α setting values is obtained:
100% working days.
Rx is connected to RB0~RB7 ports of PIC16F84 microcontroller; RA0 port is the start signal input port. When the A key is pressed, the natural wind generator starts to work; RA1 port is the stop signal input port. When the B key is pressed, the natural wind generator stops running; RA3 port is the AC phase detection port. It is used to determine the starting phase of the AC.
Program Listing:
LSIT P=PIC16F84
#INCLUDE P16F84INC
FC EQU0CH
FD EQU0DH
ORG 0
MAIN:CLRW
TRISRB
MOVWFRB; set RB port as output port,
; and set its initial value to 0
MOVLW0FH
TRIS RA; Set port A as input port
KEYA: BTFSCRA, 0; Is the A key pressed?
GOTO KEYA ;A key is not pressed to go to
KEYA, wait
START: MOVLW80H; Press the A key,
;80H→F8
MOVWFF8
BTFSSRA,1;B key pressed No
GOTOMAIN ;B key pressed
PHASE:BTFSCRA3
GOTO PHASE ; Waiting for AC power
Zero Phase
MOVF8,W
MOVWFRB ; F8 → RB exit
CALL DELAAY; delay 10 seconds
CLRC ;清C
RRF F8; F8 right shift
BTFSS3,0
GOTO PHASE
GOTO START
DELAY:MOVLW150
MOVWFF9
MOVLW7; Preset RTCC
Let the multiple be 1:256
OPTION
LOOP:MOVLW255
SUBWFRTCC
BTFSS 32
DECFSZF9
GOTO LOOP
RETLW 0
END; End of program
Previous article:Getting Started with PIC18F Microcontroller
Next article:Design of LCD segment driver driven by PIC microcontroller
- Popular Resources
- Popular amplifiers
- MCU Principles and Interface Technology C51 Programming (Edited by Zhang Yigang)
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Example interpretation of 51 single chip microcomputer complete learning and application
- USB Development Encyclopedia 4th Edition
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- How long does it take to learn ARM?
- The Mangkhut Typhoon King is here, so be prepared and pay attention to your own safety!
- Introduce some basic knowledge of MSP430 microcontroller
- 16 Altera SOC examples (ARM part)
- Methods for controlling stepper motors using microcontrollers or DSP
- 【mpy】STM32 supports using HSI as the main clock
- dsp bootloader c5000
- USB to serial chip PL-2303 driver
- Will SiC replace IGBT? Let's discuss it together.
- 【Micropython DIY】 Make a voltmeter using adc and uart