Keywords

1 Motivation

The 21st century brought us the Fourth Industrial Revolution (4IR). This industrial development is fueled by rapid changes in the digital technologies and industry, especially in the areas of artificial intelligence and advanced robotics. 4IR causes incredible modification of the global production and supply network by introducing smart technologies, wider communication between machines, internet of things (IoT), autonomous process monitoring, self-diagnostic etc.

The transformation from traditional manufacturing to full automatisation of industrial processes totally shifts the role of human in the whole system; stronger dependence on robotics moves us from the main workforce in a factory to auxiliary function of maintenance and emergency service. Undoubtedly, this situation has got many advantages like: less strains put on workers body, faster and cheaper production, better repeatability of a production process etc. Inevitably, the fast pace of drastic changes during the 4IR brings many challenges and dangers; especially socio-economic risks are raised in [10, 11] by some authors. One of the problems that arises is lack of qualified workforce that can operate at the newly created intelligent workplaces. According to Spoetti and Windelband [14] vocational education and training of the workforce will be highly relevant to successful implementation of the 4IR. This burdens the sector of education with an expectation to follow the needs of the industrial development and employment, what has a strategic importance for a stable and undisturbed economic growth.

The mentioned challenges affecting schools have been already spotted in some countries. In Poland, the Ministry of Education and Science has commissioned a study which defines an actual demand for particular professions and which of them the economy lacks the most. The published documents from 2021 [12] and 2022 [13] confirm the statements from the study by Spoetti and Windelband [14]. Three professions occurred on the list each year: mechatronics engineer, automation technician and robotics technician. In response, the Ministry of Education and Science in cooperation with the GovTech Center of the Poland’s Prime Minister’s office have created an education programme destined for primary schools called “The Laboratory of the Future”. The idea is to financially support entities that develop students’ competences in STEAM (science, technology, engineering, arts and mathematics). New workshops will be created, which should encourage pupils to learn these subjects. A huge focus has been put on robotics, more precisely on a controller programming.

2 Observations

Our laboratory together with a student research group called “KNIK” from the University of Zielona Góra and our partner in the EU’s SpaceRegion project - IHP institute from Frankfurt Oder have organized in 2022 some controller programming workshops for high and vocational schools’ students.

We have used Arduino starter kits composed of an Arduino Uno microcontroller board, a breadboard, jumper wires, a power unit, transistors, sensors, LEDs, motors, resistors, buttons, an LCD display etc. All in all, it is a quite versatile but simple to use set to introduce pupils to electronics and programming. During some classes also custom made microcontroller boards designed by IHP have been used.

In the previously mentioned “Laboratory of the Future” programme, schools are free to select appliances’ models, since only a mandatory equipment type is specified. A microcontroller board is one of them. We have assumed that many will choose Arduino based sets due to relatively low price, good availability, comprehensive documentation and huge community support.

Not a lot of students have attended the organised workshops. From the destined group, only about 10% in the high school and about 20% in the vocational school. The Arduino sets have seemed to be a bit too laborious and complicated to operate, since for many of them it has been a first contact with a microcontroller programming. Also handling of the accessories with universal connectors is a bit different than what students are used to - connecting equipment with dedicated plugs. Additionally, they have been a bit older and more skilled than primary school students to whom the new ministerial programme is devoted.

Another problem that can occur in many schools is lack of specialized teachers. A computer science tutor is skilled in programming but can have inadequate knowledge in electronics. Additionally, the time needed to put together a working unit based on the Arduino is relatively long, and taking into account very complex primary school syllabus, effective utilization of lesson’s time is crucial.

3 Idea

In cooperation with our partner IHP we have looked for a solution which would appeal more to younger people. One of the most widespread toy types are bricks especially LEGO sets. Almost all children are familiar with them and they are generally appreciated.

Another advantage of a LEGO set with a microcontroller is simplicity of construction process. All parts can be easily and tightly connected, and the amount of possible configurations is vast. It has to be underlined that for primary school students, the playing aspect is very important, and good entertainment can help to stay focused and encourage them to learn. From our observations, quite raw Arduino sets, very utilitarian in their nature, are not really rewarding for students. On the contrary, LEGO gives a possibility to make your own construction move by adding motors and sensors in the right spots. It gives more freedom in model creation and saves lesson time due to relatively simple way of connecting parts. Students can be very creative and engaged in building new constructions and simultaneously, without a lot of effort, learn how to design control systems and program them.

