admin 管理员组

文章数量: 887021


2023年12月18日发(作者:二进制转换成十进制在单片机方面有什么意义)

Voice of Electronic Password-lock Design

1 overview

As people's living standards improve and strengthen the sense of security, safety

locks system becomes essential. Many electronic intelligence lock (fingerprint

identification, IC identify) at home and abroad have already appeared. But these

characteristics of the products for a particular fingerprints and effective card, only

applicable requirements of box, ark to tilt toward secrecy from a parochial view, door to

wait. And if the general reader fingerprint public use existing easy mechanical damage,

IC card still exist easily lost, damaged, etc. Plus its cost is higher, in the certain extent

limits the products to the popularization and promotion.

Then appeared combination lock magnetic lock, electronic locks, laser lock, sonic

lock etc locks, they are the traditional keys in the foundation, USES one or more group

password, different sounds different magnetic field, different sound waves, different

beam waves, different image (such as fingerprints, fundus retinal etc.) to control the

lock open. This paper adopts the speech recognition technology and keyboard control

input combination, in CygnalSPCE061A the single board computer to realize a speech

electronic combination lock authentication system.

The design is the use of voice recognition technology and keyboard input, Sunplus

SPCE061A SCM in achieving a voice electronic password lock authentication

recognition and electronic password lock function of the ordinary locks,

and dual role of security. The password lock safe, effective, reliable, but also has voice

recognition, password Preferences, confidentiality strong, tips and other features of

error.

2 speech electronic combination lock system function

This system is mainly composed of Sunplus SPCE061A SCM, MIC input circuit,

voice output circuit, 4 × 4 keyboard, six Qiduan LED display and output control and

FLASH memory components. System is the main function: the training, the speaker's

voice through a microphone into the speaker voice signal acquisition front-end circuit,

by voice signal processing circuit on the acquisition of the characteristics of voice

signals and voice processing, from the speaker's personality characteristics and

parameters Store, a speaker parameters database. In recognition, will be voice

recognition and speaker parameters database matching, voice recognition and complete

control of the keyboard, and activate or release of locks, the final completion of the lock.

System is relying on hardware and software to closely cooperate with the Sunplus

SPCE061A SCM flexible control achieved.

Voice entry due to the interference of external environment, it is possible errors,

but through a number of training can make comparison and identification of voice

greatly improved.

3 The system hardware design

The system using a single kernel of Sunplus SPCE061A, the chip has ADC, DAC,

timer / counter, RAM, FLASH, and other devices, coupled with appropriate external

circuit and supporting Sunplus company's integrated development environment, Can

easily complete the design of hardware and software programming, thus achieving the

above-mentioned functions. Voice electronic code lock system is the core of speech

recognition module.

SPCE061A is Sunplus has developed a very high price of the 16-bit

microcontroller, embedded 2 K word of SRAM and 32 K word FLASH, with 32

programmable multi-purpose I / O ports include 7 Channel 1 O-General A / D converter,

built-in microphone amplifier, AGC AGC function of the single voice of A / D converter,

and the audio output of the dual-channel 1 O-bit D / A converter in the 2.6 V ~ - 3.6V

operating range of frequency range of 0.32 MHz ~ - 49.152Mhz, high processing speed

enable it to easily and quickly handle complex digital signal; suspension system to

support 1 O interrupt vector And l4 from the system can be a clock, timer / counter, time

benchmark generator, external interrupt, key wake-up call, Universal Asynchronous

serial communication and software interruption interrupt source, Very suitable for

real-time applications; u'nSPTM command system also provides high computing speed

of 16 × 16-bit multiplication instructions and directives within the plot operation, the

DSP for the application of additional features in a complex digital signal processing

both Very convenient than the DSP chip for much cheaper.

4 working principle

1

SPCE061A built-in 8-channel 1 O-bit A / D converter, which will be seven channels

for analog signals (such as voltage signal) converted to digital signals, a channel used

only for voice input, through the built-in automatic gain control amplifier The

microphone channels (MIC-IN) input. Therefore, it can be directly given to the voice

signal input channels, the completion of 8 kHz voice signals in the collection, encoding

and storage to off-chip FLASH, simplifying the circuit design.

Sunplus SPCE061A MCU with audio output of dual-channel 1 O-bit D / A

converters can complete user training, identification of various operations, such as the

voice prompts. SPCE061A provide audio lose

A way for the dual-channel DAC, in this manner, DAC1 and DAC2 conversion of

analog current output signal passed AUD1 and AUD2-pin output, enter the number of

