联系方式

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

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

日期:2025-06-07 09:59


ASSIGNMENT ONE

Semester 1, 2025

ITAE6.100 Automation and Embedded Systems

Weighting: 70% of final grade

Length: Refer to the Notes pages

Due Date:

Time:

INSTRUCTIONS:

• You will work in teams of two and submit one set of lab sheets covering all four lab sessions.

• All submitted work must be original and entirely your own, except when incorporating ideas, quotations, tables, diagrams, code, or any other material from external sources. In such cases, proper acknowledgment must be given using the APA referencing style.

• Submitted work must not be reused for assessment in any other academic course.

Case Study: Simple Boiler Smart Controller

Section A. Assessment Introduction

The assessment for this course involves designing and implementing an automated system to control a simple water boiler.

The assessment is structured according to the topics covered in this course, which means we will follow the following approach:

• Design the solution using digital logic in Logisim(Topics 1 & 2)

• Solution implemented as program code on a microcontroller (Topics 3 & 4)

• PLC solution created in OpenPLC for the Pico (Topics 5 & 6)

• HMI solution with a PLC & SCADA design (Topic 7)

Section B. Hardware Details of the Boiler Smart Controller

The logic and process control to drive the hot water is based on a Raspberry Pico with peripheral devices. Theboiler controller controls a power switch for the heater set by user driven choices. The user can select the desired heatand the Boiler Controller will heat the water to the set temperature. There are several indicators, buttons and fail-safe measures. A block diagram of the proposed boiler controller is provided below.

NOTE: The model may have missing features, controls, functions, etc.


Figure 1 Diagram Block of the Simple Boiler Controller

Inputs & Outputs

The centre of the Boiler controller is the Raspberry Pico. Attach to the Pico are the following interface controls and indicators.

Digital inputs

• Two buttons attached to digital inputs to start and stop the heating process

• Two buttons attached to digital inputs to adjust the temperature up and down from 80°C up to 180°C

• One button attached to a digital input for the emergency stop

• One digital input is used for an over pressure release switch

Digital outputs

• One digital output for a LED to indicate the boiler heater is activated

• Six digital outputs attached to 6 LEDs to indicate the temperature scale

Analogue Input/output

• One analogue output is used to driver a servo that would operate a water valve

• One analogue input for the temperature sensor (Thermistor). This will be the boiler temperature sensing component

Optional Inputs/Outputs

Peripherals displayed with a dotted line are not required to be implemented. These provide additional features for example:

• OLED display – ideal to display the settings an operation status of the Boiler controller. This is deal for implementation in CircuitPython and possibly OpenPLC with Arduino extensions.

• DHT11 – this if for the environmental temperature and humidity readings. This is deal for implementation in CircuitPython and possibly OpenPLC with Arduino extensions.

• Buzzer – this can be used for audible feedback to drive an alarm when the Boiler pressure switch is triggered. Can be implemented as Logic gates, CircuitPython or in OpenPLC.

• RGB LED – extra visual indicated to show temperature approaching setpoint or alarming, etc.

This is a deal for implementation in CircuitPython and possibly OpenPLC with Arduino extensions.

All of the external devices (grey dotted boxes) are NOTimplemented. They are present for the model completeness.

Implementation

A prototype of the device/appliance is to be created/assembled with the Raspberry Pico and several components from the provided electronics kit. Only the power provided through the USB port is permitted for the prototype assembly.

For safety reasons, the assembly be attached to any mains power lines, wall socket or live wires.

Section C. Operating procedure of the appliance

The goal is to duplicate the operation of the above appliance as a process control implementation for automation. The general operating behaviour to reproduce is described below. As you progress through the assessment you will be expected to design/create/duplicate the operation based on the requirements of the task.


Figure 2 Basic UI for the boiler controller

Start/stop button operations

• When the start button (RUN_STATE) is pressed, the temperature set buttons are disabled. The heater is turned on (the red LED is turned on). The emergency button will respond to presses. The temperature set LEDs switch to become the temperature status LEDs.

• When the stop button (STOPPED_STATE) is pressed, the heater is turn off (the red LED is turned off). The emergency button presses are is ignored and the temperature set buttons are enabled. The temperature set LEDs switch to become the temperature set LEDs.

Temperature


Figure 3 Temperature indicator

• The six LEDs are used to indicate the 11 temperature values within the 80-180 range as shown in the above.

• When the controller is in the STOPPED_STATE then the LEDs will indicate the desired (SETPOINT) temperature.

• When the controller is in the RUN_STATE then the LEDs will indicate the measured (ACTUAL_TEMPERATURE) temperature from the thermistor.

Pressure switch and emergency switch

• If the pressure switch is activated and the controller is in the RUN_STATE then the controller changes the operating state STOPPED_STATE. The switch is ignored in the STOPPED_STATE.

• If the emergency switch is activated and the controller is in the RUN_STATE then the controller changes the operating state STOPPED_STATE. The switch is ignored in the STOPPED_STATE.

