红外数字式转速表外文翻译要点_第1页
红外数字式转速表外文翻译要点_第2页
红外数字式转速表外文翻译要点_第3页
红外数字式转速表外文翻译要点_第4页
红外数字式转速表外文翻译要点_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、本科毕业设计(论文)外文翻译浙江师范大学本科毕业设计(论文)外文翻译译文:基于微控制器的速度表暨里程表ARUN KUMAR V ADLA文章来源:electronics for you, 2008: 60 64.通常,数字式车速表仅能在豪华汽车和高端摩托车中找到。即使您的摩托车有一个机械车转速表,当它受到损坏时您将做什么?首先,您需要替换机械蜗轮,然后替换缆绳。无论如何,我们这里描述得是如何给您的摩托车设计一个数字式车速表。该电 路使用一个微型控制器、液晶显示和一些常用的组件。这是一个更好的替代机械速 度计,甚至以最低技术水平的初学者也可以组装的物品。数字速度表暨里程表的特 点是:1 .数字读

2、出2 .显示的速度为公里/小时3 .显示行驶的移动距离4 .读数(EEPROM)固定在存储器中保存的5 .由于使用微控制器就比较可靠6 .无机械磨损和撕裂7 .在家中可以自己制速度变换装置或传感器8 .在完成99,999.9 km后会自已重新设置到零9 .容易修造和固定在自行车上计算你首先需要知道的自行车前轮的半径。这里的计算是基于对英雄本田的辉煌典范。前轮半径为30厘米(这可能随品牌或模型变化)。wheel=2九r的圆周(其中r 为厘米),周长=2 >3.14 30 =188.4厘米或一点八八四米。速度。让我们假设他在1秒钟完成一次转动。换言之,在一秒钟内,自行车前进了1.88米。所以

3、在 km/hour 的速度: NX1.88 3600/1000= N 鼠784或 NX6.8 'N 是每秒 转过的转数。6 .8是一个常数,并且仅N'变化,例如,如果'N'是5,速度 等于5x6.8 = 34公里/小时。距离。里程表每隔100米更新一次,包括100米,车轮必须作出约53次转动(100/1.88)。 微控制器采用的计算革命,速度计算,结果转换和显示任务。电路说明IC1 t 7S05 3LCD1 16M2 EL16C2由“1T23 * 57*F3.PJ.F.1HJPt O 户 PIN Pt J PT J OHJ5 pt 0 PUTP3 i7x

4、3;>DOIC3 4m5图.1基于微型控制器的数字式车速表附带测路器的电路在图.1显示。电路中使用的各种组件的功能如下所述。微型控制器。由于它的与基于CISC的8051家庭的低数 字计算、支付能力和兼容性从 Atmel的一个20引脚的AT89C2051微型控制器使用 这里。所有的微控制器引脚可利用的项目。这个微型控制器具有2 KB的闪存,128个字节RAM, 15条输入-输出(输入/输出)线、两个16位定时器或者计数器、一个 5向量两级中断结构,、一个全双工用行口、一个高精确度模拟比较器、一片上振荡 器和时钟电路。液晶显示模块。要显示移动的速度和距离,我们使用一块基于 HD44780的1

5、6x2字 母数字液晶控制器。LCD的背光功能,使数据即使在夜晚都依然可见。 LCD的引脚 配置和液晶显示功能。早前已经被发表在液晶显示器有 EFY的几个问题中。串行EEPROM。距离行驶的读数都保存在一个外部串行 EEPROM中。在这里使用 的是24C02飞禾I浦协议的串行 EEPROM。总线协议。该总线由两个活动连接线和一条地线。主动线,串行数据线(SDA)和串行时钟线(SCL)是双向的。挂接到总线的每个设备都有自己唯一的地址,不管 它是一个MCU, LCD驱动器,内存或ASIC。根据功能,这些芯片都可以作为一个 接收器和/或发射机。显然,LCD驱动器只是一个接收器,而记忆体或I/O芯片可以

