A considerable improvement of the traditional FPGA-based digital design methodology by using an Arduino sensor board

Abstract The traditional way to learn and teach Digital Systems has been changing over the last decades by the use of Hardware Description Languages (HDL) and Field Programmable Gate Array (FPGA) evaluation boards. The use of an Arduino development kit with different sensors connected to the FPGA upsizes the students experience in the area of Digital Systems. A temperature and humidity ambience sensor combined with an ultrasound sensor to measure distance can effectively be used by students to implement its first serial data converter that takes the sensor data and shows the obtained values from the Arduino in the seven segment display of the FPGA kit.


Introduction
Last decades HDL and FPGAs have been introduced as a method to teach and learn digital systems. FPGA evaluation boards [1] usually have a wide resource of peripherals that are attached to the FPGA chip. However, first courses on Digital Systems cannot take advantage of those sometimes complex peripherals like Ethernet, video and audio codecs. Only a few switches, key buttons, LEDs diodes and the classical seven segment displays are the main physical interfaces the students can interact with. The use of an Arduino board A considerable improvement of the traditional FPGA-based digital design methodology by using an Arduino sensor board Editorial Universitat Politècnica de València [2] with different sensors connected to the FPGA upsizes the students experience in the area of Digital Systems. A temperature and humidity ambience sensor combined with an ultrasound sensor to measure distance can effectively be used by students to implement its first serial data converter that takes the sensor data and shows the obtained values from the Arduino board in the seven segment display of the FPGA kit. Specifically, the temperature and ambient humidity data will be received from a DHT11 sensor. The data reception speed is intentionally very slow so that the student can get to see the bit-by-bit reception of the data frame in a LED diode and thus understand the basic concepts of serial communications. The student must focus his effort on the sequential design part, mainly synchronous sequential machines (FSM) and registers since the visualization of values in BCD (Binary Code Decimal) over the 7 segments of the DE2 card and the assignment and programming of pins are already done. The paper is distributed as follows: -Next section describes the teacher's motivation for the introduction of the Arduino Board in a classical basic digital system course. -The third section will introduce the FPGA and Arduino boards to describe a basic serial communication protocol. -To end, some conclusions are described and analyzed in the fourth and last section.

Motivation: a new syllabus for born-digital students.
Some years after the adaptation to the rules of European Higher Education Area (EHEA) [3] also known as Bologna Process of all the graduate courses at the UPV, next major challenge arrived when student motivation for the IT technologies started to go down. This reduction in the motivation surprisingly happened when the born-digital students started to enter in high-education studies. What were the external changes that diminished the student's motivation?
Even though the studies had become more practical and had reduced the number of hours devoted to theory in every single subject, reducing from 5 to 4 the number of years to become a Graduate in Telecommunication Engineering, the perception of a lack of enthusiasm in digital electronics was a fact that drove teachers in the search of answers to this new and unexpected challenge.
Thinking about how the relationship between the students and internet had changed over the last decade, with the increase of information in all the areas of knowledge included the IT technology, one could think that a student will not pay more attention to the theory or older datasheets. In these times when drones are flying outside and the DIY (Do It Yourself) concept arrived at YouTube platforms, anyone can think he can design and build electronic devices without the necessity of a graduate course. These new issues drag the interest of students in traditional teaching methodology.
The solution to the problem is as easy as to adapt the syllabus of Fundamentals of Digital Design (FSD) to the new way to acquire information that our students had developed by themselves.
FSD is a core subject in the second year of the Telecommunication grade at UPV with more than 190 students every year. The subject has groups in the Grade, in the double grade of Telecommunication and Business Administration and also in the ARA group of the grade, where EMI (English as a Medium of Instruction) is conducted [4].
The way to engage the students from the very first day was announcing that they are ready to design its first integrated circuit (IC) in the first lab session. For a 4,5 credits course the main changes adopted were: -Introduction of Verilog HDL [5] instead of the previous VHDL [6]. Verilog allows the programmer to design with the flexibility of a high-level language like C or C++. Only with several code lines, anybody can create complex digital circuits. Whereas VHDL was more structured and needed more sentences to describe the circuits. -Substitution of ancient datasheets for Verilog descriptions of basic digital structures as coders, decoders, comparators, multiplexers, counters, registers and finite-state machines. -Evolution from the classic breadboard circuitry to the FPGA board from the real beginning, allowing the creation of an IC in the first practice session. -Introduction of the Arduino board with sensors attached to it so the real-world can be connected with the designs that students are creating.
Next pictures (Figure 1 and Figure 2) show how the breadboard has been substituted by a FPGA design in the first laboratory session. In the second picture, it can be observed the Intel/ALTERA FPGA (Cyclone II) chip and the GPIO (General Purpose Input/Output) connectors at the right-side [7], to expand the capabilities of the board.

