for educational purposes only. Do not copy. Python code at end of document.
Introduction .................................................................................................................. 4
IoT System .................................................................................................................. 4
Purpose and Scope of the System ............................................................................ 4
Requirements ........................................................................................................... 4
Justification of Requirements .................................................................................... 5
Intended Audience .................................................................................................... 6
Benefits .................................................................................................................... 6
Constraints ............................................................................................................... 6
User Interactivity ....................................................................................................... 7
Architecture ................................................................................................................. 7
Designs ....................................................................................................................... 8
Design Diagrams ...................................................................................................... 8
Logic Diagrams ......................................................................................................... 9
Alternative Design Ideas ......................................................................................... 10
Why Were the Alternatives Were Not Chosen? ........................................................ 10
Technical and Design Constraints ........................................................................... 10
Feedback On the Designs ....................................................................................... 11
First Tester .......................................................................................................... 11
Second Tester ..................................................................................................... 12
Design Improvements / Optimisation ....................................................................... 13
Optimisation 1 – Changing of Logic Diagram ........................................................ 13
Original Design ................................................................................................. 13
Optimised Design ............................................................................................. 14
Explanation of Design Optimisation ................................................................... 15
Optimisation 2 – Updates to the Logic Diagram .................................................... 15
Original Design ................................................................................................. 15
Optimised Design ............................................................................................. 16
Explanation of Design Optimisation ................................................................... 17
Justification of Design Decisions ............................................................................. 17
,Past BTEC IT Level 3 assignment submitted per 2016 RQF & scored a Distinction. Shared
for educational purposes only. Do not copy. Python code at end of document.
Evaluation of Optimised Design............................................................................... 18
M2M Architecture ....................................................................................................... 19
Technical Standards .................................................................................................. 20
System and Device Communication Requirements .................................................. 20
System and Device Capabilities .............................................................................. 21
Network Location .................................................................................................... 21
Security ..................................................................................................................... 21
Remote Management ............................................................................................. 22
Effects of Malicious Attacks on the Prototype System .............................................. 22
M2M Integrated System or Device Operations ............................................................ 22
Programming Techniques and Constructs .................................................................. 23
IoT System Prototype Implementation ........................................................................ 26
PIR Sensor ............................................................................................................. 26
Raspberry Pi Pico WH ............................................................................................ 27
Complete Prototype System Implementation ........................................................... 28
System with PIR turned off ................................................................................... 28
System with PIR and Movement Detection on ...................................................... 29
System Generated Email Inbox ............................................................................... 30
System Generated Email ........................................................................................ 30
Web Dashboard – Movement Detection On ............................................................. 31
Web Dashboard – Movement Detection Off ............................................................. 31
Log File .................................................................................................................. 32
IoT Analytics .............................................................................................................. 32
Test Plan for Prototype System .................................................................................. 32
Analysis of Testing .................................................................................................. 33
Optimising of Prototype System.................................................................................. 33
First Optimisation .................................................................................................... 33
Before Optimisation – JSON File .......................................................................... 34
After Optimisation – Inside Program ..................................................................... 35
,Past BTEC IT Level 3 assignment submitted per 2016 RQF & scored a Distinction. Shared
for educational purposes only. Do not copy. Python code at end of document.
Explanation on Meeting Client Requirements ....................................................... 37
Second Optimisation ............................................................................................... 37
Before Optimisation ............................................................................................. 37
After Optimisation ................................................................................................ 37
Evaluation of Prototype Against Client Requirements.................................................. 38
Meeting Client Requirements ..................................................................................... 38
Proof for Meeting Client Requirements ....................................................................... 40
Source Code........................................................................................................... 40
Import external libraries ....................................................................................... 40
Constants ............................................................................................................ 40
General variables ................................................................................................ 41
Functions............................................................................................................. 41
connect - connects to Wi-Fi............................................................................... 41
open_socket - opens socket for web browser to connect to ............................... 42
webpage function creates web page HTML code with state of movement detector
and last 10 log entries ....................................................................................... 42
read_log_file : Reads last 10 log entries for the web server ............................... 43
serve – serves pages to client web browser and checks if movement detector
button clicked ................................................................................................... 44
open_log_file – opens log file for appending new movement detections ............. 44
turn_on_pir – turns on PIR sensor and ensures Pico is LED is off initially .......... 45
movement_detected – returns True if movement detected (only if PIR returns 1)
........................................................................................................................ 45
update_log = Adds a new entry to the log file .................................................... 45
send_email – formats email and sends it ........................................................... 45
main_loop – program loops indefinitely here, after setup, detecting movement .. 46
Main code - sets up device and connection then run main_loop until terminated ... 46
Evaluation of Risks and Benefits of the System .......................................................... 47
Evidence that you have demonstrated effective self-management and taken individual
responsibility while working on this assignment........................................................... 50
, Past BTEC IT Level 3 assignment submitted per 2016 RQF & scored a Distinction. Shared
for educational purposes only. Do not copy. Python code at end of document.
References ................................................................................................................ 51
Introduction
I have recently started working as an IT Technician in the Technical Department of a
small company that specialises in security systems and burglar alarms. The director of
the company is investigating if the company could make use of IoT technologies in its
products and services. On top of this, he has asked me to develop a prototype system
which uses this technology. The problem that the directors are keen to solve, is that
their current alarms simply ring an alarm bell when they detect an intruder, but they
would like the alarms to be able to notify the homeowner when an intruder is detected.
IoT System
Purpose and Scope of the System
The purpose and scope of the system is to create a prototype system that uses IoT
technologies for the company’s alarm to not just ring an alarm bell when they detect an
intruder but instead be able to notify the homeowner when an intruder is detected.
Requirements
Requirement ID Requirement
1 Detect movement using a PIR sensor
2 Process the output from the PIR sensor
3 Notify the homeowner of movement by sending an email to the
email address provided by the homeowner
4 Have a working Raspberry Pi Pico WH or similar microcomputer
5 Access to an email API, such as µMail for MicroPython
6 Have reliable access to the Internet
7 Have the correct Wi-Fi password stored, securely, in Raspberry Pi
Pico WH
8 Having the homeowner’s email address, which is put inside the
source code by the homeowner
9 Add text for subject and body of the email to be sent when
movement is detected