Digital Circuit Learning System Based on Unity3D

As a new technology, virtual reality technology development has been the concern of researchers in different fields, and its application in the field of teaching has been the focus of people. On one hand, the virtual reality technology itself has unique charm and feature, which has attracted a large number of experts and scholars to explore its application in education. On the other hand, the teaching of compulsory courses in universities is faced with the shortage of teaching resources and the low enthusiasm of students. Especially in the experiment teaching process, circuit experiment plays an important role in understanding the theoretical knowledge, at the same time, let the student to independently explore unrestrictedly by time and resources as well as the important direction of future development. From this perspective, this article summarizes the development of virtual reality technology at home and abroad in today’s teaching system, with the help of unity3D and rhino, the simple teaching system is achieved. I take “Digital Circuit Technology” as the main body, and the whole design is also based on it. Through the simulation of the virtual classroom, virtual experiment box, typical chip and other structures, the learning system makes students to choose the experimental time and place freely. At the same time, students can strengthen the ability of innovation and logical thinking, start a vivid, strong interactive, efficient teaching mode. In unity3D, I achieved many interactive functions such as interface jump, output control with the development language C#.

DOI: 10.4236/jss.2018.69023 334 Open Journal of Social Sciences cation system and model have also been greatly affected, and the main position of students in learning has greatly improved. However, in actual teaching, various surveys show the limitations of multimedia in presenting information. If the level of students is uneven, the teacher cannot balance the speed at which each student browses and understands the knowledge points. Therefore, the teaching progress cannot meet the needs of some students' demand. Especially in the subject teaching that relies on multimedia comparison, learners often learn in a passive learning environment, can only follow the teacher's progress, watch the teacher's operation, it is difficult to achieve independent thinking and exploration, not really integrated into the fun and interesting In the classroom.
At the same time, the rapid development of technology has led to the widely use of virtual reality (VR) technology in the field of education. Many experts believe that the integration of virtual reality technology into teaching is a milestone in the development of information technology [1]. It not only overcomes some of the shortcomings of multimedia technology in the teaching process, but also changes the single study atmosphere. Students understand the meaning of abstract knowledge and enjoy a free, open and enjoyable classroom through the interaction with virtual scenes.

Learning Object Selection and Overall Design
Nowadays, the application of virtual reality in teaching has spread to history, biology, chemistry and other disciplines, but the simulation software of circuit teaching has always stayed at the stage of two-dimensional simulation [2]. "Digital Electronic Technology Foundation" is an important course in the electronic-majors. This course is a compulsory course of entry-level technology. It has its own system and characteristics-not only deep theory, but also very strong practical [3]. Digital circuits involve a wide range of topics, in addition to playing a pivotal role in the learning of electrical and electronic information, and the widespread use of this technology can be seen everywhere in daily life.
Due to the importance of the course, almost all electronic-related majors in universities have opened Digital Electronics and its experimental courses. Designing a complete virtual teaching system requires the following four aspects: complete functions, fine internal structure, real experimental principles and correct simulation phenomena [4]. A lot of preliminary work is needed for this purpose, and the development process and sequence are shown in Figure 1.

Model Construction
This design separates the static part that does not need to interact with the part that needs to interact. The static part is the classroom environment, and the interactive part is the experimental circuit box. Because the model part of the classroom has many shape and model materials online, and the demand of accuracy is not too high, it is completed by the modeling function provided by un-ity3D, which can save a lot of storage space and greatly facilitate operation, and do not worry about lost problem when model importing. The experimental part of the circuit box model is unique to this design, no online material, and the structure is complex, the objects are numerous, so the professional industrial modeling software Rhino is used for modeling.
When using the unity3D to build a classroom environment, we need to pay be selected to restore the scene better [5]. When the light source is determined, in order to save resources and facilitate modification, we can use unity 3D's baking function to fix the shadows, making the classroom more realistic [6]. The result of the construction is shown in Figure 2.
The experiment box is the center of the whole experimental operation, and it is also the focus and difficulty of this modeling. This design uses Rhino's powerful surface modeling function to design the MY-226E digital test box. The electric test box contains a wide variety of experimental components. These models have different shapes, different materials and different colors. Different methods are needed to create the rendering. At the same time, the selection of the model material is also essential, such as the LED lights are set to a transparent glass material with diffuse reflectivity, and the switch and the box part are made of impervious metal material, so that the whole can better restore the real object [7].
The box model is shown in Figure 3.
Unlike the experimental box, the experimental chip must ensure accuracy while being aesthetically pleasing. The function chip involved in this experiment is divided into fourteen pins and sixteen pins, including 74LS175 synchronous    Figure 4. It is worth noting that each port pin label name is distinguished in the modeling. In the later circuit connection, the name of each model is used to obtain the pair. The object is identified and named, so the object's name must be able to uniquely identify the object.

Virtual Teaching System Function Realization
The main functions of this design are shown in Figure 5. The key points and difficulties are in the functional simulation of the experimental box. The following describes the implementation of each function one by one.

