Keywords

1 Introduction

The development of computer techniques in the field of designing, simulating and testing the properties of electronic circuits contributes to the simplification and optimization of the processes of starting new systems. Figure 1 shows typical procedures implemented during the design and evaluation of the properties of the electronic system using computer techniques. Designing a device with new original functional features begins long before appearing on the market. Its properties are expressed in the assumptions for the new construction. Recognition of problems usually leads to many different concepts of how to organize the device configuration. Choosing the optimal concept is a difficult task. Lack of simulation (Fig. 1 - part of the algorithm marked in red) caused the necessity to construct a prototype device for each concept. It was expensive and long work. The introduction of simulation to the design algorithm makes it possible to achieve a positive project result faster, while saving time and money in a much more effective way.

Fig. 1.
figure 1

An algorithm for designing and implementing an electronic system [11].

In the classic approach, only actual conventional instruments were used in the testing procedures of the device being built, there was no simulation stage, it appeared along with the development of computer techniques. These techniques are successfully introduced at the stage of: - testing the physical model, - testing the system being built, - to emulate the devices used in the study of the designed system.

Nowadays, simulation studies are becoming more important in many areas of engineering activity at the design stage. Computer techniques, like simulations, measurements and control, become an important element of didactics. Also many student projects focus on the construction of a device with predefined properties and functions. Simulations are also applicable here. Many bad solutions and concepts can be excluded and omitted in this way. The use of simulation laboratories is gaining popularity in the domains of engineering programs. However, the experience in teaching supported by numerous studies [1,2,3,4,5,6,7,8] shows that the simulation itself is not very effective in didactic processes. The simulation becomes effective when it is accompanied by the student’s activity in the study of actual systems. Currently, there are many programs that enable simulation of electronics, electrical engineering, digital technology and digital processing systems, e.g. SPICE, Multisim, LabVIEW, Vissim, Mathcad, Matlab [9, 10]. The SPICE and Multisim environments, with the SPICE program being the core program and the next version of Multisim, are one of the more frequently used simulation software in research, design and teaching [10].

The cross platform combined with integrated software and hardware, allows to compare real and simulated measurements in a single interface. The platform connects the theoretical model of the tested device to real components in simulation and integrates physical analysis at once in experimentation.

In the paper the cross platform for simulation and measurement of mixed-signal devices based on National Instruments (NI) myDAQ instrumentation and the Multisim Circuit Design software is presented. To illustrate its capabilities, the generator of the sawtooth wave with a mixed analogue-digital structure was tested. The integration of these environments into one workspace enables simulation and emulation of the operation of models of various systems, as well as testing of relevant real systems. This creates the conditions for the implementation of the didactic program, in which the student combine traditional hands-on activity with the capabilities of modern computer tools.

This paper is organized as follows. In Sect. 2, the NI myDAQ design template in Multisim is described. Section 3 presents the results of simulation using NI myDAQ instruments in the Multisim environment. The comparison of simulation and results of real data generating are shown in Sect. 4. Concluding remarks are drawn in last Sect. 5.

2 The NI myDAQ Design Template

The Multisim Circuit Design software is an attractive tool supporting the design of circuits. It allows to enter a schematic diagram of a simulated system that can be connected to various measuring instruments, e.g. oscilloscope, logic analyzer, voltmeter, ammeter, digital multimeter, etc. An important feature of the Multisim environment is the possibility of extending the package with the VHDL and Verilog hardware description interpreter module, as well as Utilboard and Utilroute programs for creating printed circuit boards based on the scheme introduced in the Multisim program. It is also the ability to modify the vast majority of component models by the user in accordance with specific own needs. The user, using the elements available in the library, can create his own element in the form of a sub-circuit or a model introduced using the SPICE system syntax. Multisim has the user database in which files containing a data of components created by a given user are stored; it can be used to store new components.

