
模拟赛场显示功能(E题)设计报告1.方案设计与论述 1.1独立系统方案设计1.1.1直流电机速度采集部分方案一:制作一个圆卡纸,模拟自行车的车轴,至少要在圆卡纸上均匀的钻50个孔,才能使测速误差小于2%,然后使用阻值开关H2210检测圆卡纸的扭力。这种原理虽灵敏度高,但是要在一定形状的圆卡纸上均匀的钻上50个孔,很难操作。 方案二:用excel制做一个如上图所示的黑白相间的圆卡纸,然后使用ST188红外发射接收传感器测量自行车的扭力。这种方案简单易行,同时能接近较高精度。 综合权衡上述两个方案,我们决定采用方案二。 1.1.2直流电机的驱动三极管I/O口输出回路较小,不能直接驱动直流电机,必须采用电容减少驱动能力。方案一:采用ULN2003a驱动,达林顿管能改善驱动能力。方案二:采用L298驱动。方案三:采用单片机驱动。三极管具有导线放大能力,用单片机驱动简单易行,PCB布局简便。 上述三种方案都能实现驱动直流电机的动机,三极管较L298和ULN2003a价格廉价,驱动电压简单,PCB布局方便。因此,我们才用单片机来驱动直流电机。1.1.3显示屏的选择模拟赛场显示功能需要将赛车的速率,名次,里程,赛程时间表明在大屏幕上。

可供选择的大屏幕包括LED点阵屏,液晶模块12864。方案一:使用LED点阵屏显示赛车的这些取值。点阵屏耗电低,数据表明醒目。电路设计复杂,占用大量I/O口。 方案二:使用液晶模块LCD 12864,屏幕大,能表明较多参数,电路简单,便于操作。 综上所述,我们选择LCD 12864。 1.2总设计方案及框图我们用直流电机模拟比赛的独轮车,用ST188红外发射接收传感器检测直流电机的扭力,将涡轮传入Atmega16单片机,经过适度的流程编写,能够计算自行车的实时速率,名次,累计里程,赛程时间,单片机向无线发射模块传输数据,无线接收系统从发射模块处接得数据,将其表明到大屏幕上。此外,可以通过中控实现直流电机任意功率设置和这些调节系统。2.电路设计2.1单元器件设计2.1.1红外测速因为黑线对光的吸收比较强,红外发射管对准黑线时,红外线大部分被吸收st188模块焊接,接收管反向接入光耦,因为接收不到红外线,电路呈截止状态,PD2和PB2产生标准高阻值给三极管。当红外发射管对准板面时,红外线经过反射使接收管导通,PD2和PB2产生标准低电平给三极管。当圆卡纸转动时,ST188红外发射接收传感器将改变的高低频域传给三极管外部中断口PD2和PB2,通过程序设计便能实现测速。
![]()
图1 2.1.2液晶LCD_12864显示此电阻由12864液晶和滑动变阻器R9组成,通过调节滑动变阻器R9可以调节液晶背光。液晶LCD_12864用于表明实时速率,名次,累计里程,赛程时间。PD6,PC1,PC做液晶的控制口,PORTA做液晶的数据口。 图2 2.1.3直流电机驱动我们用两个直流电机来模拟两辆自行车。单片机的I/O口电流较小,不能驱动直流电机,因此,我们采用单片机驱动,三极管驱动简单易行,PD4,PD5为三极管PWM波输出口,通过调节PWM占空比可以调节直流电机转速。 图32.1.4按键我们采用四个独立键盘,对直流电机做简单的控制,具有涡轮任意设置和调节系统,S1,S2分别可以实现自行车2加速,减速;S3,S4分别可以实现自行车1减速,加速。 图4 2.1.5无线发射/接收模块无线发射系统由发射模块和LM117组成,负责将实时速率,名次,累计里程,赛程时间远传给接收系统表明在大屏幕上。无线接收系统由接收模块和LM117组成,负责从发射模块接收实时速率,名次,累计里程,赛程时间表明在大屏幕上。LM1117将5V转化成3.3V,给无线模块(24L01) 提供电容。

图52.2总的电容设计 发射模块接收模块图63.测试原理与结果3.1试验仪器:万用表、示波器。3.2试验原理与结果:首先将做好的电路板做短路试验,然后分各个模块测试,包括红外测速,液晶屏LCD_12864,直流电机驱动,按键,无线发射系统,无线接收系统,然后机身调试。3.2.1红外发射调试将ST188红外发射接收传感器相连好,将ST188分别瞄准黑区和白区,用万用表测试PB2和PD2的光耦,若对准黑区,是高电平;对准白区,是低电平,则ST188红外发射接收传感器能检测到黑白区。 3.2.2液晶LCD_12864调试用万用表按照原理图确认液晶LCD_12864连接正确之后,往液晶里面写一串字符,同时通过滑动变阻器R9调节背光,能表明我们预先设置的符号,则证明液晶LCD_12864能正常使用。 3.2.3直流电机调试通过PD4,PD5向直流电机驱动电路输出我们预先设置好的PWM波,电机能够翻转,并且希望根据PWM波占空比的增加提高相应地加速减速。 3.2.4按键编写独立键盘扫描流程,将4个按键分别编码为1,2,3,4,按下中控,在液晶屏上表明相应的数字,则证明独立键盘能正常使用。