6、 同时发射器和接收器。该总线是一种多主总线。这意味着,超过一个IC发起数据传输能力可以连接到它。该协议规范规定的 IC,它被认为是上启动主机总线的数据传输。总线主机通常是微控制器。因此,所有其他 IC被视为在这一瞬间的总线。假设 在MCU要发送数据到它的总线之一。首先,微控制器将发出一个起始条件。 作为一 个注意'信号所连接的所有设备,这行为。总线上的所有IC将听取传入的数据总线。则MCU发送的设备,它希望访问地址,以及标明是否有访问是一个读'或写'操作。 收到的地址,所有IC将比较它自己的地址。如果不匹配,他们只是等待,直到总线 由停止条件释放。如果地址匹配,芯片将产

7、生一个响应所谓的承认信号。我们已经用写在这个项目的运作。一旦接收到应答信号微控制器,它可以开始发送或接收数 据。在我们的例子中,MCU将发送数据。当一切都过去了,微控制器会发出停止条 件。这预示着,巴士已被释放,而连接的 ICS可能期待着另一个传输到任何时候启 动。我们有几个国家在总线上:启动,地址,承认,数据和停止。这些总线上的所 有独特的条件。在我们的项目中,微控制器是主串行 EEPROM是奴隶。定期的读数 存储在EEPROM和以前的阅读是从EEPROM中检索每个自行车启动时。转速传感器。对于这个项目,我们利用一种简单的自制速度传感器的使用。车轮的 旋转是由一个干簧管的联合行动,并固定在车

8、轮磁铁感应。每一次当车轮转动时, 该传感器发出一个脉冲给微控制器。光耦。光电耦合器是用来对付反弹的时候,干簧管触点闭合的影响。电源供应器。使用三端电压后,对于各部分电路的电源从汽车的12V的电池后减少到5V。软件软件的Init_EEPROM'口 'Speeds一项目的程序源代码是用汇编语言。这是编 译使用打开来源 ASEM-51汇编器生成Init_EEPROM.hex和Speedo.hex文件。十六 进制文件被烧入微控制器芯片。两个单片机的内部定时器被配置为8位计数器来计算转速传感器产生的脉冲数。一个定时器用于测量距离和速度的计算等。一个软件 延时一秒后产生的高速计数器被触发。

9、速度计数值是从逆记数器得到。为了加快进 程,查找数据表存储在ROM,帮助微控制器转换成相应的速度值的脉冲数。该方案 流程图如图.2所示。在 距离'计数器加每隔100米。该轮已使53个转动实现这一目 标。距离柜台装有一个203的初始值(255-53 +1),并在每个转动时递增。经过 53 次计数,定时器溢出并产生一个中断来通知微控制器。在中断服务程序,微控制器 更新相应的DS加'距离变量。而是在每个周期的节能距离变量,当车辆在停止时(速 度00.0公里/小时)微控制器会保存这些读数。换句话说,当车辆停在交通信号或之 前关闭点火键S,最后读数保存到EEPROM中。同样再次检索阅读时

10、从自行车是开 启未来的阅读时间,为每个更新 EEPROM中。图.2制造建设中的簧片开关和磁铁需要在电机的自行车(英雄本田的辉煌)前轮固定。一个小的圆形磁铁(直径约2厘米),通常在使用扬声器的小玩具中是都可以用到的。 磁铁固定在鼓的中部连接到下方的辐条轮鼓。磁铁固定使用热胶水或环氧树脂。固 定磁簧开关,PVC管的机械需要,需要使磁铁和干簧管正确对齐,如图 .3所示。将3.2厘米直径、长15.2厘米PVC管测量垂直剪下,分为两半。只用一个一半 的PVC管。坐骑和安全保障的的干簧管和电缆用领带固定在熟料手柄上(通常用于 紧急照明设备)。一旦烘干,焊两条线的另一端当两个簧片开关的引线。塑料手柄上 用螺