Multisim, depending on the type of tested circuits, offers different types of simulators, which are based on different programming languages of the equipment, e.g. SPICE, VHDL, Verilog [9]. Coordination of communication between models in SPICE, VHDL and Verilog takes place automatically, full cooperation is ensured. Multisim is based on industry standard SPICE 3F5. It supports models created using standard SPICE syntax. A model can be created using the Model Makers, by assigning values to the parameters of a primitive model, or by creating a sub-circuit model. A primitive model is a model that is defined by a collection of parameters. Many electronics devices are not represented by primitives but are still well suited as SPICE models. Sub-circuit models are used to capture the characteristics of these models. In Multisim, it is possible to import/export a SPICE netlist. The ability to open .cir netlists allows for the generation of simple schematics upon import (see Fig. 2).

Fig. 2.
figure 2

The toolbar of a Multisim front panel.

2.1 Schematic Capture of a Mixed-Signal Device

The diagram of a system with a mixed analogue-digital structure is shown in Fig. 3. The designed system (simulated/real device in Fig. 3) generating the sawtooth wave is built using the following components. In order to generate the assumed waveform, two reversing, synchronous binary counters based on integrated circuit 74193 N, are connected in series, so that they work according to graph, as shown in (1).

Fig. 3.
figure 3

The diagram of a generator of a sawtooth wave.

$$ 2 5 5_{ 10} \to 2 5 4_{ 10} \to \ldots \to 2_{ 10} \to 1_{ 10} \to 0_{ 10} \to 2 5 5_{ 10} \ldots $$
(1)

The fclk clock signal (out_1) controls the state of the counters. The counters work according to the required graph, i.e. they count down, operating in the subtraction mode. Counter outputs (8 lines) are connected to the inputs of an 8-bit digital-to-analog converter DAC 0808. In the device under consideration, the frequency of the sawtooth waveform (Fig. 3) is equal to fclk/512.

The classic approach to testing the prototype of the designed device needs the use of an independent digital signal generator (generating fclk signal in Fig. 3) and oscilloscope (connected to out_1 and out_2 test points) as well as appropriate test procedures performed by test staff. Of course, a complete prototype of the device must be made before. Only then construction errors can be detected, committed during the design and construction of the device’s prototype. Any changes to the prototype made, including changes in the settings or processing characteristics of the individual functional blocks, require tedious operations usually associated with the exchange (soldering) of the relevant components of the system.

Simulations of the designed device in Multisim, before making a prototype, eliminate the majority of design errors and perform functional tests of the device. The design template found in Multisim main toolbar has the myDAQ connecting slots (see Fig. 3). The template allows to draw wires connecting a captured schematic with the lines on the virtual myDAQ device. The ideal elements available in the Multisim libraries do not always correctly represent the real systems [7, 8]. The models of actual elements available in the Multisim environment were used to build the sawtooth generator. Actual elements include the occurrence of transient states that are not significant or are suppressed in real systems but may appear in simulations using ideal elements. The methods of simulation of basic static and dynamic parameters are also important. Therefore, the image from the oscilloscope (see Fig. 4) shows so-called pins. They can be eliminated by using an appropriate filter on the D/A converter output. The application of Schmidt’s gate (see Fig. 3) was forced to obtain the right steepness of rectangular waves from the signal generated by NI myDAQ.

Fig. 4.
figure 4

The Multisim plots of an output sawtooth wave (black line) and a clock signal (red line).

In the same way it would be connected a real breadboard circuit of prototype device to the actual myDAQ device. It can fully simulate the hardware instrumentation (a signal generator, an oscilloscope) within the virtual environment. To generate the clock signal the test system uses the National Instruments myDAQ virtual instrument: a function generator (see Fig. 5). The output signal (out_2) can be presented on a virtual oscilloscope XSC2 (see Fig. 4). At the same time, the signal out_2 is given to the inputs of the myDAQ virtual oscilloscope.

Fig. 5.
figure 5

The myDAQ virtual generator of the rectangular signal.