Introducing FSM design by using an Arduino microcontroller and an FPGA board.
The course is divided into two main parts: combinational and sequential designs. The first uses circuits without memory and the second adds the concept of memory. In this second part, once the finite state machines (FSM) theoretical concepts have been introduced in the classroom, students start their final project based on an FSM design over an FPGA that connects with the Arduino to show the T and H data transmitted by using a serial protocol between both boards. Rubén Torres-Curado, Angel Tebar Ruiz

Arduino sensor board.
Arduino is an open-source electronics platform based on an easy-to-use and free-of-charge software and hardware (ranging from five to some tens of euros for the most expensive board). The smoothing way to introduce the tough process to understand a microcontroller architecture and its software was the success of the Arduino platform. There is a huge amount of information gathered by a worldwide community of makers that pave the way for a DIY and open a new way to study basic digital systems. The easy software code that controls the sensors is not part of the subject but it is recommended to read and understand it, promoting the DIY methodology.

Sensors and 3D printed structure.
Several sensors have been connected to the Arduino board: the DHT11 that integrates a room temperature and humidity sensor and the ultrasound sensor. Teachers have developed a 3D printed model to secure and protect the sensors. Figure 4 shows the final result where a blue plastic cage is used to fix the sensors on the Arduino MEGA board [2].

Structure of the sensor data acquisition system.
The following figures (Figure 3 and Figure 4)) show the connection between the ARDUINO microcontroller board and the DE2 FPGA board. The Arduino total cost was less than €30.

Serial communication protocol.
Figure 5 specifies the serial protocol between Arduino and the FPGA. Some red and green LED diodes must be connected to easily visualize the data, the clock signal and the error signal of the received data frames.  The students have to program an FSM in Verilog HDL to complete the design ( Figure 6). Only the block described as 'design to create' in Figure 5 has to be accomplished. The rest of the design, with combinational structures already studied in previous works, is designed in advance by teachers and can be downloaded from PoliformaT as an archived design project.

Evaluation
The distribution of the marks in the subject are: test exam 3 marks, practical projects 2.5 marks, laboratory test 0.5 marks and written exam 4 marks The students not only design the FSM but also they have to test it by using the waveform editor. Once the waves have been verified the design can be programmed into the FPGA. One video must be recorded an uploaded to PoliformaT platform with the result of the design.
The students try to change values of temperature and humidity by covering the sensors with their hands (Figure 7). After covering the sensor its sensed values were modified. Also, the red led in the right frame of the picture shows an error in the data received that was detected by the students' design. Eventually, students edit the recorded video adding music, text on the screen and different effect as a voluntary exercise (Figure 8). The teachers never ask for these extra work, it is just motivation and this happens in the last week of the course when students are stressed out with exams but enjoying their firsts digital designs. Arduino sensor board Editorial Universitat Politècnica de València

Conclusions
The table shows the evolution of marks obtained in the subject in the last 5 courses. The worrying data was the number of students that failed in 2015/16 and 2016/17 courses, reaching more than 30%. Although it was not a really bad percentage, the telecommunication school was increasing the number of students that abandon the grade in the two first years, reaching a worrying number of 80 every year. The fail in motivation was a major issue to change. Next course, in 2017/18, the related changes in the subject took place and a sudden rise up in students who pass the subject was obtained. Dotted lines in Figure 9 show trends in % of students who pass and fail the subject. The evolution from that 30% of fails changed to a final big number of only 8,8%, depicting a reduction in more than 20%.
All in all, the director board of the school decided to change the study plan, adding a new subject based on digital electronics as a common brach study subject in the fourth course.