volume into the P-DAC1 (write) (0 x7017) and P - DAC2 (write) (0 x7016) unit.

LED displays in each LED through 5 ~ 20mA current to achieve the normal

brightness, and the IO I SPCEO61A output current up to 5 mA, do not have to drive

circuit to reach normal brightness. In order to meet the reliability of systems design,

driven by a transistor circuit. The whole process showed that the use of dynamic, that is,

six monitors each cycle, each sustained lms or 10 ms cycle again, can also be

appropriate to make changes, but the refresh rate not less than 30 per second, so that

temporary stay because of the visual phenomenon , Is six Qiduan see the LED display at

the same time show.

Enter key part of a total of the number keys, passwords, keys set, the key shown

password, to confirm removal of keys and passwords, and other key 16 keys, enter your

password and for the realization of function keys. This design uses a wake-up function

keys of the IO low eight IOA0 - ~ IOA7 to 4 × 4 as the control input of the keyboard,

which can be rational use of hardware resources and programming flexibility.

Recognition keyboard keys are pressed whether the method is: Let all out lines are low,

check the traffic on whether there is a high-level, if there is a statement that a key is

pressed, if not, then no keys are pressed (Actual programming keys should be taken into

account the impact of jitter, usually always use the software delay processing methods

Consumers buffeting). Identify specific keys used scanning method: home-by-zero level

out and check the level of the carriageway of the changes, if a line from the low level

into a high, this trip can be sure this column cross-point Button is pressed.

2

SPCEO61A FLASH memory chip of only 32 K, large number of players in the

voice of resources needs of expanding memory. The design Sunplus Technology, Inc.,

SPR4096 as a memory expansion, combined with SPCE061A broadcast voice.

SPR4096 in use, the use of SPR4096 ResWriter to read and write operation, used to

store the speaker's personality parameters reference template.

SCM SPCE061A complete identification and display, the drive to realize the

implementation of the electromagnetic lock function, and to detect its drive current

value, to receive alarm signals sent by sensors, such as sending data. SCM receive the

type code, and stored in FLASH in the password, if the correct password, the drive for

the implementation of the electromagnetic lock, if your password is not correct,

allowing operators to re-enter your password, can enter up to three If the three are not

correct, the MCU through intelligent communication lines to monitor the police. SCM

will unlock operation and each time the electromagnetic actuator drive current value as

a status information sent to the smart monitor, will receive the report from the sensor

interface information is also sent to the intelligent monitoring, as smart Analysis of the

basis. In the transmitter, electronic locks through the pulse transformer T will

modulation good boost after data signals sent out in the receiver, pulse transformer T

will receive the data signal demodulator buck evacuation to reduce the carrier signal

transmission In the process of wear and tear. In order to reduce communication and

mutual interference between the power supply, chokes L, the choice of coupling

capacitance C to comprehensive considerations, shown in Figure 4, a carrier frequency

f0-400kHz, in order to ensure that most of the energy transmission signal to the receiver

Duan, L for a 33.7 H, C1-0.047 ~ F.

Current surveillance function is to prevent the destruction of communication lines

and electromagnetic actuator, for some reason the flow of electromagnetic coil currents

too large burning coil. Current Monitor by MAXIM company's current / voltage

converter chip MAX471. The chip can be measured current I into pairs to the output

voltage U, and is measured Wai, high precision, and U output voltage proportional to

the measured current I characteristics. Current monitor output voltage service A / D

converter, read through the single A / D converter results in the current line was

informed of the situation, through the timely detection of abnormal, issued its report.

3

SPCE061A the development of online debugger PROBE To achieve. It uses a

built-in online SPCE061 Circuit Simulation ICE (In-Circuit Emulator) and Sunplus's

online series Line programming. PROBE can work in Sunplus IDE Integrated

Development Environmental software nSP (tm), with editing, compile, link, debug and

simulation capabilities. Use IDE friendly interface, the drop-down menu, shortcuts and

quick access to the list can be ordered so that the user's programming and

commissioning work more convenient and efficient. In addition, IDE software

simulation can not connect the simulation board under the simulated conditions of the

various functions to the hardware debugger. When the system work, the main function

of the call to complete a specific function of the human voice training, training for the

future success of voice recognition, according to the order to identify the

implementation of the keyboard control operation, according to the different function

keys, the implementation of the corresponding procedures, to complete Password

changes settings, contrast, shows, and other functions.

5 development prospect

The system uses a SPCE061A 16-bit microcontrollers embedded voice processing

and control system, easy to use, easy to use, but the speech recognition capabilities have