Learning Module
Unity3d's own First Person Controller component makes it easy to implement the first-person view roaming classroom [8]. Drag the First Person Controller into the Hierarchy panel, then create a capsule object in the scene, and attach a camera to the capsule body, place it on the terrain, and pass W, S, A,    [9]. This is the first scene for users to enter the learning system.
First-person roaming helps to improve the immersive experience and greatly increase students' interest in learning. Courses can be learned in a variety of ways, including videos, PowerPoint or other forms. Considering that most of the universities are now explained in PowerPoint because the PowerPoint have more resources, and it is convenient for uploaders to modify and add learning content, this design takes Power-Point learning as an example. When the user clicks "Start Learning", the selected course name appears. The course is selected by the following Ray() function, where 0 corresponds to the left mouse button, 1 corresponds to the right button, and 2 corresponds to the middle button [10]. Take the study of study1 as an example: If(Input.GetMouseButtonDown(0)) //Monitor mouse button press if(Input.GetMouseButtonDown (0)

Circuit Box Initialization
The initialization of the circuit box includes: 1) defining the AND, OR, and NOT-basic arithmetic symbols to prepare for the subsequent implementation of the chip; 2) chip pin settings, according to the actual situation, each chip can work normally only when correctly connected to the power supply and ground; 3) Define the basic connection rules, such as each LED light can only correspond

Chip Function Implementation
With the definition of basic operators and chip pin settings, the implementation of the combined gate chip becomes very easy. For example, the input and output relationship of the 74LS20 can be expressed directly by an expression:

Secondary Function
According to the author's observation and daily experiment experience, this experiment box is designed with two additional functions: 1) In order to facilitate the experimenter to select the chip, by placing a Screen Controller script on each chip, it can be realized when the experimenter clicks on a certain chip. The corresponding pin map can appear on the screen. This can save users time to find data so improve learning efficiency. 2) In order to cultivate a good habit of the student that power-off operate, all the inputs are read and have corresponding outputs only when the "power on" is clicked. The implementation code is as follows public class ScreenController : MonoBehaviour {public Texture tex; // tex is the pin map corresponding to the chip public Material mat; // mat is the display material void OnMouseDown() // mouse down {mat.mainTexture = tex;}}// Assign the corresponding pin map to the display public void OpenPower() // turn on the power {CancelInvoke("CheckAnswer"); InvokeRepeating("CheckAnswer", 0, 0.002f); } // Check the input every clock cycle due to the timing circuit involved

Test Module
The test module takes five multiple-choice questions as an example, and uses the simplest loop algorithm to achieve the right and wrong judgment Text.text = "Answer right" + i + " Question! Don't be discouraged, pay attention to knowledge consolidation."; else if(i<5) Text.text = "Answer right" + i + "Question! Not bad, pay attention to targeted exercises after class~"; else Text.text = "Answer right" + i + "Question! Very good, pay attention to review in time~";} // different advise for different number of correct

Testing and Evaluation
Run the program and test some of the functions, as shown in Figures 6-8 Enter the main learning interface, click "Start Learning", students can choose the course to be studied on the blackboard, after selecting the course, the perspective Fixed as a slideshow. After the study is over, click the button to enter the experiment section, as shown in Figure 6.
The experimental process takes the chip 74LS04 as an example. After the connection is completed, click "Power On" to display the correct experimental phenomenon, as shown in Figure 7. Complex comprehensive experiments with sequential circuits can also get correct results.
Click the test paper test to enter the test section. After the selection is completed, click Submit. The correct answer appears on the right side of the interface. After the learner checks, you can choose to review the course or to exit, as shown in Figure 8.

Conclusions
The design achieved the following achievements: 1) Developed a visual interface with strong interactivity and operability, which basically fulfilled the requirements of the teaching system. For students, the learning style becomes self-help and free. For developers, the software is easy to   2) Using Rhino software to build a large number of digital circuit experimental virtual instrument models, from the internal structure to the shape in order to achieve the real restoration, the virtual instrument layered and processed by mapping and rendering, improved the virtual laboratory's realism.
3) Studying the specific implementation technology of virtual laboratory development tools, and giving the innovation model of the construction laboratory, that is, building functional modules one by one based on the whole system framework. The operation mode completely follows the author's imagination and completes the true meaning. Electrical experiment 3D virtual simulation.
Accurate logic control of virtual instruments and objects in the scene, including scene angle control, collision detection, interface jump, switch control, connection control, and output phenomenon control, realizes reasonable display of experimental phenomena, and builds more reasonable digital circuit 3D virtual laboratory.
4) The publishing platform is diverse. In the later stage of development can be uniformly released into an application on a computer, or can be published to an Android platform or a network platform for the user or the experimenter to learn. However, my system also has many shortcomings in the development process.
For example, due to time problems, the model cannot be made more realistic, and it can't join a more realistic interaction mode such as teacher-student interaction and student questioning. The experimental operation mode also has Y. X. Liang DOI: 10.4236/jss.2018.69023 343 Open Journal of Social Sciences some areas to be improved. At present, the experimenter can only perform experimental operations with a fixed angle of view, and the 3D model is real, but the model is too large and takes up a lot of space, which is difficult to perform as powerful as a professional circuit simulation software. However, the original intention of the development of 3D virtual interactive technology is to improve the quality and efficiency of experimental teaching in higher education, and to develop the phenomenon of low interest and low enthusiasm for students. This is also the initial goal of this design. I believe that with the continuous improvement in the future, virtual teaching will become a backbone of future higher education.

Conflicts of Interest
The author declares no conflicts of interest regarding the publication of this paper.