DoIP Interfacer System: A Low-Cost Alternative to Computer for Basic Network Communication in LAN Environment

Problem statement: Computer, very important to human society because of its capability in performing complex task. Questions were raised on the practicality of using computer for basic network communication where cost, portability and flexibility are major concerns. Explore a low-cost alternative to computer for basic network communication in LAN environment which consumes less power and portable as well as to develop a system, namely DoIP Interfacer System (DIS) to perform basic tasks of remote controlling, serial port interfacing, message (text) communication and voice communication. The device will be able to communicate to other similar devices as well as computers within the network. Approach: A modular, pick ‘n’ mix approach of developing a system consisting of function specific boards/modules was undertaken. In total, 2 modules were created which are DoIP Interfacer-Digital (DID) to perform digital tasks such as network communication and remote control; DoIP Interfacer-Analog (DIA) to perform analog tasks such as capturing and playing out of voice signals (for voice communication). To demonstrate serial port interfacing, UART Demonstration Board (UDB) was also created to display messages received by DID. A graphical user interface (GUI) known as DoIP Interfacer GUI (DIG) was also created in C# as part of the system to enable communication between DID and computer. Results: DIS was able to perform three of the four tasks which were remote controlling, serial port interfacing and message communication. However, it was not able to perform voice communication successfully. More research, experiment and testing will need to be carried on find the solution for this problem. Conclusion: These results showed that DoIP Interfacer System (DIS) had the potential to replace computer for basic network communication. With more research, experiment and testing, the function of DIS can be increased module by module.


INTRODUCTION
Computer, as we know it is a very important part of human society. It provides a means for communication to happen may it be in the form of voice communication, messaging or even to control a device. However few setbacks of the computer are its cost, power consumption and its bulkiness. True, computer is capable of performing hundreds and thousands of complex tasks, but not all of the features are used all the time. For example, if a computer is purchased for the purpose displaying basic information in a parking lot, then its main function is only to display information. The other capabilities of the computer are not used but lay dormant, which is a waste of resources.
With the introducing of DoIP Interfacer System (DIS), all the setbacks stated above are eliminated. DoIP is short for Data over Internet Protocol which means that it is able to connect and communicate with the network using TCP/IP. "Interfacer" on the other hand is a word coined to show that this system is able to interface/communicate with external devices connected to it. DIS is a low-cost alternative to computer for basic network communication in Local Area Network (LAN) environment. Its portability and lower power consumption in comparison to the standard computer, enables it to be powered from a single 9V battery.
Although the processing capability and data handling capability of DIS is unmatched to the superior performance of computer, yet DIS remains a good alternative for situations where high processing capability is not a prerequisite. Furthermore, the low cost of this system ensures that the maintenance cost as well as replacement cost for this system due to wear and tear or theft is kept at the minimum.
The brain of DIS is PIC18F4620 microcontroller with built-in Analogue-to-Digital Converter (ADC) module for sampling, quantization and encoding of signal, Pulse-Width-Modulation (PWM) module for digital to analogue conversion, SPI and Universal Synchronous/Asynchronous Receiver/Transmitter (USART) module for serial communication and other supplementary modules. This eliminates the need for external modules/components which reduces the overall production cost as well as the size of the finished board.
It uses ENC28J60, 10Base-T stand-alone Ethernet controller to interface to the network and performs TCP/IP related tasks. Unlike the other Ethernet controllers in the market, ENC28J60 is different in the sense that it is low cost (cost nearly half the price of other controllers) and it communicated to microcontroller using Serial Peripheral Interface (SPI), a communication protocol that uses only four wires to transmit and receive data. This leads to low pin count of ENC28J60 package which resulted in smaller footprint, unlike other Ethernet controller that uses ISA or PCI busses which is better suited for microprocessor/computer with pin count of eighty and above [1] .
For this article, four functions of DIS are discussed which are DIS as remote controller to control up to eight devices connected to it, serial port interfacer to demonstrate RS-232 communication for the purpose of displaying information onto Liquid Crystal Display (LCD), messaging device to exchange SMS and VoIP phone to transfer voice data.

Preliminary analysis:
Particularly for the function of DIS as a VoIP phone, preliminary analysis needed to be carried out to ensure that the voice signal into the system is of acceptable quality. First, a two-stage Sallen-Key low-pass filter is constructed. Then, a sinusoidal wave of 50 mV ranges from 10 Hz to 7 kHz is fed into the filter and the output is observed on the oscilloscope to obtained the frequency response of the filter Another filter is constructed in MATLAB based on the frequency response of the filter obtained and is applied to a pre-recorded voice signal. The resulted signal is compared to the original signal in both time and frequency domain and is played out through the speaker. The results showed that the quality is affected due to the filtering but the overall quality of the sound is acceptable.

