Functional Specification - Group 8
Functional Specification - Group 8
ELECTRONIC SYSTEMS
JULY 2022
Functional Specification
AUTHORS
2022-07-20 Page 1
Functional Specification
Table of Contents
1. Introduction.................................................................................................................... 4
1.1 Purpose of the document ..........................................................................................................4
1.2 Scope of the document .............................................................................................................4
1.3 Related documents ...................................................................................................................4
1.4 Terms/Acronyms and Definitions ..............................................................................................5
1.5 Risks and Assumptions ..............................................................................................................6
2. Functional Specifications................................................................................................. 7
2.1. Components of the System ......................................................................................................7
2.2. Block Diagram .........................................................................................................................7
2.3. Description of the System’s Functionality .................................................................................8
2.4 Software Program of the System ...............................................................................................9
2.4.1 Structure of the Software ............................................................................................................................9
2.4.2 Software used ..............................................................................................................................................9
2.4.2 Realization of the Software ..........................................................................................................................9
3. References .................................................................................................................... 17
4. Open Issues .................................................................................................................. 19
5. Appendix ...................................................................................................................... 20
A. Flowchart of the software implementation – 1/2 ......................................................................................21
A. Flowchart of the software implementation – 2/2 ......................................................................................22
B. Content of Program_DoES_Joystick_RGB_LED.py .....................................................................................23
C. Schematic of the prototype’s wiring ..........................................................................................................26
2022-07-20 Page 2
Functional Specification
D. Applicable attachments .............................................................................................................................27
Table of Figures
FIGURE 1. BLOCK DIAGRAM WITH ALL CORE COMPONENTS ........................................................................................................7
FIGURE 2. FUNCTIONALITY OF JOYSTICK.[11] (A) PRESSING THE PUSH BUTTON SETS THE AXIS VALUE AS BRIGHTNESS AND BLINKING OF THE
LEDS AS DESCRIBED IN THE FLOW CHART, APPENDIX-A. (B) PRESS UP BUTTON, BRIGHTNESS INCREASES AND BLINK INTERVAL GOES
FASTER. (C) PRESS DOWN, BRIGHTNESS DECREASES AND BLINK INTERVAL GOES SLOWER. .......................................................... 8
FIGURE 3. WIRING OF THE SYSTEM’S PROTOTYPE ...................................................................................................................10
FIGURE 4. ROUTING FOR THE PROTOTYPE ..............................................................................................................................10
FIGURE 5: UNIVERSAL HOUSING OF THE COMPANY REICHELT [REIC01] .......................................................................................11
FIGURE 6: JOYSTICK MODULE WITH IP66 PROTECTION CLASS [ANP01] ......................................................................................11
2022-07-20 Page 3
Functional Specification
1. Introduction
Joysticks are a worldwide standard in control technology for interfacing with machines, including
industrial and manufacturing environments. They’ve slowly replaced traditional mechanical control levers
for a variety of tasks.
Joystick controllers offer precise movement for steering, positioning, and speed control in multiple
applications. Particularly high-risk operations such as mining and excavation, marine equipment,
construction, and in oil and gas exploration.
Industrial joysticks are commonly applied in many industrial applications, such as cranes, winches, marine
equipment, agricultural machines, forestry machines, construction equipment, material handling vehicles,
robotics, medical apparatus, and factory production lines. Due to environmental conditions and rough
usage, an industrial joystick must be robust to ensure a long-life expectancy and minimize equipment
failure.
2022-07-20 Page 4
Functional Specification
07 07_KY-016_LED_RGB_Modul_AZ-
Datasheet for LED RGB Modul
Delivery_Vertriebs_GmbH
08 Datasheet for Raspberry Pi Pico
08_Raspberry Pi Pico Datasheet
(RP2040-based microcontroller board)
09 09_RP2040 Microcontroller Datasheet Datasheet for microcontroller
10 Schematic drawing for Raspberry Pi
10_RPI-PICO-R3-PUBLIC-SCHEMATIC
Pico
11 11_micropython_1.18-docs MicroPython Documentation v.1.18
12 MicroPython environment for RP2040
12_Raspberry Pi Pico Python SDK
microcontrollers
13 13_Schematic Drawing_2022-06-20 Schematic Drawing of the System
14 14_Code_Joystick_RGB_LED Python Code for Joystick-RGB-LED
15 .py file for Python Program for
15_Program_DoES_Joystick_RGB_LED_v3
Joystick-RGB-LED
16 .py file (Python Program for testing
16_blink
the Joystick-RGB-LED
Term/Acronym/Abbreviation Definition
2022-07-20 Page 5
Functional Specification
2022-07-20 Page 6
Functional Specification
2. Functional Specifications
This functional specification of an industrial joystick controller to describe the system intended
functionality, capabilities, appearance, and interactions with users in detail for industrial sector.
2022-07-20 Page 7
Functional Specification
Depending on the application, an industrial joystick can be 1-axis (forward/backwards movement), 2-axis
(forward/backwards and left/right movement), or 3-axis (forward/backwards, left/right, and
clockwise/counter clockwise lever movement). This makes it possible to control a machine or apparatus
in one or multiple dimensions.
The system is used to control a RGB LED using a joystick. It supports different use cases like controlling
the brightness of the red LED, the green LED or the blue LED and blinking of the LEDs.
The use cases can be selected by pressing the joystick. Using the Y-axis of the joystick (Up and Down
motion), the brightness of the respective active LED can be continuously changed and saved by pressing
the joystick. As soon as a selection has been made for the red, green and blue LED, a flashing interval can
also be set steplessly according to the principle described.
Pressing the joystick again resets the selection and a new selection can be made.
Figure 2. Functionality of Joystick.[11] (a) Pressing the push button sets the axis value as brightness and blinking of the LEDs as
described in the flow chart, Appendix-A. (b) Press up button, brightness increases and blink interval goes faster. (c) Press
down, brightness decreases and blink interval goes slower.
2022-07-20 Page 8
Functional Specification
2022-07-20 Page 9
Functional Specification
2022-07-20 Page 10
Functional Specification
The specifications call for complete protection against contact and dust, as well as protection against
powerful waterjets. Taking into account the EN60529 standard, the required protection class is IP66 (see
[Prot01]).
It is intended to pass the cap of the RBG LED through a hole to be drilled in the universal housing and seal
the gap with hot glue to provide the required protection against water and dust entering. For a later series
model, the production of a custom-fit gasket would be recommended.
Due to the design, it is unfortunately hardly possible to make a potential recess in the universal housing
for the joystick dust- and water-proof. It is quite difficult to find a universal covers for this type of joystick
available on the market that meet the required degree of protection. A seal would create too much friction
and make the intended operation much more difficult. The resulting gap when pressure is applied to the
joystick cap would also negate the IP66 protection class. To solve this problem, it is recommended to
connect the joystick via an insulated cable away from the universal housing.
As another approach, we recommend using a different joystick model. Below is a picture showing an IP66
certified model:
2022-07-20 Page 11
Functional Specification
With a total height of 22mm, this joystick module falls into a similar size category to the KY-023 required
in the specifications (see [ANP01]) and could be mounted directly to the housing.
All resulting recesses in the universal housing for cable and modules are sealed with hot glue for the
prototype and can be replaced by precisely fitting gaskets for a later series model.
• EN61000-1 (general)
• EN61000-2-1 (conducted)
• EN61000-2-3 (radiated)
• EN61000-4-3 (radiated)
• EN61000-4-4 (transient)
• EN61000-4-5 (surge)
• EN61000-4-6 (conducted)
• EN61000-4-8 (magnetic)
• EN61000-4-9 (pulse)
• EN61000-4-2 ESD
The minimum power consumption is 9mA (@5V, USB Idle) at a temperature of 25°C which results into:
To investigate the current drain and the resulting power consumption in detail, the occurring currents for
the sensor and actuator were measured.
2022-07-20 Page 12
Functional Specification
The measuring was done using a Voltcraft ME-22T multimeter between the 3.3V – pin of an Arduino Mega
2560 and the relevant pin of the sensor/actuator:
Main component Part MTBF in hours FIT - Failures per FIT - Failures per
million hours billion hours
Raspberry Pi Pico Flash memory 101501728.83 0.0099 9.8520
SRAM 609010358.57 0.0016 1.6420
Microcontroller 152063673.63 0.0066 6.5762
KY-016 RBG LED LED 2456801568.07 0.0004 0.4070
Resistor 6694449043.33 0.0001 0.1494
KY-023 Joystick Potentiometer 66944490.17 0.0149 14.9377
Resistor 6694449043.33 0.0001 0.1494
mean value 2396459987 ≈ 0.0048 4.81624286
273568.5 years
Table 2: Calculations of the MTBF and Failure Rates for the main components of the projects
The probability of a product failure in a product runtime T at an average MTBF value of 2396459987 was
calculated according to the following formula (see [Wik01]):
𝑇
𝑝(𝑇) = 1 − 𝑒 −(𝑀𝑇𝐵𝐹)
2022-07-20 Page 13
Functional Specification
2.11 Recycling
It is intended to distribute this product within the member states of the EU. In the European Union, the
sale, return and proper disposal of old electrical equipment is regulated by the Waste Electrical and
Electronic Equipment (WEEE) Directive (see [DR01]). Directive 2012/19/EU requires producers and
distributors of electrical and electronic equipment to bear the costs of financing collection and recovery
systems. It is therefore in the interests of the manufacturer to want to hand over this product to the
recycling process at the end of its lifespan as simple as possible. As a small electrical appliance, this
product falls under the jurisdiction of the aforementioned directive.
With this in mind, care was taken to ensure the simplest possible handling of the recycling process for the
series version of this product.
The plastic ABS is used as the housing material. Acrylonitrile butadiene styrene can be melted down as
often as required and thus recovered for the material cycle.
Since the series model uses plug-in modules for ease of repair, the separation of plastic and electronic
components is also straightforward and the respective components can be fed into the material
processing methods of the respective EU country. For easier recycling of the electronic components,
attention was paid to compatibility with the Restriction of Hazardous Substances (RoHS) directive and the
use of toxic substances was reduced to a minimum.
2022-07-20 Page 14
Functional Specification
2022-07-20 Page 15
Functional Specification
2022-07-20 Page 16
Functional Specification
3. References
2022-07-20 Page 17
Functional Specification
2022-07-20 Page 18
Functional Specification
4. Open Issues
Issue Raised Solution/ Resolved Resolved
Issue Raised By Status
ID On Decision By On
01 Protection Group 8 25-June- Selection of Proposed 05-July- Open
against 2022 different by Group 2022
powerful types of 8
water jets Joystick
module
2022-07-20 Page 19
Functional Specification
5. Appendix
List of appendices:
2022-07-20 Page 20
Functional Specification
2022-07-20 Page 21
Functional Specification
2022-07-20 Page 22
Functional Specification
B. Content of Program_DoES_Joystick_RGB_LED.py
#############################################################################
# University : Hochschule Anhalt
# Team : Kurumbaparambil, Vishnudev
# Lemar, Mohammad Naim
# Moslemi, Mohammad Ali
# Obert, Martin
# Degree Course : Electrical and Computer Engineering (M. Eng.)
# Subject : Development of Electronic Systems
# File Name : Program_DoES_Joystick_RGB_LED.py
# Version : 3.0
# Date : 30-05-2022
# Description : The joystick is used to change the RGB Led color and
# blinking frequency
#############################################################################
########### I M P O R T S E C T I O N ###################################
from machine import Pin, PWM
from time import sleep
#############################################################################
########### G L O B A L S E C T I O N ###################################
# Pin Definitions
RGB_pwmBlueLED = PWM(Pin(22))
RGB_pwmGreenLED = PWM(Pin(21))
RGB_pwmRedLED = PWM(Pin(20))
Jystk_valYAxis = machine.ADC(26)
Jystk_valPushBtn = machine.Pin(28, machine.Pin.IN, machine.Pin.PULL_UP)
######### F U N C T I O N S E C T I O N #################################
#############################################################################
# Name : RGB_setBlueLED_Proc
# Description : This function sets the Blue LED according to the Y axis value
# of Joystick
#############################################################################
def RGB_setBlueLED_Proc():
global RGB_dutyBlueLED
while Jystk_valPushBtn.value() == 1:
RGB_dutyBlueLED = 65535 - Jystk_valYAxis.read_u16()
RGB_pwmBlueLED.duty_u16(RGB_dutyBlueLED)
RGB_pwmGreenLED.duty_u16(0)
RGB_pwmRedLED.duty_u16(0)
#############################################################################
# Name : RGB_setGreenLED_Proc
# Description : This function sets the Green LED according to the Y axis
# value of Joystick
#############################################################################
2022-07-20 Page 23
Functional Specification
def RGB_setGreenLED_Proc():
global RGB_dutyGreenLED
while Jystk_valPushBtn.value() == 1:
RGB_dutyGreenLED = 65535 - Jystk_valYAxis.read_u16()
RGB_pwmBlueLED.duty_u16(0)
RGB_pwmGreenLED.duty_u16(RGB_dutyGreenLED)
RGB_pwmRedLED.duty_u16(0)
#############################################################################
# Name : RGB_setRedLED_Proc
# Description : This function sets the Red LED according to the Y axis value
# of Joystick
#############################################################################
def RGB_setRedLED_Proc():
global RGB_dutyRedLED
while Jystk_valPushBtn.value() == 1:
RGB_dutyRedLED = 65535 - Jystk_valYAxis.read_u16()
RGB_pwmBlueLED.duty_u16(0)
RGB_pwmGreenLED.duty_u16(0)
RGB_pwmRedLED.duty_u16(RGB_dutyRedLED)
#####################################################################################
# Name : RGB_setLEDBlink_Proc
# Description : This function sets the LEDs to blink according to the Y axis #
value of Joystick
#####################################################################################
def RGB_setLEDBlink_Proc():
global RGB_dutyLEDBlink
while Jystk_valPushBtn.value() == 1:
#####################################################################################
# Name : LED_FINAL
# Description : Lights up the LEDs according to set duty cycle and blink
# interval
#############################################################################
def LED_FINAL():
while Jystk_valPushBtn.value() == 1:
for i in range(0, RGB_dutyLEDBlink):
RGB_pwmBlueLED.duty_u16(RGB_dutyBlueLED)
RGB_pwmGreenLED.duty_u16(RGB_dutyGreenLED)
RGB_pwmRedLED.duty_u16(RGB_dutyRedLED)
if Jystk_valPushBtn.value() != 1:
mainloop()
2022-07-20 Page 24
Functional Specification
#############################################################################
# Name : mainloop
# Description : Main function of the program
#############################################################################
def mainloop():
# Repeat
sleep(0.5)
mainloop()
#############################################################################
2022-07-20 Page 25
Functional Specification
2022-07-20 Page 26
Functional Specification
D. Applicable attachments
The following data sheets are applicable:
2022-07-20 Page 27