-
Notifications
You must be signed in to change notification settings - Fork 1
Project Report
Raspberry Pi refers to a series of small single board computers developed by Raspberry Pi Foundation in the UK, aiming at promoting the education of basic computer science in schools and developing countries. This assignment requires to measure physical input values by using Raspberry Pi and display them on the screen, allowing the values to be altered by interactive operation.
Gesture Recognition is a topic of computer science and language technology, which aims to interpret human gestures through digital algorithms. The technology is considered to be a very successful technology, which provides a new type of device interaction, characterized by higher accuracy, high stability and time-saving. Gesture recognition has a prosperous application in automobiles, consumer electronics and gaming industry, that’s why Gesture Interface Glove is selected as the topic of research.
Attach the glove to the flex sensor, and drive the sensor to deform through the bending of the finger, displaying the physical input value on the screen. After calibration, simple gesture games can be realized by proofreading operation within the system. The following sections will provide a detailed description, including project structure,design (hardware and program) and product performance.
- Xiangpeng Liang: Software Design; GitHub; Sensor selection; Testing (90%); Documenting (40%); Hardware design (30%); Welding (30%)
- Zhong Lu: Hardware design (50%); Welding (30%); Documenting (30%) ; Testing (10%)
- Chenhan Ye: Video; Converter selection; Hardware design (20%); Welding (40%); Documenting (30%);
Figure 1: The flow chart of the project
The structure of this project can be described as follows: First, the different gesture will bend or flat the sensor. Thus, the resistance of the sensor will be changed. Hence, the output voltage from the AD converter will be different. The program in the Raspberry Pi can measure these voltages to determine the gesture in order to display corresponding picture on the screen.
Figure 2: Flex sensor
In this project, the sensors used are five Flexible Sensor. It can change its resistance due to the physical bend and flex. In addition, the range of the flat resistance of this sensor is 10K ohms ±30% and the bend resistance can be 2 times greater than the flat resistance at 180° pinch bend at least. The principle of how this sensor works is shown as follows:
Figure 3: The principle of the sensor
The advantages of this sensor include simple construction and low profile.
The AD converter used in this project is MCP3008. MCP3008 device is a successive approximation 10-bit Analog-to-Digital (A/D) converter with on-board sample and hold circuitry. The MCP3008 is programmable to provide eight single ended inputs. In this project, 5 input channels are used. Differential Nonlinearity (DNL) and Integral Nonlinearity (INL) are specified at ±1 LSB. Communication with the devices is accomplished using a simple serial interface compatible with the SPI protocol. The devices are capable of conversion rates of up to 200 ksps. The MCP3008 devices operate over a broad voltage range (2.7V - 5.5V). Low current design permits operation with typical standby currents of only 5 nA and typical active currents of 320 µA. The MCP3008 is offered in 16- pin PDIP and SOIC packages. The pins of MCP3008 is shown as Figure 4:
Figure 4: The pins structure of MCP3008
The basic idea of this project is to change the input voltage by change the resistance of the sensors, so that the gesture can be detected. Thus, the sensors should be parallelly connected with five instant resistors to divide the voltage. Due to the resistance of the sensor is from 10K to 20K Ohms, the resistors were chosen as 10K Ohms. While the resistance of the sensors changes, the voltage it can gain changes. In other words, the input voltage changes. Due to the different voltages, the program can determine the bend level of the figures. Hence, the gesture can be detected.
4.4 PCB manufacture
A software called eagle was used to design PCB in this project. EAGLE is a scriptable electronic design automation application with schematic capture, printed circuit board layout, auto-router and computer-aided manufacturing features. EAGLE stands for Easily Applicable Graphical Layout Editor (German: Einfach Anzuwendender Grafischer Layout-Editor) and is developed by CadSoft Computer GmbH. Cadsoft Computer GmbH was acquired by Autodesk Inc. in 2016 (Wiki pedia, 2017).
There are two design steps in EAGLE. First is to prepare the schematic diagram. The second one is to complete the printed board. The schematic diagram of our PCB is shown as follows:
Figure 5: Schematic diagram
In detail, for the output port, the ADC and Raspberry Pi would be connected as follows:
MCP3008 VDD to Raspberry Pi 3.3V
MCP3008 VREF to Raspberry Pi 3.3V
MCP3008 AGND to Raspberry Pi GND
MCP3008 DGND to Raspberry Pi GND
MCP3008 CLK to Raspberry Pi SCLK
MCP3008 DOUT to Raspberry Pi MISO
MCP3008 DIN to Raspberry Pi MOSI
MCP3008 CS/SHDN to Raspberry Pi CE0
Moreover, a LED connected with a resistor was added to display the working process.
For the input port, five resistors are parallelly connected to five sensors respectively and the two ports are connected to 3.3V of Raspberry Pi and the five input channels of MCP3008. Moreover, the five sensors were represented by five resistors. In addition, every component was added from the component library in order to get the package.
The next step is to switch to the printed board. In the printed board, all devices would be generated from the schematic diagram automatically. The assignment is to arrange them. However, due to the mistake made by the autorouter, the route was done by hand. The basic rule is that there should be no cross of every two lines. Furthermore, a two side PCB was designed to avoid the cross in this project. The figure of printed board is shown as follows:
Figure 6: The printed board of the PCB
After completing the printed board, the PCB mask can be printed. Thus, the PCB was obtained. The completed PCB is shown as Figure :
Figure 7: The top of the PCB
Figure 8: The bottom of the PCB
4.5 The manufacture of the glove
The five sensors are attached on a glove to detect the gestures. The sensors should be put on the joint in order to obtain the maximum bend degree. Furthermore, the top head of the sensor is screwed up and the opposite is kept loose to avoid the false bend.
Figure 9: Hardware
The appendix is the complete program of this project. According to the defined functions, the system is divided into 3 parts: ‘window’ for the user interface of calibration, voltage display and some buttons, ‘adcreader’ for reading and sending data between the system and MCP3008, ‘guessing’ for the user interface of Scissor-rock-paper game. There are several variables transmitting data between these three modules. Additionally, the ‘main.cpp’ and ‘main()’ function is used to initially run and open the ‘window()’. The program structure is based on the ‘qwt-example’ of Bernd Porr, University of Glasgow (https://github.com/berndporr/qwt-example).
Figure 10: Sampling rate measurement
As can be seen on the screen, the communication signal is last for about 2.268ms, the interval between each set of signals is exactly 20ms. According to the codes, the interval is caused by the delay commend. Therefore, the communication signal containing five fingers’ data is last for 2.268ms, which is 441Hz. This result means when the commend of 20ms delay is removed, the sampling rate is 441Hz for five sensors and 2205Hz for one sensor.
The project successfully lived up to the anticipated assumption, including measurement of physical input values with the use of Raspberry Pi and the display of values on the screen as well as realization of simple rock-paper-scissors. According to the task requirements, a self-designed ADC PCB is manufactured and used. After repeated modification and perfection, the program design is also perfectly in line with the task requirements. In the process, the selection of hardware and assembly is done by careful discussion and research, including AD converter, sensor and resistor. PCB manufacturing follows the step of schematic diagram first and followed by printing plates. The program system includes calibration, voltage display and buttons for interactive operation. The project realizes the anticipated assumption, but due to the limitations of the funds and the craft level, the numerical accuracy of Gesture Interface Glove is not so accurate, and the range of application is limited. But this research allows some basic theories and methods of operation to be acquired, which provides valuable experience and lessons for the use of Raspberry Pi, PCB design and manufacturing or the selection of some necessary hardware in the future. The group will carry out further research of this project.