MATERIALS AND METHODS
To implement DIS, three hardware boards are created which are DoIP Interfacer Digital (DID) board, DoIP Interfacer Analogue (DIA) board and USART Demonstration Board (UDB). DID consist of core components such as PIC18F4620, ENC28J60 which is responsible for TCP/IP communication and MAX232 which is responsible for RS-232 serial communication for serial port interfacing. DIA is responsible for all the analogue operations consisting of pre-amplifier circuit, low-pass filter circuit and power-amplifier. The third board is UDB which is created for the purpose of demonstrating serial communication using RS-232 and consist of core components such as PIC18F2620, Liquid Crystal Display (LCD) and MAX232.
The software development for DIS are separated into four different functions involving microcontroller's firmware programming using Microchip's C18 C compiler and Graphical User Interface (GUI) programming using Microsoft Visual C#. The GUI for DIS is known as DoIP Interfacer GUI (DIG). After each function is developed, it is then tested and its results recorded.
The block diagram of the whole system is shown in Figure. 1. Figure. 1 is short for DoIP Interfacer which is actually the combination of DID and DIA as a unit. Figure. 2 below shows the block diagram for DI together with UDB.

DI in
DIS as remote controller: DIG can be used to control up to eight devices connected to DI. User enters the Internet Protocol (IP) address of DI and then clicks the "ON" button to turn ON a device or "OFF" button to turn OFF a device. The "Update Status" button is used to synchronize DIG to DI so that the status of each device in DI, whether it is on or off is known. Figure 3 shows the remote control section of DIG.
DIS as serial port interfacer: DI provides a platform for interfacing of serial port to the network. To demonstrate this function UDB is used as Data Circuitterminating Equipment (DCE) which is connected to DID that acts as Data Terminal Equipment (DTE) [2] . The purpose is to display information such as device status for remote control function. Here, DID accept inputs from keypad, converts it into alphanumeric characters similar to SMS in mobile phone and then sends it to a remote node. DID can also receives messages from DIG and display it on the LCD. The only limitation is that in DIS, the messaging function only can send up to 32 characters because the display that is used can only displays up to 32 characters.

DIS as VOIP phone:
VoIP phone is about sending and receiving of voice data in DIS, to and from a specific node. In DI, voice signal is received from microphone connected to DIA, passed through pre-amplifier stage which includes a two-stage low-pass filter. The processed signal is then sampled at 8 kHz, encoded into 8-bits binary data and stored in a 20 ms buffer. The voice data is then sent every 20 ms to a specified node.
The receiving process on the other hand involves, storing the 20 ms voice data into 100 ms jitter buffer to ensure a smoother sound play out [3] . The data is then played out using PWM and then amplified using power amplifier to obtain a more powerful sound.
In DIG, these processes are done by the computer. Figure 4 shows the VoIP section of DIG. Table 1 shows the voltage of each device in OFF condition and Table 2 further down shows the voltage of each device in ON condition.     The audio quality on both sides is poor in the sense that the sound is not continuous. The noise level is also quite obvious.

DISCUSSION
DIS as remote controller: It can be seen that when the device pin is ON, it has a potential difference of 4.83V which is more than enough to turn another TTL input ON and a potential difference of 1.2 mV (max.) when pin is OFF. Every output pin in DID consist of a resistor connected in series to PIC18F4620's pin to limit the amount of current drained. The I/O pin of PIC18F4620 can supply a maximum current of 25mA (stated in PIC18F4620's datasheet) without causing damage to the microcontroller. The resistor is also to prevent damages to the microcontroller when the user accidentally connects the output pin to Ground (when the pin is ON) which will cause large amount of current to be drained from the microcontroller's pin.

DIS as serial port interfacer:
The results above shows that the function of DIS as a serial port interfacer works according to specification as it is able to communicate with external device through RS-232 serial communication to show the device status.

DIS as messaging device:
The results above show that messages are able to be sent and received successfully for both DIG and DID. Referring to Figure 8, the 17th character onwards that are displayed on the LCD are placed on the next line because the LCD is only able to display 16 characters per line. This causes the display of messages to be a bit awkward. An alternative to this is to enable the scrolling function of the LCD where the messages move left so that everything can be displayed on a single line. Figure 9, it can be seen that the throughput of the system is close to 50 packets sec −1 or 76.8 kbps which is according to expectation. However, in Figure. 10, the throughput of the system this time is only 11 packets sec −1 or 16.9 kbps instead of 76.8 kbps achieved previously. This suggests that DIG is not functioning as expected. Since DIG is responsible for playing out the audio received as well as transmitting of voice data to DI, this certainly affects the play out of sound on both sides. Further investigation into DIG is needed to find out the reason as well as to solve the problem.

CONCLUSION
Overall, the concept of DoIP Interfacer System as an alternative to computer is successfully applied with satisfactory results except for the function of DIS as a VoIP phone. Firstly DIS was able to control eight devices to both ON and OFF. In addition to that, was able to interface with UART Demonstration Board to demonstrate serial port interfacing to display the status of the devices. Next, DIS was able to exchange SMS successfully between DID and DIG. Finally, DIS is put to the test as a VoIP phone. According to the results obtained during testing, DIG was not able to send data fast enough to ensure continuous playing of sound in DI. In addition to that, despite DI's ability to capture and transfer voice correctly, DIG wasn't able to play it out smoothly or continuously.

Author thanks Mr. Lim See Wei, his Industrial
Training supervisor for giving him suggestion for this project. He also thanks Mr. Bryan Chong who has been his lecturer since day one in INTI International College Penang and is now his project supervisor for introducing him to PIC programming, as well as his parents for their support, understanding and encouragement.