a direct circuit experiment system in non-immersive virtual environments for education and...
TRANSCRIPT
A Direct Circuit ExperimentSystem in Non-ImmersiveVirtual Environments forEducation and Entertainment
QUANG-CHERNG HSU
Department of Mechanical Engineering, National Kaohsiung University of Applied Sciences, 415 Chien-Kung Road,
Kaohsiung 807, Taiwan
Received 13 February 2004; accepted 27 December 2004
ABSTRACT: This article proposes to contribute to the goal of ‘‘The Popular Science
Teaching Research Project’’ as well as to enhance the programming abilities of mechanical
engineering students. Topics being included as example are in physical science, which include
battery, lamp, and electric circuit. These materials are designed, based on virtual-reality
technology that is suitable for students as early as fourth-grade students of primary school. It
will help the students become familiar with new computer technology and provide an
opportunity to study while playing virtual reality computer games. The benefits of the
developed application software system of virtual reality are virtualization of teaching
equipment, cost reduction of teaching materials, unlimited teaching style, and optimization
of learning procedures. � 2005 Wiley Periodicals, Inc. Comput Appl Eng Educ 13: 146�152, 2005;
Published online in Wiley InterScience (www.interscience.wiley.com); DOI 10.1002/cae.20044
Keywords: virtual reality; circuit experiment; physical modeling; software design; virtual
experiment
INTRODUCTION
Virtual reality (VR) is a high-end user interface that
involves real-time simulation and interactions through
multiple sensorial channels. Three important char-
acteristics are: immersion, interaction, and imagina-
tion [1]. Virtual environment (VE) is an alternative
word for VR when especially focusing on graphical
exhibition. McNeill and his colleagues [2] developed
a spoken-dialogue system for navigation in non-
immersive virtual environments by using natural
language-processing technology. The scientific com-
munity has been working in this field for some years,
having recognized VR as a powerful human-computer
interface. VR in surgery and medicine are promising
application areas [3]. The use of VR in surgery
impacts a number of distinct areas, such as teaching
Correspondence to Q.-C. Hsu ([email protected]).Contract grant sponsor: National Science Council, Taiwan;
contract grant number: NSC 90-2515-S-151-003-.
� 2005 Wiley Periodicals Inc.
146
human anatomy and pathology, surgical-procedure
training for new surgeons, surgical planning of
complex procedures, navigational and informational
aid during surgery, and predicting operational out-
comes [4].
Education and entertainment are also other
important VR application areas. Kumar and his
colleagues [5] created a web-based interactive virtual
experiment on microelectronics for early engineering
students. The web material is presented in an intuitive
and highly visual 3D form that is accessible to a
diverse group of students. Through the use of highly
engaging VR, the ‘‘Virtual Lab’’ addresses edu-
cational opportunities at high school, community
college, and university levels. Ou and his colleagues
[6] developed an interactive web-based training tool
for CAD in a virtual environment along with an
integrated graphics real-time system. Duarte and Butz
[7] have developed an intelligent universal virtual
laboratory to provide a more realistic and enhanced
learning experience. Entertainment was the driving
force of early VR technology and is presently its large
market. Therefore, in this article, the author develops
a direct circuit experiment system in non-immersive
virtual environments for education and entertainment.
The basic concept is to provide a virtual environ-
ment for students, by which they can manipulate
virtual objects like lamp, battery, motor, wire, etc. and
try to find what happens when a virtual circuit layout
has been finished or changed, just as in a real
experiment.
THEORETICAL BACKGROUNDS
The theoretical backgrounds of VR are a combination
of psychology, computer graphics, database, real and
distributed system, electronics, robotics, and multi-
media, etc. For computer graphics, the theories of
solid modeling, surface modeling, transformation,
3D clipping, color graphic, collision, shading, and
projection are well developed [8]. All of these are
elements in the basic technologies for VR; however,
the deficiency will be limitations of computation
speed and close to human eye visualization.
According to the different communication devices
between computer and human, VR offers four types:
desktop (non-immersion), immersion, CAVES, and
web. When desktop VR is used, the operator will see
virtual and real environments at the same time. If
immersion VR is used, one is abstracted from the real
world and put into the computer-generated environ-
ments. CAVES VR allows several observers’ look at
the same virtual scene at high resolution and 3D
images with stereo sounds. Web-based VR is an
extension of desktop VR which allows many manip-
ulators, operate at the same time in Internet.
The proposed system belongs to desktop VR.
However, in addition to normal devices like keyboard
and mouse, the joystick is also applied in the proposed
system to enhance the entertainment effect. The vir-
tual objects are constructed by using AutoCAD and
the textures are pasted in by using True Space. Finally,
by using EON Studio [9] and Visual BASIC (VB)
script programming, the proposed virtual experiment
system is finished as is described in details in the
following sections.
CREATION OF A NON-IMMERSIVEVIRTUAL ENVIRONMENT
Background Knowledge
The background knowledge of direct-circuit experi-
ment is as follows: (1) according to the layout of
elements, such as lamps, electric wires, motors,
batteries, the system should respond how many short
and closed circuits occur in that layout. (2) Identifying
how many shared elements between two nearest
closed circuits. (3) Accumulating the total voltages
and electric resistances exist in each closed circuit.
(4) Deriving the equation, based on mesh-current
method in each closed circuit. (5) Using the Gaussian-
elimination method [10] to solve for current value in
each closed circuit. (6) Setting the brightness of each
lamp or the rotation speed of each motor according to
the electric current. In order to mimic real-time
simulation of the direct-circuit experiment, if an
element is added or removed in electric layout, the
proposed system should repeat the previous six steps
automatically.
The creation of such a non-immersive virtual
system consists in constructing CAD models, arran-
ging virtual environments and interface between
virtual and real worlds, building hierarchy of virtual
objects in simulation trees, planning activation and
sequence between each objects in route trees, and
programming.
CAD Models for Virtual Objects
The virtual objects used in the direct-circuit experi-
ment are circuit board, binding posts, electric wires,
lamps, motors, batteries, etc. By using CAD software,
the solid modeling of virtual objects are constructed as
shown in Figure 1.
DIRECT CIRCUIT EXPERIMENT SYSTEM 147
Virtual Environments and Interface
Other than virtual-experimental objects, the virtual
environments also need a table and cabinet to store
and position all of them. Figure 2 shows the planned
virtual environments used in the proposed virtual
experiment. The table is in front of the cabinet (called
cabinet frame). The circuit board and binding posts
(called basement frame) are placed on the table. The
other virtual experimental objects are stored inside of
the cabinet. For reducing the complexity of checking
whether the wire is contact with other component or
not, the proposed system assumes, when components
connect into binding posts, the electric current can
flow through between them. It is also hard to generate
an electric wire that can be flexible as in a real world.
Therefore, in the proposed system the electric wires
are always straight.
In order to construct a handling interface by
which all the virtual experimental objects can be
manipulated easily as well as to navigate in the virtual
environments, the 2-axis and 14-button joystick is
used. This joystick should be installed under the
Figure 3 The simulation tree represents the frame-
work of the current study.
Figure 2 Virtual environments of direct circuit
experiment.
Figure 1 Virtual objects in solid modeling.
148 HSU
Windows operation system. There are three major
manipulations: (1) the walking of operator in first-
person viewpoint; (2) the choice, pick, and placement
of current object; (3) the movement or positioning of
an object. The operation of manipulator in the virtual
laboratory includes translation and rotation that can be
activated at anytime by a joystick. Mouse keys can
also activate the choice, pick, and placement of cur-
rent object, such as lamp or wire, anytime. This mani-
pulation is the first and necessary step when beginning
a virtual experiment. The movement or positioning of
current object is also activated by joystick, by which
each virtual object can be moved to anyplace of circuit
board and locked in definite positions. If an object is
moved or repositioned, the virtual environment should
perform according to the previous mentioned back-
ground knowledge.
Simulation Tree
The simulation provided by EON Studio involves
three main actions—adding and enhancing 3D
graphic objects, defining behavioral properties for
these objects, and specifying how users will interact
with them in the simulation. The files containing 3D
objects, textures, and sounds can be imported into
EON Studio. In simulation tree, the framework of this
simulation should be provided that includes the
viewpoint, the lighting, the hierarchy of virtual
objects, etc. The interaction between any two virtual
objects can be added in the route tree. However, the
more complex functions such as solving linear
algebraic equations can be finished by VB script
programming.
Figure 3 depicts the simulation tree of the current
study that consists of: Camera node, Ambient light
node, Lovely animation—motor node, My tree node,
and Joystick node. The first two nodes are default
nodes that represent the status of view and light.
Lovely animation—motor node responds the pre-
defined animation of virtual objects including wire,
lamp, battery, and motor. My tree node is the major
node that comprises several main frames of virtual
objects, such as Cabinet frame and Basement frame.
There are a lot of virtual objects in the Cabinet frame
such as cabinet sub-frame, lamps with different color,
motors with different color, batteries with different
color, electric wires with different color, and several
glasses in front of the cabinet. There are two main
sub-frames in the Basement frame: ir-table (represent-
ing a circuit board) and connecting pole (representing
binding posts). All these nodes comprise the frame of
the current simulation.
Routes Window
Routes window is used to connect the nodes and
define how they will behave when data are sent
between them. Node behavior is also affected by
where the node is placed in a simulation tree, as well
Figure 4 Rotation node ‘‘mg’’ is used to control ‘‘motor G’’ rotation both in simulation tree and routes window.
DIRECT CIRCUIT EXPERIMENT SYSTEM 149
as the settings in its properties window. The Routes
window provides a graphic representation of all defined
routes. Connections between nodes are shown as lines,
running from the triggering node’s out-field to the
corresponding in-field of the target node. Out-fields
are represented by an arrow and in-fields by a dot.
Figure 4 depicts how to control a motor fan
rotation. In the simulation tree, motor G is divided
into two sub-frames: body (without blade) and blade.
A rotation node ‘‘mg’’ is defined and placed under the
blade frame. A script node called ‘‘Basement receive’’
governs with how much current will flow through this
motor and transferring the rotation speed to rotation
node ‘‘mg.’’ This algorithm can also be used to control
motor R by ‘‘mr’’ or to control other virtual objects,
like lamps, by passing information to texture nodes
‘‘br,’’ ‘‘bg,’’ and ‘‘bb.’’
VB Script Programming
Scripting in EON is a method to solve a large
calculation works or special purposes. The data from
Script node fields storing single values is accessible as
ordinary variables in VBScript subroutines. For each
in-event field in the Script node a subroutine named
On_name() can be written. The subroutine is executed
when the Script node receives the name in-event.
Figure 5 lists a part of VB script language for
Figure 6 Demonstration of picking virtual object and layout in the basement.
Figure 5 Listing a part of VB script language for debugging, when key ‘‘D’’ is pressed the subroutine On_debg()
is operated.
150 HSU
debugging. When key ‘‘D’’ is pressed, the keyboard
sensor node ‘‘Debug’’ is activated and sends a
message called ‘‘debg’’ as an in-event field to
‘‘Basement receive’’ script node. In the same time,
the subroutine On_debg() is operated to print some
data on screen for debug. A lot of tasks should be
conducted by VB script programming, such as:
responding how many short and closed circuits in
that layout, identifying how many shared elements
between two adjacent-closed circuits, accumulating
the total voltages and electric resistances in each
closed circuit, solving current value in each closed
circuit by numerical method, and adjusting the bright-
ness of each lamp or the rotation speed of each motor
according to electric current.
RESULTS AND DISCUSSION
Based on the above descriptions and constructions, a
non-immersion virtual environment for direct-circuit
experiment has been created. Figure 6 depicts picking
virtual-experimental objects from a cabinet and
layouting into a circuit board in such a virtual environ-
ment. In order to test the accuracy and performance of
the virtual experiment system, several tests have been
conducted. The first one was a simple circuit layout
for one battery, one lamp, and two electric wires, as
shown in Figure 7. The lamp was bright. The second
test was to add two wires and one motor-fan to
compose another closed circuit using the same battery
in both, as shown in Figure 8. The motor-fan rotated
(however, it can not be seen on paper) and brightness
of the lamp was the same as in Figure 7. The third test
was to add two more wires, another lamp, and to
compose a multiple circuit, as shown in Figure 9. The
two lamps had the same brightness. The last test was
to exchange one battery and one wire such that the
batteries were in opposition, as shown in Figure 10.
The lamps turned off and the motor stopped rotating.
All above tests demonstrate the validity of the pro-
posed virtual environments.
Figure 10 An inoperative circuit layout.
Figure 9 A multiple composed circuit layout for two
batteries, two lamps, one motor fan, and six electric
wires.
Figure 8 A composed circuit layout for one common
battery, one lamp, one motor fan, and four electric
wires.
Figure 7 A simple circuit layout for one battery, one
lamp, and two electric wires.
DIRECT CIRCUIT EXPERIMENT SYSTEM 151
CONCLUSIONS
The purpose of the proposed virtual experiment
system for direct circuit is based on the basic training
of department of mechanical engineering: computer-
aided design, computer-aided drawing, and computer
programming; to extend their software design abil-
ities. The developed virtual environments can be
provided to primary school students to explore or
layout the simple and basic direct circuit experiments.
Based on the demonstrating examples: the simple
circuit, the complex circuit, the multiple complex
circuits, and the invalid circuit, the proposed system
behaved smooth, true and natural. It can be used as a
computer-aided tool to assist real experiments as well
as used as an entertainment toy.
REFERENCES
[1] K. Warwick, J. Gray, and D. Roberts, Virtual reality in
engineering, The Institution of Electrical Engineers,
London, 1993.
[2] M. D. J. McNeill, H. Sayers, S. Wilson, and P. Mc.
Kevitt, A spoken dialogue system for navigation in
non-immersive virtual environments, Comput Graph
Forum 21 (2002), 713�723.
[3] G. Miller, E. Hoffert, S. Chen, E. Patterson,
D. Blackketter, S. Rubin, S. Applin, D. Yim, and
J. Hanan, The virtual museum: Interactive 3D naviga-
tion of a multimedia database, J Visualization Comput
Animation 3 (1992), 183�197.
[4] G. Burdea and P. Coiffet, Virtual reality technology,
Wiley, New York, 1994.
[5] V. V. Kumar, N. ansari, J. F. Groves, and J. C. Bean,
The creation of web-based interactive virtual experi-
ments on microelectronics for early engineering
students, 32nd ASEE/IEEE Frontiers in Education
Conference, November 6�9, 2003, Boston, Session
T4F.
[6] S.-C. Ou, W.-T. Sung, S.-J. Hsiao, and K.-C. Fan,
Interactive web-based training tool for CAD in a
virtual environment, Comput Appl Eng Educ 11
(2003), 182�193.
[7] M. Duarte and B. P. Butz, An intelligent universal
virtual laboratory, Proceedings of the 34th South-
eastern Symposium on System Theory, 2002, pp
75�80.
[8] J. Vince, Virtual Reality Systems, Addison-Wesley,
Boston, 1995.
[9] Anon., EON studio3.0 reference guide and user guide,
EON Reality, Inc., USA, 2000.
[10] G. N. Vanderplaats, Numerical optimization tech-
niques for engineering design: With applications,
McGraw-Hill, New York, 1984.
BIOGRAPHY
Quang-Cherng Hsu is an associate profes-
sor at the National Kaohsiung University of
Applied Sciences, Taiwan. He received his
PhD in mechanical engineering at the
National Chen Kung University, Taiwan. In
2003�2004, he was a visiting scholar at the
Center for Advanced Polymer and Compo-
site Engineering at The Ohio State Uni-
versity. His research interests focus in
precision manufacturing (such as sheet
metal forming and forging), molecular dynamics simulation of
nano imprint processes, and virtual experiment system develop-
ments for education and entertainment.
152 HSU