11、钉固定。现在,请将前面避震前叉,使得磁簧开关管正对磁体的开关。连接万用表,将它设置在连续性模式下,两条电线来宇磁簧开关。慢慢转动方向 盘,当磁铁横跨它通过时,看看簧片开关是否关闭。如果是这样的话,万用表会提 供连续性的响声。当磁铁移开远离磁簧开关后,蜂鸣声将停止,这表明该簧片开关 处于打开状态。做一些试验,以找到安装和固定的 PVC管,让磁簧开关顺畅工作的 最佳位置。马克前面减震器叉的位置。现在您可以修复的PVC管玩意儿的减震器前叉采用热胶,如图所示.5。使用一定的热胶,以确保管道的自由。仔细检查自行车的 车把上的两条电线之间的关系,以确保能顺利使用电缆线,这就完成了传感器安装 的一部分。主电

12、路和液晶显示模块可安装在合适的塑料外壳中,可随时在电子商店 中买到。这些外壳应具有易于安装的液晶面板预切槽。如果这样的框不可用,您可 以使用适当取消对某些部分的液晶面板的电子电抗器的塑料盒。电源可采取直接从 自行车的12V的电池或挖掘控制台的大灯开关和指示灯。为此,您需要拆卸交换机 控制台并积极用万用表识别正面导线和接地导线。在进行这一步时,记住要关闭点 火。钎具60厘米两芯线连接到交换机控制台内的正负极。必须采取从交换机控制台 提供,它的优点是点火钥匙的控制,而主要单位是无需单独的通断开关电源。一个 实际的尺寸,单面印刷电路板的基于微控制器的速度表暨里程表布局如图所示。在 图.7和元件布局图

13、.8。测试当所有的部件测试被焊在PCB上,方案与Init_EEPROM.hex文件放置在一个微 控制器和20引脚微控制器芯片和相应的开关电路。在LCD的第一行, 'INIT_EEPROMi现。五秒钟后,00000 .显示在第二行。这个过程将删除任何以 前的数据并且将EEPROM中的初始读数调整为零。现在关掉电源和speedo.hex的主要文件中的微控制器。编程后,单片机电路和开关电源回到先前的状态。LCD会显示公里:00000.0在第一行,速度 千米/小时:00.0在第二行。现在,先准备你要测 试的车子。连接两条电线从干簧管和电源线来的主要单位。装载在自行车的车把中 心的u的夹子用于固

14、定手柄的机箱顶部单位。您可以使用电缆来做到这一点。安装 布置的位置如图.6。现在来做个测试,启动自行车,如果连接是正确的,速度和距离 将在液晶显示屏上显示出来。像聚乙烯防护罩可用于雨天的主机使用。EFY注意。本文的源代码已被列入thismonth的EFY - CD中。图.4图.515图.6ODDKTER$2 ONzDFf 瓯 geum'-图.8图.7原文:Microcontroller-based Speedometer-Cum-OdometerARUN KUMAR VADLAThe article source : electronics for you , 2008: 6064.N

15、ormally, digital speedometers are found only in luxury cars and high-end motorbikes. Even if your motorbike has a mechanical speedometer, what will you do when it gets damaged? First, you need to replace the mechanical worm gear and then the cable.Anyway, we describe here how to build a digital spee

16、dometer-cumodometer for your motorbike. The circuit uses a microcontroller, an LCD display and some commonly available components. It is a better alternative to the mechanical speedometer and even a beginner with minimal skill level can assemble it.The features of the digital speedo-meter-cum-odomet

17、er are:1. Digital readout2. Speed displayed in km/hour3. Distance traveled displayed in kilometers4. Readings saved in non-volatile memory (EEPROM)5. Reliability due to use of the microcontroller6. No mechanical wear and tear7. Home-brewed speed transducer/sensor8. Self reset to zero after completio

18、n of 99,999.9 km9. Easy to build and fix onto the bikeCalculationsYou first need to know the radius of the bike' s front wheel. The calcahetibasedeonHero Honda ' s Splendor model. The radius of the front wheel is 30 cm. (This can vary with the brand or model.) Circumference of the wheel= 2兀

