ImageVerifierCode 换一换
格式:DOCX , 页数:46 ,大小:999.03KB ,
资源ID:30239969      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/30239969.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(基于单片机的红外遥控小车控制电路的设计教材.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

基于单片机的红外遥控小车控制电路的设计教材.docx

1、基于单片机的红外遥控小车控制电路的设计教材基于单片机的红外遥控小车控制电路设计设计总说明 红外线是近距离、高速无线通信的一种手段,一直以来,红外遥控、遥测技术在玩具生产、家电制造及工业测控等领域得到了广泛的应用.作为近距离、室内通信的手段,红外线具有无线电无法比拟的优势.因此,遥控加智能的技术研究、应用都是非常有意义而且有很高的市场价值的。红外遥控的特点是利用红外线进行点对点通信的技术,不影响周边环境,不干扰其他电器设备。通过基于单片机的控制指令来对多种设备进行远程控制,可以选择不同的按键来控制不同的设备,从而方便快捷的实现远程控制。智能小车的控制在科研等各个领域中都被广泛的应用,具有很大的实

2、用价值。 本设计就是利用红外线及单片机系统对小车进行无线控制,通过红外灯发送无线红外信号,通过红外接收器接收信号经过单片机处理对电机进行控制,进而实现小车的动作。该系统以P06单片机为核心,采用低功耗8位微处理器高速CMOS技术。拥有电气一次可编程存储器和数记忆。p06适用于在嘈杂的环境中工作因此,它是适用于家用电器电机控制中的应用。因为p06工作在一个非常低的电流消耗,它在低功耗的应用是有利的,如远程控制器和电池供电系统。红外线通讯的发送部分主要是把待发送的数据转换成一定格式的脉冲,然后驱动红外发光管向外发送数据。接收部分则是完成红外线的接收、放大、解调,还原成同步发射格式相同,但高、低电位

3、刚好相反的脉冲信号,其主要输出TTL兼容电平。最后通过解码把脉冲信号转换成数据,从而实现数据的传输。红外线接收器是一种可以接收红外信号并能独立完成从红外线接收到输出与TTL电频信号兼容的器件,体积和普通的塑封三极管差不多,适合于各种红外线遥控和红外线数据传输。主要硬件电路包括:(1)单片机模块:对红外信号进行处理,控制设计功能的实现。(2)按键模块:包括四个按键,表示小车的动作即前进、后退、左右转动。(3)无线红外信号的发送及接收模块:按键按下时红外发射管发送红外信号,红外接收器接收到信号后送入单片机处理。(4)四个选项通道:发送和接收部分别带有四个选项开关,进项选择控制,当发送与接收选择同一

4、通道时才能正确的发送和接收信号。只有接收端的地址码和发射端的地址码设置完全相同,输出端才有输出信号。解码芯片 将数据输入端接收到的信号,经内部电路解码辨识确认。如果所接收到的信号地址码与本机地址编码相同,AUXOUT1AUXOUT4 输出与无线电发射系统所发射的相对应的开关信息给单片机电路,由单片机控制相应的开关电路动作。否则,解码芯片不解码,单片机电路不响应。(5)电机的正反转控制模块:对单片机输出的控制信号进行放大处理通过改变两对大功率PNP、NPN三极管的导通,控制流入直流动电机里的电流方向。以实现直流电动机的正反转。工作时两对三极管为了避免发热过多损坏和对电机造成不良影响等问题采用大功

5、率三极管,通过控制三极管的基极的高低电位使一对PNP或NPN导通即可控制电流的方向实现直流电机正反转。设计中的软件部分要求实现发送装置的按键控制、接收装置的输出控制、发送与接收的通道检测控制。发送信号采用载波38KHZ进行发送,接收装置有相应的延时时间。本系统采用的是上电复位的复位方式。本设计要求作出实物,所以要求每步的设计都具有可行性,不只是单单的只停留在原理阶段。要想做出实物PCB电路板的制作是非常重要的一部分,要进行电路板的设计,采用Protel99se进行原理图和PCB图的设计,作出实际符合要求可行的电路板。其次就是选择元器件进行焊接调试,随着设计的进行发现用LED发光二极管来代替电机

6、来实现功能的指示更加方便可行,因此就用四个发光二极管来指示小车的前进后退左右转的动作。最后通过调试发送装置能在六米左右的范围内对接收装置进行控制。该系统具有结构简单,低功耗,抗干扰性强等特点,能准确的达到对小车的控制目的。关键词:红外线;单片机;小车;控制IntroductionInfrared ray is a means of near distance, high-speed wireless communication,All along, the infrared remote control, remote sensing technology has been widely us

7、ed in the production of toys, home appliances and industrial control etc.As a close distance, indoor communication means, has the incomparable advantage of infrared radio Therefore, remote control and intelligent technology research, application is very meaningful and very high market value.Characte

8、ristics of infrared remote control is the point to point communication technology using infrared, does not affect the surrounding environment, does not interfere with other electric equipment.Through the control instruction based on single-chip microcomputer for remote control of a variety of equipm

9、ent, can choose different buttons to control the different devices, thus convenient remote control.Intelligent vehicle control has been widely used in scientific research in various fields, and has great practical value. This design is the use of infrared and single-chip microcomputer system for wir

10、eless control of the car, through the wireless infrared signals to control the car.P0X is an 8-bit microprocessor with low-power and high-speed CMOS technology. It is equipped with an electrical one time programmable memory and a data memory.P0X is designed to work in noisy environment。Therefore, it

11、 is suitable to be used in application of home appliance motor control. Because P0X operates in a very low current consumption, it is advantageous in low-power application, like remote controller and battery-powered system.This design is the use of infrared and single-chip microcomputer system for w

12、ireless control of the car, through the wireless infrared signal transmitted by infrared light, infrared receiver receives the signal through the MCU to control the motor, and then realize the car movement. The system uses P06 microcontroller as the core, using low-power 8 bit microprocessor speed C

13、MOS technology. Have electrical one-time programmable memory and memory. P06 is applicable to working in a noisy environment therefore, it is suitable for use in motor control of the household electric appliances. Because P06 consumption at a very low current, its application in low power consumptio

14、n is beneficial, such as remote controller and battery power supply system. The sending part of infrared communication is mainly for conversion of the data to be transmitted into pulse a certain format, and then drive the infrared emitting tube out data. The receiving part is to complete the infrare

15、d receiving, amplification, demodulation, restore the synchronous firing of the same format, but the high and low potential, just the opposite of the pulse signal, the output TTL compatibility level. Finally the pulse signal into data by decoding, thus achieving data transmission. The infrared recei

16、ver is a kind of can receive infrared signals and can independently from the infrared receiver to output and TTL power frequency signal compatible devices, volume and plastic triode ordinary tube almost, suitable for all kinds of infrared remote control and infrared data transmission.The main hardwa

17、re circuit includes:(1)SCM module: carries on processing to the infrared signal, realize the control function.(2)The key module: includes four keys, said car motion forward and backward, turning left and right.(3)Wireless infrared signal transmitting and receiving module: the infrared emission tube

18、infrared signal is sent when a button is pressed, the infrared signal received by the receiver into the SCM treatment.(4)The four option channel: sending and receiving part dont with four options, select the control input, and the received signal when sending and receiving the same channel to send t

19、he correct. Only address code and transmitter receiver address code set up exactly the same, the output is the output signal. Decoding chip data input signal end received, confirmed by the internal circuit decoding identification. If the signal received by the address code and the address of the mac

20、hine code the same, emission of the AUXOUT1AUXOUT4 output and radio transmission system corresponding to the switch information to the microcontroller circuit, MCU control switch circuit corresponding action. Otherwise, decoding chip is not decoded, the singlechip circuit does not respond.(5)Positiv

21、e inversion control module, motor control signal for the microcontroller output: the amplified by changing the two pairs of large power PNP, a NPN triode conduction, control flows into the DC current direction of the motor. In order to achieve positive DC motor. When the two pair of transistors in o

22、rder to avoid too much heat damage and adverse effects on motor problems with large power triode, through the high and low potential control triode base to make a pair of PNP or NPN conduction can control the direction of the current implementation The software part of the design to realize transmit

23、ting device, receiving device keys to control output control, sending and receiving channel detection control. Send a signal with carrier 38KHZ transmitting, receiving device with a delay time corresponding. This system is used in the way of reduction on reset. The design requirements to make real,

24、so that each step of the design is feasible, not just only stay in the theory stage. Production to make real PCB circuit board is an important part, in order to design a circuit board, designed by Protel99se for schematic diagram and PCB diagram, to meet the requirements of circuit board is feasible

25、. The second is to choose the components welding debugging, as the design was found to replace the motor to realize the function of instructions is more convenient to use LED light-emitting diode, so using four LEDs to indicate the car forward back around the turn. Finally, through the debugging and

26、 transmitting device can control the receiving device at six meters range.The system has the advantages of simple structure, low power consumption, the characteristics of strong anti-jamming, can accurately achieve the aim of control of the car.of reversible DC motor.Keywords: infrared; MCU; car; co

27、ntrol1 绪论我们知道,人的眼睛能看到的可见光按波长从长到短排列,依次为红、橙、黄、绿、青、蓝、紫。其中红光的波长范围为0.620.76m;紫光的波长范围为0.380.46m。比紫光波长还短的光叫紫外线,比红光波长还长的光叫红外线。红外遥控具有抗干扰,电路简单,容易编码和解码,功耗小,成本低的优点。红外遥控是利用红外线(波长为0.761.5m之间的近红外线)进行传递信息的一种控制方式,红外遥控几乎适用所有家电的控制。随着电子技术、计算机技术和制造技术的飞速发展,数码相机、DVD车等消费类产品越来越呈现光机电一体化、智能化、小型化等趋势。各种智能化小车在市场玩具中也占一个很大的比例。本系统采

28、用红外线发送信号通过红外信号接收器及核心单片机来实现对小车的行车控制,通过按键来让小车前进、后退、左转和右转的控制。在汽车工业的迅速发展的过程中,关于汽车的研究也就越来越受人关注,智能控制技术也同时得到使用和发展。全国各类的电子大赛中,几乎每次都有智能小车这方面的题目,全国各高校也都很重视该题目的研究,特别在智能控制方面。另外在紧急或高危状况下,采用智能电动小车来代替人去完成某些任务更是十分必要的。本设计实现的是对小车进行红外控制即简单的机械控制机,通过通道选择来选择控制对象,发送控制信号。2方案设计红外线的广泛应用给我们的生产生活带来了极大的方便,红外遥控装置具有抗干扰项性强、低功耗的特点。

29、本设计主要分为红外发送和红外接收两部分。红外线通讯的发送部分主要是把待发送的数据转换成一定格式的脉冲,然后驱动红外发光管向外发送数据。接收部分则是完成红外线的接收、放大、解调,还原成同步发射格式相同,但高、低电位刚好相反的脉冲信号,其主要输出TTL兼容电平。最后通过解码把脉冲信号转换成数据,从而实现数据的传输。红外线接收器是一种可以接收红外信号并能独立完成从红外线接收到输出与TTL电频信号兼容的器件,体积和普通的塑封三极管差不多,适合于各种红外线遥控和红外线数据传输。遥控范围最大可达6米左右,灵敏度高,一个遥控器可控制四个接收装置。系统硬件电路框图如下:图 2-1发送电路框图图 2-2接收电路

30、框图3硬件电路设计调制载波频率大多数使用的是38kHz,在发射端要对晶振进行整数分频,红外遥控是以调制的方式发射数据,就是把数据和一定频率的载波进行“与”操作,这样既可以提高发射效率又可以降低电源功耗。红外线通过红外发光二极管(LED)发射出去,红外发光二极管(红外发射管)内部构造与普通的发光二极管基本相同,材料和普通发光二极管不同,在红外发射管两端施加一定电压时,它发出的是红外线而不是可见光。实现红外发射的元器件很多,可以根据需要发出不同种类的编码。由于发射系统一般用电池供电,P06芯片的功耗要很低,设计成可以处于休眠状态,这样可以降低功耗当有按键按下时才工作,本此次采用的单片机有内部晶振当

31、电路的设计对时钟晶振要求不是很严格时可以采用,会有一定的误差,但这一点误差是可以忽略的。红外遥控系统的硬件分为发送和接收两部分。发送部分主要采用单片机P06与红外发送LED灯及运放装置组成,选用元件时要注意三极管的开关速度要快,还要考虑到LED的正向 电流和反向漏电流,一般流过LED的最大正向电流为100mA,电流越大,其发射的波形强度越大;接收部分同样采用单片机P06与红外接收 器HS0038组成,单片机P06通过运放电路对电机进行控制。红外接收头内部放大器的增益很大,很容易引起干扰,因此在接收头的供电脚上须加上滤波电容,一般在22uf以上。 3.1主体元器件选择3.1.1单片机本系统采用P

32、06单片机是低功耗8位微处理器高速CMOS技术,带有程序和数据存储区,提供灵活的中断处理能力。内部带有一个振荡器(精度5%)集成,降低了成本。带有内部分频器,振荡器可以在时间精度要求不高时替代晶振。图 3-1 P06单片机结构:采用哈佛结构,其中提到的计算机体系结构,使用物理上独立的存储和信号通路的指令和数据。因此,程序和数据的内存块的分离,可以有不同的总线宽度。16位和8位宽线路中使用的程序和数据的存储器,分别。数据存储器分为两个部分:特殊功能寄存器(SFR)和通用寄存器(GPR)。ALU是8位的操作数,可以从做业务(累加器寄存器),探地雷达,SFR,或立即常数。注册是一种用于ALU操作没有地址专用寄存器。控制寄存器(CR)块只能通过一个默认的源/目的大多数指令。内部上电复位(POR)和外部复位可以作为设备复位源。看门狗定时器(定时器),定时器0(TMR 0),内部振荡器,八级深栈和中断处理能力有助于提高系统的成本和功耗。双向I/O引脚被分组到一个,B,和C振荡器启动定时器(OST)增加振荡器的可靠性。图3-2 P06结构图程序存储功能:记忆中的p06包括程序存储器,配置存储器,数据存储器,寄存器和控制寄存器。有两种寻址方式在p06:非线性和线性寻址方式寻址方式。在非线性的寻址方式,用一个寻呼方案。在线性寻址模式,所有的数据是

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1