Project 02
Project 02
SPRING 2014
Laboratory Design Project/Project #2
(Team Project)
Total: 40 pts. (10% of the course grade)
Due 5:00pm, Wednesday, April 16, 2014
The theme of the project is to move an object that has been placed on a conveyor belt
from a start position to a specific end position. If it was built, a physical model of the
plant would include the peripherals as follows: a Start Switch, a LED indicator, a Buzzer
(a small speaker), an IR (Infra Red) Emitter and Receiver Module, an H-Bridge Motor
Driver Module, and a Motor Encoder Module. In the absence of a fully assembled
physical model, the IR Module will be substituted by a IR LED indicator (i.e., a
common LED) and a bounce-free switch (STOP#), the output signal of the Encoder
Module will be provided by a Function Generator (initial frequency is 5.5KHz), and
the PWM signal to drive the H-Bridge will be verified using a Logic Analyzer
(initial duty cycle is 50%). All signals should comply with TTL levels.
The system should implement the operations as follows: upon receiving the asserted
START# signal (active-low), the Buzzer should sound (the frequency of the output signal
f = 5.5KHz), and the LED indicator should blink six times (at the rate of 1 blink/s). The
Buzzer should also be turned off when the blinking is over. Then the IR Emitter LED
should be turned on. The PWM signal driving the motor should also be turned on at this
point (f = approx. 30KHz, initial duty cycle = 50% to match the input frequency of 5.5
KHz). Until an active-low signal from the IR Receiver (i.e., from the STOP# switch) is
detected indicating that the object on the belt has tripped the IR beam, the system should
sample the frequency of the signal received from the Encoder, and respond to it by
adjusting the duty cycle of the PWM signal as given in the Table below.
Input frequency (KHz) 4.7 4.9 5.1 5.3 5.5 5.7 5.9 6.1 6.3
Duty cycle of PWM signal (%) 90 80 70 60 50 40 30 20 10
When the desired end position for the object is reached, the PWM signal should be turned
off (duty cycle = 0%), the Buzzer should sound (at 3.5KHz), and the LED indicator
should blink 10 times (at the rate of 2 blinks/s). The Buzzer and the IR LED indicator
should be turned off when the blinking is over. The process should restart when the
START# signal is asserted again.
You are to design, simulate, build, and demonstrate the operation of the system
specified above using the STM32F4-DISCOVERY Board in the Lab and circuits
constructed on your Breadboard.
Tasks:
a) Summarize the key points of your design. That should include a list of ports
and bit maps, and a discussion of your approach to implement the required
functions using hardware and software means. You should clearly indicate
what internal modules of the STM32F4 microcontroller have been used (if
applicable). You should set the CPU and peripheral clocks Comment on your
design steps, and give a conclusion of your project. (5 pts.)
b) Give a detailed schematic diagram for the whole system. The DISCOVERY
Board should be represented by its interface connector signals. All STM32F4
microcontroller port signals used in your design should be buffered by suitable
parts. All parts should have pin numbers and all traces should have signal
names assigned. (5 pts.)
c) Develop a C program for the software segment of the system. Turn in your C
source file along with the compiled .lst file with comments. In addition, turn
in electronic copies of oscilloscope/logic analyzer screen shots and other
picture files as appropriate to document the performance of your system with
respect to the speed control task (14 pts.)
d) Build your circuit on your Breadboard and demonstrate the correct operation
of the whole system to your Lab TA, or the course instructor. (16 pts.)
Each Design Team should submit a joint Project Report. In the report you should have
the sections Introduction, Design, and Conclusions. The Design section should cover for
Tasks a) - c). In the Conclusions section you should assess the performance of your
system. You are also expected to comment on your work on the project.
Note: you will lose 4 pts. by each day your project (a working system and a report) is
tardy. No credit will be given if the project is late by more than three days. No projects
will be accepted after 5:00pm, on Friday, April 18, 2014.
Bonus Projects
(Team Project)
Grand Total: 28 pts. (7% of the course grade)
Due 5:00pm, Wednesday, April 16, 2014
Bonus Project #1 (8 pts)
Add the tasks to the Basic Project as follows:
- Appropriately command and control the available H-bridge motor IC to operate
the prototype conveyor system, moving forward and backward.
- Provide the means to the system (switches and LEDs) to initiate the actions and
display the status of the motor control task.
Bonus Project #2 (12 pts)
Implement Bonus Project#1 and add the tasks as follows:
- Utilize the PING ultrasonic proximity sensor capability to continuously monitor
the location of an object on a prototype conveyor system.
- Establish two locations at specified distances from the end of the belt in order to
stop the belts movement. Make sure that the object will be halted within +/- 0.25
inches from the target locations. Provide the means to get the belt movement
started and restarted until the object reaches its final destination. The stop and the
restart actions should be accompanied by sounds and display lights as they are
specified in the Basic Project.
Bonus Project #3 (8 pts)
Implement Bonus Project#2 and add the tasks as follows:
- Add an alphanumeric LCD display to the system. The displayed messages should
indicate when the object is moving, or halted and the two stop positions in inches
from the belts end position.
- Provide for an emergency stop capability.