2.2 Instrumentation Simulated Using NI myDAQ

The Multisim software integrates myDAQ instruments within the design template. There are eight different measurement and signal generation tools: a digital multimeter (DMM), an oscilloscope (SCOPE), a function generator (FGEN), a Bode analyzer (Bode), a dynamic signal analyzer (DSA), an arbitrary waveform generator (ARB), a digital reader (DIGIN) and writer (DIGOUT). A specific instrument can be enabled or disabled in simulation.

3 The Schematic Capture Simulation

The simulation is performed using NI myDAQ instruments in the Multisim environment. The function generator FGEN and the oscilloscope SCOPE should be enabled during a simulation. The simulated data appear in the front panel of a virtual SCOPE (see Fig. 6).

Fig. 6.
figure 6

The front panel of the SCOPE with the sawtooth waveform of the schematic capture simulation

After successfully simulating the schematic capture, it could acquire the real data from myDAQ and compare the results.

4 Testing a Prototype Device

After construction the prototype of the device with the structure corresponding the schematic capture in Multisim, it should be connected to the myDAQ right slots. In the Multisim environment, under Instrument Control in the front panels the device corresponding to “NI myDAQ” instead “Simulate NI myDAQ” has to be chosen (see Fig. 7).

Fig. 7.
figure 7

Selecting myDAQ to generate real data.

The NI myDAQ is a data acquisition device that provided analog input (AI), analog output (AO), digital input and output (DIO), audio, power supplies, and digital multimeter (DMM) functions in a compact USB device. The input channels can be configured either as general-purpose high-impedance differential voltage input or as audio input. The analog inputs are multiplexed, meaning a single analog-to-digital converter (ADC) is used to sample both channels. They can measure up to ±10 V signals, at the rate of up to 200 kS/s per channel, so they are useful for waveform acquisition. Analog inputs are used in the DMM, the SCOPE, the DSA and the Bode instruments. There are two analog output channels on NI myDAQ. These channels can be configured as either general-purpose voltage output or audio output. Both channels have a dedicated digital-to-analog converter (DAC), so they can update the output signals simultaneously. In general-purpose mode analog outputs can be updated at the rate of up to 200 kS/s per channel, making them useful for waveform generation up to ±10 V. They are used in the FGEN, the ARG and the Bode instruments.

During testing prototype of the device and a real data generation, the FGEN instrument is generating an analogue clock signal fclk and a sawtooth signal from a digital-to-analog converter DAC 0808 (out_2) is given on the analog inputs of the myDAQ. The SCOPE instrument is running.

Figure 8 illustrates the simulated data in Multisim against the real data obtained during testing of the device’s prototype. The visible shift between the two waveforms results from the difference in the frequency of the fclk signals.

Fig. 8.
figure 8

The sawtooth waveforms obtained from simulation (green line) and real data (black line) generated during testing of the prototype.

The results of operation of real system could be also compared with the waveform plot from a stand-alone oscilloscope (see Fig. 9). The waveform obtained in the myDAQ SCOPE overlaps the waveform observed on the oscilloscope.

Fig. 9.
figure 9

The sawtooth waveforms obtained from a stand-alone oscilloscope.

5 Conclusion

The nowadays technology provides tools that enable effective testing and correcting the structure of designed devices. The classic approach to the design and testing of new devices is replaced by computer-assisted operations, greatly facilitating the processes of designing and implementing new solutions. In this way, a large part of the process of testing the properties of the actual systems is transferred from the hardware testing area to the virtual test, i.e. software area.

The Multisim programming environment in cooperation with virtual instruments operating in LabVIEW is a cross platform that creates new possibilities in effective designing and testing of both analog and digital devices as well as mixed-signal devices.

Didactic values of the cross platform should also be appreciated. In addition to familiarizing with new technologies, including simulation and device emulation techniques, students can conduct research on the properties of real elements and devices, with a small additional workload.