In many cases students, who are coming in the CTU in Prague, Faculty of Electrical Engineering, have only a vague idea of electronics despite they use electronic devices every day. It concerns especially school-leavers of secondary schools (high schools in the USA). Of course, they gain all the necessary knowledge in the first 2 years of their bachelor study, but mostly on the theoretical level only. Thanks to this fact, later they are afraid of bachelor projects, which are pointed at developing and realization of an electronic device, and therefore they prefer modeling or software projects. However, it is not in line with the needs of industrial partners, whose will employ them in the future. The situation could be slightly better now thanks to the opening of a laboratory course concerning applied electronics. Nevertheless, a worry about development and realization of even simple electronic devices persists.
From the reason mentioned above the short but intensive preparatory course “Practical Electronics” focused on measurement and instrumentation was designed and realized at the Department of Measurement. It is intended for starting students and it is organized before the 1st semester. Only the basic secondary education in physics is supposed. Its aim is not to teach students fundamentals of electronics, but to get them interested in it and overcome their fear of connection of electronic components in circuits. The main goal is to motivate them and to inspire them for their following self-study and work. The course was inspired by number publications from this area, e.g. , , , .
Some basic electronic components are shown at the beginning of the course. Subsequently, a small, but powerful microcontroller and its application for voltage measurement and square wave signal generation are introduced. Finally, it is shown that even with minimal basic knowledge and several electronic components some simple electronic devices can be easily created. The similar approach can be found e.g. in , , .
The course is divided between a theoretical part and laboratory work. Each day starts with two hours lecture. The content of following laboratory work (tasks, the necessary theory and a way of solving) is presented. The following activities run in laboratories under the guidance of one teacher and one student’s instructor for 10 students in each laboratory room. A set of necessary components, solderless breadboard, connecting wires, and a low-cost multimeter are prepared for each student. The following components are used:
• Passive components - 7 resistors, 1 trimmer, 4 capacitors.
• Active components - 3 LED diodes (2 red, 1 green), 2 phototransistors (PT204), 1 transistor (BC546), Zener diode (BZX55C2V4), operational amplifier (LM324), 3.3 V stabiliser (HT7533)
• Microcontroller STM32F042
• USB interface, which serves both for supplying and for software loading in the microcontroller.
The laboratory tasks are designed from the simplest tasks to the more complicated ones. While the 1st day is devoted to the connection of the simplest electric circuits (voltage divider, LED connection) and measuring on them using a low-cost multimeter, the 2nd day starts connecting of the virtual measuring instrument (VI) F0-Lab (see below) based on microcontroller. This is used in all following tasks for voltage measurement and recording, for displaying of examined signals and pulse signal generation. The content of lectures and following laboratory tasks are presented in table 1.
The content of lectures and following laboratory tasks.
|Day||Topic of lecture||Laboratory task|
|1||Revision of necessary physical fundamentals.Using a digital multimeter.Realization of basic circuits using a solderless breadboard (circuit with a LED, its V-A characteristics).Circuit fundamentals necessary for following work (Kirchhoff law, Thevenin theorem).Resistance voltage divider (RVD), loaded RVD.||Supply connection using a USB adapter, checking the supply voltage.The connection of RVD using fixed resistors and resistance trimmer, measuring the output voltage, comparison with the calculated result (both without and with load).The connection of LED, changing of current using resistance trimmer, measuring of V-A characteristics of the LED.|
|2||Sampling and digitisation of analogue signal.Digitizing oscilloscope (principle).A simple virtual instrument for measuring and recording of voltage and for pulse signal generation using microcontroller STM32F042.Microcontroller supplying – voltage stabiliser. PWM – principle. RC circuit – transients.||Connection and putting into operation of F0-labVerifying voltmeter and scope functions using an internal pulse generator.The connection of LED to the output of the pulse generator, lighting observation using the frequency range of 1 - 100 Hz and PWM control.Experiments using the RC circuit.|
|3||Phototransistor – principle, characteristics, and connection.Transistor – principle, characteristics, and connection as a current amplifier.Optical gate – principle and application, the setting of a necessary threshold.||Measuring the phototransistor current by different lighting.Measuring the gain factor β of a transistor.Amplification of phototransistor current using the transistor, an optical gate.Speed determination using 2 optical gates.|
|4||Thermal dependence of PN junction, a transistor as a temperature sensor.Operational amplifier (OA) – principle, basic DC characteristics, applications.Voltage stabilisers using a Zener diode.PWM signal and its filtration using an RC filter.Adjustable DC voltage and DC current source.||Measuring the thermal dependence of a silicon diode, Realisation of a temperature detector.The realization of a voltage stabilizer with a Zener diode (a simple connection and using OA).Displaying of PWM signal in the input and output of RC filter.The realization of an adjustable DC voltage source and DC current source using PWM and OA.|
|5||Loudspeaker – principle, using a transistor amplifier for supplying the loudspeaker.Problems by pulse supplying in circuits with coils (inductance) and its solving.||Sound generation using the pulse signal generated by the microcontroller.Measuring of parameters of the used transistor amplifier.|
F0-LAB – THE SIMPLE VIRTUAL MEASURING INSTRUMENT WITH EMBEDDED MICROCONTROLLER
The realization of the virtual measuring instrument F0-Lab using the solderless breadboard is the main task for the 2nd day of the course. F0-Lab can be used as a simple DC voltmeter, a digitizing oscilloscope (3-channels in both cases) and a pulse generator. It is based on microcontroller STM32F042F6P6 . Its basic structure is shown in figure 1. It includes a 32-bit processor with ARM Cortex – M0 core, FLASH programme memory, RAM, I/O gates, timers/counters, and 12-bit ADC. The ADC range is determined by a supply voltage of the analog part (VDDA). The resolution is about 0.8 mV for VDDA = 3.3 V, it corresponds to low-cost digital multimeters. The technology CMOS is used for STM32F042 (like as the most of microcontrollers). It follows that there are some restrictions concerning especially supplying and the maximum input voltage of ADC, which must be lower than the supply voltage VDDA. The basic connection of F0-Lab and its realization is presented in figure 2.
The microcontroller is supplied by 3.3 V using a USB interface and a voltage stabilizer (5 V -> 3.3 V). The button “reset” connected between the pin RNST and the switch “BOOT/RUN” makes it possible to load programme into FLASH programme memory. The LED connected to the pin marked PA4 serves for checking of a correct function of the microcontroller. If the switch “BOOT/RUN” is set to “RUN” (the pin BOOT0 connected to GND) and the connection is OK, the LED winks due to a programme placed in the FLASH memory. The firmware for F0-Lab, which is placed in PCs in the laboratory, can be loaded now.
The VI F0-lab enables 2 function modes: “PWM output + Voltmeter” and “PWM output + Oscilloscope”. The PWM output (pin PB1) can generate a square wave signal with amplitude 3.3 V in the frequency range to 100 kHz and duty cycle 0 – 100 % (resolution 1 %). The voltage range of 3-channel voltmeter (pins PA5, PA6, PA7) is 3.3 V unipolar. The virtual 3-channel digitizing scope (the same pins) can be used as the stand-alone scope, but also with the 3.3 V unipolar input voltage range only. Its sampling rate is 500 kSa/s and memory dept is 768 pts for the 1-channel mode. These parameters must be divided for more channel by 2 or 3 (only one ADC is used, and input channels are multiplexed). The software of the VI F0-lab was developed in pursuance of diploma work .
SOME SELECTED LABORATORY TASKS IN DETAIL
The overview of all laboratory tasks solved in the course was presented in table 1 (see above). The examples mentioned below were selected from the whole range of the tasks solved in the course to show, how to design and realize a simple, but functional measuring circuits using low-cost components.
Resistive voltage divider (RVD)
▪ Connect RVD using fixed resistors, measure the output voltage using a digital multimeter and compare the measured value with the calculated result.
▪ Use a resistance trimmer 5 kΩ as RVD, measure the dependence of the output voltage on the slider position (both without and with the load 10 kΩ).
▪ Calculate an output voltage for the loaded RVD for the middle position of the slider and compare with the measured result.
V-A characteristics of diodes
▪ Connect LED in series with the resistor 470 Ω to the RVD output and measure the V-A characteristics in the current range 0 - 5 mA (the current is determined from the voltage measured by a multimeter at the resistor 470 Ω).
▪ Determine a differential resistance of LED in surroundings of the current 2.5 mA.
▪ Realize the same measurement using a common silicon diode.
The following tasks apply the virtual instrument F0-lab both for measuring and recording of voltage, a multimeter is used only in the case of some problem.
Experiments using PWM and RC circuit
▪ Connect LED in series with the resistor 470 Ω to the PWM output, observe a shine of LED for the duty cycle 50 % and frequencies from 1 to 100 Hz. For what frequency is a flicker not visible?
▪ Observe a shine of LED for the frequency 50 Hz and duty cycles from 0 to 100 %.
▪ Connect an RC filter (100 nF, 27 kΩ) to the PWM output, observe the signals both at the input and the output of the RC filter by frequency 30 Hz using the virtual oscilloscope.
▪ Determine the time constant τ from the transient using cursors (finding time for 63 % of amplitude - see figure 3) and using the equation τ = RC.
Optical gate and its application
▪ Connect a light-sensitive circuit using a phototransistor
▪ Realize an optical gate using LED and the circuit mentioned above (see figure 4a), set the suitable sensitivity using the resistance trimmer 5 kΩ
▪ Record the voltage change by the passage of an obstacle using the virtual oscilloscope.
▪ Realize the second optical gate to be possible to measure the speed of a moving subject (see figure 4b). Measure using the virtual oscilloscope the time between corresponding edges, measure the distance d between gates and calculate the speed of moving.
The one-week intensive preparatory course “Practical electronics” was organized already for the third time. About 40 students (in two runs, each for 20 persons) took part in it. The course is very popular with coming students because the aim is not only to teach them the basic knowledge of electronics but also to familiarise them with a manner of study at the university and to prepare them for it. The course included theoretical lectures as well as laboratory experiments where each participant assembled a simple microprocessor-based laboratory measuring instrument F0-Lab. By means of it, each participant learns practically apply his/her theoretical knowledge during the work with electronic circuits and sensors.
A part of the course is also dedicated to a brief introduction concerning the programming of the STM32F042 microcontrollers contained in the F0-Lab using the C / C++ language. C++ is available for this purpose in on-line IDE mbed . Using C++ makes it possible to apply the programme also for other microcontrollers with ARM Cortex M core used in different modules supported by mbed. Students, who successfully finish the course, obtain (free of charge) the microcontroller with other used components and the firmware of the virtual instrument.
The approach used in the described course corresponds to the up-to-date trend switching from teaching knowledge to teaching competencies. The attention to competences rather than knowledge is certainly due to the transformation speed of the current production system, in the context of Industry 4.0. Competencies are defined here as a combination of knowledge, skills, and attitudes appropriate to the context , .
The preparatory courses “Practical Electronics” were supported by the company STMicroelectronics.