Mplab代写-PIC16F886
时间:2021-11-16
Design Project
ELEC 2117, Electrical System Design, Term 3, 2021
You must design and develop a temperature and humidity monitoring and control system using the
PIC16F886 microcontroller. The hardware, system functionality, and assessment details are explained
below.
Required Components
• Breadboard
• PIC16F886 Microcontroller (on breadboard adaptor)
• Alphanumeric LCD Module
• Keypad
• DC Motor
• DHT11 Temperature Humidity Sensor
• LEDs
Other Available Components
• Resistors
• Capacitors
• BJTs (PN2222)
• Power MOSFETs (IRLB8743)
• Diodes (1N4004)
• 5V Relays (HRS2H-S-DC5V-N)
• Voltage Regulators (7805)
System Description
The proposed system should operate according to the following specifications.
• On startup, the LCD must display both team members’ full names separately for roughly 1 second.
If any full names cannot fit on the screen, then they can be shortened or truncated.
• Display and continually update the temperature and humidity on the LCD read from the DHT11
sensor. You may display both temperature and humidity simultaneously or use the keypad to switch
between temperature display and humidity display. It is preferred to display them separately with
clear labels for ease of use. It is also recommended to use the 8-bit checksum sent from the DHT11
to verify the data received is not corrupted.
1
• If the temperature is greater than a specified set-point (of your choosing), the motor should be turned
ON.
• As a further requirement, when the motor is ON, it should run at 3 different arbitrary speeds based
on 3 separate thresholds of your choosing. The 3 LEDs must also light according to the current
speed mode. The system should work according to the following piecewise expression. Let Ti, where
i = 1, 2, 3, be the temperature thresholds you select, then if:
1. current temperature < T1 ⇒ motor is OFF, LEDs are OFF
2. T1 ≤ current temperature < T2 ⇒ motor runs at speed S1, LED 1 is ON
3. T2 ≤ current temperature < T3 ⇒ motor runs at speed S2, LED 1 & LED 2 are ON
4. T3 ≤ current temperature⇒ motor runs at speed S3, LED 1 & LED 2 & LED 3 are ON
The motor speed must be controlled by varying the duty cycle of the PWM output from the PIC.
This must be done using the CCP1 peripheral, which you will have to research from the PIC16F886
datasheet yourself.
• For a basic system implementation, temperature thresholds T1,2,3 and speed levels S1,2,3 can be
hard-coded within your program.
• For a comprehensive system implementation, your system should allow the user to change temper-
ature thresholds T1,2,3 using the keypad. Before such changes, the system should be driven into a
“service mode” (using a keypad command), where all LEDs and the motor are turned OFF. Once
the changes are made, the user can drive the system back into “normal mode” (again using a keypad
input), where the system will operate based on the updated T1,2,3.
• Lastly, you also need to password-protect the entry into “service mode”, and the password must be
the zID of one of the team members.
Guidelines
• Project duration is weeks 8-10 (inclusive), though it will be released in week 6 for your reading to
allow an early start.
• You will be evaluated based on a project demonstration and a report.
• Project demonstrations will be during week 11 (tentative). Your program must be able to run
standalone without connecting to the PICKit Debugger.
• Project reports must be submitted on or before 12 noon on 22/11/2021. Submit a typed report
in pdf format (at least four pages long excluding code), which should be clear, comprehensive, and
include the following:
– A brief description of the project.
– Detailed design specifications.
– Relevant block diagrams of the design.
– All interfacing circuit diagrams.
– Details of software design (including flow charts, pseudocodes etc.).
– Appropriate test results.
– A discussion showing a clear understanding of the project. This may include any reasons for
non-functioning parts (if there is any) and potential system improvements.
2
• Thoroughly read data sheets of the LCD module, motor, temperature sensor, and PIC16F886. It is
recommended that you divide the main project task into several sub-systems and work on each sub-
system first (do a bit of planning beforehand). Also, allocate some time to integrate the sub-systems
together to achieve a complete and functional system.
• Additional lab time may be provided based on the availability of the labs.
• Each group of two students need to submit a single common report.
• Though this project is a team activity where two students are paired up in a group to carry this design
out, each team member will be evaluated separately for their understanding of and contribution to
the design. Each member will be asked about any part of their solution.
Assessment
This project carries 40% of the total course marks. You will be assessed based on the demonstration of a
correctly working system, including the oral examination (30%) and project report (10%).
3




















































































学霸联盟


essay、essay代写