Professional Documents
Culture Documents
Chapter 3
Chapter 3
METHODOLOGY
3.1 OVERVIEW
FIG the VDI 2206 model (VDI 2206- A guide for design of new Mechatronic systems, 2002)
The Association of German Engineers (VDI –Verein Deutscher Ingenieure) developed the design
methodology for mechatronic systems, VDI-2206, to meet the need to solve more complex engineering
problems in an innovative manner (Avarestech.com, 2019). The methodology seeks to integrate
and combine different disciplines, such as mechanical engineering, electronic instrumentation, and
information technology. This design process method is iterative, where each iteration represents a
degree of maturity in the solution of the mechatronic system. Its main characteristics are as follows.
▪The mechatronic system is divided into modules, also called subsystem, in a top-down process. The
modules are divided into assemblies, the components of which provide the details.
▪Throughout the process, models and simulations are developed to define the behavior of the system.
▪The system integration is a bottom-up process, starting with the integration of components, assemblies,
and modules, and finally, the complete mechatronic system is actualized through constant validation
and verification at all its levels. This allows the system requirements to be revised along the design
process.
The above design process can be grouped into four main stages (see Fig.2. 1); it has as input the
requirements and specifications that the system must meet and as output the mechatronic system itself.
The stages are briefly described as following.
1. System design: The system is considered as a whole, and later defined at the level of
components. The system is divided into modules, defining the system constraints. The details of the
modules are in accordance with the development of the task distribution, transition and power
generation functions, information and control functions, sensor selection, actuators and components,
human-machine interface, reliability, and design safety.
2. Domain-specific design: The components are designed according to the specific domain to which
they belong. (Domains include Mechanical, Electrical, Electronic and Software/Information)
3. Analysis and modeling: Mathematical models of components are developed using behavior
modeling and simulation tools. These models are analyzed and must provide the system behavior
throughout the system design, the domain-specific design, and the system integration.
4. System and software integration: The system integration stage includes the spatial integration
of components, sensors, actuators, cables, connectors, necessary adaptations and synergistic effects
and precision implementation in the system. The software integration stage includes the development
of prototypes for verification and validation. Finally, the necessary tests and adjustments of all the
modules are conducted under real operating conditions, and system reliability and safety,
electromagnetic compatibility, and compliance with specifications are verified. After the acceptance of
the system, the next step is the production of the system.
This include identification of mechanical constraints to lead into the overall design of the mechanical
framework. Various solutions of the mechanical system are analyzed to be developed into a single
perfect solution that meets the prescribed objectives. Principle design and solutions are analyzed and
selected for appropriate components to be designed.
The overall models obtained from cross domains are simulated to test for functionality without having
to physically build a model.
b) Verification/Validation
Experimental tests are carried out to verify the geometries and fits for certain parts for mechanical
system. To verify the working of the electrical part, Proteus software is used. It tests the motor as well
as the drive for impeller to see whether selected components fit well and do not go beyond their
working limits like torque, over voltage and over-currents.
The following research steps were carried out in order to come out with a fully functioning machine.
3.2.1NARRATIVE REQUIREMENTS
The system should be able to control the operation of a medication dispensing. This system should be
microcontroller-based and a software program that helps the user to operate and manage the system.
The System should be able to communicate with the patient or care giver through an sms. An alarm
module is used to notify the patient or caregiver of the time for medication by use of a buzzer and LEDs
to cater for the deaf patients.
T = Ki (1)
(2)
From Fig.2.7 we can write the following equations based on the Newton’s law combined
with the Kirchoff’s law:
J = Ki (3)
L + Ri = V-
Transfer Functions:
Using the Laplace transform, equations (3) and (4) can be written as:
where s denotes the Laplace operator. From (6) we can express I(s):
J
This equation for the DC motor is shown in the block diagram in Fig.2.8. From equation (8),
the transfer function from the input voltage, V (s), to the output angle, , directly follows
Ga(s)=
From the block diagram in Fig.2. 8, it is easy to see that the transfer function from the input
voltage, V (s), to the angular velocity, , is:
Gv(s)=
FIG A Closed-loop System Representing the dc servo motor
Servos are controlled by sending an electrical pulse of variable width, or pulse width modulation (PWM),
through the control wire. There is a minimum pulse, a maximum pulse and a repetition rate. A
servomotor can usually only turn 90° in either direction for a total of 180° movement. The motor's
neutral position is defined as the position where the servo has the same amount of potential rotation in
the both the clockwise or counter-clockwise direction. The PWM sent to the motor determines position
of the shaft, and based on the duration of the pulse sent via the control wire the rotor will turn to the
desired position. The servomotor expects to see a pulse every 20 milliseconds (ms) and the length of the
pulse will determine how far the motor turns.
3.4.2.2 DRIVE L293D IC
L293D is a typical Motor drive or IC, which allows DC motor to drive on either direction. L293D is a 16-
pin IC that can control a set of two DC motors simultaneously in any direction. It means that you can
control two DC motor with a single L293D IC.
It works on the concept of H-bridge is a circuit which allows the voltage to be flown in either direction.
As you know voltage need to change its direction for being able to rotate the motor in clockwise or
anticlockwise direction, hence H bridge IC are ideal for driving a DC motor.
In a single L293D chip there two H-Bridge circuit inside the IC, which can rotate two DC motors
independently. Due its size is very much used in robotic application for controlling DC motors.
There are 16 pins sticking out of this IC, this is the functionality and the connection of each pins:
(up to 36V)
There 4 input pins for this l293d, pin 2,7 on the left and pin 15 ,10 on the right shown on the pin diagram.
Left input pins will regulate the rotation of servo motor connected across left side and right input for
motor on the right-hand side. The motors are rotated based on the inputs provided across the input pins
as
LOGIC 0 or LOGIC 1
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When
an enable input is high, the associated driver gets enabled. As a result, the outputs become active and
work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their
outputs are off and in the high-impedance state.
0 0 1 Stop
0 1 1 Anti-clockwise rotation
1 0 1 Clockwise rotation
1 1 1 Stop
half speed
3.4.2.3 ULN2003
The ULN2003 is a high voltage, high current Darlington array each containing seven open collector
Darlington pairs with common emitters. Each open collector Darlington is rated at 500 mA. It can accept
output voltages of up to 50V. Suppression diodes are included for inductive load driving so it used for
fan, buzzer and led.
Figure 3.4: ULN2003
5 5B
6 6B
7 7B
9 COM
10 7C
11 6C
12 5C
14 3C Output Buzzer2
15 2C Output
16 1C Output FAN
3.4.2.4 ICLM35
IC LM35 is a sensor use for detecting accurate centigrade temperature. LM35 is a thermometer on a
chip, designed by Semiconductor Instead of using mercury or another fluid; it relies on a property of
diodes that causes the breakdown voltage of the diode to increase with temperature. This relationship is
linear and predictable, making the LM35 a very accurate temperature sensor, with a voltage output that
is linearly proportional to temperature.
This sensor uses the fact that, as temperature increases, the voltage across a diode increases at a
known rate. When the temperature reach to 30 Centigrade the DC motor (fan) will run.
1 VCC
2 Pin A.0
3 Ground
3.4.2.5 DISPLAY UNIT
The monitoring element is the common LCD LM016L chip; it will display a number of messages to the
user. These messages include things such as, setting the clock, questions about entering new medication
data, which has 16 pins. This pin can be interfaced with microcontroller in 4 Bit or 8 Bit mode. These
differ in how data is sent to LCD.
In 8-bit mode to write a character, 8-bit ASCII data is sent through the data lines D0 – D7 and data strobe
is given through E of the LCD. LCD commands, which are also 8-bit, are written to LCD in similar way.
However, 4 Bit Mode uses only four data lines D4 – D7. In this mode 8-bit character ASCII data and
command data are divided into two parts and send sequentially through data lines. The idea of 4-bit
communication is used save pins of microcontroller. 4-bit communication is a bit slower than 8-bit
communication but this speed difference can be neglected since LCDs are slow speed devices. In this
project will use 4-bit mode connected as below:
1 VSS
2 VDD
3 VEE
4 RS Pin B.0
5 RW GROUND
6 E Pin B.2
7 D0
8 D1
9 D2
10 D3
11 D4 Pin B.5
12 D5 Pin B.6
13 D6 Pin B.7
14 D7 Pin B.8
Used for loading numeric into the microcontroller. It consists of 16 buttons arranged in a form of an
array containing four lines and four columns.
GSM
To provide a type of communication between the medical dispenser system and the patient or a
guardian of the patient, the GSM circuit has been provided to remind the patient or the guardian of the
time of taking the particular medicine.
The AMDS can be programmed when the system is switched on beginning the program mode. After the
name has been inputted the user is asked to enter the password of the user which his name was
entered before.
Then, the user’s telephone number is asked for to help in remember the patient to be around by
sending him a massage before ten minute to take the medication.
Also the user is asked to enter the present number of medication which are going to be inputted to
visual each tray information separately. The user is first asked to enter the MDT user name whose
medication for. The user then prompted to enter the medication name. After the name has been
inputted it is redisplayed to the user for correctness the name is not correct the user must input it again.
The user can select the wished tray from the five existing MDT by entering its number, when it is
involved with some medication, he can select another MDT. The user is then prompted for the times per
day, these times are used to calculate the intervals between the dispensing process, so the device can
forecast the next dispensing. The start time is the first time to be entered which is the first time the
user should take his or her medication, the next time of dispensing is the first time plus the time of the
interval, the interval time is the time in between when a tablet is taken and when it should be taken
next. The user is then asked to input the total number of the tablets to know the time of stopping when
there are no more tablets to dispense. In addition, the tablets per dispense were asked to be entered to
ensure the correct dosage.
Now the role of time setting is come. the first asking is about first hour Note this interval can only be
inputted in as hours. The user is then asked to enter the first minute of the interval time. Also this
interval can only be inputted in as minutes. After that, the user is prompted for the actual time now. The
actual time is the time consists of the actual time hour, the actual time minute and the actual time
seconds. After programming one MDT the user has the option to program another, if it is entered extra
medications. By this last step the programming mode is logged of and the dispensing mode is started.
Once an MDT alarm time has been reached the system goes into dispensing mode. First the alarms will
go off alerting the user that it is time to take his or her medication. The alarms will not cease until the
dispense button is pressed. During this time the buzzer sounds, the LED lights up, and the motor rotate.
Once the dispense button is pressed the
medication name, and dosage start are written to the
backlit screen. The program will then wait for the
bush button to close assuming the user has take his
or her medication and is now Set accurate
closing the alarms.
The system will then check to see time if another MDT alarm
time has been reached, dispensing mode will
be repeated all over again. If no other medication is
to be taken the time is then redisplayed on the
LCD and the program returns to Accurate time = main. Dispensing
mode can be better visualized dispensing time ? using Figure
LED
BUZZER
Switch
button
Rotate
motor
Off LED&
buzzer
Display the
next time
Another
MDT?
end
Figure The schematic of the integrated system
Atmega 16 AVR is the systems controller and is powered by a 12v supply and it is programmed with the
medication information through the keypad and displays information like medication name, dosage,
dispensing time through the LM016L display unit. The controller receives temperature reading through
the ICLM35 and sends a signal to the ULN203 to supply 12v to the fan to start running and to the Alarm
module to ring when its time to take medication. 10 mins before dispensing time the controller sends a
signal to the GSM module to send an SMS to the patient or caregiver as a reminder. And 10 mins after
dispensing time another SMS is sent to the caregiver stating whether the patient took the pill or not. The
GSM module is connected to the controller through the RS-232. When its dispensing time the controller
sends a signal to the servo motor to rotate through the Drive L293D IC which enable the motor to rotate
in both forward and reverse directions.
3.6 DESIGN VALIDATION
In this section, a checklist is made to verify if the system design satisfies the various requirements made
in the requirements section.