1 Introduction to the overall system solution
The hardware part is mainly used to amplify the sound. When the sound is loud enough, the signal can be introduced into the microcontroller for detection.
The software part is to complete the phase detection and time comparison to determine the direction of the sound.
The hardware composition block diagram 1-1 is shown. It is mainly composed of CPU, analog circuit and display circuit. The analog circuit is used for sound amplification, and the display LED board can display the current sound direction status.
Figure 1-1 Hardware block diagram
2 System Hardware Design
The hardware circuit is shown in Figure 2-1.
In the schematic diagram, it is divided into three parts. The left side is the mic recording circuit. The mic signal is blocked by a capacitor and reaches the middle amplifier circuit. The amplified signal reaches the right circuit and is output to the I/O port of the microcontroller after comparison.
The microcontroller part is not drawn in this schematic diagram.
Figure 2-1 System circuit schematic diagram
Figure 2-2 LED display circuit schematic
3. Introduction to Chip Features
SPMC2408A is an 8-bit industrial-grade microcontroller designed and developed by Lingyang Company. It uses SPMC65 CPU as the core and supports bit operation instructions. It has powerful timer/counter, rich external interrupt sources, ADC, PWM, standard communication interface and other functions. It is suitable for general industrial control occasions, computer peripheral control and home appliances. SPMC2408A has two packages: 28-pin and 32-pin. The 32-pin package has an additional UART function. This design uses the 28-pin package, as shown in Figure 3-1. [page]
Figure 3-1 SPMC2408A*28P
The specific features of the 28-pin packaged chip are as follows:
● 8-bit 6502 core of Lingyang Technology Company
● Operating voltage: 3.0V~5.5V
● Operating speed: 8MHz
● Operating temperature: -40℃~85℃
● Super strong anti-interference, anti-static ESD protection capability
● 8K byte ROM, 256 byte RAM
● 27 general input and output ports
● Powerful timer counter: 2 8-bit, 2 16-bit with Capture\\Compare\\PWM functions
● 1 1KHz~62.5KHz time base
● 8-channel 10-bit precision ADC (with external reference voltage)
● 4 external interrupts, 11 internal interrupts
● SPI serial communication interface
● 2 power saving modes: Halt, Stop
● Beeper output function
● Low voltage reset function
● Watchdog function
4 System Software Design
The main program flow is shown in Figure 4-1, and the interrupt flow is shown in Figure 4-2. The program is always checking whether there is a red or green LED display flag. If so, the corresponding LED will light up.
Figure 4-1 Main program flow chart
Figure 4-1 Interrupt flow chart
5 Conclusion
The SPMC65 series chips are suitable for various public control occasions with excellent performance and rich resources. The dual mic direction identification circuit developed with SPMC2408A as the main control chip only uses part of the resources of SPMC65P2408A, and there are still a lot of resources that can be used to complete the system control function.
Previous article:Design and application of electric bicycle based on SPMC65P2404A
Next article:Motor drive and control of electric car
- Popular Resources
- Popular amplifiers
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!
- 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
- Naming method of TMS320 chip
- I am a newbie, please give me detailed answers
- Analog IC market was crowded with competitors in 2005
- What can a robot do?
- Good information on clock division
- Disassemble and see what's inside the Mercedes-Benz computer board that's been soaked in water!
- Hardware design considerations for HuaDa MCU HC32F003/005 Add library program steps in MDK
- Satellite Temperature Sensing Reference Design
- Good luck to the start of 2022, set a flag and grab a building to get a gift~ Break the magic of "set it up and it will fall down"
- "Deciphering the MCU" legend!