For our tests, we have chosen a LEGO set featuring electric motors and a wheeled platform, see Sect. 4. Additionally, some external electronic parts and a control software written in Python have been implemented. We believe that these elements are relatively easy to handle, and the learnt skills would be useful at the job market. We had decided to give the construction and programming tasks to a PhD student inexperienced in such subjects to mimic a teacher’s situation and to verify how challenging and time consuming is gaining a new knowledge. Young students reaction and interest level have been checked during a public science exhibition at IHP institute in Frankfurt.

4 Construction

A robot that has been created by the PhD student has been a wheeled platform with a camera. He has used some out of the box parts to simplify the development process and to make it more reproducible. The construction components are shown in Fig. 1. The entire based structure has been assembled with elements from the LEGO Technic 42114 Volvo 6\(\,\times \,\)6 set (Fig. 1a [4]). Motion system has consisted of four Lego Large Motors 88013 (Fig. 1f [3]) installed on the platform. They have been connected to a Raspberry Pi Build HAT (Fig. 1h [7]) which is an extension (shield) for the main computer - Raspberry Pi B4 (Fig. 1d [6]). An Intel Neural Compute Stick 2 (Fig. 1c [1]) and a Raspberry Pi Camera HD v2 (Fig. 1g [8]) have been linked to the main computer. The power has been supplied by a LiFePO4 battery (Fig. 1e [2]) connected to a step-down Voltage Inverter LM2596 (Fig. 1b [9]).

Fig. 1.
figure 1

Used components.

Only the compatible components have been selected, thus assembling of the entire platform has been relatively straightforward. A first three-wheeled prototype had been constructed within one week. It had been rear-wheel drive, and its drivetrain had included a front-mounted self-aligning wheel. Unfortunately, such a solution had encountered some mobility problems, so it has been decided to transform the entire structure to a four-wheeled vehicle. Still, a simple attachment of the wheels via LEGO cross axle has caused them to fall out of their mounts during sudden turns. Moreover, a rather low torque and fast movement of the motors have made a precise control of the whole structure relatively cumbersome. It has oscillated or on the grippy surface has not moved at all. To solve these problems, we have applied a gear multiplier equipped with a dedicated hub for each wheel. In addition, we have had to upgrade the entire structure to make it more stable and to withstand the forces exerted by relatively heavy battery and electronic parts. A final construction is shown in Fig. 2.

Fig. 2.
figure 2

Final construction.

The Raspberry Pi 4B has been the main computer board for this setup. It has been extended with the Raspberry Pi Build Hat which is a dedicated add-on board (shield) for the Raspberry Pi computer. Generally, this shield is compatible with various LEGO motors and can control up to four different units or sensors of distance, color, pressure etc. Moreover, it allows users to precisely control motors and read data from encoders i.e. an absolute motor position, its current speed or rotation direction. Additionally, a motors control via PWM signal is possible. A minimal possible rotation angle of used LEGO Large Motors 88013 has been 6\(^\circ \).

The Intel Neural Compute Stick 2 (Intel NCS2) is a plug-and-play USB hardware deep neural-network inference accelerator for computer vision and deep learning. The acceleration is working by assisting the main computer’s processing unit (CPU) by taking over mathematical calculations required for running deep learning models. Moreover, the Intel NCS2 is supported with an OpenVINO (Open Visual Inference and Neural Network) library, which includes multiple pre-trained models e.g. face or text detection, formula recognition etc. A wide variety of them allows users to choose the most suitable for desired tasks. The biggest advantage of OpenVINO is its application simplicity. This library can be used as a ready-made module. A person without specialized knowledge is able to apply it without modifications and understanding of its working principles. Inexperienced students can treat it as a black box and quickly create a fully functioning device.

