学习实践

声音导引系统程序

图中,AB与AC垂直,Ox是AB的中垂线,O’y是AC的中垂线,W是Ox和O’y的交点。

声音导引系统有一个可移动声源S,三个声音接收器A、B和C,声音接收器之间可以有线连接。声音接收器能利用可移动声源和接收器之间的不同距离,产生一个可移动声源离Ox线(或O’y线)的误差信号,并用无线方式将此误差信号传输至可移动声源,引导其运动。

可移动声源运动的起始点必须在Ox线右侧,位置可以任意指定。

基本要求

(1)制作可移动的声源。可移动声源产生的信号为周期性音频脉冲信号,如图2所示,声音信号频率不限,脉冲周期不限。

(2)可移动声源发出声音后开始运动,到达Ox线并停止,这段运动时间为响应时间,测量响应时间,用下列公式计算出响应的平均速度,要求平均速度大于 5cm/s。

(3)可移动声源停止后的位置与Ox线之间的距离为定位误差,定位误差小于3cm。

(4)可移动声源在运动过程中任意时刻超过Ox线左侧的距离小于5cm。

(5)可移动声源到达Ox线后,必须有明显的光和声指示。

(6)功耗低,性价比高。

下图是小车(移动声源)

使用esp32编程,通过PWM的占空比,使用L298控制直流减速电机转速和方向,从而控制小车前后左右运动。

主要使用了esp32单片机,因为直接使用Arduino IDE编写程序,很高效方便。而且esp32单片机自带WiFi模块,可以很稳定的实现信息的发送接受。

声音放大模块:使用了扬声器和功率放大器,使其可以产生尽可能响(振幅大)的声音,一秒中的时间产生5K Hz的声波。

三个声音接受器都是自主设计的,使用了CSND,类似于stack overflow和github。这个网站上有各种工科的中文资料,如何使用二阶高通滤波电路滤除低频干扰信号(人发出的声音),获取高频信号(5 k Hz),再结合高灵敏度的小型电容式话筒将声波信号的电压模拟量信号,再通过滤波放大操作,通过专门检测的芯片输出高电平(模拟信号转换为数字信号)。通过设定esp32(接受部分模块)获取高电平信号,从而开始记录获取信号的时间,再进行运算计算出小车(声源)的位置。

在寝室中测试系统运行情况

实验室测试,更加规范,马上就要验收任务了,可以看出我们模块抗干扰能力很强,其他组产生的不同于5k Hz的声波没有对我们产生任何影响。

使用示波器放大两个信号的捕获到的时间差,计算小车的位置。算是使用示波器验证方案可行性。

Author

wwq136@163.com
I am a junior majoring in Measurement and Control Technology and Instrumentation, with a passion for exploration and innovation. I have participated in various competitions, such as the Electronic Design Competition and Intelligent Vehicle Competition, and have contributed to national innovation projects, including the development of a fruit-picking robot. I possess strong embedded systems skills, working with platforms like STM32, Arduino, Raspberry Pi, and Jetson Nano, alongside proficiency in C/C++ and Python programming. My interests lie in the intersection of robotics and artificial intelligence, particularly in areas like computer vision (CV) and natural language processing (NLP), with a focus on machine learning. I am constantly learning AI-related technologies and exploring ways to integrate them into practical applications, aspiring to develop digital twins incorporating AI. I use Ubuntu 22.04 both on WSL2 for Windows and on my server. Currently, I am preparing for the IELTS, aiming for a 7.0 score, with a current score of 6.5. My future academic goal is to study at a top 50 QS university in Australia, such as UNSW Sydney, the country’s top-ranked university for engineering. Post-graduation, I plan to pursue entrepreneurship, focusing on local AI model deployment, particularly in healthcare. In addition to my technical pursuits, I am fascinated by Western culture, history, and philosophy, and I look forward to returning to Europe to further explore these areas.
Total post: 52

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

树莓派入门

01/11/2024