real time fpga-based ethernet control communication for ...media access controller which work along...

5
PERPUSTAKAAN fiVwnMawUo PENYERAHAN KERTAS KERJA SEMINAR/PERSIDANGAN/BENGKEL No. Ruj. Kami: USM.PK/BBB/H/PKK/385 Tarikh : 16 November 2016 Pustakawan Bahagian Bahan Bersiri Perpustakaan Kejuruteraan Universiti Sains Malaysia 14300 Nibong Tebal Seri Ampangan, Seberang Perai Selatan Pulau Pinang (U.P: Mazainun Aini) Bersama ini saya sertakan kertas kerja bagi semlnar/persidangan/bengkel seperti dl bawah : fnternationai Conference on Mechatronics, Automation &Manufacturing 2016" Tokyo, Japan 29-31 Oktober2016 Terima kasih, Tandatangan & Cop Jabatari: Nama: Tarikh : 1,^/ II /«vo| t WUCure, ^'<"AIRMSHAK Universiti Sains Malaysia BERSiai SilcT hsnt;-3r ke UKAS HWUCMVT Berilmu Amanah Progresif

Upload: others

Post on 02-Apr-2020

26 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Real time FPGA-Based ethernet control communication for ...Media Access Controller which work along with the Nios IIprocessor andexternal PHY chip. Besides, theinterface for communication

PERPUSTAKAANfiVwnMawUo

PENYERAHAN KERTAS KERJA SEMINAR/PERSIDANGAN/BENGKEL

No. Ruj. Kami: USM.PK/BBB/H/PKK/385

Tarikh : 16 November 2016

Pustakawan

Bahagian Bahan BersiriPerpustakaan KejuruteraanUniversiti Sains Malaysia14300 Nibong TebalSeri Ampangan, Seberang Perai SelatanPulau Pinang(U.P: Mazainun Aini)

Bersama ini saya sertakan kertas kerja bagi semlnar/persidangan/bengkel seperti dl bawah :

fnternationai Conference on Mechatronics, Automation &Manufacturing 2016"Tokyo, Japan

29-31 Oktober2016

Terima kasih,

Tandatangan & Cop Jabatari:

Nama:

Tarikh : 1,^/ II /«vo| t

WUCure, '̂<"AIRMSHAK

Universiti Sains Malaysia

BERSiai

SilcT hsnt;-3r ke

UKASHWUCMVT

Berilmu Amanah Progresif

Page 2: Real time FPGA-Based ethernet control communication for ...Media Access Controller which work along with the Nios IIprocessor andexternal PHY chip. Besides, theinterface for communication

Real Time FPGA-Based Ethernet Control Communication For Robotic Arm

Mohamad Khairi Ishak , Ho Kar Hwai and Lee Kong Lam

^Schoolof Electrical and Electronics Engineering, Unh/ersitiSains Malaysia, Engineering Campus, 14300, Penang, Malaysia.

Abstract. In this paper, an approach for real time control communication using Ethernet is proposed. The strategy tosupport this at the network level and include Field ProgrammableGate Array (FPGA) implementationon the Ethernetplatform for robotic arm. An embedded Ethernet controller is designed to send data packet via Ethernet Local AreaNetwork (LAN). The transferring data also employs Arduino Mega as the medium of communication between FPGA

board and the robotic arm. It is used as the receiver to receive data packet from FPGA board with the interface ofArduino Ethemet shield. The control operation on the robotic arm is performed once the desired data packet length isreached to the Arduino Mega. SolidWorks and MATLAB software are used to design the robotic anu and simulatethe robotic arm working flexibility in real world respectively. The result of the average data packet delay betweenFPGA boards is lower in comparison to Arduiono board. The data packet can send successfully in through thenetwork to test the robotic arm.

1 Introduction

Real time system is a system that produces instant outputresponse within a specific amount of time without delayafter receiving input signal [1]. It has the advantages overthe non-real time system because non real time systemsdo not produce immediate response and do not haveaccountability [2]. Embedded communication networkreal time system is used in applications which require aset of synchronized data to be delivered in time and highresponse speed. Many field of application especiallysafety critical application use embedded communicationnetwork control to interact with real world due to flexibleof designed system and less wiring complexity [3, 4].Examples of safety critical application are military,robotics, medical, transportation system and avionics.Various types of communication control protocols whichdeveloped for network embedded real time system areused as a solution for communication problems. AlteraDE2 and DE2-115 boards are used in this project as theembedded real time Ethernet controller system.

