Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHAPTER I
INTRODUCTION
1.1
Introduction
The obstacles avoidance robot is widely use recently either as the favourite student
projects or as a robotic kits that can be bought for a reasonable price. It also made as
a toy for the children. The robot that based on the hardware and the software was a
simple constructed robot that able to attract people as it can avoid the obstacles in
front by using motion sensor as the input and the controller will control the motor to
move the robot so it can avoid the obstacles.
The concept of obstacles avoidance robot was so many that it can be applied
at any systems, applications, and also machines. In this project, the obstacles
avoidance robot concept will be used as a device for the baby walker application
with some modification so it can be implement on the baby walker.
1.2
Problem Statement
Dr. Joan Shook (1998), chief of the Emergency Medicine Service at Texas Children's
Hospital reported that nearly 20,000 children are treated in emergency rooms each
year for baby walker-related injuries. The devices, long considered an easy and
entertaining way to occupy a child's time and provide exercise, can gather speed
quickly moving as fast as four feet per second and put children at risk for falls and
give them access to other hazards.
The physicians group says children in baby walkers can roll down the stairs
and it may cause breaking bones or injuring their heads and also drown by falling
into a pool, bathtub, or toilet while in a walker. The majority of children with baby
walker-related injuries fall down stairs are 80 percent and many of them sustain
serious head injuries (Neil Villette, 2001). On April 7, 2004, Canada became the first
country ever to ban the sale, importation and advertisement of baby walkers.
1.3
Project Background
The main purpose of this project is to design a distance controller for the baby walker
to prevent children from serious injuries causing by fall down from stairways and
also other hazards. By using the basic concept of obstacles avoidance robot, this
device used ultrasonic sensor to detect far from the fixed distance for example the
stairs, and by using microcontroller, it will control the motor to stop the baby walker
from falling down from the stairs.
1.4
The main objective of designing the baby walker distance controller is more
concentrate on the device itself and not the baby walker. There are some objectives
for this project:
i.
To use the ultrasonic sensor as the input and the motor as the output of
the controller.
ii.
iii.
iv.
1.5
The few topics defined in the scope of the project and there are:
i.
ii.
iii.
1.6
Summary
In this chapter, the main problem is there are children treated in emergency rooms
each year for baby walker-related injuries that put children at risk for falls and gives
them access to other hazards. The main purpose of this project is to design a distance
controller for the baby walker to prevent children from serious injuries causing by
fall down from stairways. The project objectives and scopes was explained to
specified the components and softwares that been used during the project
construction.
CHAPTER II
LITERATURE REVIEW
2.1
Introduction
The details of the component and also device that will be use for this project is
explained in this chapter. The main objective is to understand each component and
also devices that will be use in this project. This is to ensure there will be fewer
problems when using this component and device during the project progress.
2.2
The background of this project was formed based on several topics. Some principles,
application and knowledge in this project obtained from these researches based on
journals, thesis and also technical papers. By following the previous literature case,
several information and data was collected and compared to specify the research and
also to prevent the problems in the previous research.
By studying the previous related project, the cost of project construction can
be reduced by determine and calculate the component that was used only for the
project.
2.2.1
Case Study 1
2.2.2
Case Study 2
2.2.3
Case Study 3
2.2.4
Case Study 4
2.2.5
Case Study 5
10
2.2.6
Case Study 6
11
2.3
Ultrasonic Sensor
Ultrasonic sensor is the sensor that use the high frequency sound waves to measures
the time for the echo of targeted object by transmit the sound wave to the target and
the sound reflects back to the sensor. And the sensor computes the distance to the
target using the speed of sound in the medium. By knowing the speed of sound in
the medium, the sensor can determine the distance of the object from the transducer
element.
There are many applications for ultrasonic sensors, such as in intrusion alarm
systems, automatic door openers and backup sensors for automobiles. In this project,
the ultrasonic sensor was used for the baby walker distance controller as the input.
Figure 2.1 below shows the ultrasonic sensor.
12
2.3.1
Ultrasonic instruments are sensitive to sound frequencies above the range of human
hearing, usually over than 20 kHz (Sivananthan A/L Subramaniam, 2008, page 15).
The ultrasonic sensor transducers used as transmit the sound pulse and receive the
reflected echo, typically operating at frequencies between 40 kHz and 250 kHz.
Figure 2.2 below shows the ultrasonic emitting and detecting sound wave.
Figure 2.2: The ultrasonic emitting and detecting sound wave (Innovation One,
2005)
When voltage is applied to piezoelectric ceramics, mechanical
distortion is generated according to the voltage and frequency. On
the other hand, when vibration is applied to piezoelectric ceramics,
an electric charge is produced. By applying this principle, when an
electric signal is added to a vibrator, constructed of 2 sheets of
piezoelectric ceramics or a sheet of piezoelectric ceramics and a
metal sheet, an electric signal is radiated by flexure vibration. As a
reverse effect, when an ultrasonic vibration is added to the
vibrator, an electric signal is produced. Because of these effects,
piezoelectric ceramics are utilized as ultrasonic sensors. Figure 2.3
below shows the construction of ultrasonic sensor.
13
2.3.2
Easy to calibrate.
ii.
Low maintenance.
iii.
iv.
14
v.
Long-term reliability.
vi.
vii.
viii.
ii.
iii.
iv.
v.
vi.
vii.
viii.
Some delay between the time when power is first applied and the first
output.
15
2.4
Microcontroller
16
2.4.1
Microcontroller
Incorporate program memory, RAM
Microprocessor
Require external components to
Contains microprocessor
bus.
Designed to perform a wider set of
specific function.
CPU (Central Processing Unit) was
microprocessor.
Need a big space because of purpose
Small size
Inexpensive
2.4.2
function.
Expensive
PIC16F84A Microcontroller
17
Ports
18
Ports are the group of pins on microcontroller that can access simultaneously / set
desired combination of zeros and ones. It is the physical register inside PIC
microcontroller which is connected by wires to pins. Ports also are physical
connection of CPU inside microcontroller & outside world. Ports used to
monitor/control other components or devices beside designated as input / output.
Ports are divided into two parts. First, PORT A and TRIS A. PORT A was a
5-bit wide and bi-directional port. Meanwhile TRIS A corresponding data direction
registers. When TRISA equals to 1, the corresponding PORTA pin was equals to
input (put corresponding output driver in a Hi-Impedance mode). And when TRISA
equals to 0, the corresponding PORTA pin equals to the output (put contents of
output latch on the selected pin). The second part is PORT B and TRIS B. PORT B
was an 8-bit wide and bi-directional port. Meanwhile TRIS B corresponding data
direction registers. When TRISA equals to 1, the corresponding PORTA pin was
equals to input (put corresponding output driver in a Hi-Impedance mode). And
when TRISA equals to 0, the corresponding PORTA pin equals to the output (put
contents of output latch on the selected pin) (Sharina Binti Safiee, 2004, page 30).
2.4.4
It is responsible for finding and fetching the right instruction to be executed. The
program instruction was fetch to decode (assembler) and it was executed into binary
form so the microcontroller understands the given instruction. Data bus & address
bus is used to connect CPU to all part of microcontroller. ALU (Arithmetic Logic
Unit) function is to add, subtract, move/shift (left & right) & logic (Sharina Binti
Safiee, 2004, page 30). The PIC16F84A contains an 8-bit arithmetic logic unit & 8bit work registers.
2.5
DC Motor
19
DC motor or direct current motor is the most common of all motors. A DC motor
works by converting electric power into mechanical work. DC motor is small,
cheap, reasonable efficient and easy to use. It works when electrical current through
loops of wires mounted on a rotating shaft. When current is flowing, loops of wire
generate a magnetic field, which reacts against the magnetic fields of permanent
magnets positioned around the wire loops. These magnetic fields push against one
another and the armature turns.
Many applications call for a high start-up torque. The DC motor has a high
torque versus falling speed characteristic and this enables it to deal with high starting
torques and to absorb sudden rises in load easily. The speed of the motor adjusts to
the load. Furthermore, the DC motor is an ideal way of achieving the miniaturisation
designers are constantly seeking because the efficiency it gives is high compared
with other designs. Figure 2.6 below shows a DC Motor.
2.5.1
20
The DC motor has two basic parts: the rotating part that is called the armature and
the stationary part that includes coils of wire called the field coils. The stationary
part is called the stator. The armature is made of coils of wire wrapped around the
core, and the core has an extended shaft that rotates on bearings. The ends of each
coil of wire on the armature are terminated at one end of the armature. The
termination points are called the commutator, and this is where the brushes make
electrical contact to bring electrical current from the stationary part to the rotating
part of the machine (www.sgmada.com, 2007). Figure 2.7 below shows basic parts
of DC motor.
2.5.2
DC Geared Motor
21
has a torque limit, which is the breaking torque. If this torque is applied to the
gearbox, it will cause severe damage. Figure 2.8 below shows DC geared motor.
2.6
22
2.7
Summary
In this chapter, the fundamental knowledge for every each component was explained.
This is to ensure there will be fewer problems when using this component and device
during the project progress.
23
CHAPTER III
METHODOLOGY
3.1
Introduction
ii.
Programming PIC16F84A.
iii.
These selection phases involves choosing project title, the suitable circuit
with availability components, programming PIC microcontroller to meet projects
needs, the material that used to design the baby walker distance controller prototype
and project scheduling. Figure 3.1 below shows research methodology.
24
25
26
3.2
The first stage of this project involves designing and constructing the sensor circuit
and motor control circuit. The most suitable circuit for infrared sensors and motor
has been determined. After that, numerous tests on the designed circuit were
simulated using Proteus software. Once it complete simulated, the designed circuit
were construct and performed on the prototyping board. Once it works efficiently, the
circuit design will transfer on the printed circuit board (PCB). The circuit once again
were been tested and troubleshoot, if necessary. Figure 3.3 below shows circuit
design and construction flowchart.
27
3.3
PIC16F84A microcontroller is the device selected for the project. Its wide operating
voltage range is about 2.0 to 5.5V. MPLAB was used to develop PIC program. It
provides a set of equivalent tools in one integrated package. Assembly code is used
because it is generally faster and requires less memory. Figure 3.4 shows PIC
program development flowchart.
28
3.4
To design the distance controller prototype, it must fulfil all these criteria:
i.
Small
The prototype needs to be small because it will be place below
the baby walker. The suitable motor is the main factor in designing
this project prototype. The motor needs to be in small size and have a
large torque.
ii.
Practical
The functions for this prototype need to be friendly use and it
can function as plug and play. It cannot be complicated so the
consumer doesnt have any problems on how to use it.
iii.
Safe
The important factor in designing the distance controller
prototype is it must be safe for the consumers especially for babies
who used the baby walker. The safety of the distance controller must
be for the baby and from the baby. It must safe for the baby because it
will stop the baby walker when detected stairs and it must be saved
from the baby to get hurt while using this device.
3.5
The most important thing in designing the baby walker distance controller is the
softwares. The softwares that being used in this project will make the project
construction became more fast, easy and efficient. Without these softwares the baby
walker distance controller maybe cannot completed on a schedule.
29
3.5.1
PROTEUS
The distance controller for the baby walker use ultrasonic sensor circuit and also
motor controller circuit as an input and output. All the circuit must be designed and
simulated to make the system works accordingly. When the simulated system circuit
works accordingly, then the circuit can be constructed on the printed circuit board
and finally the circuit can be test. The software that has been used to design and
simulate the distance controller circuit for the baby walker system is PROTEUS
software.
PROTEUS software is used to design and simulate the circuit before the
circuit is been construct. This is to make sure the circuit is functionally as desired.
This software also can analyse the simulated circuit by using the application in it.
The most interesting part in the PROTEUS software is it also able to simulate the
circuit that using the PIC microcontroller. This is can be done by inserting a certain
program file type from the MPLAB software into the PIC microcontroller. Figure
3.5 shows the Proteus Software from Labcenter Electronics.
30
3.5.2
MPLAB IDE
The system works depends on the commands from the microcontroller. To program
a microcontroller, the assembly language, source code, algorithm and the
specification of the microcontroller need to be known. After the written program
successfully run without an error in the source code, the microcontroller can use the
program by compiled it with a compiler. A compiler act as a burner as it burns the
source code into the microcontroller. The program was written and assembled using
MPLAB IDE. Figure 3.6 below shows MPLAB Integrated Development
Environment (IDE).
31
3.6
Overall Project
The details for designing the baby walker distance controller form the system, block
diagram, flowchart, circuit diagram, programming code and also prototype design
has been explained. This is to make sure the project proceed accordingly and not
going out of track. The project scope is the important matter to make sure all the
progress is in under control.
3.6.1
The baby walker distance controller is in off condition when the baby walker moving
around as the sensor detects the fixed distance. When the sensor detects stairs (the
distance is over than the fixed distance) the controller will automatically turn on and
stop the baby walker from moving forward. The distance controller will hold the
baby walker by lift the baby walker a little bit as the wheels did not touch the ground.
The signal came from the infrared sensor and the motor is moving based the
programmed PIC16F84A microcontroller. Figure 3.7 shows a project system
overview.
32
3.6.2
The electronic control system consists of electronic circuit, controller circuit using
PIC16F84A and motor driver. The power supply is a battery will supply the voltage
to the electronic control circuit. The DC motor will stop the baby walker if the
ultrasonic sensor detects stairs or further than fixed distance. Figure 3.8 shows the
project system block diagram.
33
3.6.3
Figure 3.9 shows a structured algorithm flow chart for the project system. The
program has been written base on the flow chart given and then it was compiled to
the microcontroller. The flow chart construction usually is based on the circuit
design as it determines the input and output for the system.
This program is structured in a continuous loop. First of all, the related
register takes place, and then the program looks at the ultrasonic sensor. If the
ultrasonic sensor doesnt detect stairs (ON condition), the motor is in idle. But if the
ultrasonic sensor detect stairs (OFF condition), the program ran the next instruction
which was moving the motor to the left for about a second and it stopped
automatically after that.
The program was waited until the sensor is in ON condition again as it moved
the motor to the right for about a second and it stopped automatically after that. The
interesting part of the program is it will move the motor to the right or to the left
based on ultrasonic sensor condition.
34
35
3.6.4
In order for the baby walker distance controller to operate, it requires an electronic
circuit which is designed based on the function of the baby walker distance
controller. There are three circuits that have been used for this project which are the
voltage regulator circuit, ultrasonic sensor circuit and also motor controller circuit.
Each circuit required a voltage supply to make it function. Battery is the
most suitable to supply all these three circuits. So the schematic circuit design for
these three circuits need to be connected to the same battery as long as the loads from
the circuits are not higher than the supplied battery voltage.
36
37
38
39
40
Figure 3.13: The component position on the PCB layout using PROTEUS ARES
software for the circuit
41
The PCB is chosen for a network connection to operate the circuit. After the
circuit has been designed by using PROTEUS ARES software, the circuit layout was
printed and finally etched on a PCB. Figure 3.14 shows the etched circuit board.
3.6.5
The project circuit will not function if there is no programme in the PIC
microcontroller. The programme is the set of instruction that was given to the PIC
microcontroller to control the output as desired. The programme that is used in this
project is assembly language programme. The reason for using this language is easy
to understand and have a small library of language. This project is not using so many
instructions so the programme writing will be not difficult and easy to understand.
MPLAB IDE software is used to write the programme. This software also
capable to compiled the programme into the PIC microcontroller. The programme
for this project was written based on the function of this project itself. The project is
about the control of the motor to stop the baby walker. So the programme basically
is to control how long the motor will turned on. Flowchart is the main key to write a
programme.
42
43
The baby walker distance controller used two motor to stop the baby walker. The
prototype design for those two motor is the important part for this project. The
design need to be function as required which is to stop the baby walker from moving
when the ultrasonic sensor did not detect any obstacle. The design was focused to
the DC geared motor as the motor will stop the baby walker by the motor shaft is
turning clockwise or counter clockwise.
The prototype design used the screw movement concept because it is same to
the motor movement. The concept is simple, when the screw turning clockwise, it
will move the screw forward and when the screw turning anticlockwise, it will move
the screw backward. Figure 3.17 below shows the screw movement.
44
the range of the motor movement for the baby walker distance controller. The
prototype design specification was detailed so the construction of the prototype will
be much easier. Figure 3.18 shows the prototype design for the baby walker distance
controller.
Figure 3.18: The prototype design for the baby walker distance controller
45
3.7
Summary
In this chapter, the methodology of the project including the research methodology,
circuit design and construction, programming PIC16F84A and also the baby walker
distance controller prototype design were explained. The softwares that were used
along in this project also were described in details.
46
CHAPTER IV
4.1
Introduction
From the circuits and the prototype of baby walker distance controller that is
produced, it is necessary to analyse several experiment on the product based on the
capability itself. There are four major analyses that being done for data collection
and also the capable to understand the function of the system for more further
research. The analysis for the baby walker distance controller is the motor analysis,
ultrasonic analysis, motor controller circuit analysis and also the baby walker
distance controller analysis.
Several techniques, calculations and some measurements are made for data
collection and result collection. Then the analysis from the result is being made to
get the information and also to be able to understand the function of the project that
being made.
4.2
Results
To ensure the baby walker distance controller is working properly, several of the
output can be analyse. The output of ultrasonic sensor will send a signal to the
programmed PIC microcontroller to control the motor movement. The result will
showed the written program for the PIC microcontroller and the distance controller
prototype design.
47
48
Figure 4.1: The program for the baby walker distance controller
49
50
51
4.3
Analysis
From the circuits and the prototype of the baby walker distance
controller that is produced, it is necessary to analyse at the product
based on the capability itself. The analysis including the voltage
regulator circuit analysis, dc motor analysis, ultrasonic sensor
analysis, ultrasonic sensor analysis, and motor controller circuit
analysis.
Input voltage
(volt)
Output voltage
(volt)
12
24
5.00401
5.00493
5.00863
52
53
12
174.66
249.36
Table 4.2 shows the result of rpm for DC motor. The result
shows that the speed of DC motor is increased when the voltage
input is increased. This can be shown at the graph below. Figure
4.8 shows the graph of DC motor rpm proportional to voltage input.
The important of this graph is to calculate the approximate time
how long the motor will rotate. This is to ensure the motor will lift
the baby walker up to stop it.
Voltage
(V)
rpm
14
12
10
8
6
4
2
0
50
100
150
200
54
55
56
57
58
4.4
Summary
In this chapter, all the project constructions were finalized. The results were analysed
using several techniques to gain the information and also to be able to understand the
function of the project that being made.
59
CHAPTER V
This project development contains three phases and which are the baby walker
distance controller circuit design and construction, the programming of PIC16F877A
and also to design the prototype of baby walker distance controller. The main
components that use in this project are ultrasonic sensors, PIC16F877A
microcontroller and servo motor. MPLAB Integrated Development Environment
(IDE) program is use to program the PIC16F877A microcontroller. From this project,
the baby walker distance controller was designed successfully. The circuit was
function as desired.
5.1
Conclusion
60
using the screw movement method move the motor down and lift
the baby walker up so the wheel doesnt touch the ground.
5.2
Recommendation
ii.
iii.
iv.
61
REFERENCES
62
63
APPENDICES
64
APPENDIX A
65
66
APPENDIX B
67
68
APPENDIX C
69
70
APPENDIX D
71
72
73
74
75
76
APPENDIX E
77
78
79
80
81
82
83