yet to be improved. Electronic password lock technology development so far, has been

widely used in higher property security areas as information technology and computer

technology and the constant development, voice, electronic password lock technology

will have greater development and, ultimately, achieving efficiency, safety And reliable

Voiceprint control of the voice of electronic locks.

4

语音电子密码锁的设计

1概述

随着人们生活水平的提高和安全意识的加强,锁具系统的安全性变得至关重要,许多电子智能锁(指纹识别、IC卡辨认)已在国内外相继面世。但是这些产品的特点是针对特定的指纹和有效卡,只能适用于保密要求的箱、柜、门等。而且指纹识识别器若在公共场所使用存在容易机械损坏,IC卡还存在容易丢失、损坏等特点。加上其成本较高,一定程度上限制了这类产品的普及和推广。

于是出现了密码锁磁性锁、电子锁、激光锁、声控锁等等锁具,它们是在传统钥匙的基础上,利用一或多组密码,不同声音不同磁场,不同声波,不同光束光波,不同图像(如指纹、眼底视网膜等)等来控制锁的开启。本文采用语音识别技术和键盘控制输入相结合,在CygnalSPCE061A单片机上实现一种语音电子密码锁认证系统。

本课题是采用语音识别技术加键盘控制输入,在凌阳SPCE061A单片机上实现的一种语音电子密码锁认证系统。语音识别并配合电子密码锁的普通锁具功能,实现双重安全保障作用。该密码锁安全、有效、可靠,而且具有语音识别、密码预置、保密性强误码提示等特点。

2语音电子密码锁的系统功能

系统主要由凌阳SPCE061A单片机、MIC输入电路、语音输出电路、4×4键盘、6位七段LED显示、输出控制及FLASH存储器组成。系统主要的功能是:在训练时,说话人的声音通过麦克风进入说话人语音信号采集前端电路,由语音信号处理电路对采集的语音信号进行特征化和语音处理,提取说话人的个性特征参数并进行存储,形成说话人特征参数数据库。在识别时,将待识别语音与说话人特征参数数据库进行匹配,完成语音识别以及键盘的控制,实现激活或解除锁具,最终完成开锁。系统是依靠硬件和软件地密切配合,由凌阳SPCE061A单片机的灵活控制实现的。语音输入由于受到外部环境的干扰,有可能出现错误,但通过多次的训练可以使语音对比和识别有很大的提高。

5

3系统硬件的设计

系统采用具有内核的凌阳SPCE061A单片机,该芯片内有ADC、DAC、定时器/计数器、RAM、FLASH等器件,加上适当的外围电路与配套的凌阳公司的集成开发环境,可以很方便地完成硬件设计和软件编程,从而实现上述功能。语音电子密码锁系统的核心是说话人识别模块。SPCE061A是凌阳公司开发的一种性价比非常高的16位单片机,内嵌2K字的SRAM和32K字的FLASH,具有32位可编程的多功能I/O端口;包含有7通道1O位通用A/D转换器、内置麦克风放大器、自动增益控制AGC功能的单通道声音A/D转换器,以及具有音频输出功能的双通道1O位D/A转换器;在2.6V~3.6V工作电压范围内,工作频率范围为0.32MHz~49.152Mhz,较高的处理速度使其能够非常容易、快速地处理复杂的数字信号;中断系统支持1O个中断向量以及l4个可来自系统时钟、定时器/计数器、时间基准发生器、外部中断、键唤醒、通用异步串行通信及软件中断的中断源,非常适合实时应用领域;U’nSPTM的指令系统还提供具有较高运算速度的16位×16位的乘法运算指令和内积运算指令,为其应用增添了DSP功能,在复杂的数字信号处理方面既非常便利,又比专用的DSP芯片便宜得多。

4工作原理

SPCE061A内置8通道1O位模/数转换器,其中7个通道用于将模拟信号(例如电压信号)转换为数字量信号,1个通道只用于语音输入,即通过内置自动增益控制放大器的麦克风通道(MIC—IN)输入。因此,可以直接将语音信号送给此输入通道,完成8kHz语音信号的采集、编码并存储到片外FLASH中,简化了电路设计。

凌阳SPCE061A单片机具有音频输出功能的双通道1O位D/A转换器可 以完成用户训练、识别等各种操作的语音提示。SPCE061A提供的音频输出方式为双通道DAC方式,在此方式下,DAC1和DAC2转换输出的模拟量电流信号分别通过AUD1和AUD2引脚输出,输入的字量分别写入P—DAC1(写)(0x7017)和P—DAC2(写)(0x7016)单元。