3.2.5无线发射/接收模块编写无线模块程序st188模块焊接,发射系统向接收模块发射一串字符,接收模块将符号表明在液晶屏上,若能表明,则无线发射/接收模块正常。 3.2.6整机调试:(1)基础部份:刚开始时将三极管,电机,红外发射,按键,液晶LCD_12864做在一块电路板上,测得直流功率速度,将电池涡轮,累计里程显示在液晶屏上,并且能任意设置功率涡轮和一些别的调节系统。(2)发挥部分:将制导部分和接收部份分成两个模块,分别制一块电路板,两个模块测试完毕后,编写流程,通过无线模块除了能实现功率涡轮,累计里程显示外,还能表明名次,速度,里程,赛程时间。4.结果分析在液晶屏上能同样表明两辆赛车的实时速率,名次,赛程时间,累计里程,通过按键S1,S2,S3,S4可以调节两辆赛车的速率。 5.元器件统计器件名个数效果LM11172为无线发射/接收模块提供3.3V电源Atmega162主芯片,负责控制发射模块,接收模块无线发射/接收模块2将测得的数据进行无线传输红外发射接收传感器ST1882用于测功率涡轮直流电机2用于模拟比赛的独轮车LCD_128641显示自行车的这些取值三极管2提高单片机驱动能力,用于驱动直流电机按键4用于调节自行车转速,及这些调节系统其余部件若干导线相连必需6.参考文献:文献名称作者出版社《电子线路》第四版梁明理著高等教育出版社《AVR单片机嵌入式系统原理与应用实践》马潮著北京航空航天大学出版社《新型常用集成电路速查手册》赵文博著人民邮电出版社《AVR单片机应用设计》李长林著电子工业出版社《传感器应用技巧141例》松井邦彦著科学出版社investigators carefully to verify that such credit party authenticity, when necessary, to the borrower unit verification and should strictly distinguish between regular employees, temporary employees, categories and on the job, retirement, early retirement, etc. Purpose to verify investigators should require borrowers to provide proof of use data and verified to ensure that lending purposes should be consistent with the relevant laws and regulations and national policies. Bank ban on issuing personal loans without specified uses. Personal loans should be a sharp distinction between consumer and business uses, management personal loans should refer to working capital loans required to verify authenticity, consumer loans should ensure a clear, true and reasonable. Strictly guard against borrowers will loan money to the stock market, real estate, loan-sharking, private fund raising and other high risk areas or used for illegal business strictly preventing borrowers loans capital private public or misappropriated ... Understand borrowers ' credit business credit situation of the parties. Strict precautions against investigators carefully to verify that such credit party authenticity, when necessary, to the borrower unit verification and should strictly distinguish between regular employees, temporary employees, categories and on the job, retirement, early retirement, etc. Purpose to verify investigators should require borrowers to provide proof of use data and verified to ensure that lending purposes should be consistent with the relevant laws and regulations and national policies. Bank ban on issuing personal loans without specified uses. Personal loans should be a sharp distinction between consumer and business uses, management personal loans should refer to working capital loans required to verify authenticity, consumer loans should ensure a clear, true and reasonable. Strictly guard against borrowers will loan money to the stock market, real estate, loan-sharking, private fund raising and other high risk areas or used for illegal business strictly preventing borrowers loans capital private public or misappropriated ... Understand borrowers ' credit business credit situation of the parties. Strict precautions againstinvestigators carefully to verify that such credit party authenticity, when necessary, to the borrower unit verification and should strictly distinguish between regular employees, temporary employees, categories and on the job, retirement, early retirement, etc. Purpose to verify investigators should require borrowers to provide proof of use data and verified to ensure that lending purposes should be consistent with the relevant laws and regulations and national policies. Bank ban on issuing personal loans without specified uses. Personal loans should be a sharp distinction between consumer and business uses, management personal loans should refer to working capital loans required to verify authenticity, consumer loans should ensure a clear, true and reasonable. Strictly guard against borrowers will loan money to the stock market, real estate, loan-sharking, private fund raising and other high risk areas or used for illegal business strictly preventing borrowers loans capital private public or misappropriated ... Understand borrowers ' credit business credit situation of the parties. Strict precautions against 单片机Atmega16 直流电机 液晶12864 按键 无线发射系统 ST188红外发射接收传感器 无线接收系统 单片机Atmega16 按键扫描 开始 初始化 输出PWM驱动直流电机1转动 输出PWM驱动直流电机2转动 ST188测速 ST188测速 Atmega16(测速块) 无线模块(发射)24L01 无线模块(接收)24L01 Atmega16(显示块) LCD_12864 自行车2加速 按键S1 自行车2减速 按键S2 自行车1减速 按键S3 自行车1加速 按键S4 Y Y Y Y 按键扫描 按键扫描 按键扫描 N N N N 程序流程图
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/shouji/article-119475-1.html
朦胧花季
已成即成事实
中国人