For people and facial recognition task we have used the compatible Raspberry Pi v2 camera with an 8 MPx resolution. This device works with drivers included in Raspbian - Raspberry Pi’s operating system, moreover it has hardware support what totally limits a consumption of CPU’s computing power.

The whole system has been powered by LiFePO4 battery connected to the step-down Voltage Inverter LM2596. A connection diagram is shown in Fig. 3.

Fig. 3.
figure 3

Connection diagram.

5 Algorithm’s Working Principles

The main task of the used algorithm has been recognizing a human posture and robot’s movement control. It has had to follow and hold a desired target (a human) in the middle of the observed area.

We used an OpenVINO pretrained model from the Object Detection Models library called “person-detecion-retail-0013” [5]. The control algorithm has been designed to center the detection frame in the middle of the observed area and then try to follow the target and hold it in that position (Fig. 4). The size of the detected target has had to be kept within defined limits what has forced the robot to zoom in or out by moving forward or backward.

Fig. 4.
figure 4

Visualization of the algorithm.

Software code changes implemented by users can be kept to a minimum. It is only necessary to declare the camera resolution, the desired data detection frame size and the motors’ speed. The whole algorithm works in real time. Users have to bare in mind that a wide accepted model size limit gives better error tolerance but can cause some control problems like lack of a trigger to move. On the other side, a too small limit can cause permanent movement due to defined, finite minimal possible motor’s rotation angle. The software gets caught in an infinite loop while trying to center the detection frame because the minimal movement value is bigger than the accepted margin. A similar situation will occur if the engines’ speed is too high; the control unit is not able to proceed collected data fast enough and to send control commands on time. Also a too high video resolution can cause delays between target recognition and motors movement due to limited CPU’s calculation power.

Generally, the camera constantly sends data to the computation unit. When a target occurs in the detection area and is recognized, the main computer transmits a control signal to motors via the Raspberry Pi Build HAT. The motors are running until the target’s frame is centered in the middle of the detection area. The platform rotation is caused by movement of the wheels placed on different sides in the opposite direction. Afterwards motors shut down and wait until target leaves the center of the detection area. Moreover, the robot tries to keep the correct target size by moving forward and backward by rotating all wheels in the same direction. The robot follows a detected person to keep him within a certain distance. This has been very encouraging for children, who have thought that the robot has been scared by them and has run away to keep a save distance every time they have come closer.

All pretrained models are implemented in .xml and .bin files and can be used like black-boxes in the modular fashion. Their content do not need to be changed by users. E.g. changing our software to recognize particular objects instead of people comes down to replacement of the complete .xml and .bin files to ones containing the correct detection model. This totally simplifies the software development and can be quickly executed even by inexperienced primary school students guided by a teacher who has completed only a short training.

6 Tests

Real life tests have been conducted during the Doors Open Day 2022 at IHP institute. The robot has been placed at the floor next to a stand. Other experiments have been also presented in the same space. The forward-backward operation feature has been disabled to prevent the robot from moving away from the stand and colliding with someone.

The reaction of the targeted age group - children aged 7–15 years has been very enthusiastic. The bright yellow colour of the robot attracted their attention. Smaller children have been mostly interested in playing with the robot - moving from side to side and observing how it has followed them. Older primary school students generally have wanted to know how the whole thing works and what more it could do. We have received questions about used components and software. All in all, the presented robot has drawn much more attention and vigorous reaction than any of the Arduino sets used during the organized by us workshops mentioned before.

7 Conclusions

Our observations show that teaching primary school students using LEGO sets with additional electronic extensions seems to be a much better idea than introducing them to the Arduino. LEGO is well recognised among children, they know how to use it and what can be constructed with it. Younger children associate it with good fun and creativity freedom, older ones additionally with complex mechanics and possibility to control the components movements of LEGO Technic sets. Complementing LEGO with external microcontrollers and simple artificial intelligence creates a perfect educational set for primary school students. They can learn programming through playing and improve their creativity and technical skills by building diverse interactive constructions fulfilling various tasks. These can encourage them to develop competences in STEAM what is the aim of the “Laboratory of the Future” educational programme and will be desired by the economy changed under the influence of the Fourth Industrial Revolution.