联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2022-11-10 10:40

COMP9032 Lab 4


Oct. 2022

1. Objective

In this lab, you will study how to detect the motor speed.


2. Description


The DC motor on the AVR Microcontroller Board is DC (Direct Current) voltage driven.

The motor is attached to a disc and the disc has four holes, as highlighted in the figure

below.


OpE OpO Mot POT


Figure: DC Motor on the Lab Board


The speed of the motor is measured in revolutions per second (rps). To determine the

motor speed, we use a shaft encoder. The encoder uses the infrared light emitter and

detector that are each placed on the different side of the disc. When a hole of the disc is

situated between the emitter and the detector, the light can pass through the hole and

turn on the detector; otherwise, the light is blocked, and the detector is off.


The emitter is active high (i.e, it emits light when OpE=1) and the detector is active low

(i.e, OpO will go low when the detector can see the light). For further circuit information,

2

refer to the “I/O Connection Diagram” available on the References page of the course

website.


Power up the AVR Microcontroller board and connect the pin named as POT (output

from the potentiometer) to the Mot pin (input to the motor) on the lab board. As you turn

the potentiometer, the speed of the motor changes accordingly.


To measure the motor speed, you need to design to count the number of holes detected

by the shaft encoder per second and the motor speed is this value divided by 4.


3. Task (15 marks, due your lab session in Week 9)


Write an AVR assembly language program that measures the speed of the motor and

displays the speed on the LCD. The motor speed can be adjusted by the POT

(potentiometer) on the lab board.


Assemble your program using Atmel Studio and run it on the AVR Microcontroller Board.

Demonstrate your work to the lab assessor.


Assessment: The task will be accessed based on both overall group work and

individual presentation during the demonstration which is split into

1) One member demonstrates your group work with the lab board.

2) Other members each explain part of your assembly code.


Your marks of this lab consist of 60% from the overall group work and 40% from your

individual presentation. All participating members have the same group marks.


相关文章

版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp