You are on page 1of 6

EMEC455 - Project 01

School of Engineering
American University in Dubai

Course Code: EMEC455 Course Name: Mechatronic Systems


Semester & Year: Fall 2022 Date: Monday, 10 Oct. 2022 (Week 07)
Instructor: Salem Haggag DUE Date: Monday, 28 Nov. 2022 @ 5:00 PM (Week 14)

No Student Name ID/Major Score

1 ………………………………………………. …………………….…………………………

2 ………………………………………………. ……………………….………………………

Directions
- You must clearly and neatly show your work to qualify for full credit.
- The main task of your report is to communicate information, so report organization is very important.
- Project should be submitted with this cover page.
- Neatness counts, 20% will be deducted for lack of neatness or not following the directions.
- Work this project on your own.
- Use A4 paper size (single face).
- Do not stable your project report, instead use paper clip.
- Late submissions will not be accepted.
- All type of knowledge sources is allowed but it need to be clearly cited.
- Your work must be original: no copying from any other term or any other class, and no copying from any classmate.

Course Learning Outcomes


Report

CLO1: Design actuators, solenoids, and other mechatronics systems components for mechanical applications that
X
meet specified needs.
CLO2: Identify the main ethical and professional responsibility of mechatronic systems implementation, and
X
considering the global impact of mechatronic systems on the economy, environment, and society.
CLO3: Compare, through personal research, the applicability and characteristics of basic and advanced
X
mechatronics systems, such as PLCs, distributed control systems, and embedded microcontrollers.

No Format Abstract Chapter Chapter Chapter Chapter Chapter Chapter Interview Total
1 2 3 4 5 6 Factor
1 /10 /10 /20 /5 /35 /5 /10 /5 /100% /100
2 /10 /10 /5 /20 /5 /35 /5 /10 /100% /100

*By signing above you confirm that the submission has been fully prepared by you. Any suspicion of copying or plagiarism in this work will be
reported to the Dean or Chair for appropriate investigation and appropriate disciplinary actions, which may result in a “0” on the work, an
“F” in the course or other penalties as described in the Student Handbook, which can be found online at:
http://www.aud.edu/files/StudentHandbook.pdf

1|Page
EMEC455 - Project 01
School of Engineering
American University in Dubai
Project Title: Refrigerator Controller

Introduction
A refrigerator controller is basically the brains of the refrigerator cooling system—it runs the show. A
temperature sensor is typically found inside the refrigerator and have a knob that allows users to adjust the
temperature setting. Once a user sets the desired temperature, the controller maintains that temperature by
controlling the flow of electricity to the compressor based on the signal received from the temperature sensor.
If the controller is the brain, the compressor is the heart of the operation, responsible for pumping the
refrigerant through the system. When the air inside the refrigerator is at the desired temperature, the
controller stops the flow of electricity to the compressor. When the temperature sensor senses too much heat,
it allows electricity to flow, activating the compressor.
Project Description
In this project, each group of students is required to develop a refrigerator controller by utilizing the modern
approach used in the design and implementation of Mechatronic System. The objectives of this project are:
• Understand and utilize the concept of Hardware-In-the-Loop (HIL) simulation (sometimes called Real-
Time Interface). In HIL, the controller is used actual hardware by interfacing to it with some of the system
actuators and sensors.
• Produce efficient high-level source code from the block diagram or visual modeling interface using Code
Generator capability of MATLAB/Simulink. The control code will be compiled and used on the Computer
System.
• Abject the controller parameters using the Embedded Processor Interface feature. The Embedded Processor
Interface is used to tune the final product performance. This feature provides communication between the
controller and the computer-aided prototyping environment (MATLAB/Simulink).
Required Hardware and Software
The following hardware and software are required:
1. PC with MATLAB/Simulink and Arduino IDE (Integrated Development Environment),
2. MATLAB/Simulink with Simulink Arduino Toolbox.
3. Arduino Board,
4. Inputs/outputs:
▪ Inputs: two Potentiometers, one Switch;
▪ One Relay output, one LED output, One Audio Buzzer (or three LEDs for just testing purposes)

How to Add Arduino Toolbox to Simulink


• Open MATLAB.
• Click on “Add-Ons” on the upper menu bar (the upper menu is called Toolstrips).
• Choose “Get Hardware Support Packages”.
• Choose “Simulink Support Package for Arduino Hardware”.
• On the right-hand side, click “Install”.
• Sign to your MathWorks account, if you do not have one, create one.
• Check accept “The MathWorks Auxiliary Software License Agreement”.
• Click “Next”.
• Connect the Arduino board to the USB port of the computer.
• When the installation reaches a window that shows “Complete the Configuration”, choose “Setup Now”.
• During this step, the package will detect the Arduino board connected to the computer.
• when you see a massage “Do you want to verify the setup”, select “Yes”.
2|Page
EMEC455 - Project 01
School of Engineering
American University in Dubai
• Then click “Test Connection”.
• If you receive a massage from Windows Firewall to allow access, click “Allow Access”.
• When the test is done, click “Next”.
• Uncheck “Show Examples for Support Package” and then click “Next”.

Making sure that the Simulink has the required Arduino Toolbox:
• Open new Simulink Model (By opening MATLAB, click “New” on the upper menu and choose
“Simulink Model”).
• Choose “Blank Model”.
• Click the “Library Browser” to open the Simulink Library.
• Scroll down in the Simulink Library items and make sure you have the “Simulink Support Packages for
Arduino Hardware” toolbox in the Simulink Library.

Software Development Tools:


Software development can be done either in
1. Arduino IDE environment using C language: Developer will need to learn how to develop C code,
compile, debug code using the Arduino IDE.
2. MATLAB/Simulink, plus Arduino Board Simulink Library: Developer can develop the control
code in Simulink, and then auto-code it for Arduino target, then download and run it on the
Arduino board.
Figure 1 below shows the configuration of the refrigerator controller Arduino software development
tools.

Figure 1: Refrigerator Controller using Arduino Board – Software Development Tools

3|Page
EMEC455 - Project 01
School of Engineering
American University in Dubai
Inputs and Outputs:
Figure 2 below shows the refrigerator controller using Arduino board circuit diagram. The inputs and
outputs of the Arduino controller are identified below:
Inputs: two Analog Inputs, one Digital Input
1. Desired Temperature Potentiometer: Analog Input. The desired temperature for the refrigerator is
specified by the user via a rotary potentiometer (in real refrigerator, a Graphical User Interface
(GUI) with a potentiometer like input device is used).
2. Actual Temperature Sensor: Analog Input. The actual temperature of the refrigerator is specified by a
rotary potentiometer. (in real refrigerator, the actual temperature is measured using a temperature
sensor such as RTD or Thermistor).
3. Door Sensor: Digital Input. This sensor detects if the Door is Open or Closed.
Outputs: three Digital Outputs
1. Compressor Motor Relay Output: Digital Output. Controller turns ON/OFF compressor motor via
relay output (digital output) for the cooling function using a software control function for relay
control with hysteresis function.
2. Light Output (LED): Digital Output. Turn ON, when the Door is Open.
3. Audio Output (Buzzer): Digital Output. Turn ON, when the Door is Open more than a certain time
period.

Figure 2: Refrigerator Controller using Arduino Board – Circuit Diagram


4|Page
EMEC455 - Project 01
School of Engineering
American University in Dubai
Control Logic
1. Relay Control with Hysteresis: When the desired temperature is less than the actual temperature
plus a hysteresis (i.e. 1 degree), the refrigerator starts the compressor: turn ON compressor. The
compressor cools the refrigerator until the desired temperature is reached minus a hysteresis (i.e. 1
degree). Then the compressor is turned OFF. The hysteresis is intended to prevent the actual
temperature from fluctuating too much around the set temperature, which would result in the
compressor constantly switching itself off and on. Hysteresis value is a programmable constant.
2. Light Control: When the door is open, the light is turned ON.
3. Audio Control:
▪ When the door is open too long (a programmable time period), a beeping acoustic signal is
generated.
▪ If the compressor does not reach the set temperature despite activity of the motor over a long period
of time (another programmable time period), then the buzzer emits a steady acoustic signal.
Programmable Parameters
1. Hysteresis value of Relay Control
2. Time Period Delay 1 (Door open too long): intermittent beeping on the Buzzer.
3. Time Period Delay 2 (Compressor has been running too long without being able to reach desired
cooling temperature): Continuous beeping on the Buzzer.
Test Plan:
Testing is an ever increasingly important activity in embedded software development. The only way to
find potential problems (the obvious ones and not so obvious ones that occurs under very rare conditions
and yet must be captured, corrected and tested again) is to have a systematically developed test plan. In
simple applications, test plan is simple and obvious. In complex applications, the test plan and its execution
may take longer time and cost more than the actual development of the application software.
Test Plan Steps
Operate Inputs, Observe Outputs.
1. Use one potentiometer to enter Set Temperature
2. Use one potentiometer to mimic (manually simulate) the Actual Temperature
3. Use Digital Input number (the switch) and turn it ON/OFF to simulate Door Open condition.
4. Observe Digital Output 0: Compressor ON/OFF output
5. Observe Digital Output 1: Door Open Light
6. Observe Digital Output 2: Buzzer
Project Report Structure Guidelines
The project report must at least include the following sections
➢ The same cover page given in this project document with project team information written clearly on it.
➢ A table of content
➢ A list of Figures
➢ A List of tables
➢ Project Abstract (150 words maximum)
➢ Chapter 1: Introduction (a maximum of four pages).
➢ Chapter 2: Project Electronic System (a maximum of four pages)
➢ Chapter 3: Control Logic Development (a maximum of four pages)
➢ Chapter 4: System Experimental Testing and Analysis (a maximum of four pages)
5|Page
EMEC455 - Project 01
School of Engineering
American University in Dubai
➢ Chapter 5: Project Non-Technical Issues (a maximum of two pages).
➢ Chapter 6: Conclusion (a half page maximum)
➢ References
➢ Appendices
Important Note:
✓ Two members project group is required to develop the control logic using the Software
Development Tool option 2 only.
✓ Three members project group is required to develop the control logic using the Software
Development Tools option 1 and 2.
✓ A report hardcopy needs to be submitted by the project due date/time
✓ Use the cover page for the report hardcopy only.
✓ A soft copy (project report in PDF & Word format and MATLAB/Simulink files) need to be emailed
by the project due date/time to Dr. Salem Haggag at shaggag@aud.edu
✓ One minute late in submitting the project hardcopy or electronic files will result in project rejection.

6|Page

You might also like