Inlet valve control

• Water entering the boiler is controlled by a servo that slowly opens and closes the value. When entering the RUN_STATE the servo should open from 0% to 80% (hint: duty cycle) in increments of 5%.

• When entering the STOPPED_STATE, the servo must close the value by returning to 0% from the controller 80% in increments of 5%.

PID controller

A simple software PID controller is used to maintain the temperature based on the SETPOINT and the ACTUAL_TEMPERATURE.

PART 1: DIGITAL LOGIC (Topics 1 & 2)20marks

Introduction

The focus of this part of the assessment is various aspects of digital logic and is based on topics discussed in class. The goal is to duplicate some of the case study operation as digital logic. The logic design activity requires the use of the (Logisim) logic simulation software. The appliance has several digital inputs and outputs.

Requirements

• The operation of the boiler. E.g: How does the boiler know when it has enough water?

• NOTE: You are not required to implement missing features or controls.

Task: Button & light operation

• Create a logic circuit that reflects the operation of the buttons.

• Extend the above logic circuit to include the LED outputs.

• Include a counter to implement the temperature LED operation.

• No analogue circuits are required.

[20 marks]

Submission requirements for Part 1

For Part 1 submission, you need to document your work by taking screenshots of each step and providing a detailed explanation of the logic behind your Logisim design. Additionally, include a description of the contributionsmade by each team member. This should be compiled into a Word document named <yourname>-part1.doc. Along with the document, ensure that all necessary Logisim files (.circ) are included as evidence of your work. Once all required files are collected, place them in a folder and compress it into a single ZIP file named Group*_Part1.zip, where "*" represents your group number. This ZIP file will be your final submission.

Preparation for the next activity

To prepare for the next lab activity, ensure you have at least the following components and parts ready for assembly:

• Raspberry Pico plugged into the breadboard

• At least seven LED’s (colours not important for the task) and resistors

• Six buttons

• One thermistor

• One servo motor

PART 2: CONTROL SYSTEMS (Topics 3 & 4)25marks

Introduction

The focus of this part of the assessment is on leveraging aMicrocontroller to implement a control system, and is based on topics covered in class. The objective of this assessment is to demonstrate your ability to use a microcontroller to achieve a set of requirements. Parts of the assessment might require additional research or actions to be able to move forward, e.g. installing or configuring software and reading datasheets.

This part of the assessment will continue to use the Case Study Simple Boiler Smart controller.

Details & Requirements

This assessment requires you to set up and configure the Raspberry Pi Pico with suitable CircuitPython firmware and the mu editor to demonstrate functioning programs using physical hardware.

Some of the resources required for this task can be found in the picoPLC starterkit. You will find the following files that will be used in this activity

• Pico-OpenPLC-A4-Pinout.pdf – updated pinout to align the Pico with PLC functionality.

• adafruit-circuitpython-raspberry_pi_pico-en_US-8.0.3.uf2 – CircuitPython firmware

• code folder – contains sample code and the requiredboot.py & iomapping.py file and lib folder for this activity

To confirm operation on the breadboard, you must take photos/video of the “appliance” in action

Task 1: Process control in CircuitPython

With an understanding of how the case study appliance operates, the next step is to convert the operation into program code. The program will be written in CircuitPython to operate on the Raspberry Pi Pico.

• Install the required files and folders onto the Raspberry Pi Pico

• Map out the case study appliance inputs and outputs to the pinouts as reflected in the Pico-OpenPLC-A4-Pinout.pdf document and the iomapping.py file. E.g Temperature sensor – %IW0 (analogue input)Water Value actuator - %QW (analogue output)


• Connect the necessary buttons, LEDs, servo and Temperature sensor to the Raspberry Pi Pico on a breadboard (ensure the device is not plugged into a computer when setting it up).

o Use the previous mapping to connect the components

o Use suitable resistors for the LEDs

o The inputs have an internal pulldown so buttons need to be connected to 3V3 and the GPIO.

o Use the PCLcode1.py to test the inputs and outputs

• Write a CircuitPython program that best reflects the operation of the case study appliance.

[20 marks]

Task 2: Control system using a PID

Extend the above program code to include a suitable control system.

• Apply a PID controller to ensure the temperature control is maintained.

• Comment on why the PID in this scenario may not be the most suitable control system.

[5 marks]

Submission requirements for Part 2

For Part 2 submission, gather all required materials and place them in a folder named Group*_Part2, where "*" represents your group number. This folder should include short videos (about 10 seconds each) or photosdemonstrating the hardware in action, along with written documentation explaining how you addressed challenges during the lab and detailing each team member’s contributions. Additionally, include all code files for Tasks 1 and 2. Once everything is collected, compress the folder into a single ZIP file named Group*-part2.zip for final submission.

NOTE: Keep the above circuit intact for the next lab activity

PART 3: Programming with a PLC (Topics 5 & 6)25 marks