LED显示器中每个发光二极管要通过5~20mA电流才能达到正常亮度,而SPCEO61A的IO口输出电流可达到5mA,不用驱动电路即可达到正常亮度。系统

6

为了满足可靠性设计,采用晶体管构成驱动电路。整个显示过程中采用动态显示,即六位显示器逐一轮流显示,每位持续lms或10ms循环一遍,也可以适当进行更改,但刷新速度不要小于每秒三十帧,这样,由于视觉暂留现象,看到的便是六位七段LED显示器同时显示。

按键输入部分共有数字键、密码设定键、密码显示键、确认键和密码清除键等16个按键,用于密码输入和功能按键的实现。本设计采用具有键唤醒功能的IO的低8位IOA0--~IOA7接4×4键盘作为控制输入部分,从而可以合理利用硬件资源,且编程灵活。识别键盘有无键被按下的方法是:让所有列线均为低电平,检查各行线电平是否有高电平,如果有则说明有键被按下;如果没有,则说明无键被按下(实际编程时应考虑按键抖动的影响,通常总是采用软件延时的方法进行消抖处理)。识别具体按键的方法采用扫描法:逐个列置零电平,并检查各行线电平的变化,如果某行电平由低电平变为高电平,则可确定此行此列交叉点处按键被按下。

SPCEO61A片内的FLASH存储器只有32K,在播放大量语音资源时需要外扩存储器。本设计使用凌阳科技公司的SPR4096作为外扩存储器,与SPCE061A结合播放语音。在使用SPR4096时,采用ResWriter对SPR4096进行读写操作,用于存储说话人的个性特征参数参考模板。

SPCE061A单片机完成识别和显示后,驱动电磁执行器实现开锁功能,并检测其驱动电流值、接收传感器送来的报警信号、发送数据等。单片机接收键入的代码,并与存贮在FLASH中的密码进行比较,如果密码正确,则驱动电磁执行器开锁;如果密码不正确,则允许操作人员重新输入密码,最多可输入三次;如果三次都不正确,则单片机通过通信线路向智能监控器报警。单片机将每次开锁操作和此时电磁执行器的驱动电流值作为状态信息发送给智能监控器,同时将接收的来自传感器接口的报警信息也发送给智能监控器,作为智能化分析的依据。在发送端,电子锁具通过脉冲变压器T将调制好的数据信号升压后发送出去;在接收端,脉冲变压器T将接收到的数据信号降压后送解调器,以减少载波信号在传输过程中的损耗。为了减少通信和供电之间的相互干扰,对扼流圈L、耦合电容C的选择要综合考虑,设载波频率f0—400kHz,为了保证绝大部分信号能量传输到接收端,取L一33.7H,C1—0.047~F。电流监视功能是为了防止通信线路的人

7

为破坏和电磁执行器因某种原因造成流过电磁线圈的电流过大而烧毁线圈。电流监视器采用MAXIM公司生产的电流/电压转换芯片MAX471。该芯片能将被测电流I转化成对地输出电压U,且有测量范围大、精度高、输出电压U和被测电流I成正比等特点。电流监视器输出电压送达A/D转换器,单片辨识器初始化机通过读取A/D转换结果,获知线路中电流的变化情况,通过分析及时发现异常,发出报警信号。

SPCE061A的开发可通过在线调试器PROBE来实现。它利用了SPCE061内置的在线仿真电路ICE(In—Circuit Emulator)和凌阳公司的在线串行编程技术。PROBE可工作于凌阳IDE集成开发环境软件 nSP(tm)下,具有编辑、编译、链接、调试以及仿真等功能。利用IDE友好的交互界面、下拉菜单、快捷键和快速访问命令列表可以使用户的编程、调试工作更加方便和高效。此外,IDE的软件仿真功能可以在不连接仿真板的情况下模拟硬件的各项功能来调试程序。当系统工作时,在主函数中调用相关函数完成特定人语音的训练,训练成功后再进行语音识别,根据识别的命令执行键盘控制操作,根据各功能键的不同,执行相应的程序,完成对密码的修改、设置、对比、显示等功能。

5发展前景

系统采用SPCE061A16位单片机构成嵌入式语音处理与控制系统,操作简单,易于使用,但语音识别能力尚有待提高。电子密码锁技术发展至今,已广泛应用于财产安全防范要求较高的领域随着信息技术和和计算机技术的不断发展,语音电子密码锁技术必将有更大的发展,并最终实现高效、安全、可靠的声纹控制的语音电子密码锁。

8

9


本文标签: 语音 识别 功能 系统 电子