19、r(where ' r' is in cm)= 2 x 3.'4 x 30= 188.4 cmetres.Speed. Let ' assume that in 1 second he wheel completes one revolution. In other words, in one second, the bike has covered 1.88 metres. Therefore the speed in km/hour: NX 1.88 x 3600/1000= N x 6.784 or N x 6.8 where' N' is

20、 the number of revolutions per second.constant and only ' N' vares; poe, if' N' is 5, the speed equals 5x6.8= 34 km/hour.Distance. The odometer is updated every 100 metres. To cover 100 metres, the wheel is required to make approximately 53 revolutions (100/1.88).The microcontroller

21、takes care of the tasks of revolutions counting, speed calculation, conversion and display of results.Circuit descriptionThe circuit of the microcontroller-based digital speedometer-cum-odometer is shown in Fig. 1. The functions of various components used in the circuit are described below. Microcon

22、troller. A 20-pin AT89C2051 microcontroller from Atmel is used here because of its low pin count, affordabilityDI 1*400/ +LCDf 1fix2 ELI6021OOCUFPOWER(C1 :7805 30 S3 ,HE£:P ,SwrrCHFig. 1.and compatibility with CISC-based 8051 family. All the available pins of the microcontroller are utilised in

23、 the project. This microcontroller features 2 kB of Flash, 128 bytes of RAM, 15 input/output (I/O) lines, two 16-bit timers/counters, a five-vector two level interrupt architecture, a full-duplex serial port, a precision analogue comparator, on-chip oscillator and clock circuitry.LCD module. To disp

24、lay the speed and distance traveled, we have used a 16x2 alphanumeric LCD based on HD44780 controller. The backlight feature of the LCD allows data to be visible even at night. The pin configuration and features of this LCD have earlier been published in several issues of EFY Serial EEPROM. The read

25、ings of the distance traveled are saved in an external serial EEPROM. Here, a 24C02 serial EEPROM based on Philips I 2c protocol is used.I C bus protocol. The I2C bus consists of two active wires and a ground connection. The active wires, serial data line (SDA) and serial clock line (SCL) are bidire

26、ctional.Every device hooked up to the bus has its own unique address, no matter whether it is an MCU, LCD driver, memory or ASIC. Each of these chips can act as a receiver and/or transmitter, depending on the functionality. Obviously, an LCD driver is only a receiver, while a memory or I/O chip can

27、be both transmitter and receiver.The 12C bus is a multi-master bus. This means that more than one IC capable of initiating a data transfer can be connected to it. The I2C protocol specification states that the IC that initiates a data transfer on the bus is considered the bus master. Bus masters are

28、 generally microcontrollers. Consequently, all the other ICs are regarded as bus slaves at that instant.on tLet ' s assume that the MCU wants to send data to one of its slaves. First, the MCU will issue a START condition. This acts as an' attention ' signal to all of the connected device

29、se AUSiwill listen to the bus for incoming data. Then the MCU sends the address of the device it wants to'read ' or 'write ' t match, they simply wait uoperation. Havin ntil theaccess, along with an indication whether the access is aaddress, all ICs will compare it with their own add

30、ress. If it doesnbus is released by the stop condition. If the address matches, the chip will produce a response called 'acknowledge ' signal. We have used write operation in this project.Once the MCU receives the acknowledge signal, it can start transmitting or receiving data. In our case,

31、the MCU will transmit data. When all is done, the MCU will issue the stop condition. This signals that the bus has been released and that the connected ICs may expect another transmission to start any moment.We have several states on the bus: start, address, acknowledge, data and stop. These are all

32、 unique conditions on the bus. In our project, the microcontroller is the master and the serial EEPROM is the slave.The readings are periodically stored in the EEPROM and the previous reading is retrieved from the EEPROM each time the bike is started.Speed sensorF or this project, we make use of a s

33、imple home-made speed transducer. The rotation of the wheel is sensed by the combined action of a reed switch and a magnet fixed on the wheel. The sensor sends a pulse to the microcontroller each time a revolution is made.Optocoupler. An optocoupler is used to counter the effects of bouncing when th

34、e contact of reed switch is closed.Power supply.The power supply for various parts of the circuit is drawn from the vehicle ' s 12V battery after reducing it to 5V using a three-terminal voltage.SoftwareThe ' Init_EEPROM ' and 'Speedo' source codes of this project are written in

35、Assemblgeangua These are compiled using an open-source ASEM-51 assembler to generate the Init_EEPROM.hex and Speedo.hex files. The hex files are burnt into the microcontroller chip.Two internal timers of the microcontroller are configured as 8-bit counters to count the number of pulses generated by

36、the speed sensor. One timer is used to measure the distance and the other for speed calculation.A software delay of one second is generated after the speed counter is triggered. The speed count value is obtained from the counter registers. To speed up the process, a look-up data table is stored in t

37、he ROM that helps the microcontroller to convert the number of pulses into the corresponding speed values. The program flow-chart is shown in Fig. 2.The ' distance ' courrteremented every 100 metres. The wheel has to make 53 revolutions to achieve this. The distance counter is loaded with an

38、 initial value of 203 (255-53+1) and is incremented on each revolution. After 53 counts, the timer overflows and generates an interrupt to notify the microcontroller that 100 metres are covered.In the interrupt service routine, the microcontroller updates the corresponding ' DS1 distance variabl

39、e. Instead of saving distance variables after each cycle, the microcontroller saves these readings when the vehicle is at halt (speed is 00.0 km/hour). In other words, when the vehicle is stopped at traffic signals or before the ignition key s turned off, the last reading is saved to the EEPROM. The

40、 same reading is again retrieved from the EEPROM when the bike is turned on next time and the readings are updated for each trip.Fig. 2.ConstructionThe reed switch and a magnet need to be fixed on the front wheel of the motor bike (Hero Honda' s Splendor). A small circular magnet (about 2 cm in

41、diamet re), normally used in speakers of small toys, can be used. Fix the magnet to the central drum of the wheel just below the spokes connected to the drum. Secure the magnet using hot glue or Araldite.For fixing the reed switch, a PVC pipe contraption needs to be made so that the magnet and reed

42、switch are aligned as shown in Fig. 3. The materials required to build the contraption are shown in Fig. 4. Cut a 3.2cm diameter PVC pipe measuring 15.2 cm in length perpendicularly into two halves. Use only one half of the PVC pipe. Mount and secure the reed switch using Araldite and cable ties on

43、the plastic handle (normally used in emergency lights). Once it dries up, solder two wires to the two opposite end leads of the reed switch. Fix the plastic handle on the half cut PVC pipe using screws. Now, place the pipe on the front shock-absorber fork such that reed switch faces towards the magn

44、et. Connect a multimeter, set in continuity mode, to the two wires coming from the reed switch. Rotate theFig. 3.Fig. 4.wheel slowly and see whether the reed switch closes when the magnet passes across it. If it does, the multimeter will give a continuity beep. When the magnet moves away from the re

45、ed switch, the beep will stop, indicating that the reed switch is open. Make a few trials to find the optimal position for mounting and fixing the PVC pipe such that the reed switch works smoothly. Mark the location on the front shock-absorber fork.Now you can fix the PVC pipe contraption to the sho

46、ck-absorber fork using hot glue as shown in Fig. 5. Use liberal amount of hot glue to secure it to the pipe. Carefully route the two wires up to the bike ' s handle bar using cable ties to secure the wire. This completes the sensor moting part.Fig. 5.The main circuit and the LCD module can be ho

47、used in suitable plastic enclosures, which arereadily available in electronic projects shops. These enclosures should have precut slot for easy mounting of the LCD panel. If such boxes are not available, you can use the plastic boxes of electronic chokes by suitably removingSome portions for the LCD

48、 panel. Power supply can be taken either directly from the bike' s 12Vbattery or tapped from the console which houses horn, headlight and indicator light switches. For this, you need to remove the switch console and identify positive wire and ground wire using a multimeter.When carrying out this step, remember to turn the ignition key to' on' poscoon. Solder a 60cm tvwire to the positive and negative terminals inside the switch console. The advantage of taking supply from the switc

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论