Introduction

The focus of this part of the assessment is on various aspects of Programmable Logic Controllers (PLCs) and is based on topics covered in class. Parts of the assessment might require additional research or actions to be able to move forward, e.g. installing or configuring software.

Details & Requirements

This part of the assessment will require you to set up and configure the OpenPLC PLC IDE to demonstrate functioning program using either simulation tool or their respective physical hardware. This part uses the Raspberry Pi Pico as the PLC device with the Pico-OpenPLC-A4-Pinout.pdf mapping the pins as inputs and outputs. Make sure you are familiar with the pinout.

Make sure you have extracted and setup the OpenPLCdistribution software. You will need the OpenPLC Pico firmware.uf2 file from the picoPLC startkit to be installed onto the Raspberry Pi Pico. This WILL erase the CircuitPython installation so make sure you have a backup of your code.

This part of the assessment assumes you have retained the breadboard circuit from the previous lab activity.

To confirm operation on the breadboard & OpenPLCRuntime, you must take screenshots/photos/video of the “appliance” in action

Task 1: IEC 61131-3 LD or FBD on the Raspberry Pi Pico PLC

• Use the OpenPLC application to create a LD or FBD program that meets the operation requirements for the appliance in the case study.

• Prepare to upload the program to the device, ensuring the “Enable Modbus RTU (Serial) is checked. The baud should be 115200, the other settings can be left as default.

• Upload the program to the Raspberry Pi Pico and confirm it is operating as intended.

[15 marks]

Save the program, from either the LD or FBD, as a ST file to be used with the OpenPLC Runtime in the next step

Task 2: OpenPLC runtime and the Raspberry Pi Pico PLC

• Once you have confirmed the above programs are working on Raspberry Pi Pico, the next step is to use the OpenPLC runtime to operate the Raspberry Pi Pico.

• Start the OpenPLC runtime and load the ST program generated from above.

• Confirm the OpenPLC runtime is correctly configured for the Raspberry Pi Pico.

• Start the Runtime and confirm the Raspberry Pi Pico is operating as intended.

[10 marks]

Submission requirements for Part 3

For Part 3 submission, collect all required materials and place them in a folder named Group*_part3, where "*" represents your group number. This folder should include your Ladder Diagram (LD) or Function Block Diagram (FBD) program, short videos (around 10 seconds each) demonstrating the correct functioning of your code for Tasks 1 and 2, and a written documentexplaining how you addressed challenges during the lab and outlining each team member’s contributions. Once everything is gathered, compress the folder into a single ZIP file named Group*_part3.zip for final submission.

NOTE: Keep the above circuit & loaded program (LD or FBD) intact for the final lab activity

PART 4: HMI (Topic 7)15marks

Introduction

The focus of this part of the assessment is on creating anHMI based on topics covered in class. Parts of the assessment might require additional research or actions to be able to move forward, e.g. installing or configuring software such as Python and supporting packages.

Details & Requirements

This part of the assessment will require create a simple UI written in Python and NiceGUI to demonstrate a functioning HMI program. This part uses the Raspberry Pi Pico as the PLC device that has been preloaded with a program from the previous lab activity. Use the following figure as guidance for the interface. You can substitute image and other elements to represent the various UI widgets.


Figure 4 Basic UI for the boiler controller

The archive MUST include any screenshots, reports, documents you created too.

This part of the assessment assumes you have retained the breadboard circuit from the previous lab activity.

Portable Python kit

To simplify this task a portable Python installation has been prepared that includes the Python installation and supporting packages (NiceGUI, pyModbus, PySerial) for this project. Any additional packages are left up to your discretion and can be installed using the provided pip.cmd batch file. This installation has been prepared for a Microsoft Windows environment; however, you can use any other operating system too. Just install the above packages to test the demo code.

NiceGUI UI framework

The HMI makes use of the NiceGUI Python package that lets you write Python code to generate an interactive HTML page using your browser as the rendered. Various examples have been provided to assist you in creating the above UI with only the basics of Python knowledge required.

Task: HMI UI for the Raspberry Pico PLC

• Create a UI that best reflects the requirements of the case study appliance in terms of the inputs and outputs.

• Connect the UI widgets the respective Modbus addresses used by the Raspberry Pi Pico program.

[15 marks]

Submission requirements for Part 4

For Part 4 submission, collect all required materials and place them in a folder named Group*_Part4, where "*" represents your group number. This folder should include pictures and videos related to the assessment, along with a written document explaining where and how you added or wrote the code during the lab. The document should also describe the code function blocks and detail each team member’s contributions. Once all materials are organized, compress the folder into a single ZIP filenamed Group*_Part4.zip for final submission.

ITAE6.100 Automation and Embedded SystemsPage 9 of 9ITAE6.100 Automation and Embedded Systems Practical.docx

相关文章

【上一篇】:到头了
【下一篇】:没有了

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

python代写
微信客服:codinghelp