air engine - murdoch research repository · air engine thesis 2016 2 declaration i declare that...
TRANSCRIPT
![Page 1: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/1.jpg)
ENG470 ENGINEERING HONOURS THESIS
AS A REQUIREMENT FOR THE COMPLETION OF THE BACH. OF ENGINEERING(HONS) AT
MURDOCH UNIVERSITY FOR INDUSTRIAL COMPUTER SYSTEMS/INSTRUMENTATION
AND CONTROL ENGINEERING.
School of Engineering & Information Technology
Prepared by: Abdul Razak Ibrahim
Academic Supervisor: Associate Professor Graeme Cole
June 2016
Air Engine
![Page 2: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/2.jpg)
Air Engine Thesis 2016
1
Dedication I dedicate this report and project to my family for their moral support and my sponsor Majlis
Amanah Rakyat (MARA) for their financial support. Also, my friends for sharing the knowledge and
ideas during the implementation of this project. Thank you.
Acknowledgement I would like to acknowledge the great help from a staff member at the Department School of
Engineering and Information Technology. Especially to Mr. John Boulton and Mr. Iafeta Laava (Jeff)
for being a handyman, and prepare the tool and equipment used for replacement and installation,
also included Mr. Will Stirling for his help with IT. I also recognize my classmates those are made
meaningful contribute towards the success of this project.
Most importantly, my great supervisor Associate Professor Graeme Cole for his incredible patience
and tireless effort with my terrible organizational skill. I would not have been able to complete this
project and got this far in engineering without the help and support from them.
![Page 3: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/3.jpg)
Air Engine Thesis 2016
2
Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured to
the best of my knowledge that all information sources from secondary sources have been cited and
acknowledged duly as required. If there are any omissions noted herein, they are not intentional in
any way, and corrections for this report are welcome.
Student Sign………………………
Date…………...……………………
![Page 4: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/4.jpg)
Air Engine Thesis 2016
3
Abstract The Murdoch University Air Engine project was built for Industrial Computer System Engineering
(ICSE) students to implement and fundamentally develop a significant understanding of the 68HC11
Microcontroller. This system was developed and designed by third-year undergraduate students for
their project with the help of Murdoch University’s technician and electrician staff for installation of
hardware equipment and information technology (IT) related task. This project is a learning tool that
provides hands-on experience with industrial-grade equipment and the environment. This also
includes maintenance and improvement of its functionality as a part of the on-going thesis project.
Air Engine was one of the first engine designs that helped to introduce the concept that an engine
can be used to run a vehicle. Throughout the years, different designs have been implemented, and
some of them were successful such that they were utilized in the powering vehicles. Also, it is
versatile, therefore, can be used in operations where immense power is required. However, the
basic principles of an engine remain almost the same since cylinders, and other associated
components are used to run it.
The project deals with an Air Engine controlled by a microcontroller. The primary objective of this
project is to develop an embedded and real-time control system based on the Forth programming
language. Other associated aims are to incorporate user interaction via a keypad and LCD screen
which make significant use of the timing interrupt system capabilities for the inputs and outputs
available. Also implementing a form of control for cylinder firing sequences, designing the wiring
diagram, improving the safety feature, implementing set input of Revolution Per Minute (RPM) via
keypad and maintain the rotational speed was undertaken.
The project is now complete and fully operational with fully functioning hardware configurations and
programming language. Additionally, the programming code has been modified and recreated using
simplified code words which make it easier to understand. As well, extensive documentation is
provided to help for the future development of this project.
![Page 5: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/5.jpg)
Air Engine Thesis 2016
4
Contents Dedication ............................................................................................................................................... 1
Acknowledgement .................................................................................................................................. 1
Declaration .............................................................................................................................................. 2
Abstract ................................................................................................................................................... 3
List of Figures .......................................................................................................................................... 7
List of Tables ........................................................................................................................................... 8
Term and Abbreviation ........................................................................................................................... 9
Chapter 1 Introduction ...................................................................................................................... 10
Chapter 1.1 Project Objectives ..................................................................................................... 11
Chapter1.1.1 Main Objective for Understanding operation of the Air Engine .......................... 11
Chapter1.1.2 Objectives for Software Implementation ........................................................... 11
Chapter1.1.3 Objectives for Hardware Implementation .......................................................... 11
Chapter1.1.4 Objectives for Safety Features ............................................................................ 11
Chapter 1.2 Project Outline .......................................................................................................... 12
Chapter 2 Background Information ............................................................................................... 13
Chapter 2.1 Overview of Air Engine .............................................................................................. 13
Chapter 2.2 Technical Information ............................................................................................... 14
Chapter 2.2.1 Hardware Setup .................................................................................................. 14
Chapter 2.2.3 I/O Stack board ................................................................................................... 15
Chapter 2.2.3.1 NMIL-0021B Board .......................................................................................... 15
Chapter 2.2.3.2 NMIS-7003 Digital I/O OPTO Board ................................................................. 16
Chapter 2.2.3.3 NMIS-7070 LCD and Keypad Interface Board .................................................. 16
Chapter 2.2.4 Solenoid Valve ..................................................................................................... 17
Chapter 2.2.5 Pneumatic Cylinder ............................................................................................. 17
Chapter 2.3.4 Air filter regulator ............................................................................................... 18
Chapter 2.3.4 Optical Sensor encoder .......................................................................................... 19
Chapter 2.4 Software Development ............................................................................................. 19
Chapter 3 Technical Approach ....................................................................................................... 20
Chapter 3.1 Understanding operation of the Air Engine .............................................................. 20
Chapter 3.2 Project Implementation ............................................................................................ 21
Chapter 3.2.1 Hardware Interface ............................................................................................. 21
Chapter 3.2.2 Software Implementation .................................................................................. 24
Chapter 3.3 Wiring Diagram ......................................................................................................... 25
![Page 6: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/6.jpg)
Air Engine Thesis 2016
5
Chapter 3.3.1 Previous Wiring Diagram ........................................................................................ 25
Chapter 4 Analysis of Results ............................................................................................................. 26
Chapter 4.1 Result for Auto mode .................................................................................................... 26
Chapter 4.1.1 Auto Mode Flow Chart ........................................................................................ 26
Chapter 4.1.2 Auto Mode Firing and Timing Sequence ............................................................. 27
Chapter 4.1.3 Auto Mode Angle and Rotation .......................................................................... 28
Chapter 4.2 Result for Manual Mode ............................................................................................... 29
Chapter 4.2.1 Manual mode flow chart ..................................................................................... 29
Chapter 4.3 Differences between Auto and Manual Mode.............................................................. 30
Chapter 4.4 Speed Control ................................................................................................................ 31
Chapter 4.5 Updated Wiring diagram ............................................................................................... 31
Chapter 4.5.1 New Wiring Diagram .............................................................................................. 31
Chapter 4.5.2 Optical Sensor Interface Board .............................................................................. 33
Chapter 4.6 Updated Programming Code .................................................................................... 34
Chapter 4.6.1 Add key mapping byte table code .......................................................................... 34
Chapter 4.6.2 Set firing point for clockwise and anticlockwise rotation ...................................... 34
Chapter 4.6.3 The automatic firing cylinder routine .................................................................... 34
Chapter 5 Major Problem Encountered and Solutions ......................................................................... 35
Chapter 5.1 Grounding Issues ........................................................................................................... 35
Chapter 5.2 Mismatching Programming code .................................................................................. 35
Chapter 5.3 Code update .................................................................................................................. 35
Chapter 5.4 Several Components Faulty/Broken ............................................................................. 35
Chapter 5.5 Communication error .................................................................................................... 35
Chapter 6 Future Work ...................................................................................................................... 36
Chapter 6.1 Program Summary ........................................................................................................ 36
Chapter 6.2 LCD implementation ..................................................................................................... 36
Chapter 6.3 Wireless Keyboard ........................................................................................................ 36
Chapter 6.4 Additional Programming ............................................................................................... 36
Chapter 6.5 Human Machine Interaction (HMI) control .................................................................. 36
Chapter 6.6 Safety aspect ................................................................................................................. 36
Chapter 7 Conclusion ..................................................................................................................... 37
Chapter 8 Bibliography ......................................................................................................................... 38
Chapter 9 Appendices ........................................................................................................................ 41
Appendix 9 A: Microcontroller M68HC11 Based Embedded System Hardware .............................. 41
![Page 7: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/7.jpg)
Air Engine Thesis 2016
6
Appendix 9 A.1 NMIS-0021B ......................................................................................................... 41
Appendix 9 A.2 NMIS 7003 ........................................................................................................... 43
Appendix 9 A.3 NMIS-7070 ........................................................................................................... 44
Appendix 9 B: Forth Air Engine Programming Code ............................................................................. 44
Appendix 9 B.1 User-code text file (user code.f) .............................................................................. 44
Appendix 9 B.2 Air engine text file (air engine.f) .............................................................................. 45
Appendix 9 B.2.1 Defines Constants and Variables Code ......................................................... 46
Appendix 9 B.2.2 Set Constant and Variables ........................................................................... 47
Appendix 9 B.2.3 Set Toggle Switch Code ................................................................................. 48
Appendix 9 B.2.4 Set Push Button Code ................................................................................... 48
Appendix 9 B.2.5 Creates Easy Words to Store Values into Address Locations ....................... 48
Appendix 9 B.2.6 Heartbeat Task .............................................................................................. 48
Appendix 9 B.2.7 Coding for Buzzer ........................................................................................... 48
Appendix 9 B.2.8 Create code for LEDs flashing ....................................................................... 49
Appendix 9 B.2.9 LCD Display Code .......................................................................................... 49
Appendix 9 B.2.10 Keypad Setup ............................................................................................... 50
Appendix 9 B.2.11 Manual Mode Code .................................................................................... 50
Appendix 9 B.2.12 Set Cylinder Mask and Offset ..................................................................... 51
Appendix 9 B.2.13 Set Firing Point for Clockwise and Anticlockwise Rotation ........................ 51
Appendix 9 B.2.14 Speed Calculator Command and Task ........................................................ 51
Appendix 9 B.2.15 Automatic Firing Cylinder Routine for Maintaining Speed ......................... 51
Appendix 9 B.2.16 Automatic Mode Code ................................................................................ 52
Appendix 9 B.2.17 Creates the Auto Mode Task .......................................................................... 53
Appendix 9 B.2.18 Automatic Start-Up and Testing words .......................................................... 53
Appendix 9 B.3 Position Interrupt Text File (Positioninterupt.f) ...................................................... 54
Appendix 9 B.3.1 Set Variables for position interrupts................................................................. 54
Appendix 9 B.3.2 Creates Interrupts Task ..................................................................................... 55
Appendix 9 C: Air Engine Hardware ...................................................................................................... 55
Appendix 9 C.1 Solenoid Valve ......................................................................................................... 55
Appendix 9 C.2 Pneumatic Cylinder Specification ............................................................................ 57
Appendix 9 C.3 Air Filter Regulation Specification ........................................................................... 58
Appendix 9 C.4 Optical Sensor .......................................................................................................... 58
Appendix 9 D: ROM Updating Process ............................................................................................. 59
![Page 8: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/8.jpg)
Air Engine Thesis 2016
7
List of Figures Figure 1: Air Engine as the whole system ............................................................................................. 13
Figure 2 Air Engine (Top View) .............................................................................................................. 13
Figure 3 Air Engine (Side View) ............................................................................................................. 13
Figure 4 Air Engine (Front Panel) .......................................................................................................... 14
Figure 5 Air Engine (Back Panel) ........................................................................................................... 14
Figure 6 NMIL-0021B Board .................................................................................................................. 15
Figure 7 NMIS-7003 Digital I/O Board ................................................................................................... 16
Figure 8 NMIS-7070 LCD and Keypad Interface Board ......................................................................... 16
Figure 9 3/2 valve symbol [32] .............................................................................................................. 17
Figure 10 Single Acting Pneumatic Cylinder ......................................................................................... 18
Figure 11 View of Air Filter Regulator ................................................................................................... 18
Figure 12 Optical Sensors OPB815W [36] ............................................................................................. 19
Figure 13 Hardware Implementation Overview ................................................................................... 20
Figure 14 Flow chart of the desired response ...................................................................................... 24
Figure 15 Previous Wiring Diagram for Relay Board and Solenoid Valve ............................................. 25
Figure 16 Auto Mode State Pattern ...................................................................................................... 26
Figure 17 Running on Auto Mode ......................................................................................................... 27
Figure 18 Rotary Encoder Direction ...................................................................................................... 27
Figure 19 Manual Mode State Pattern ................................................................................................. 29
Figure 20 Running on Manual Mode .................................................................................................... 30
Figure 21 Example of Changing Speed Control ..................................................................................... 31
Figure 22 New Wiring Diagram for a) Relay Board and b) Solenoid Valve ........................................... 32
Figure 23 Optical Sensor Interface Board ............................................................................................. 33
Figure 24 Microcontroller M68HC11 Block Diagrams [26] ................................................................... 41
Figure 25 NMIS-0021B Unit Layouts [26] .............................................................................................. 42
Figure 26 NMIS-7003 Unit Layouts [27] ................................................................................................ 43
Figure 27 NMIS-7070 Unit Layouts [28] ................................................................................................ 44
Figure 28 SMC Solenoid Valves [15] ..................................................................................................... 55
Figure 29 SMC Clamp Pneumatic Cylinder [16] .................................................................................... 57
Figure 30 Optical Sensors OPB815W [36] ............................................................................................. 58
Figure 31 Manufacture Selection List Window ..................................................................................... 60
Figure 32 Program Status Window ....................................................................................................... 60
Figure 33 File Format Window .............................................................................................................. 61
Figure 34 Editor Window ...................................................................................................................... 61
Figure 35 Auto Window ........................................................................................................................ 62
![Page 9: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/9.jpg)
Air Engine Thesis 2016
8
List of Tables Table 1 Differences between air and car engine. ................................................................................. 10
Table 2 Inputs and Outputs Terminal ................................................................................................... 21
Table 3 NMIL-0021B Port Mapping ....................................................................................................... 21
Table 4 NMIS-7070 LCD and Keypad Interface Board Port Mapping.................................................... 21
Table 5 NMIS-7003 Digital Input and Output OPTO Card 1 Port Mapping ........................................... 22
Table 6 NMIS-7003 Digital Input and Output OPTO Card 2 Port Mapping ........................................... 23
Table 7 Clockwise Firing Sequences ...................................................................................................... 28
Table 8 Anticlockwise Cylinder Firing Sequences ................................................................................. 28
Table 9 Difference between Auto and Manual Mode .......................................................................... 30
Table 10 Solenoid Valve Specification [15] ........................................................................................... 56
Table 11 Pneumatic Cylinder Specification [16] ................................................................................... 57
Table 12 Air Filter Regulation Specification [18] ................................................................................... 58
Table 13 Optical Sensor Specification [36] ........................................................................................... 59
![Page 10: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/10.jpg)
Air Engine Thesis 2016
9
Term and Abbreviation ADDD - Add 16-Bit to D
COM - Communication Port
EEPROM - Electrically Erasable Read-Only Memory
EPROM - Erasable Read-Only Memory
GND - Ground
I/O - Input/output
ICE - Instrumentation and Control Engineering
ICSE - Industrial Computer System Engineering
IRQ - Interrupt Request
JMP - Jump
LCD - Liquid Crystal Display
LDAA - Load Accumulator A
LDD - Load Double Accumulator D
LED - Light Emitting Diode
MCU - Microcontroller Unit
NPN - Negative-Positive-Negative Bipolar Transistor
OS - Optical Sensor
PA(x) - Port A pin (x)
R/W - Read/Write
RAM - Random Access Memory
RMS - Root Mean Square
ROM - Read-Only Memory
RPM - Revolution Per Minute
RTI - Return from Interrupt
RTII - Real-Time Interrupt
RTS - Return from Subroutine
RxD - Receive Signal
STAA - Store Accumulator A
STD - Store Accumulator D
SV - Solenoid Valve
SW - Switch
TB - Terminal Block
TCTL - Timer Control Register
TDC - Top Dead Centre
TFLG 1 - Main Timer Interrupt Flag Register 1
TFLG 2 - Miscellaneous Timer Flag Register 2
TIC - Timer Input Capture Register
TMSK 1 - Main Timer Interrupt Mask Register 1
TMSK 2 - Miscellaneous Timer Interrupt Mask Register 2
TxD - Transmit Signal
VCC - Positive Supply Voltage
VDC - Voltage Direct Current
![Page 11: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/11.jpg)
Air Engine Thesis 2016
10
Chapter 1 Introduction This project is a teaching and an education tool project for hands-on experience with industrial
equipment and communication system, the most important thing about this project is to keep the
previous work has been done and update the system operations. Hence, the improvement and
maintenance duties to the functionality of the air engine are the primary aspects of the on-going
thesis project.
In the 19th century, the first air engine was produced and was given different names such as heat,
hot air, caloric or compressed air [1]. This early design always had a great potential for high
efficiency and low emission power generation. However, the major obstacle to its practical use in
the past was the lack of sufficiently heat resistant materials since not many materials were known to
the public. This obstacle has now eliminated due to the higher strength of modern material and
alloys. The basic design of an air engine is such that it enables the engine to run purely on
compressed air to expand and extend a pneumatic actuator which turns the engine. [1]
Initially, the air engine used the SwiftX development and programming environment for
implementing the programming code and controlling the system by using a 68HC11 microcontroller.
SwiftX is based on the Forth programming language; it provides a fast, and powerful tool for the
development of software for embedded and real-time control system. As a multitasking software,
operating system SwiftX provides the service to multiple programs operating without any fixed
timing relationship (i.e. asynchronously). [4]
The main idea and concepts of the air engine are similar to a car engine, say one with four cylinders,
where the firing sequence of the cylinder and rotation of the shaft is very similar. However, some of
the differences between an air engine and car engine are the arrangement and actions of the
cylinders, fuel type, and their components. The air engine runs by using compressed air rather than
driving the pneumatic cylinder extension, compressed air uses the expansion of compressed air, in a
similar manner to the expansion of steam in a steam engine. The Table 1 below shows some of the
significant differences between the two engine.
Table 1 Differences between air and car engine.
Components Air engine Car engine
Fuel Compressed Air Petroleum products
Ignition None Needed, spark plug
This project was not started from the scratch but had not been operating for many years since
October 2010, lastly operated by third years’ students for the ENG306 in a class project. Although
they did the project, it was not well documented. The latest programming code was provided but
during the testing and investigation of the software and hardware, it was found that many of the
components were changed and not working because the equipment has been sitting in the store
room for years. For further investigation, underlying the issue and proceed with troubleshooting and
reorganizing the hardware and programming code to end up this project is on-going project hence
this was one of the goals. [8]
![Page 12: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/12.jpg)
Air Engine Thesis 2016
11
Chapter 1.1 Project Objectives The aim of this project is to upgrade the communication and control of the air engine. This Section
consists of four categories which relate to the primary aims of the project. The goals are listed
below:
1. Understanding operation of the Air Engine
2. Software Implementation
3. Hardware Implementation
4. Safety Features
Chapter1.1.1 Main Objective for Understanding operation of the Air Engine
The primary phase was to get the air engine operating and functional. The key focus of this phase
was to ensure this project can operate reliably via the 68HC11 microcontroller and develop the
embedded and real- time control system based on the Forth programming language. The software
has been upgrading to its latest version, from “SwiftX Pro 68HC11 3.8.8 (05 February 2015)” to
“SwiftX/68HC11 V3.8.8 ICSE Lab NMIY-0020 (31 July 2015)”. The programming code from the
previous students can be re-downloaded, and the system can be investigated and tested for any
faulty components or mismatched communication between programming code and hardware. Once
completed, it was possible to underline all the parts that needed replacement followed by
troubleshooting of the wiring and connection for interface electronic, and for mismatched
communication of the programming code can be upgraded and reorganized based on the system.
Chapter1.1.2 Objectives for Software Implementation
The second objective consists of developing and implementing the programming code to
communicate with the air engine. The investigation includes, how the Forth programming language
communicates with the interface electronics and instruments, what changes have to be done for the
program code and how it is working. The next step is to implement user interaction via a keypad and
LCD screen, investigating the significant use of the timing interrupt system capabilities for the input
and output available, implementing the set input of RPM via keypad and maintaining the rotational
speed.
Chapter1.1.3 Objectives for Hardware Implementation
As mention previously, this project was not fully documented which includes missing wiring and
connection diagrams. For the third phase, the purpose is to investigate with rechecking, redesigning
the wiring, block, and process flow diagram for the overall system. Once finished, it will be easier to
troubleshoot and investigate the wiring and any connections problem in the system.
Chapter1.1.4 Objectives for Safety Features
Once the overall system has been successfully implemented and commissioned, the next objective is
to proceed with the design of safety features for the air engine since there is are moving
components which are hazardous for the users and any future works.
![Page 13: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/13.jpg)
Air Engine Thesis 2016
12
Chapter 1.2 Project Outline For the project, the outline will start with an overview of the system design, hardware, and software
is provided to the reader in chapter 2 which relates to the background information and
understanding for the following sections. Chapter 3 will describe the major work undertaken during
the investigation and tested for the project. Also, the description is more related to the objective
phase that has been mention previously. Chapter 4 describes the results acquired during the testing
phase. Chapter 5, outlines the major problems encountered and the issues during the project which
led to not all of the objectives step being satisfied and completed. In chapter 6, there will be a
description of the recommendation for future work and the last chapter will be the conclusion of the
project which will summarize the satisfied and unsatisfied of the project.
![Page 14: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/14.jpg)
Air Engine Thesis 2016
13
Chapter 2 Background Information This chapter contains all necessary background information on the air engine and previous related
work; it will cover an overview of the air engine, and its technical information.
Chapter 2.1 Overview of Air Engine The Murdoch Air Engine is one of the industrial computer system projects for students at Murdoch
University. As shown in Figure 1,2 and 3, this project consists of white chassis made out of box
tubing. Attached to this is a metal flywheel of considerable weight which is mounted to a shaft, held
to the chassis by a series of bearings. The pneumatic cylinders are also attached to the flywheel
crankcase in a similar manner as a car engine design; enabling a linear motion converted into
rotational motion. The solenoid valve transforms an electrical signal into a physical movement of the
valve which allows air to be either vented to atmosphere or pumped through to the cylinders.
Furthermore, this project also consists of a flywheel driven by four pneumatic cylinders. The
cylinders attached in pairs on each side of the wheel are set on two bosses 90 degrees to each other
on the wheel and is attached to the shaft encoder.
Figure 1: Air Engine as the whole system
Figure 2 Air Engine (Top View)
Figure 3 Air Engine (Side View)
![Page 15: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/15.jpg)
Air Engine Thesis 2016
14
Figure 3 illustrates the shaft-encoder disk with 64 holes equally spaced around the circumference of
the disk and one larger hole located in between of the disk. The two optical sensors attach to the
disk are used to initiate a counter that will activate the movement of the solenoid valve whether
extend or retract when the sensor detects the particular set point value of small holes, and will reset
the counter when it senses a big hole.
Chapter 2.2 Technical Information This Section will describe the fundamental knowledge of the hardware and software that is provided
for this project.
Chapter 2.2.1 Hardware Setup
The hardware available in this project is on the front panel as shown in Figure 4 which consists of:
RS232 connector, LCD, keypad, and buzzer,
Seven switches (includes a stop push button, two toggle, and six push-button switches),
Ten LEDs (includes LEDs for a heartbeat, direction, cylinder one to four and output one to
four).
Figure 5 illustrates the back panel consisting of:
Input and output stack board,
Optical sensor interface board,
Relay and solenoid valve interface board.
Figure 4 Air Engine (Front Panel)
Figure 5 Air Engine (Back Panel)
![Page 16: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/16.jpg)
Air Engine Thesis 2016
15
Chapter 2.2.3 I/O Stack board
The input and output stack board consist of three different boards namely:
NMIL-0021B for M68HC11 microcontroller board [26]
NMIS-7003 for digital input and output boards [27]
NMIS-7070 for LCD and Keypad interface board [28]
These boards use the 34 pin JEDSTACK connector as interface signals to the board including the five-
volt supply, ground, control lines, address lines and data lines. The addressing of the circuitry on the
board is identified by two octal comparators that decode the sixteen address lines and one control
line. The current address location can be arranged to a high or low condition by the arrangement of
addressing jumpers. [29]
Chapter 2.2.3.1 NMIL-0021B Board
Figure 6 shows the main components on this board are the M68HC11 micro-controller, EEPROM,
RAM, five parallel ports (includes Ports A, B, C, D, and E), RS232 and reset ports connector. The
micro-controller M68HC11 is the main processor, together with an ancillary component that
provides a very powerful embedded controller and has many derivatives with different memories
slots and output configurations. The microcontroller will allow the rapid program development
through pre-prepared connections to typical components and easy to download and modify the
programming code. The programming code can be developed by using SwiftX or any Motorola
development programming software and then directly download into the mounted ROM. The
connection is directly from the computer serial port to the development board and the various
components through the RS232. [29]
Figure 6 NMIL-0021B Board
This controller board was primarily chosen because it was capable of driving the air engine with low
power consumption and high-performance operations at bus frequencies up to 4MHz. Some of the
features of the M68HC11 controller that includes:
eight bit analog to digital converter,
two of eight on the sixteen-bit accumulator,
two of sixteen index register,
powerful bit manipulation instructions,
six powerful addressing modes,
power equal to saving STOP and WAIT modes,
memory mapped input and output,
eight by eight multiplication,
sixteen by sixteen integer and fractional dividers.
![Page 17: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/17.jpg)
Air Engine Thesis 2016
16
The isolation is provided for this board through the optical isolation unit. This board also provides an
external memory expansion to move the terminal input buffer and dictionary into the external
memory, if the RAM is installed into the address 0100 to 1FFFF of the memory bit. The purpose of
the isolation barrier is to have a safe operating unit. [29]
Chapter 2.2.3.2 NMIS-7003 Digital I/O OPTO Board
Figure 7 NMIS-7003 Digital I/O Board
Figure 7 shows the two boards that provide the extra input and output capacity that is required to
run the air engine setup. There are eight-bit separate inputs and one output on the board for the
LEDs and switches connections. The isolation for this board is provided through the optical isolation
unit; the OPTO-isolation will invert the condition for any outputs activated. Therefore, to activate a
device, the output must be in its low condition and to turn a device OFF, the output must be in high
condition.
Chapter 2.2.3.3 NMIS-7070 LCD and Keypad Interface Board
Figure 8 NMIS-7070 LCD and Keypad Interface Board
The interface boards shown in Figure 8 has two distinctly different type of devices, one is an LCD, it
can have up to four display controller chips, and the other one is the keypad controller. The
programming for these two devices is totally different; they operate completely independently, and
one function can be used without the other. It uses sixteen consecutive addresses, if a display with a
single display controller chip is used, only four address location will be active, two for keypad
controller and the other two for the LCD. [28]
The keypad controller interface is dependent on the particular code generated when a specific
column or row position is activated by a key pressed. The keypad controller will scan the matrix
constantly, and when it detects a key pressed, it will drive the data available to be high. After the key
is released, the data remain latched, and the strobe disappears. For the five data bits A, B, C, D, and
E, are read as data bus bit D0 to D04 and the data available strobe will be read as a bit D6. [28]
![Page 18: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/18.jpg)
Air Engine Thesis 2016
17
This boards also provide a connector with an interface to an intelligent alpha-numeric LCD and
twenty key for the keypad controller. The connectors can be easily associated with a ribbon cable,
power, and ground to the keypad and display. [28]
Chapter 2.2.4 Solenoid Valve
There are four solenoid valves used in this project to operate and control in and out air flow for the
firing of the cylinders. The valves used are ‘3/2 way’ direct acting solenoid valve with two positions
switching and three ports to open or close the inlet or exhaust ports of the solenoid valve. The
original condition of this valve is usually open which means that the initial position for inlet port P is
open to outlet port A with exhaust port R closed. Once energized, the solenoid valve brings the inlet
port P to a closure and outlet port A is enabled to vent through exhaust port R. [32]
Figure 9 3/2 valve symbol [32]
Figure 9 illustrates a 3/2 valve symbol, however, in some instances, the normally open solenoid valve
configuration would use port R as the inlet port and port A as outlet port thus making port P as the
exhaust port. This arrangement offers a reduction in cost and a common way of obtaining the
normally open function. The advantages of this solenoid valve are its low cost, compactness; it does
not require any pressure differential to operate and with a small coil offering reduces power
consumption.
This solenoid valve is also suitable for most general purpose media application and can be found in
either stainless steel, brass and plastic bodies variants. For the specification of the solenoid valve
refer to the Appendix 9 C.1. [32]
Chapter 2.2.5 Pneumatic Cylinder
This project used four single-acting pneumatic cylinders to operate and move the flywheel. This
pneumatic cylinder only has one compressed air inlet flow connection as shown in Figure 10. The
incoming compressed air will move the piston in one direction, and the force within the cylinders
builds up in this direction. If there has no entering of compressed air, the spring pushes the piston
back to its original position. These cylinders have an exhaust hole such that the volume behind the
piston is kept at atmospheric pressure. [30]
The advantages of this pneumatic cylinder are easy actuation via a 3/2-way solenoid valve, defined
the position in the event of a power failure and reduced air consumption. As for the disadvantages,
this cylinder has the spring force to reduces strength, no constant force, the force is simply built in
one direction, and the spring dependent has stroke length limiting the maximum stroke length. For
the specification of the pneumatic cylinder refer to the Appendix 9 C.3. [30]
![Page 19: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/19.jpg)
Air Engine Thesis 2016
18
Inlet FlowExhaust
Figure 10 Single Acting Pneumatic Cylinder
Chapter 2.3.4 Air filter regulator
Air filter regulator is used to reduce the incoming compressed air through for the efficient operation
of pneumatic equipment. As shown in Figure 11, an air filter will clean the entering compressed air
and traps any kinds of material, such as dirt, rust, and dust. [33] It also separates water and oil
entrained in the compressed air. Using the air filter, it ensures:
that less damage is made to the equipment,
that it reduces the production losses, and
the removal of the contaminants from the pneumatic system. [33]
Figure 11 View of Air Filter Regulator
![Page 20: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/20.jpg)
Air Engine Thesis 2016
19
Chapter 2.3.4 Optical Sensor encoder
This project used two optical sensor encoders with two different functions. One is used to detect the
revolution of the flywheel, allowing the calculations of the RPM to be displayed on the LCD.
Secondly, it is used to detect the position of the wheel so that the appropriate cylinders could be
activated. The encoder on the air engine consists of the metal disk with 64 holes cut on the inner
channel of the encoder with one big hole left on the outer channel. The inner channel was used to
determine the relative position of the encoder, but the outer channel finds top dead center (TDC).
The TDC mark allows the revolution of the air engine to be counted accurately and used as a
reference point to determine the optimum firing timing and duration of the speed.
Figure 12 Optical Sensors OPB815W [36]
Figure 12 shows the optical sensor which consists of an infrared emitting diode and an NPN silicon
phototransistor mounted in the low-cost plastic housing on opposite sides. The phototransistor
switching takes place whenever an opaque object passes through the slot. For further information,
refer to Appendix 9 C.4. [20]
Chapter 2.4 Software Development This project is programmed by using SwiftX a programming environment is in for the Forth
programming language. This language was developed in the 1970s by Charles H. Moore; Forth is a
high- level language that provides interactive development and allows language extension. [39]
In the SwiftX folder, there are multiple files which include the app file, user code text file, air engine
text file and position interrupt text file as shown in Appendix 9 B.3. The user code text file is the
important code for this system; it is the main program to start the background of the programming
code that has been created. The app file is programmed into the ROM, a time-consuming process
requiring ultraviolet erasing to wipe the previous program.
The user code text file can be quickly updated via downloading and debugging the program code
from software in the personal computer (PC) terminal to RAM. The testing, debugging and
development of the project programming code is completed in the user code text file. The
programming code can be transferred between the languages. Therefore, this project will focus on
the code design and structure.
![Page 21: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/21.jpg)
Air Engine Thesis 2016
20
Chapter 3 Technical Approach
Chapter 3.1 Understanding operation of the Air Engine The hardware is a significant as the software. The overview as provided in Figure 13 below:
Reset Push Button
Interface Electronics
Terminal Block 6
LEDS for Output 1 to 4
Switches ON/OFF & Direction
Push Button 1 to 4
Buzzer, LEDS for Heartbeat and Direction
Relay Board
Keypad & LCD
Switf-X Development & Program Enviroment
Switf-X Development & Program Enviroment
NMIS-7003 Digital I/O
OPTO Board 2
NMIL-0021BM68HC11
Board
NMIS-7070 LCD & Keypad
Interface Board
Optical Sensor Shaft Encoder Disk
LEDS for Cylinder 1 to 4
Flywheel
Solenoid Valve 1 to 4 Cylinder 1 to 4
RS2
32
NMIS-7003 Digital I/O
OPTO Board 1
Terminal Block 5
Terminal Block 4
Terminal Block 3
Terminal Block 2
Terminal Block 1
Add
ress
& D
ata
Bus
Figure 13 Hardware Implementation Overview
From Figure 13, it can be observed:
The program developed in Swift X can be downloaded from the PC to the M68HC11
microcontroller via a serial connector RS232 cable. The main board consists of an NMIL-
0021B, NMIS 7003 Digital I/O 1 and 2, and the LCD and keyboard interface boards. Each of
these different components conducts a separate operation. They are connected to each
other via a vertical stacking connector (VSC).
NMIL-0021B is the control board. The optical sensor reads the encoder disk value and the
readings are fed to a set of electronics and finally submitting to the microcontroller. Also, a
reset switch is attached to the controller to allow the program to be reset when it crashed
during the development phase.
NMIS 7003 Board 1 – it reads the status of the switches including the direction switch and
the LEDs. It also controls the LED for the output.
NMIS 7003 Board 2 – the latter is concerned with the operation of the buzzer, LEDs for
Heartbeat and direction. As well, it controls the solenoid valves via the relay board. That
results in the moving of the cylinders hence the moving of the wheel. Indirectly, this board is
connected to the controller since the controller reads the rotation of the wheel.
![Page 22: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/22.jpg)
Air Engine Thesis 2016
21
LCD & Keypad Interface Board – it is concerned with displaying the desired process
parameters and keypad controller.
The terminals are the inputs and outputs that feed into the different boards. Table 2
illustrates the various inputs and outputs on the board:
Table 2 Inputs and Outputs Terminal
Boards Inputs Outputs
NMIS 7003 Board 1 Terminal Block 3, and 4 Terminal Block 5, and 6
NMIS 7003 Board 2 No Terminal Block 1, and 2
These boards were connected via a 32 pin vertical stacking connector (VSC) and have different
addresses lines. Each of the four boards has a unique address. Port mapping is done to know the
various addresses that the components have. As well, the various components such as all the LEDs,
buzzer, switches and the inputs for the relay board have different bit addresses. Further information,
can be found in the hardware interface Section in Section 3.2.1.
Chapter 3.2 Project Implementation This Section will demonstrate the project implementation, the different attributes make for the
whole process. The two most important are the hardware interface and software implementation.
Chapter 3.2.1 Hardware Interface
For the hardware interface was complete by re-checking the port mapping for each board. The
approach taken was trial and error to investigate which port was connected to where by setting
individual bits high and low for the port addressed. From a very early stage, it was possible to detect
that the board was wired in a fashion that was since setting the bit high resulted in the output being
the switched off whereas setting the bit low resulting in it being set high. Although the major part of
the code was just easier to continue with the traditional convention that had been learned and
instead utilize the insert command. This trial and error method did, however, lead to the association
of bits and memory locations to control the following inputs and outputs as shown in Table 3, 4, 5,
and 6.
Table 3 NMIL-0021B Port Mapping
Bit Hexadecimal Address Port Address Specification
1 1 Port A1 Outer Ring Encoder
2 2 Port A2 Inner Ring Encoder
Table 4 NMIS-7070 LCD and Keypad Interface Board Port Mapping
Port Address Specification
$8440 Liquid Crystal Display (LCD)
$8441 Keypad Controller
![Page 23: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/23.jpg)
Air Engine Thesis 2016
22
Table 5 NMIS-7003 Digital Input and Output OPTO Card 1 Port Mapping
BIT Hexadecimal Address Port Address Specification
1 01 $8400 (Inputs) Push Button 1
2 02 Push Button 2
3 04 Push Button 3
4 08 Push Button 4
5 10 Direction (Toggle Switch)
6 20 ON/OFF (Toggle Switch)
7 40 No
8 80 No
9 01 $8401 (Outputs) LED Cylinder 1
10 02 LED Cylinder 2
11 04 LED Cylinder 3
12 08 LED Cylinder 4
13 10 LED Output 4
14 20 LED Output 3
15 40 LED Output 2
16 80 LED Output 1
![Page 24: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/24.jpg)
Air Engine Thesis 2016
23
Table 6 NMIS-7003 Digital Input and Output OPTO Card 2 Port Mapping
BIT Hexadecimal Address Port Address Specification
1 01 $8420 (Inputs) No
2 02
3 04
4 08
5 10
6 20
7 40
8 80
9 01 $8421 (Outputs) Relay (Pin 0)
10 02 Relay (Pin 0)
11 04 Relay (Pin 0)
12 08 Relay (Pin 0)
13 10 LED Heartbeat
14 20 LED Clockwise
15 40 LED Buzzer
16 80 No
![Page 25: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/25.jpg)
Air Engine Thesis 2016
24
Chapter 3.2.2 Software Implementation
A flow chart is made before any programming is started. The flow chart is presented in Figure 14
below:
Figure 14 Flow chart of the desired response
When the program is downloaded and debugged, the first thing that the controller would check is
whether the emergency button is pushed. If so, the program will jump to the first state. If not,
progress would be made by jumping to another state which is “checking whether the engine is
initialized”; otherwise, the program will go back to the original state.
Imagine the engine is initialized, all the cylinders and LEDs would be off, however, if the engine is not
on, the result would be the program returning to the beginning state. Suppose the engine is on, and
all the LEDs and cylinders are off, the program will wait for the user to enter the desired mode
shown as the “Selected mode in Figure 14.” The choices offered are between “manual” or
“automatic”. If all the states explained above are false, the program will go to the initial state.
If the engine is not initialized, the program verifies whether the emergency button is pressed and
then goes to the first state. Whenever the emergency button is pressed, all the operations will stop,
and the program will render to the first state. When the engine is not running, the program thinks
that the emergency button is pressed, breaks the operation and goes back to the beginning.
![Page 26: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/26.jpg)
Air Engine Thesis 2016
25
Chapter 3.3 Wiring Diagram As mention previously, this project was not complete documented and has missed the wiring
diagram, after re-designed the previous wiring diagram can be described as shown in Figure 15
below. The design of this diagram was not maintained from former student and the resulted of
wiring the 12 Volt relay and solenoid valve with the polarity inverted into 12 Volt power supply and
also the wiring connection of ground for 5 Volt and 12 Volt were connected in series.
This connection cause of destroyed all four transistors, the consequence of this issue is consumed of
the feedback current from solenoid valve is more than the maximum current of 0.8 ampere (A) for
the transistor. To solve this problem, new wiring diagram has been designed as shown in Figure 22.
Chapter 3.3.1 Previous Wiring Diagram
SV 1
RelayContact 1
Power Supply 112 VDC
D1
T1
R1
Pin 0
D2
T2
R2
Pin 1
D3
T3
R3
Pin 2
D4
T4
R4
Pin 3
Relay 1 Relay 2 Relay 3 Relay 4
Power Supply 15 VDC
Receive signal From TB1NMIS-7003 Digital I/O OPTO Board 2
Pin 0
Pin 1
Pin 2
Pin 3
Stop Push Button
Note:1) Resistor (R1,R2,R3.R4) = 1.5 kΩ 2) Transistor (T1,T2,T3,T4) = NPN Transistor (BC337)3) Diode (D1,D2,D3,D4) = IN4004 4) Solenoid Valve (SV1,SV2,SV3,SV4)
SV 2
RelayContact 2
SV 3
RelayContact 3
SV 4
RelayContact 4
Figure 15 Previous Wiring Diagram for Relay Board and Solenoid Valve
![Page 27: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/27.jpg)
Air Engine Thesis 2016
26
Chapter 4 Analysis of Results This section will brief about the results obtained and will analyze whether the latter is what was
expected from the system. It should be noted that there are two modes of the experiment.
Chapter 4.1 Result for Auto mode Result for auto mode is consists of:
Auto mode flows chart
Auto mode firing and timing sequence
Auto mode angle and rotation
Chapter 4.1.1 Auto Mode Flow Chart
Figure 16 illustrates the flow chart state pattern for auto mode, this is continuing chart as described
and shown in Figure 14 if the auto mode has been selected.
1
Is Auto ModeSelected?
SuspendManual Mode
Task
Stop Firing Cylinders & Turn all
LEDs OFF
Is Toggle Switch ON?
Is Direction Switch ON?
Start ANTI-CLOCKWISEFiring Cylinder & LEDs Sequence, Start Speed Task
Start CLOCKWISEFiring Cylinder & LEDs Sequence,Start Speed Task
Yes
No
Yes
Yes
No
No
Is STOPEngine?
Yes
No
Figure 16 Auto Mode State Pattern
The “1” represents if auto mode is selected. As auto is nominated, the engine is ready to start. When
the engine starts, the program checks whether the toggle switch is reading a high. When the toggle
switch is turned on, the program reads in which the direction switch is reading. If yes, the wheel
from the side view as shown in Figure 3 will rotate clockwise and undergoes a sequence of the LEDs
lighting similar to the firing cylinder rotation but if no then the wheel turns anticlockwise, and the
LED sequence follows the pattern.
![Page 28: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/28.jpg)
Air Engine Thesis 2016
27
Assume that the engine is giving a low then all the cylinders and LEDs cease their operation. Another
scenario is if the engine starts but the toggle switch is not on, the result is the same as described
above. Now, say when the auto mode is selected, and after selection nothing is fed into the
program, the resulting state would be the program jumping to the stage where it checks again if any
mode is selected.
When the auto mode is selected, as a precaution the manual mode is suspended. This step is taken
to avoid confusion between the two modes tasks; that may occur during the simulation given that
this is a learning material for the beginners.
The auto mode is different compared to the manual mode. The former is a firing and timing
sequence as descript in Section 4.1.2. When auto mode is selected it is displayed on the LCD as
shown in Figure 17, also for clockwise and anticlockwise motion, it is indicated through direction
LED.
Figure 17 Running on Auto Mode
Chapter 4.1.2 Auto Mode Firing and Timing Sequence
Figure 18 Rotary Encoder Direction
![Page 29: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/29.jpg)
Air Engine Thesis 2016
28
Figure 18 illustrates the direction of the rotary encoder either clockwise or anticlockwise followed by
the firing sequence as shown in Table 7 and 8. The cylinder is fired over a range of hole counts
between 5 and 20, 21 and 36, 37 and 52, 53 and 4. The difference of the firing sequence for
clockwise and anti-clockwise is in between cylinder 2 and 4; it is because after the optical sensor
detects the big hole, the counter will start to count the position back to zero.
The firing order starts from cylinder 1, 2, 3, 4 for anti-clockwise and cylinder 1,4,3,2 for clockwise.
The duration of the firing time of each cylinder can be changed dynamically in the command
window; this will act to control the speed of the engine. This pattern and sequence of the rotation
are only in auto mode.
Chapter 4.1.3 Auto Mode Angle and Rotation
The auto mode angle and rotation is followed whether clockwise or anticlockwise direction.
Table 7 Clockwise Firing Sequences
Angle, (degree) 0 45 90 135 180 225 270 315
Cylinder 1
Cylinder 2
Cylinder 3
Cylinder 4
For the clockwise firing, assuming at the start of the operation, the arrangement of the cylinders is
(in regards to Figure 18 and Table 7):
Cylinder 1 – will start at an angle of 45 reaching up to 90 degrees during firing,
Cylinder 4 – will be at 135 degrees reaching up to 180 degrees
Cylinder 3 – will be at 225 degrees, attaining up to 270 degrees and
Cylinder 2 – will be at 315 degrees reaching up to 0 degrees.
Table 8 Anticlockwise Cylinder Firing Sequences
Angle, (degree) 0 45 90 135 180 225 270 315
Cylinder 1
Cylinder 2
Cylinder 3
Cylinder 4
![Page 30: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/30.jpg)
Air Engine Thesis 2016
29
For the anticlockwise firing, assuming at the start of the operation, the arrangement of the cylinders
is (in regards to Figure 18 and Table 8):
Cylinder 1 – will start at an angle of 45 reaching up to 90 degrees during firing,
Cylinder 2 – will be at 135 degrees reaching up to 180 degrees
Cylinder 3 – will be at 225 degrees, attaining up to 270 degrees and
Cylinder 4 – will be at 315 degrees reaching up to 0 degrees.
Chapter 4.2 Result for Manual Mode
Chapter 4.2.1 Manual mode flow chart
Figure 19 illustrates the flow chart state pattern for manual mode, this is continuing chart as
described and shown in Figure 14 if the manual mode has been selected.
Figure 19 Manual Mode State Pattern
The “2” asserts the manual mode is selected. This state waits till the user enters all the data such as
push button 3 to do a designated action. At each stage, the program waits till the new condition is
fitted into the system and then it performs the related action.
![Page 31: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/31.jpg)
Air Engine Thesis 2016
30
When the manual mode is selected, the program verifies which button (1,2,3 or 4) is pressed and
depending on the user choice, the according cylinders and LED would start. The firing cylinder would
be displayed on the LCD.
If nothing is selected or if the emergency button is pressed, the program will return to the original
state. It is also possible to stop any of the processes via the software by typing the appropriate code.
Similar to the auto mode, if manual mode is selected, the auto mode is suspended hence no
operations under auto will be performed. When the engine is stopped, all the other operations like
firing cylinders and LEDs will stop respectively.
The purpose of manual mode is to run the system manually by pressed the input push button
whether 1, 2, 3 or 4. Once the desired push button is activated, the relative cylinder will fire, and the
LCD will acknowledge and display which cylinder is firing as the example shown in Figure 20 below.
This mode is an entirely difference with auto mode as descript in Section 4.1.1, once it running in
manual mode the firing order is depending on the desired push button activated.
Figure 20 Running on Manual Mode
Chapter 4.3 Differences between Auto and Manual Mode Though it is the same system, the manual, and the auto mode run differently, and some of the
major differences are given in Table 9 below:
Table 9 Difference between Auto and Manual Mode
Differences Auto Manual
Pattern and Sequence Well ordered, follows angle No pattern and sequence
LCD display Only shows cylinder Shows which cylinder is firing
LED sequence Depends on directions Depends on which push button
is active
Speed Controllable Very slow
![Page 32: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/32.jpg)
Air Engine Thesis 2016
31
Chapter 4.4 Speed Control It was desired to control the speed, however, due to time constraints, this was not entirely possible.
A simple method was used instead where the duration of a cycle was altered resulting in the change
of speed of the wheel. So if the cycle time is less, then the wheel will rotate faster compared the
cycle time is longer. The speed control can be changing while it running in auto mode and to
changing the cycle time follow as example shown in Figure 21 below:
Figure 21 Example of Changing Speed Control
Variable as illustrated in Figure 21 can be described as:
XYZ is variable to modify the number of offsets,
PERIODON is variable to modify the cycle of time,
DISPLAYP is variable to display the current position of the rotary encoder disk.
Chapter 4.5 Updated Wiring diagram As mentioned before, the wiring diagram was updated since there was less information available
from previous years. To solve the problem has been described in Section 3.3, the wiring connection
of solenoid valve and relay board have to separate by two difference of wiring connection and input
of power supply, for further information for this diagram, refer the description in Section 4.51. Also,
a new wiring diagram for optical sensor interface board has been designed as it was missing from
the previous student, for further information for this diagram, refer the description in Section 4.5.2.
Chapter 4.5.1 New Wiring Diagram
Figure 22 illustrates the relay board used a 12 Volt supply as a specification for the relay and
connected in series with the ground of 5 Volt as an incoming signal from digital I/O is 5 Volt supply.
This connection has no feedback current because the 12 Volt supply is used to trigger the relay when
there is an incoming signal from digital I/O board. Once the signal triggers the relay, then contact
relay will be in a closed circuit and energize the solenoid valve to start firing order and sequence as
follow the mode has been selected.
![Page 33: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/33.jpg)
Air Engine Thesis 2016
32
Power Supply 212 VDC
SV 1
Relay Contact 1
SV 2 SV 4SV 3
Relay Contact 2
Relay Contact 3
Relay Contact 4
b)
Power Supply 112 VDC
D1
T1
R1Pin 0
D2
T2
R2Pin 1
D3
T3
R3Pin 2
D4
T4
R4Pin 3
Relay 1 Relay 2 Relay 3 Relay 4
Power Supply 15 VDC
Receive signal From TB1NMIS-7003 Digital I/O OPTO Board 2
Pin 0
Pin 1
Pin 2
Pin 3
a)
Stop Push Button
Note:1) Resistor (R1,R2,R3.R4) = 1.5 kilo ohms2) Transistor (T1,T2,T3,T4) = NPN Transistor (BC337)3) Diode (D1,D2,D3,D4) = IN4004 4) Solenoid Valve (SV1,SV2,SV3,SV4)
Figure 22 New Wiring Diagram for a) Relay Board and b) Solenoid Valve
Item used in Figure 22 are four Diodes (IN4004), four Resistors (1.5 kΩ), four Relays (12 VDC) (Good
sky), two power supply 12 Volt, one power supply 5 Volt, and four NPN transistors (BC337). The relay
pins 0,1,2, and 3 are receiving their signal from the outputs of the NMIS digital I/O board two which
is primarily responsible for the movement of the cylinders. Also to stop the operation in case of an
emergency, there is a push button to break the contact, known as the “Emergency stop push
button.”
The transistors are used to control the amount of current that flows through the other components
hence securing them from an overcurrent situation. As well, the diodes dictate that the current will
flow in only one direction. The resistors are put into place to limit the amount of current flowing
through the circuit. The solenoid valves (SV1-4) are powered by a 12V supply as shown in Figure 22
(b). The Relay from Figure 22(a) acts as a trigger which then make the contact relay from the bottom
circuit to be closed, and the solenoid valves (SV1-4) would be energized hence this will allow the
movement of the cylinders.
![Page 34: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/34.jpg)
Air Engine Thesis 2016
33
Chapter 4.5.2 Optical Sensor Interface Board
Figure 23 illustrates another wiring has been designed after go through in detailed the interface
board. This board is used to detect the movement on the wheel.
ORANGELED
C2C1
1 2 76543
GND
VCC
IC:SN74LS14N
14 13 12 11 10 9 8
Power Supply 15 VDC
G1 R1
G2 R2
B2W2
OS1
OS2
R1
R2
R4
R3 REDLED
R5 R6
PA1 PA2
B1W1
Send signal to Port A1 and A2
Note: 1) OS1 and OS2 – Optical Sensor 1 and 22) VCC – Positive Supply Voltage3) GND – Ground 4) IC – Inverter Chip
Figure 23 Optical Sensor Interface Board
This diagram can be described as:
The signal coming from the optical sensor will be converted by an inverter chip to high if the
optical sensor detects the signal and low if undetected.
This board uses two LEDs. The red LED is for position detection, and the orange LED is for
revolution.
A 5 VDC supply powers this board.
There are two optical sensors to detect the position (small hole) and revolution (big hole).
R is the resistor – (R1, R2, R5, R6 = 470Ω), (R3 and R4 = 68-kΩ)
C is for Capacitor – (C1 and C2 = 0.1µF)
Inverter chip (IC), model SN74LS14N [40]
After inverted signal then sending to port A1 (revolution) and port A2 (position).
The IC is a non-inverting Schmitt Trigger. [41] The latter acts as a voltage comparator which has two
different threshold levels. If an input signal is higher than the upper threshold level of the
comparator, a high is fed to the rest of the circuit and vice versa [41]. The advantages are their low
price, no need to have a really neat signal since they can read through noisy signal too [42].
![Page 35: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/35.jpg)
Air Engine Thesis 2016
34
The current IC was provided with the board, and the previous work has been conducted using the
same board. Some highlights of the IC are [40]:
Low input voltage, around 5V,
Low current output, about 8mA.
Chapter 4.6 Updated Programming Code The updated programming code was developed in relation the technical approach in Section 3 and
updated wiring diagram in Section 4.5. Some of the update and new code written are:
Add a new key mapping byte table code,
Set firing point for clockwise and anticlockwise rotation,
The automatic firing cylinder routine,
Chapter 4.6.1 Add key mapping byte table code
From previous work, the setup of the keypad controller for this system does not follow the actual
label on the keypad. By creating the new code for byte-table “map key” is to map a code read from
the keypad to the actual label on the keypad. For further information for this code, refer to Appendix
9 B.2.10.
Chapter 4.6.2 Set firing point for clockwise and anticlockwise rotation
This code is created for set firing point for the cylinder to running the system whether in the
anticlockwise or clockwise rotation. The setup for this code is to make it easier to changing the
offset, length of duration and firing point that has been set.
The initial setup of the firing point for the cylinders are fired as follow below:
For anticlockwise, the cylinders will fire at hole number 5 for cylinder 1, 21 for cylinder 2, 37
for cylinder 3 and 53 for cylinder 4.
For clockwise, the cylinders will fire at hole number 5 for cylinder 1, 53 for cylinder 2, 37 for
cylinder 3 and 21 for cylinder 4.
This setup is to run the system with constant speed and similar form in beginning of the system
rotation. To change the configuration, refer the example as shown in Figure 21. For further
information for this code, refer to Appendix 9 B.2.13.
Chapter 4.6.3 The automatic firing cylinder routine
This code is created for the setup an automatic firing cylinder method, once the rotation has been
selected, this code will start the firing sequence routine as has been described in Section 4.1.2. For
further information for this code, refer to Appendix 9 B.15.
![Page 36: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/36.jpg)
Air Engine Thesis 2016
35
Chapter 5 Major Problem Encountered and Solutions This Section will describe the significant issues encountered during this project.
Chapter 5.1 Grounding Issues The optical sensor interface board and relay board were built as an interface between the different
I/O devices. The wiring diagram for both boards was not available and provided from reports,
meaning new diagram had to comply. During tracing the individual wires that had been connected to
the boards and the hardware, it was found that the connection of 12 Volt ground for solenoid valve
is connected in series with the relay board 5 Volt ground. This could be the cause of all transistors
blowing.
Chapter 5.2 Mismatching Programming code The code from previous years act differently on the system. Through investigation, it was found that
the programming code for the keypad and the RPM do not work. So new codes had to be developed.
Chapter 5.3 Code update During the review of the previous code, it was found that the code was written in a complicated way
which was hard to understand. Furthermore, it was not commented properly hence creating a tense
environment of what does each code do. Most of the programs were updated with great success
and were given easy and memorable names for future students to understand the programming
code.
Chapter 5.4 Several Components Faulty/Broken Upon further investigation of the system, it was noticed that there is a leak in the air filter.
Therefore, there was not enough pressure to power the cylinders. A new air filter was fitted which
solved the problem. There also has another issue with LEDs broken and loose wiring cable that has
to replace new LEDs and resolder back for the loose wiring cable.
Chapter 5.5 Communication error At the start of the project, while testing the interface between the software and hardware, it was
found that there was a memory loss while updating the system. Upon examination of the processing
board, it was observed that the ROM was not updating, and RAM was faulty. The solution was to
update the ROM can be referring to the guideline of updating the ROM in Appendix 10D and the
solution for RAM was replaced new RAM.
![Page 37: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/37.jpg)
Air Engine Thesis 2016
36
Chapter 6 Future Work This Section is devoted to some of the future works that needs to be carried out, along with some
recommendations and suggestions.
Chapter 6.1 Program Summary The program summary is directed towards student and staff working on the air engine. The
document includes an introduction to the functions of the machine, detail for the main tasks and
relevant information relating to the program. The detailed of the program in Appendix 9 B.
Chapter 6.2 LCD implementation The LCD was used to display the running mode whether manual or auto and also used to show the
speed. However, when implementing the background tasks for each function, it only shows for
manual and auto mode task. For the speed, it does not show anything. To reduce the time of
investigating the speed proceed to the future recommendation.
Chapter 6.3 Wireless Keyboard The current keyboard is working but is not used much since it is preferable to control through the
software. The good idea is to develop a wireless keyboard to control the engine which can be
controlled within a given range rather than sitting near the personal computer (PC).
Chapter 6.4 Additional Programming That would be useful if another program can be developed in LabVIEW to display the status of the
different components such as switches, LEDs, cylinders and more. The idea is to make it easier for
the future student to monitor and control the system in more advance rather than standing near the
machine.
Chapter 6.5 Human Machine Interaction (HMI) control In future, it would be better to develop a system that can be controlled using an HMI. This would be
handy since the user does not have to sit near the control panel to control the engine. A lot of HMIs
are available such as Siemens operated devices [43].
Chapter 6.6 Safety aspect Due time constraint with implemented and commissioned for the overall system successfully run,
the last objective for safety feature has to proceed for next student. The fact of the safety for this
project, that there is a mechanical rotating part it better to make it as safe as possible. A possibility is
to design and implement a clear prospect which will prevent mishaps occurring.
![Page 38: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/38.jpg)
Air Engine Thesis 2016
37
Chapter 7 Conclusion The project was a difficult one because there was less information available from previous years.
Due to time constraints and unforeseen circumstances, the time taken to solve the issue between
hardware and software took far longer than expected. Also, since this project was not in use for a
long time, there was a lot of parts that were not working properly. Nevertheless, most of the
objectives were completed, and they are given below:
Air engine operation
o Being able to operate the Air engine by using an M68HC11 microcontroller
Software implementation
o Code updated
o Developing and controlling the engine by two different modes
o Implementing form of control for cylinder firing sequence and maintain the
rotational speed
o Make a significant use of the timing interrupt system capabilities for the input and
output available
o Implement the user interaction via LCD screen
Hardware implementation
o Redesigning the wiring diagram
o Replaced all broken components
o Tidy the wiring connections
o Port mapping to assign the addresses of the board
Skills gain from this project are:
A proper time management schedule,
A more in-depth understanding of the Forth programming language,
Sharpening of the communication skills,
Polishing of the diagnostic and troubleshooting skills,
Have a better insight of how real- time and embedded systems work,
![Page 39: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/39.jpg)
Air Engine Thesis 2016
38
Chapter 8 Bibliography [1] T. Finkelstein, A. J. Organ, (2001), “Air Engines: The History, Science, and Reality of the Perfect
Engine”. UK: Professional Engineering Publishing.
[2] H.K. Porter, Inc. “Wikipedia: Compressed Air Locomotive.” (Accessed: 6 August 2015)
[3] “SwiftX 68HC11Target Reference Manual: Internal I/O registers”, Section 3.3., Forth, Inc., LA,
California USA, 2010.
[4] “SwiftX Cross-Development Software Reference Manual”, Forth, Inc., LA, California USA, 2010
[5] E. K. Conklin and E. D. Rather, August 2007, 3rd edition, “Forth Programmer’s Handbook”, Forth
Inc. LA, California.
[6] Motorola INC, 1991, USA, “M68HC11: Reference Manual”, Rev 3.
[7] P. Spasov, 2004, “Microcontroller Technology: The 68HC11 and 68HC12”, 5th Edition.
[8] B.Walker and S.Mackay. (2010), “ENG306 Real Time Embedded System: Air Engine Project,”
Murdoch University, Western Australia.
[9] S. Likhar, "Compressed Air Engine: Create the Future Design Contest", Contest.techbriefs.com,
2016. [Online]. Available: http://contest.techbriefs.com/2013/entries/sustainable-
technologies/3097. [Accessed: 07- Aug- 2016].
[10] K.M. Jagadale and Prof V.R. Gambhire, “Low-Pressure High Torque Quasi Turbine Rotary Air
Engine”, International Journal of Innovative Research in Science, Engineering, and Technology, Vol 3,
Issue 8, August 2014.
[11] B.R. Singh and O. Singh, “A Study of Performance Output of a Multivane Air Engine Applying
Optimal Injection and Vane Angle”, International Journal of Rotating Machinery Vol. (2012).
[12] Ray T. Bohacz, Hemming Classic Car, “Timing Dwell Angle”, October 2013.
[13] SMC Corporation, Tokyo (Japan), P.G. Information, 3 Port Solenoid Valve/VP544-X538,
https://www.smcworld.com/upfiles/pgpdf/SP111X-007E.pdf (accessed on 1 October 2015)
[14] Steven Engineering, South San Francisco (CA), 3 Port Solenoid Valve,
https://stevenengineering.com/tech_support/PDFs/70D3SVP300.pdf (accessed on 1 October 2015)
[15] SMC VP544 24V Solenoid Valve Assembly, http://www.ebay.ca/itm/SMC-VP544-24V-Solenoid-
Valve-Assembly-USED-/131512602872 (accessed on 12 November 2015)
[16] SMC Global Standard, Clamp Cylinder,
https://www.smc.eu/portal_ssl/WebContent/corporative/modules/Repository_e-matters/042_10-
11-e-matters/CLAMP_cat_je.pdf (accessed on 7 October 2015)
[17] SMC E-Tech, Clamp Cylinder, http://content2.smcetech.com/pdf/CK_1.pdf (accessed on 7
October 2015)
![Page 40: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/40.jpg)
Air Engine Thesis 2016
39
[18] Hydraulic and Pneumatics, Air Regulator,
http://hydraulicspneumatics.com/200/TechZone/AirFiltersandFR/Article/False/6457/TechZone-
AirFiltersandFR (accessed on 11 November 2015).
[19] SMC Manufacturing Pneumatic Worldwide, AW Filter/Regulator Combination,
http://content2.smcetech.com/pdf/aw.pdf (accessed on 15 November 2015)
[20] TT electronic OPTEK Technology, 1968, Juarez (Mexico), Optical Encoder Sensor, page 42-44,
http://optekinc.com/files/Complete%20Selector%20Guide2.pdf (accessed on 5 October 2015)
[21] Motorola INC, SCHMITT Triggers Dual Gate/Hex Inverter
http://pdf1.alldatasheet.com/datasheet-pdf/view/5653/MOTOROLA/SN74LS14N.html (accessed on
20 January 2016)
[22] FAIRCHILD, NPN Epitaxial Silicon Transistor,
https://www.fairchildsemi.com/datasheets/BC/BC337.pdf (accessed on 21 January 2016)
[23] ON Semiconductor, Amplifier Transistors (NPN Silicon),
http://www.changpuak.ch/electronics/xtal/BC337-D.pdf (accessed on 21 January 2016)
[24] Rapid Electronics, Good Sky SPDT Relay, http://www.rapidonline.com/electronic-
components/good-sky-rw-ss-112d-12v-rw-series-10a-spdt-relay-60-4662 (accessed on 2 November
2015)
[25] Manual: “NMIY-0020 Single Board Computer”, New Micros Inc, V10, Dallas, Texas, July 1998.
[26] Manual: “NMIS-0021B F68HC11 CPU Card”, New Micros Inc, 1st Ed, Dallas, Texas, Aug 1992
[27] Manual: “NMIS-7003 8-Bit Digital Input and Output OPTO Card”, New Micros INC. Dallas, Texas,
Rev 1, Feb 1990.
[28] Manual: “NMIS-7070 LCD Display and Keypad Interface”, New Micros INC. Dallas, Texas, Rev 1.1,
Jan 1990.
[29] Manual: “68HC11 Development Board V2.0”, 2nd ed.
[30] Fiesto, Pneumatic Cylinders: “Single Acting Cylinders”,
https://www.festo.com/wiki/en/Pneumatic_cylinders (accessed on 28 May 2015)
[31] Omega, “Technical Principles of Valves”,
http://www.omega.com/Green/pdf/VALVE_TECH_REF.pdf (accessed on 28 May 2015)
[32] Solenoid Valves, “3/2 way Direct Acting Solenoid Valves”, http://www.connexion-
developments.com/solenoid-valve-3-2-way-direct-acting.html (accessed on 28 May 2015)
[33] Pneumatic Tips, “What is a Filter Regulator Lubricator?”,
http://www.pneumatictips.com/2325/2012/09/engineering-basics/what-is-a-filter-regulator-
lubricator-frl/ (accessed on 28 May 2015)
![Page 41: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/41.jpg)
Air Engine Thesis 2016
40
[34] Instrumentation Tools, “Air Filter Regulator Working Principle Animation”,
http://instrumentationtools.com/air-filter-regulator-working-principle-animation/ (accessed on 30
May 2015)
[35] J. Shearer, Jun 2010, “Industrial Air Control: Air Filter”,
http://www.slideshare.net/jcshearer/industrial-air-controls (accessed on 30 May 2015)
[36] TERAPEAK, “New Optek Slotted Optical Switch OPB815W’,
http://www.terapeak.com/worth/new-optek-slotted-optical-switch-opb815w-s19-1-
159a/231658235536/ (accessed on 30 May 2015)
[37] Programming Forth, 4th edition, Microprocessor Engineering Limited, Southampton, UK, 2011.
[38] "How does a Car Engine work? - Physics for Kids | Mocomi", Mocomi Kids, 2011. [Online].
Available: http://mocomi.com/how-does-a-car-engine-work/. [Accessed: 07- Aug- 2016].
[39] “What is the Forth programming language?”, Forth.com, 2016. [Online]. Available:
https://www.forth.com/forth/. [Accessed: 08- Jun- 2016].
[40] "SN74LS14 HEX SCHMITT-TRIGGER INVERTERS", Texas Instrument, 2016. [Online]. Available:
http://www.ti.com/lit/ds/symlink/sn74ls14.pdf. [Accessed: 11- Jun- 2016].
[41]"The Schmitt Trigger", Pcbheaven.com, 2016. [Online]. Available:
http://www.pcbheaven.com/wikipages/The_Schmitt_Trigger/ [Accessed: 11- Jun- 2016].
[42]"How does a Schmitt trigger circuit work?", Quora.com, 2016. [Online]. Available:
https://www.quora.com/How-does-a-Schmitt-trigger-circuit-work. [Accessed: 11- Jun- 2016].
[43]"Operator devices - Operator Devices - Siemens", W3.siemens.com, 2016. [Online]. Available:
http://w3.siemens.com/mcms/human-machine-interface/en/operator-devices/Pages/Default.aspx.
[Accessed: 11- Jun- 2016].
[44] A. PhysLink.com, "How does a transistor work?", Physlink.com, 2016. [Online]. Available:
http://www.physlink.com/education/askexperts/ae430.cfm. [Accessed: 07- Aug- 2016].
![Page 42: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/42.jpg)
Air Engine Thesis 2016
41
Chapter 9 Appendices
Appendix 9 A: Microcontroller M68HC11 Based Embedded System Hardware This appendix is providing the technical information relating to the NMIS-0021B, NMIS-7003 and
NMIS-7070 boards schematics and block diagrams. The schematics and diagrams were used to
understand the connections in the air engine and capability and function of each board.
Appendix 9 A.1 NMIS-0021B
Figure 24 and 26 are the NMIS-0021B board microcontroller block diagram and unit layout. The
information for these figures is to understand the board connection.
Figure 24 Microcontroller M68HC11 Block Diagrams [26]
![Page 43: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/43.jpg)
Air Engine Thesis 2016
42
Figure 25 NMIS-0021B Unit Layouts [26]
![Page 44: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/44.jpg)
Air Engine Thesis 2016
43
Appendix 9 A.2 NMIS 7003
This Figure 26 is the NMIS-7003 board unit layout. The information for this figures is to understand
the board connection for digital I/O terminal and isolation.
Figure 26 NMIS-7003 Unit Layouts [27]
![Page 45: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/45.jpg)
Air Engine Thesis 2016
44
Appendix 9 A.3 NMIS-7070
Figure 28 and 29 are the NMIS-7070 board unit layout and schematic respectively. The information
for both figures is to understand the board connection for LCD and keypad controller.
Figure 27 NMIS-7070 Unit Layouts [28]
Appendix 9 B: Forth Air Engine Programming Code This appendix displays the entire Forth for air engine code placed in the RAM. The program consists
of three main files to run the air engine.
1. User code.f
2. Air engine.f
3. Positioninterrupt.f
Appendix 9 B.1 User-code text file (user code.f) This file is in turn loaded by a (debug.f) file which is loaded during a “debug” session. This file is
about all the necessary files that are included, and the required task and heartbeat is initialised. This
main text file is used to create all task required and include all files used to start the programming
code.
Creates all Tasks required:
Task MyHeart
Task Manual
Task AutoMode
Task Initialise
Task StartIt
Task StopIt
Task SpeedCalc
: hello." This is a test”; \ set command code “Hello” to execute and show this is test in the
system
![Page 46: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/46.jpg)
Air Engine Thesis 2016
45
Includes All Files Used:
include positioninterupt.f
Include air engine.f
Starts Program Code:
: Doit TestStartup cr .( WELCOME TO MURDOCH AIR ENGINE PROJECT 2016 );
Appendix 9 B.2 Air engine text file (air engine.f) The purpose of this section is to create the user-friendly words that will lead to an easy set up when
developing a state machine model for the background tasks. Each Section of the is broken down into
individual routines, and definitions follow the routine. The specific code relating to other routines
are indicates followed by an individual code are written, and code follows. This text file is required as
follows:
Defines the constant and variables code
set the constant variable code
set the toggle switch and set push button code
creates easy words to store values into address location
Heartbeat task
LCD start-up and keypad setup
Manual Mode code
Creates a mask for a period/scale and offset for firing cylinder for accurate timing
Set Firing points for clockwise and anticlockwise rotation
Speed calculator code
Automatic Routine maintaining speed and auto firing cylinders when within set boundaries
Auto-mode code
o Start engine code
start auto mode if the toggle switches in ON condition
o Kickstart code
Kick start the engine to get movement
o Begin auto code
Suspend the start engine code and run kickstart code
o Ready code
once entering this state check direction switch and then loads different
firing point.
o Switch OFF code
used to show system off and will display in LCD as (welcome)
o Initialise engine code
upon power up, this code is executed whereby all states except heartbeat
and manual mode are suspended
o Stop Engine code
once the toggle switch transition from on/off condition this initialises to
disallow immediate start-up
Set automatic setup and some test words
![Page 47: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/47.jpg)
Air Engine Thesis 2016
46
o Test start-up code
To execute the coding that has been selected at the beginning of the system
start.
o Displaycs
This code will show which point the cylinder firing
o Displayp
This code to run the position point sensed by optical sensor encoder.
Appendix 9 B.2.1 Defines Constants and Variables Code
C1 refers to cylinder 1
C2 refers to cylinder 2
C3 refers to cylinder 3
C4 refers to cylinder 4
Output4 refers to output 4 on the board
Output3 refers to output 3 on the board
Output2 refers to output 2 on the board
Output1 refers to output 1 on the board
Out1 refers to output port address @ $8421
Out2 refers to output port address @ $8401
In1 refers to input port address @ $8420
In2 refers to input port address @ $8400
A refers to address variable @ $8421
B refers to address variable @ $8401
Knight-rider refers to the old TV show whereby the lights flashed in a linear sequence. The
developed start-up phase will be similar
Out1on and Out1off refer to $8421 output begin turned on or off through variables. The
purpose of this was to eliminate and reduce coding.
Out2on and Out2off refer to $8401 output begin turned on or off through variables. The
purpose of this was to eliminate and reduce coding.
Hi refers to the start-up welcoming the panel will display until a switch is pressed
![Page 48: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/48.jpg)
Air Engine Thesis 2016
47
Appendix 9 B.2.2 Set Constant and Variables
$01 constant c1
$02 constant c2
$04 constant c3
$08 constant c4
$10 constant output4
$20 constant output3
$40 constant output2
$80 constant output1
$FF constant all
$F0 constant bottomhalf
$0F constant tophalf
$8421 constant out1
$8401 constant out2
$8420 constant in1
$8400 constant in2
$8440 constant lcdcmd
$8441 constant lcddat
variable Fire1
variable Fire2
variable Fire3
variable Fire4
variable C1on
variable C1off
variable C2on
variable C2off
variable C3on
variable C3off
variable C4on
variable C4off
variable Periodon
variable Speed
variable StartPoint
variable StopPoint
variable Cylinders
variable A
variable B
![Page 49: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/49.jpg)
Air Engine Thesis 2016
48
Appendix 9 B.2.3 Set Toggle Switch Code
This code is to execute the command for read the return of input for ON/OFF and direction toggle
switch.
: OnSwitch? $20 in2 c@ and; \ command for ON/OFF switch
: Direction? $10 in2 c@ and; \ command for direction switch
Appendix 9 B.2.4 Set Push Button Code
This code is to execute the command for read and return of input push button 1,2,3 and 4.
: Push1 c1 in2 c@ and; \ command for Push Button 1 : Push2 c2 in2 c@ and; \ command for Push Button 2 : Push3 c3 in2 c@ and; \ command for Push Button 3 : Push4 c4 in2 c@ and; \ command for Push Button 4
Appendix 9 B.2.5 Creates Easy Words to Store Values into Address Locations
This section is to reduce the programming code setup such instead of typing the address and then
adding and storing the variable a word can be used instead which runs the required routines.
Address $8421 refers to the address of the buzzer, LEDS heartbeat, and direction, relay input board
pin 0 to 3 to trigger the solenoid valve. Address $8401 refers to the address of the LEDs for all
cylinders and outputs.
: store1 A c@ out1 c!; \ Store information for the variable A at address $8421
: store2 B c@ out2 c!; \ Store information for the variable B at address $8401
: out1on A byteclear store1; \ set variable A in Low condition at address $8421
: out1off A byteset store1; \ set variable A in High condition at address $8421
: out2on B byteclear store2; \ set variable B in low condition at address $8401
: out2off B byteset store2; \ set variable B in High condition at address $8401
: initialisesystem all A c! store1 all B c! store2; \ set low condition for all LEDs
: Cylindersoff of all Out1Off; \ set low condition for all cylinders
Appendix 9 B.2.6 Heartbeat Task
This code is to show the heartbeat routine.
: Install Myheart Build; \ command for heartbeat task
: Pulse begin output4 out1on 500 ms output4 out1off 500 ms again; \ code for Heartbeat
flashing
: Something installMyHeart Myheart activate Pulse; \ execute command for heartbeat
Appendix 9 B.2.7 Coding for Buzzer
This code is to run the command to turn ON and OFF buzzer.
: buzzeron output2 out1on ; \ command to activate the buzzer
: buzzeroff output2 out1off ; \ command to deactivate the buzzer
![Page 50: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/50.jpg)
Air Engine Thesis 2016
49
Appendix 9 B.2.8 Create code for LEDs flashing
This code is to execute all LEDs flashing ON and OFF in linear sequence.
: Knightrider \ command to execute the code
all out2off
c1 out2on output4 out2on 100 ms
c2 out2on output3 out2on 100 ms
c1 out2off output4 out2off c3 out2on output2 out2on 100 ms
c2 out2off output3 out2off c4 out2on output1 out2on 100 ms
output2 out2off c3 out2off 100 ms all out2off;
Appendix 9 B.2.9 LCD Display Code
This code will show the routine and LCD used for this system.
: !LCD-DAT lcddat c! 40 ms; \ write the character
: !LCD-CMD lcdcmd c! 40 ms; \write command
: @LCD-DAT lcddat c@ 40 ms ; \ read the character
: @LCD-CMD lcdcmd c@ 40 ms; \ read the command
: initialiselcd \ Initialise LCD display
$38 !LCD-CMD \ get attention to display
$38 !LCD-CMD \ set 2 line to display
$38 !LCD-CMD \ set 3 line to display
$6 !LCD-CMD \ Increment cursor
$F !LCD-CMD ; \ set cursor position to 1st line and 1st column
: EmitToLCD lcddat c! ; \ send character to LCD
: ClearLCD $1 !LCD-CMD $1 !LCD-CMD ; \ Clear display screen
: TypeToLCD 0 Do dup c@ EmittoLCD 1 + loop drop ;\ send and show character to display
: Welcome clearlcd s" MURDOCH AIR ENGINE Presented By PROJECT VERSION 2.0
A.R.IBRAHIM 2016 " typetolcd ; \ set the command and show the character to LCD display
: mvprint ( n -- ) swap over abs 0 <# # # #s rot sign #> typetolcd ; \ print the character to and
command to display
![Page 51: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/51.jpg)
Air Engine Thesis 2016
50
Appendix 9 B.2.10 Keypad Setup
This code is for setup of the keypad controller for the system. In comment show the key pad control
mapping follow the actual label on the key.
byteTable mapkey
$3 c, $2 c, $1 c, $0 c, \ $3 for (0), $2 for (1), $1 for (2), $0 for (3)
$7 c, $6 c, $5 c, $4 c, \ $7 for (4), $6 for (5), $5 for (6), $4 for (7)
$B c, $A c, $9 c, $8 c, \ $B for (8), $A for (9), $9 for (A), $8 for (B)
$F c, $E c, $D c, $C c, \ $F for (C), $E for (D), $D for (E), $C for (F)
$13 c, $12 c, $11 c, $10 c, \ $13 for (10), $12 for (11), $11 for (12), $10 for (13)
: clearflag 0 $8448 c! ; \ clear keypad controller flag
: dataready? ( -- flag ) $40 $8448 c@ and ; \ set data to keypad terminal
: iskeybeingpressed? ( -- flag ) $80 $8448 c@ and ; \ enables interrupts
: rawkey ( -- key ) $1F $8448 c@ and ; \ set code when keypressed
: whatkeypressed ( -- key ) rawkey mapkey ; \ execute the key pressed code
: pressed iskeybeingpressed? if s" Yes" TypeToLCD then ; \ write key pressed in LCD display
Appendix 9 B.2.11 Manual Mode Code
This code is required the manual routine for manual mode and allows the manual firing of the
cylinder and display the character to LCD during as a background task as shown below.
: Manual1 \ code for manual firing cylinder 1 and turn ON and OFF LED cylinder 1
Push1 if clearLCD s" Manual Mode - Now Firing Cylinder 1" TypeToLCD
c1 out2on c1 out1on 200 ms c1 out2off c1 out1off then ;
: Manual2 \ code for manual firing cylinder 2 and turn ON and OFF LED cylinder 2
Push2 if clearLCD s" Manual Mode - Now Firing Cylinder 2" TypeToLCD
c2 out2on c2 out1on 200 ms c2 out2off c2 out1off then ;
: Manual3 \ code for manual firing cylinder 3 and turn ON and OFF LED cylinder 3
Push3 if clearLCD s" Manual Mode - Now Firing Cylinder 3" TypeToLCD
c3 out2on c3 out1on 200 ms c3 out2off c3 out1off then ;
: Manual4 \ code for manual firing cylinder, turn ON and OFF LED cylinder 4
Push4 if clearLCD s" Manual Mode - Now Firing Cylinder 4" TypeToLCD
c4 out2on c4 out1on 200 ms c4 out2off c4 out1off then ;
: ManualMode Begin Manual1 Manual2 Manual3 Manual4 pause again stop ; \ task for
manual firing sequence
: BuildManual Manual Build Manual activate ManualMode ; \ command to execute manual
mode in multiple extension
![Page 52: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/52.jpg)
Air Engine Thesis 2016
51
Appendix 9 B.2.12 Set Cylinder Mask and Offset
This section is set the cylinder mask and offset for the firing the cylinder.
variable xyz \ set variable for XYZ to allow dynamic alteration of OFFSET
: Rotvar $3F and ;
: Offset xyz @ + rotvar ; \ command for offset
: SetCylinderOn Cylinders @ and dup out1on out2on ; \ command to execute Cylinder
Mask code
Appendix 9 B.2.13 Set Firing Point for Clockwise and Anticlockwise Rotation
This code is to execute the command to start firing the cylinder whether in anticlockwise or
clockwise rotation.
: FiringSetupAnticlockwise \ command for Anticlockwise Firing Setup
0 xyz ! 8 periodon ! Cylinders On \ XYZ is variable for offset and PERIODON is variable for
length of firing duration
5 c1on ! 21 c2on ! 37 c3on ! 53 c4on ! ; \ Point for firing Cylinder 1, 2, 3, 4
: FiringSetupClockwise \ command for Clockwise Firing Setup
0 xyz ! 8 periodon ! Cylinders On \ XYZ is variable for offset and PERIODON is variable for
length of firing duration
5 c1on ! 53 c2on ! 37 c3on ! 21 c4on ! ; \ Point for firing Cylinder 1, 2, 3, 4
: AntiClockwise FiringSetupAnticlockwise Output3 Out1Off 0 Revolution c! ; \command code to
execute anticlockwise
: Clockwise FiringSetupClockwise Output3 out1ON -1 Revolution c! ; \ command code to execute
clockwise
Appendix 9 B.2.14 Speed Calculator Command and Task
This task is to calculate the rotation speed
: RPM begin Revolution @ StartPoint ! 2000 ms Revolution @ StopPoint ! \ RPM is initial
variable for speed task
StartPoint @ StopPoint @ - 30 * Speed ! Speed @ 0 and if
ClearLCD s" Auto Mode " s" Not Moving or Accelerating" TypeToLcd else
ClearLCD s" Auto Mode " speed @ mvprint s" " TypetoLCD s" RPM" TypetoLCD
0 Revolution ! 0 StartPoint ! 0 StopPoint ! then pause again stop ;
: BuildSpeed SpeedCalc Build SpeedCalc ACTIVATE RPM ; \ command to execute speed task
Appendix 9 B.2.15 Automatic Firing Cylinder Routine for Maintaining Speed
This task is for simpler and execute the firing sequence for cylinder with dynamic period.
![Page 53: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/53.jpg)
Air Engine Thesis 2016
52
: FiringCylinders \ command for firing cylinder task
Position @ offset c1on @ dup PeriodOn @ + within
if c1 SetCylinderOn else c1 dup out1off out2off then
Position @ offset c2on @ dup PeriodOn @ + within
if c2 SetCylinderOn else c2 dup out1off out2off then
Position @ offset c3on @ dup PeriodOn @ + within
if c3 SetCylinderOn else c3 dup out1off out2off then
Position @ offset c4on @ dup PeriodOn @ + within
if c4 SetCylinderOn else c4 dup out1off out2off then ;
Appendix 9 B.2.16 Automatic Mode Code
The automatic mode code is consisting of start engine, kick start, begin auto, ready, initialise and
stop engine. To start the auto mode task, have to write in command window “buildautomode”, once
it done the program will execute the “startengine” code and suspend for the other task includes
manual mode, stop engine, begin auto and initialise engine. After that, it continues with selecting
the direction whether clockwise or anti-clockwise firing sequence. To stop the auto mode task write
in command window “buildstopit”, the program will execute the “stopengine” code and suspend all
task.
: StartEngine \ starting command when execute automode
begin StartIt suspend tophalf out2off
OnSwitch? clearLCD s" Auto Mode - Now Firing Cylinder Routine" TypeToLCD
Direction? if anticlockwise else clockwise then
if FiringCylinders else StopIt resume then pause again stop;
: KickStart \ to get movement and readings into the rotary encoder variables
c1 dup out1on out2on 400 ms c1 dup out1off out2off
c4 dup out1on out2on 400 msc4 dup out1off out2off;
: BeginAuto \ to execute and run kickstart command automatically
begin pause tophalf out2off output2 out2on
Initialise SUSPEND StopIt SUSPEND Manual SUSPEND
output2 out2on kickstart AutoMode RESUME again stop ;
: Ready \ once entering this command then loads different firing point
![Page 54: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/54.jpg)
Air Engine Thesis 2016
53
Direction? If anticlockwise else clockwise then
all out2on 100 ms all out2off 100 ms all out2on 100 ms all out2off 100 ms
Onswitch? if all out2off StartIt resume then;
: SwitchOff \ to execute knightrider code
OnSwitch? Not Knightrider ClearLCD Welcome;
: InitEngine \ to run all state except heartbeat and manual mode
all out2off clearlcd welcome begin pause
StopIt SUSPEND Manual RESUME SpeedCalc SUSPEND
OnSwitch? if Ready else SwitchOff then again stop ;
: StopEngine \ to execute all state in stop condition
Begin AutoMode SUSPEND SpeedCalc SUSPEND
tophalf out2off output1 out2on cylindersoff 1000 ms
OnSwitch? Not if Initialise RESUME Manual SUSPEND
then pause again stop;
Appendix 9 B.2.17 Creates the Auto Mode Task
This is selected task to execute the system while running in auto mode.
: BuildAutoMode Automode build Automode activate StartEngine; \ command for start
engine task
: BuildStartIt StartIt Build StartIt Activate BeginAuto ; \command for begin auto task
: BuildInitialise Initialise Build Initialise ACTIVATE InitEngine ;\ command for initializing task
: BuildStopIt StopIt Build StopIt Activate StopEngine ; \command for stop engine task
Appendix 9 B.2.18 Automatic Start-Up and Testing words
This code is to execute the start-up, beginning with the system, display the firing point of the
cylinder and the current position for rotary encoder disk hole detected.
: TestStartup initialisesystem buildposition initialiselcd welcome buzzeron 2000 ms; \
execute the start-up and beginning of the system
: displaycs c1on? c2on ? c3on ? c4on ?; \ execute to display firing cylinder point
: displayp begin position @ u. 100 ms cr key? Until; \execute the current position of
encoder disk
![Page 55: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/55.jpg)
Air Engine Thesis 2016
54
Appendix 9 B.3 Position Interrupt Text File (Positioninterupt.f) The Section is to create the interrupts which store the variables that are to be used for the rotary
encoder.
TDC Top Dead Centre and is the reference point.
Position refers to the current position of the encoder
TIC-2 interrupts every time TDC is passed
TIC-1 interrupts at every position
Position refers to current position of rotor and increments by 1 till 64 then resets
Revolution refers to the amount revolutions the rotor passed TDC (TDC point is 0)
Through investigation, it was determined that the encoder reference points i.e. TDC and position
were located at the interrupts TIC-2 and TIC-1 respectively. From here upon each interrupt the
variable is loaded, incremented and then stored through register D. However, whenever the TDC
reference point went past the Revolution counter would increment and reset the position variable.
The interrupt loads the values of the variable position of small holes into the accumulator (A) which
is then incremented by one and the new value stored again in the accumulator (A). The interrupt flag
register is then loaded with the value $04 to clear interrupts. The interrupt flag was set to capture a
rising edge on the input to examine if the flag was raised on such a rising edge event. The interrupt
was enabled using the tmsk1 enabler.
This file is including:
Set variable used
TIC-2 interrupts for revolution is loaded into direction and position is reset to zero.
TIC-1 interrupts for the position is loaded into direction and position is after reset to zero in
the revolution.
Appendix 9 B.3.1 Set Variables for position interrupts
variable position
variable Revolution
variable prime
variable period
variable TDCTime
: startint_tic %00000110 tmsk1 c! %00000110 tflg1 c! %00010100 tctl2 c! ; \ enable
interrupt,
\ every time TIC-2 interrupts revolution is loaded into direction and position is reset to zero
label <TopDeadCenter>
Revolution ldd 1 # addd Revolution std \Load position into revolution
0 # ldd position std \load 0 into position
![Page 56: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/56.jpg)
Air Engine Thesis 2016
55
TIC2 ldd TDCTime std \Store TIC2 as time of TDC interrupt
$02 # ldaa tflg1 staa <rti> jmp \reset interrupt flag
rti end-code \ return from interrupt
\ every time TIC-2 interrupts revolution is loaded into direction and position is reset to zero
label <position>
position ldd 1 # addd position std \Increments position by 1
tic1 ldd ptime std \loads TIC time into position time
$04 # ldaa tflg1 staa <rti> jmp \reset interrupt flag
rti end-code \ return from interrupt
Appendix 9 B.3.2 Creates Interrupts Task
: Vectorposition <position> V-TIC1 exception ; \start interrupt TIC1
: VectorTopDeadCenter <TopDeadCenter> V-TIC2 exception ; \start interrupt TIC2
: Buildposition startint_tic VectorTopDeadCenter Vectorposition ; \ execute interrupts TIC1
and TIC2
Appendix 9 C: Air Engine Hardware This appendix is providing the further information of specification for hardware used for this project.
Appendix 9 C.1 Solenoid Valve
Figure 28 SMC Solenoid Valves [15]
![Page 57: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/57.jpg)
Air Engine Thesis 2016
56
Table 10 Solenoid Valve Specification [15]
Model VP544
Fluid Air
Type of actuation Normally Close (NC- Return Spring)
Operating pressure range 0.25 to 0.7MPa
Operation Internal pilot type
External pilot pressure None
Maximum operating frequency 30 times per minute
Minimum operating frequency 1 time per week
Ambient and fluid temperature -10 to 50 degree(C) (No freezing)
Ambient 20 to 90 percentage-RH (No freezing)
Lubrication No required
Shock or Vibration (150/30) meter per second square
Enclosure IP65
Operating environment Indoors
Weight 930 grams
B10d(MTTFd Calculation) 10000000 times
Rated of voltage 24 VDC
Power consumption 0.45 watt(W)
![Page 58: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/58.jpg)
Air Engine Thesis 2016
57
Appendix 9 C.2 Pneumatic Cylinder Specification
Figure 29 SMC Clamp Pneumatic Cylinder [16]
Table 11 Pneumatic Cylinder Specification [16]
Fluid Air
Proof pressure 1.5 Mpa
Maximum operating pressure 1.0 Mpa
Minimum operating pressure 0.05 Mpa
Ambient and fluid pressure -10 to 60 degree
Piston speed 50 to 500 mm/s
Speed controller Equipped on both end
Lubrication Non-lube
Stroke length tolerance 0 to 1.0
![Page 59: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/59.jpg)
Air Engine Thesis 2016
58
Appendix 9 C.3 Air Filter Regulation Specification Table 12 Air Filter Regulation Specification [18]
Fluid Air
Proof pressure 1.5 Mpa
Maximum operating pressure 1.0 Mpa
Set pressure range 0.05 to 0.85 Mpa
Ambient and fluid pressure -5 to 60 degree, c
Nominal filtering rating 5 micro minute
Drain capacity 25
Bowl material Polycarbonate
Bowl guard Standard
Construction Relieving type
Mass 0.4 kg
Appendix 9 C.4 Optical Sensor
Figure 30 Optical Sensors OPB815W [36]
![Page 60: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/60.jpg)
Air Engine Thesis 2016
59
Table 13 Optical Sensor Specification [36]
Part Number OPB815W
Storage & operating temperature range -40 to 80 degree, c
Continuous forward current 50 mA
Reverse voltage 2 V
Power dissipation 100 mW (milliwatt)
Collector to Emitter Voltage 30 V
Emitter to Collector voltage 5 V
Forward voltage 1.7 V
Appendix 9 D: ROM Updating Process ROM modification is required due to non-updated ROM. There is guideline for ROM updating as
listed below:
1. Initially, open the project and press the build button.
2. If any error appears then build and debug again, which will update the target S19 file.
3. To ensure step 2 was completed correctly, check the last updated time.
4. Use ultraviolet eraser to wipe out the current code on the EEPROM, which is a lengthy
process usually taking more than an hour
5. Insert an empty chip into the ALL-11 Universal Programmer then switch ON.
6. Open the WACCESS program from start menu on the PC, then press the device button to
pop-up the manufacture selected list window as shown in Figure 33.
7. Select the appropriate chip manufacturer then it will bring up the status program window as
shown in Figure 34.
8. From the file tab chose: ‘load the file to program buffer’ then select the target file built. The
file format window will pop up as shown in Figure 35, then select Motorola S-Record, for
Unused Bytes select (FF), and for file status makes sure the file start has to 00008000 and
the file end has to 001FFFFF, then press OK.
9. To check the updated chip, select “edit program buffer” from edit tab then the editor
window will pop up as shown in Figure 36, on the right of editor window will display symbol
selection and toward on the bottom of the symbol area will be show the GREET message and
check the last date has been updated. Once it did, close the window.
10. Continue with the press the Auto button to pop up the auto window as shown in Figure 37,
then select the ID check, blank check, program and verify box. If the still have the error, the
chip may be faulty.
11. Lastly, insert the updated ROM into the processor board and make sure all the system is
turned off before insert the ROM.
![Page 61: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/61.jpg)
Air Engine Thesis 2016
60
Figure 31 Manufacture Selection List Window
Figure 32 Program Status Window
![Page 62: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/62.jpg)
Air Engine Thesis 2016
61
Figure 33 File Format Window
Figure 34 Editor Window
![Page 63: Air Engine - Murdoch Research Repository · Air Engine Thesis 2016 2 Declaration I declare that this report is my effort, and it has never presented before elsewhere. I have ensured](https://reader030.vdocuments.us/reader030/viewer/2022040920/5e98417486b7d72d2f4d46a2/html5/thumbnails/63.jpg)
Air Engine Thesis 2016
62
Figure 35 Auto Window