Currently, there are high demands from variousindustries to use different types of robot to performdifferent tasks in the workplace. The controller chosen tomanipulate the robot is very important. Most of thedigital control systems for conventional robots stillemploy microcontroller as the brain of the robot in whichcannot keep pace with the new applications that requirehigher control performance especially when the robotsare used for high speed manufacturing and medicaloperations [5]. Although microcontroller such as Arduinois cheaper compared to FPGA but it cannot provideparallel processing at the same time which is required formost of the industrial robots control nowadays [6,7,8].

^Corresponding author: khairiishak(^usm.my

Hence, the development of real time FPGA controller isnecessary to achieve higher control performance on therobotic arm.

Development of embeddedEthemet controllerfor signal tj^ansmissionGeneration and transmission of Ethemet packet from AlteraDE2 FPGA board to Arduino Mega via Ethemet LAN cable

TInterface between Arduino Ethernet shield and

Arduino Mega to control robotic arm

Development of the robotic arm

End

Figure 1; Flowchart of the project development

This project consists of four major parts. The firstpart is the development of embedded Ethemet controllerfor signal transmission. The second part is the generationand transmission of Ethernet packet from Altera DE2FPGA board to Arduino Mega via Ethemet LAN cable.The third part is the interface between Arduino Ethemet

Page 3: Real time FPGA-Based ethernet control communication for ...Media Access Controller which work along with the Nios IIprocessor andexternal PHY chip. Besides, theinterface for communication

MATEC Web of Conferences

shield and Arduino Mega to control robotic arm. Thefourth part is the development of the robotic arm. Theoverall flow chait of this project is shown in Figure 1.

2 System Design Development

In this section, the step by step metliods used to completethis project are highlighted and explained in details. Theexplanations are important in complete the objectives ofthe project. Both software and hardware are used in thisproject.

2.1 Development of Embedded EthernetController for Signal Transmlssion affiliations

Etliemet is the main control communication protocol asthis protocol is a low cost, robustness, easy to available,expendability and non-proprietary networkcommunication solution. In order to control the Ethernetchip DM9000A in Altera DE2 FPGA board, a digitalhardware system that contain components such asinternal processor, RAM memory, parallel input/outputinterfaces, serial communication protocol, and Ethernetinterface protocol will be built using SOPC builder toolsin Quartus II software. It is used to run applicationprogram that handle the data transmitted to or receivedfrom the Ethernet controller chip. DM9000A fromDavicom is a fully integrated and low pin count FastEthernet controller chip with a general processorinterface, a media access control (MAC) unit, alO/lOOMbps PHY transceiver and 16K bytes SRAM.Ethernet protocol associated with DM9000A chipincluded in this digital hardware system works as aMedia Access Controller which work along with the NiosII processor and external PHY chip. Besides, the interfacefor communication between MAC and external PHY chipis chosen as Media Independent Interface (Mil) since thisEthernet controller only support data transfer rate oflO/lOOMbps.

After Verilog code associated with the componentsof digital hardware system is generated using SOPCbuilder, this system need to be instantiated in our design'stop level module in order for the components this systemto perform its function. The main function of this systemis to generate Rlhernel packet in Altera DE2 board. Theblock diagram ofdigital hardware sy.stem isasshown inFigure 2.

2.2 Generation and Transmission of EthernetPacket from Altera DE2 FPGA Board to ArduinoMega via Ethernet

Nios II processor is used to send the Ethernet packet fi'omFPGA board to Internet by connecting Ethernet LANcable through PHY layer via serial interface. The endpoint of theEthernet packet will be stored at either serveror computer. In this project, theEthernet packet will sendto the IP address of the Arduino Ethernet shield fi'omAltera DE2 FPGA board when a push button is pressed.After this digital hardware system is created, anapplication program is written in C/C++ code through

Nios II IDE software build tool. This application programis implemented in order to initialize the DM9000AEthernet controller chip, generate Ethernet packets, anddrive the Ethernet controller to send the packets overbuilt network through external PHY chip of physicallayer.

QiTOanftgementCsrBoi

sun Rooue

Figure 2: Block diagram of Ethernet controllerDM9000A

2.3 Interface between Arduino Ethernet Shieldand Arduino Mega to Control Robotic Arm

Arduino Ethernet shield is interfaced with Arduino Megato perform control operation on robotic ann. Ai'duinoEthernet shield is used to enable Arduino Mega to act asthe medium of communication between FPGA board androbotic arm so that signal can be transferred via (RJ45)Ethernet LAN cable. Correct IP address need to beobtained fi'om Arduino Mega after Etliemet shield hasbeen connected onto it.

iiiiMii ^ArduinoMcga

9,:um

Figure 3: Hardware interface between Arduino Megaand Arduino Ethernet shield

Once the Ethernet packet has reach to the correct IPaddress of the Arduino Ethernet shield, the ArduinoEthernet shield will pi'ompt the Arduino Mega to performcontrol operation on robotic arm. The hardware interfaceis shown in Figure 3.

Page 4: Real time FPGA-Based ethernet control communication for ...Media Access Controller which work along with the Nios IIprocessor andexternal PHY chip. Besides, theinterface for communication

Short title of the conference

2.4 Development of the Robotic Arm

Robotic aim with 3 degree of fieedom and the endeffector is a gripper is designed by using of SolidWorkssoftware and simulated with MATLAB software. The

robotic arm is capable of doing the task of pick and placeof objects. All 3 links and joints are revolute. This robotis configured as an articulated robot. Estimation is beingmade for design material specification, theory to calculatethe torque of the robotic arm is applied and itsrelationship towards rotational speed.

Servo motor is a rotary actuator that allows forprecise control of angular position [9]. In this project,type of analog servo motors HD-150 IMG are used. Servomotor is the most suitable motor in this project because itis low cost and has a lot of advantage compared to theother motor such as stepper motor, brushless motor, acmotor, etc. The robotic arm is printed with 3D printer sothat precise dimension guaranteed. Servo motors are usedon the robotic arm.

By using SolidWorks software, the robotic arm isdesigned. After designing, simulation process must becarried out to make siu e there is zero interference and to

test on the robotic arm joints and links feasibility as inreal world [10].

2.5 Development of Real-Tlme CommunicationSystem between Two FPGA Devices

In this digital hardware system, Triple SpeedEthernet MegaCore is chosen as the Ethernet Controllerinstead orDM9000A. This is because the FPGA boards

use to build this communication system is DE2-115 seriesand the Ethernet PHY chip (Marvell 8E1111) of thisboard can only support this Ethernet controller. Besides, atimer will be used to determine the transmission time and

reception time of Ethernet packets at transmitter andreceiver. This timer is implemented by using a 32-bitcounter and its timing behavior is based on the internalclock frequency of DE2-115 FPGA board.

Practically, the Ethernet communication system isdesigned using two FPGA boards which communicate toeach other based on their unique MAC address andInternet Protocol (IP) address. The experimental setup forthis Ethernet real-time communication system ispre.sented in Figure 4. One of the FPGA board will besetup as transmitter and the other FPGA board will besetup as receiver. The process of data transmission willbe begun with transmitter send data with data byteslimited by user to receiver. During the process of datatransmission, transmitter is allow to send data packets toreceiver only by addressing transmitter to one of thereceiver's unique IP address. The data packetstransmitting time and data packets receiving time aredetermined from transmitter and receiver by triggeringtimer in NIGS 11 software build tool. These timers use

counters with internal clock frequency of lOMHz tocalculate both data packets transmitting time andreceiving time. The obtained liming results will berecorded on workstations which connected to the FPGA

boards.

Figure 4: Experimental setup for FPGA basedcommunieation system

3 Results and discussion

The Altcra DE2 FPGA board transmits Ethernet data

packet of different sizes to the Arduino Mega. If the datapacket of greater or equal to 1200 bytes is received by theArduino Ethernet shield, the Arduino Mega will performcontrol operation of pick and place object on two points.The object to be picked up is a sponge.The combine(Front, Left, Top and Trimetric) view of the robotic amiis shown in Figure 5.

Figure 5: Combine view of the robotic arm

Once the static IP address of the Arduino Ethernet shield

is obtained via Ethernet switch, the program of receivingEthernet data packet from FPGA board and promptrobotic arm operation is uploaded into the Arduino Mega.The serial monitor in the Arduino software is open toobserve when the data packet is reached to the Arduino.If the data packet size is greater or equal to 1200 bytes,the robotic arm is activated. The robotic arm picks andplace operation is shown in Figure 6.

For the communication setup which used FPGAand Arduino board, the average transmission delay ofeach data packet is 16ms. From the data measurements,transmission delay of each data packet can be calculatedby using the formula:

rvafismisrion £?f[ay =larai Darn fiefgyciot; Tung Dara rrafssmis^ior. 7tms

Total Data Packets Received Total Data Packets Trammitted

Page 5: Real time FPGA-Based ethernet control communication for ...Media Access Controller which work along with the Nios IIprocessor andexternal PHY chip. Besides, theinterface for communication

MATEC Web of Conferences

3

O

Figure 6: The robotic arm picks and place operation

The transmission delay for each data packet size iscalculated and recorded in Table 1. According to Table 1,the average data packet transmission delay for FPGA-FPGA based communication system is about 1.0642msand this delay is much smaller than the traiisinissiondelay of FPGA-Arduino communication system (I6ins).This significant delay reduction is because FPGAdevelopment boards possess better features compared toArduino board. These features include high processingspeed, high precision, parallel processing, shortdevelopment cycle and perfect combination ofstandardized programming structure of Verilog HDL.

Table 1: Data transmission delay for communicationbetween t>vo FPGA de\1ces

Data Packet Total Dnti Total Data Total Data Total DataSize Packets Packets Traitsmission Reception

(Bsnes; Transniined Recei\ ed Time (s) Time (s)(Packets) (Packets)

4 ConclusionIn conclusion, the control communication is successfullydeveloped at high data transfer for real-time controlcomniunicatioii to communicate with other controllerdevice for robotic arm witli Arduino board and FPGAboard via Ethernet. Through this implementation, theability to communicate safely data directly ever anEthemet/IP network is achieved. The practical test resultshave shown that the delay is reduced by 93.3% after thereceiver in a communication system is changed fi-omArduino board to FPGA board.

References

1. Joseph, M. and P. Pandya, Finding Response Timesin a Real-Time System. Tlie Computer Journal, 1986.29(5): p. 390-3952. Wong, T.C., J.W. Mark, and K.C. Chua.Approximate performance analysis ofresource allocationfor real-time and non-real-time multiclass sennces incellular systems, in Communication Systems, 2002.3. Lee, K.C. and S.Lee, Performance evaluation ofswitched ethernet for real-time industrialcommunications. Computer Standards and Interfaces,2002. p. 411-423.4. Venkatramani, C. and T.-c, Chiueh, Design,implementation.and evaluation of a software-based realtime ethernet protocol. SIGCOMM Comput. Commun.Rev., October 1995.: p. 27-37.5. Ishak, M.K., G. Henmann, and M. Pearson.Reducing delay and jitter for real-time controlcommunication in Ethernet, in Ach'anced Communication

Technology (ICACT), 2013 ISih InternationalConference on. 2013.6. Kadir, W.M.H.W., R.E. Samin, and B.S.K. Ibrahim,Internet Controlled Robotic Arm. Procedia Engineering,2012. p. 1065-1071.

7. Sam, R,. K. Arrifin, and N. Buniyamin. Simulationoj pick and place robotics system using SoiidworksSofimotion. in System Engineering and Technolog)'(ICSET), 2012 International Conjerence on. 2012.8. C. A. Lara-Nino, C. Torres-Huitzil and J. H. Barron-Zambrano, "Versatile educational and research roboticplatform based on reconfigurable hardware," 2014International Conference on ReConFigurable Computingand FPGAs (ReConFigl4), Cancun, 2014, pp. 1-6.9. N. K. Anish, B. Kowshick and S. Moorihi, "Ethernetbased industry automation using FPGA," AFRICON,2013, Pointe-Aux-Piments, 2013, pp. 1-4.10. M. Engin, "Embedded and real time system design: Acase study fire fighting robot," 2016 in 5thMediterranean Conference on Embedded Computing(7V/£'CO;,Bar,20]6.