Home
Work Final Master by Pedro Plaza
Contents
1. sn mali Figure 4 3 QUARTUS II WEB EDITION 13 0SP1 33 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 4 3 MODELSIM ALTERA STARTER EDITION 13 0 1 232 Digital System designers have to deal unavoidably with the task of testing their design Each design can be composed by lots of modules Each module should be tested separately before it is integrated in the complete design after its correct working has been validated In order to verify a correct working of a design the best way is using the simulation This process is carried out by applying stimuli inputs into the described circuit and checking that its behaviour is according to the expected The output of a simulation is the grouping o waveforms which shows the response of the described circuit when a sequence of input stimuli has been applied 31 There are two main kinds of simulations functional simulation and temporal simulation The functional simulation test how the logic is working within the circuit During this type of simulation the timing delays are deprecated The signal propagation through the circuit such as logic interconnection is not considered This kind of simulation is very quick and the obtained results are very useful in order to check the correct working of the circuit The second step is carrying out a timing simulation In this case the simulation complexity increas
2. 19 e ema va ap I av ETE ile ig s i a xe gos T4 wo met L ES g an emma an M i sa siz ar L an K r pr sm Mn Zar cz on L uns a a i aj ud Z aonn AR Aa 77 snno 2 A Gu t gi sena 3 R a Si2 L ea suo uz po ons e 74 L zu Figure 4 7 EAGLE Schematic Editor e PCB Editor this editor allows the place and route of all components in the board Figure 4 8 show ER 2 ton CiUser VasroiDenumenenaug ando Servo Sraid Kondo Serva Su 2 bed AG file f r Draw Mem foot Many Qptons Mimdow Help an Ben aUusz E RN QAQAM DI ENT Eppe R GA Bb NIE ZE OG S NIOONONJENBR AX SI Figure 4 8 EAGLE PCB Editor 4 5 AVS VIDEO EDITOR AVS Video Editor is a video editor which allows the performing of the whole process when a video is modified This includes the video importation sound and images film creation file exportation and also the CD or DVD burning 37 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 AVS Video Editor has lots of effects and transitions which are very useful during the editing Furthermore the sound can be edited and prepared for the project while the video editing is carrying out Once the project is created there are lots of exportation possibilities It can be simply created a file AVI MPEG o WMV or it can expo
3. Master s Dissertation ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author PEDRO PLAZA MERINO Director Dr MANUEL ALONSO CASTRO GIL Co Director GERMAN CARRO FERNANDEZ This Master s Dissertation has been conducted in the DEPARTMENT OF ELECTRICAL ELECTRONIC AND CONTROL ENGINEERING COLLEGE OF INDUSTRIAL ENGINEERING NATIONAL UNIVERSITY OF DISTANCE EDUCATION as part of the requirements to obtain the Master Degree in Electrical Electronic and Industrial Control Research Electrical and Electronic Engineering intensification 7 OCTOBER 2013 DEPARTMENT OF ELECTRICAL ELECTRONIC AND CONTROL ENGINEERING COLLEGE OF INDUSTRIAL ENGINEERING NATIONAL UNIVERSITY OF DISTANCE EDUCATION Master s Dissertation ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author PEDRO PLAZA MERINO Director Dr MANUEL ALONSO CASTRO GIL Co Director GERMAN CARRO FERNANDEZ Assessment Committee Dr GABRIEL DIAZ ORUETA Dr MANUEL ALONSO CASTRO GIL Dr ALFONSO CONTRERAS Qualification DISTINCTION 9 UNESCO Code 331108 Summary This Master s Dissertation has been conducted in the National University of Distance Education s Department of Electrical Electronic and Control Engineering The aim of this Dissertation is to develop a robotic system controlled with an FPGA for its use in Remote Scientific Laboratories specifically as part of the Go Lab Project Techno Museum initiative arises from the Go Lab Project the technology at
4. R26 C1 C3 Polarized gt 10u CP SV A CSV A capacitors for the 5 V voltage regulators input 2 20K R 0805 kokos me resistors DATA_MEM Data and Debug 25AA1024 DIP254P762 2 VP X533 8 DBG MEM EEPROM memories R27 R28 LED polarization R29 R30 resistors R31 R32 12 330 R_0603 R0603 R33 R34 R35 R36 R37 R38 gt i 7805DT 70252 ICI IC2 5 V voltage regulator Table IV 2 b Kondo Servo Shield V2 BOM 72 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES APPENDIX IV FPGA SHIELD SCHEMATIC Author Pedro Plaza Merino Date 7 October 2013 22 BC847 SOT23 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 T21 T22 NPN Bipolar Transistor MCP3201 BI P DIP254P762 X533 8 ADC ADC PIN 3X1 PIN 3X5 BACK IR L IR S Trunk servo and sensor connectors PIN 3X5 PIN 3X5 LEFT ARM amp WAIST LEFT LEG RIGHT AR M amp WAIS T RIGHT LEG Servo connectors Table IV 2 c Kondo Servo Shield V2 BOM 73 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX V FPGA SHIELD PCB Date 7 October 2013 APPENDIX V FPGA SHIELD PCB V 1 KONDO SERVO SHIELD V1 PCB Figure V 1 Kondo Servo Shield V1 PCB 15 Author Pedro Plaza Merino 7 October 2013 Date ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES APPENDIX V FPGA SHIELD PCB
5. SDC methodology in order to limit the design and the results are showed The generated information by the timing analyzer can be used to analyze debug and validate the design synchronization performance e Simulation at this point a behavioural analysis can be carried out on the complete design with the aim of verifying that all functional requirements have been accomplished e Programming amp Configuration once the compilation of a project has been fulfilled using the Quartus II tool an Altera device can be programmed or configured The Quartus II assembler module generates the programming files required by the Programming tool in order to program or configure a device for the hardware programming An independent version of the Quartus II Programmer can be also used for programming or configuring devices 31 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 Quartus II software allows the using of user graphical interface and command line interface in any stage of the design flow Figure 4 2 shows a design flow diagram followed when the Quartus II software toll is used includes block based design system level design amp software development Power Analysis Debugging Engineering Timing Change Analysis Management Timing Closure Programming amp Configuration Figure 4 2 Design flow diagram using QUARTUS II Quartus II software too
6. the objective is the design of a simple PCB which interfaces the FPGA and the servos in order to adapt the voltage levels Additionally it holds the Bluetooth board configured in Slave mode This PCB replaces the prototype mentioned in the chapter 5 2 The used components are the same as the used for the prototype built in the drill board but replacing the traditional packages by SMD components The main difference is that in this prototype the NPN BC547 transistors have been replaced by their SMD package equivalence which is BC847 36 In order to have 5 V in the servo data line it has been used a voltage regulator which powers all the Pull Up resistors This voltage regulator is the MIC5205 38 The Kondo Servo Shield V1 PCB without any component is showed in the Figure 5 3 At the left the top of the PCB and at the right of the Figure 5 3 the bottom of the PCB 0000000090909000 00000000000090 6000 E E E u uuu y OOOO O L OOOO O O000 0 000000000909 COO0O0000009 o0000000909 9 i A UUN 8 o O 00 lt ap O o o O O O 6999099900 4 Figure 5 3 Kondo Servo Shield VI without components The Kondo Servo Shield V1 with all components mounted is showed in the Figure 5 4 At the left the top of the PCB and at the right of the Figure 5 4 the bottom of the PCB 47 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7
7. 64 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX II HIGH LEVEL LOGIC DIAGRAM FOR FPGA Date 7 October 2013 APPENDIX III HIGH LEVEL LOGIC DIAGRAM FOR FPGA 10 to 80 cm Ultrasound ADXL345 3 Axis Infrarred Sensor Sensor Accelerometer LIR Sensor US Sensor ACC 12C Top Top Top Intrared To P Main_Top DBG BT Top 10 cm DATA MEM Bluetooth DEBUG MEM Position Selector Top Servo Controller Top 20 ru Servo Controller Top 0 Kondo Control Bluetooth Servo 21 Servo 1 Figure II 1 High Level Logic Diagram for FPGA 65 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX IV FPGA SHIELD SCHEMATIC Date 7 October 2013 APPENDIX IV FPGA SHIELD SCHEMATIC IV 1 KONDO SERVO SHIELD V1 SCHEMATIC Figure IV 1 Kondo Servo Shield V1 Schematic 67 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX IV FPGA SHIELD SCHEMATIC Date 7 October 2013 IV 2 KONDO SERVO SHIELD V1 BOM Quantity Value Device Package Component Description 4 PINHD PINHD P1 P2 P3 Connector for FPGA 1X14 1X14 P4 connection PWRI Power supply 2 PINHD 1X2 PINHD 1X2 PWR ai 1 i PINHD 1X4 PINHD 1X4 CONS Bluetooth module connector R1 R2 R3 Resistor R4 R5 R6 R7 R8 R9 RIO R11 19 10K R 0805 R0805 R12 R13 R14 R15 R16 R17 R
8. Date 7 October 2013 o PCDuino o Raspberry Pi 57 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX I ATTACHED DVD CONTENT Date 7 October 2013 APPENDIX I ATTACHED DVD CONTENT Due to the large quantity of documents that cannot be included in physical format a DVD ROM has been elaborated Its content is mentioned below I 1 Arduino Code The following Arduino Sketches have been included inside the folder Codigo Arduino e BT MASTER basic code to interface the PC and the Master Bluetooth Shield e GoLab this folder holds the source code developed during the Go Lab integration e FOUR WHEELED BOT source code used with the 4 wheeled bot e TWO WHEELED BOT source code used with the 2 wheeled bot 1 2 FPGA Code The following FPGA development related files have been included inside the folder Codigo FPGA e Altera Quartus II tool generated project files have been included here e Modelsim Simulation tool generated project files have been included here e VHDL this folder holds all source code files related to the developed blocks 1 3 Multimedia Material The following Multimedia Material has been included inside the folder Material Multimedia Inside of Material Multimedia some related files to multimedia material have been included This multimedia material has been generated during the whole process e Video Robot 2 Ruedas this folder holds the 2 wheeled robot rela
9. Date 7 October 2013 ARDUINO APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR ARDUINO II 1 2 WHEELED ROBOT FLOW DIAGRAM ia comando Mover derecha Mostrar instrucciones Figure II 1 2 Wheeled Robot flow diagram 61 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR Date 7 October 2013 ARDUINO II 2 4 WHEELED ROBOT FLOW DIAGRAM comando Indicacion adelante Mover adelante Indicacion adelante Mover adelante Mostrar instrucciones Indicacion adelante Figure 11 2 4 Wheeled Robot flow diagram 62 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR Date 7 October 2013 ARDUINO 11 3 BLUETOOTH MASTER FLOW DIAGRAM Nuevo comando Reenviar por el otro puerto serie Figure II 3 Bluetooth Master flow diagram 63 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR Date 7 October 2013 ARDUINO II 4 GO LAB INTEGRATION FLOW DIAGRAM Nuevo comando en Puerto Serie 0 Envia a por Puerto Serie I Envia b por Puerto Seriel Envia c por Puerto Seriel Envia d por Puerto Seriel Envia e por Puerto Serie 1 Figure 11 4 GO LAB integration flow diagram
10. Figure 11 4 GO LAB integration flow diagram esee eee ssseesseesseesseeeseeeetis 64 APPENDIX II HIGH LEVEL LOGIC DIAGRAM FOR FPGA_ n 65 Figure II 1 High Level Logic Diagram for FPGA nono 65 APPENDIX IV FPGA SHIELD SCHEMATIC ii 67 Figure IV 1 Kondo Servo Shield VI Schematic eesceeseeeeseecsseceseeeseeeeseeesaeenes 67 Figure IV 2 Kondo Servo Shield V2 Schematic part l i 69 Figure 111 3 Kondo Servo Shield V2 Schematic part 2 70 APPENDIX V FPGA SHIELD PCB iui 15 Figure V 1 Kondo Servo Shield V1 PCB sus sis 2a ee 15 Figure V 2 Kondo Servo Shield V2 POB s m comicios 76 xii ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 1 RESEARCH SCOPE Date 7 October 2013 1 RESEARCH SCOPE This Master s Dissertation arises from the Techno Museum initiative 51 In November 2011 a group of engineering students and professors decided betting for the technology divulgation and exploitation Hence it was created a project supported by several national and international institutions with the aim of move the technology from the laboratories to the society as soon as possible by the use of tools which the society already has to promote e The technology divulgation e The rational use of the technology for helping to society e Showing that nowadays the technology allows the improving of the environment e D
11. May 2013 F DATASHEETS 32 25AA1024 1 Mbit SPI Bus Serial EEPROM Manufacturer Microchip 2010 Microchip Technology Inc DS21836H 33 uA7800 SERIES POSITIVE VOLTAGE REGULATORS Manufacturer Texas Instruments SLVS056J MAY 1976 REVISED MAY 2003 34 ADXL345 3 Axis 2 g 4 g 8 g 16 g Digital Accelerometer Manufacturer Analog Devices Rev D 35 BC547 NPN amplifier transistor Manufacturer Motorola Rev 1 36 BC847 NPN general purpose transistors Manufacturer Philips Semiconductors 2002 Feb 04 37 GP2YOA21YKOF Distance Measuring Sensor Unit Measuring distance 10 to 80 cm Analog output type Manufacturer Sharp Corporation Sheet No E4 A00201EN Date Dec 01 2006 38 MIC5205 150mA Low Noise LDO Regulator Manufacturer Micrel June 2000 39 MCP3001 2 7V 10 Bit A D Converter with SPITM Serial Interface Manufacturer Microchip 2007 Microchip Technology Inc DS21293C 40 PC817 photocoupler Manufacturer Sharp Corporation June 14 1996 ED 94054D G WEBSITES 41 Altera FPGA definition Website http www altera com products fpga html Last visited on 08 16 2013 42 Arduino Website http arduino cc Last visited on 08 16 2013 43 Association Connecting Electronics Industries Which Term To Use PWB or PCB Website http www ipcoutlook org mart 50194D shtml Last visited on 08 18 2013 44 AVS Video Editor Website http www avs4you com A VS Video Editor aspx Last visited on 0
12. Merino 3 USED HARDWARE Date 7 October 2013 a Transmission rate 38400 bauds b Data bits 8 bits c Stop bits 1 bit d Parity no parity e Flux Control without Flux Control Paso 4 Check that all is configured and connected properly For this purpose AT r n is sent and the expected response from the device is OK r n Paso 5 Send the characters AT ROLE 1 r n and the expected response from the device is OK r n Paso 6 Power on the device which will assume the Slave role and write its MAC address it will be similar to 20 13 05 08 41 19 In order to get the MAC address in a simple way an Smartphone with a Bluetooth terminal application can be used Paso 7 Send the characters AT BIND lt first four digits of the MAC gt lt the next two digits of the MAC gt lt the other digits of the MAC gt r n and the expected response from the device is OK r n If the MAC address used in the above example is used the command to send is as follows AT BIND 2013 05 084119 Paso 8 Send the characters AT UART 115200 1 0 r n and the expected response from the device is UART 115200 1 0 Once all the above steps have been fulfilled and both devices the Master and the Slave are powered on they will be paired if neither of them have been previously paired with another device 3 3 2 BLUETOOTH TO TTL INTERFACE BOARD The Bluetooth to TTL interface board is a board which implements a serial port to Bluetooth conversion
13. October 2013 AA AMA 44444444449 3 pesi L S gt D 9 3 ds eee pee p a 3 u 3 u nR a2 2 a raz 13 D 3 gt 3 gt A A ugo BERENI Ps Omi TF LN 4 S a er Adi gt a 624677 we 040631 AO ALA r r r Figure 5 4 Kondo Servo Shield VI with components Once all the components were mounted in the PCB some design issues were found They are summarized in the following bullets e Servo control lines routed incorrectly into FPGA pins e The soldering of the 5 V voltage regulators was very hard due to its reduced size and the used tools e Not much information printed in the PCB for its mounting and future use e There are only interfaces for 19 servos instead of the 21 which conform the humanoid robot e Unknown issues related to the FPGA power supply Hence this version is just valid for minor testing and over more to learn about the mistakes which have been made Due to the issues detected in this version a new version was started In the new version the size is bigger 5 42 KONDO SERVO SHIELD V2 This second iteration fixes the previously mentioned issues in the first approach Instead of interfacing with 19 servos the interface is increased into 21 control lines in order to allowing the FPGA to manage up to 21 servos Furthermore the MIC5205 voltage regulator has been replaced by a
14. V 2 KONDO SERVO SHIELD V2 PCB OHYOG ININ 8243 8 DTI039 104 2 OA PIRIS apuo TEE aut vi Bea oo eee fF amp 2 2 Figure V 2 Kondo Servo Shield V2 PCB 76 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX VI CV DEL AUTOR Date 7 October 2013 APPENDIX VI AUTHOR S CV Pedro Plaza A EXPERIENCE SIEMENS RAIL AUTOMATION S A U San Fernando de Henares Spain May 2013 to present The Rail Automation Business Unit with its headquarters in Berlin provides signalling and control systems for worldwide mass transit and mainline rail Services The rail automation systems from the world market leader and pioneer of railway signalling systems create the relevant conditions for enhanced safety punctuality speed capacity and energy efficiency both along lines and at stations They open up the way for trains within the network and specify when where and how fast trains are to travel In future a special focus of Rail Automation will lie on the optimization of entire operational sequences within rail transport Under the keyword Rail IT software solutions are being developed which ensure that complex frequently existing information is intelligently networked R amp D Project Engineer e Design implementation and verification of industrial equipment e Client liaison regarding to technical assistance about company products e Collaborate in critical facility projects DIMETRO
15. again by the Bluetooth boards until the data reaches the FPGA The FPGA differentiates the received data performing a motion into the humanoid robot by modifying the position of the servos 5 7 2 GO LAB EMULATED AS A WEB SERVER WAMPSERVER In this last stage additional commands have been added into the firmware When the FPGA get some of the valid commands a sequence of motion movements is sent to all the servos depending on the received command In this case the user interacts with the PC as a web server emulation by using Wampserver tool The server where it was located the remote laboratory of Go Lab is emulated 54 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 6 CONCLUSIONS Date 7 October 2013 6 CONCLUSIONS Once this point has been reached the Master s Dissertation can be evaluated globally Hence a global vision has been highlighted Positive and negative aspects are also showed as the result of the undertaken work Finally some research lines have been mentioned as the evolution of the lessons learned during this work 6 1 GLOBAL VISION wide range of aspects have been covered during the implementation of this project They are the following e A system based on FPGA has been developed with the aim of controlling an humanoid robot e That robot has been adapted to be used with educational purposes e Arduino software has been developed in two versions for controlling a wheeled robot
16. and the interface between the PC and the FPGA control board e PCB design and implementation in order to adapt the different voltage levels of the servos and the FPGA Furthermore the board holds all used peripherals to compose the whole control system e FPGA firmware design and implementation This has been carried out by using the Hardware Description Language VHDL At the end of the project a complete control of an humanoid robot is presented System which communicates using Bluetooth wireless communications with a PC In the particular case of the Go Lab project it can be included as remote laboratory as result of the Techno Museum initiative 6 2 POSITIVE ASPECTS As positive aspects after the obtained experimental results it can be concluded that the Bluetooth communications provide motion freedom to the system It allows a location in the laboratory is not restricted to cables length for the connection with a PC which is the server of the remote laboratory Other positive aspect are the learned lessons obtained along this work such as user friendly software tools which allows a time reduction during the development against the other mentioned along the document In addition a simple circuitry with a low cost has been obtained in order to adapt the voltage levels between the FPGA and the servos 6 3 NEGATIVE ASPECTS As the negative aspects this project present some disadvantages e This system is not too much flexible due to
17. device which converts a continuous signal usually voltage into a digital value which represents the amplitude of the original signal 4 Arduino Arduino is a platform with the aim of creating open source code electronic prototypes based on hardware and software which is easy to use giving a great flexibility It is intended for any person who is interested in objects creation or interactive environments 42 B BER Bit Error Rate it is a parameter used in digital transmissions which indicates the number of bit error which can be occur during a data transmission within a communication channel 5 Bluetooth Bluetooth is an industrial specification for wireless personal area networks WPAN which enables the voice and data transmission by using a radio frequency link based on 2 4 GHz ISM 16 BOM Bill Of Materials in the context of the PCBs it is a list with identification of every component showed in the schematic and the kind of component what it is It is usually used by the manufacturer of the PCB and it can also include useful notes from the designer and to possible maintainers E EEPROM Electrically Erasable Programmable Read Only Memory is a kind of memory which can be programmed or erased electrically 12 F FPGA An FPGA Field Programmable Gate Array is a semiconductor device which can be programmed after the manufacturing Instead of restricting in a predefined hardware functionality an FPGA can be adapted to the
18. for the CH 20 DIR freedom degree for the left hip right ankle CHII Second freedom degree for the CH21 Second freedom degree for the left hip right ankle CH 24 Freedom degree for the trunk Table 3 1 Servo description for the Kondo KHR 1HV All of the servos mentioned above can turn over one single axe The European Regulation EN ISO 9787 1999 mentioned in the Annex 1 of the book 2 has been followed in order to manage properly the limb courses of the robot This European Regulation adapted from the International Regulation is extremely useful because the coordinate systems criteria are unified and established and unified This criteria is used for specifying the motion stages during the programming As well as all coordinate systems referenced by the regulation All coordinate systems are referenced to orthogonal systems which agree with the right hand rule A B and C are referred to spin around the X Y and Z axis respectively That spins are positives when they follow the with the right hand rule When the axe and the spin are defined for each servo the robot is placed in a stand up position over the positive Z axe and oriented to the positive X axe Figure 3 2 represents these aspects ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Z positivo Y positivo X positivo Figure 3 2 Coordinate axes for the Kondo KHR 1 HV In this way all orie
19. my sister who has supported me always without conditions To Mariluz a very special person who always has known how get the best of me in any moment to Manuel the director and to Germ n the co director this project never has been possible without they To Igor M Ch vez by giving up his Kondo robot and by sharing his robotics knowledge To my friends and partners because they always have been close to me when I have needed them dekle GIS GI Beren toi 1 1 1 EDUCATIONAL ENVIRONMENT u 1 1 2 CONTROL SYSTEM WITH EPA soroas ppro s Gi ons bib Ss ka sacttevesastenzatadedeavasaleeetualees 2 2 RESEARCH STAGES a ana 3 2 1 ORIGINAL CONTROLLER USE aus roka a 3 2 2 FPGA BOARD AS CONTROL SYSTEM USE 3 2 3 INTEGRATION AS PART OF A REMOTE LABORATORY c iae 3 3 USED HARDWARE ss soo an us eu 5 3 1 KONDO KHR IHV ROBOT cora 5 3 2 CONTROL BOARD WITH FPGA illa a 9 3 3 INTERFACE SYSTEMS WITH THE PC cintia 11 3 3 1 ARDUINO BLUETOOTH SHIELD uses 12 332 BLUETOOTH TO TTL INTERFACE BOARD 14 3 4 INTERFACE AND OBJECT DETECTION SYSTEMS 16 34 VLTRASOUNDSENSOR scie 16 142 INFRARED SENSORS aii 17 3 4 3 STABILITY SYSTEM elia 20 3 44 WEBCAM CONNECTED TO THE PC BY USB i 21 345 ROBOT LOCATED WEBCAM Lille 21 335 DATA SEE ENE EE RS ee 23 3 6 ANALOG TO DIGITAL CONVERSION 2er nnersnnennnennnnnnnnensnnennnn 23 3 7 POWER SYSTEM 23 4 USED SO
20. needed 2 Firmware for servo management this firmware has been modified lots of times due to the large amount of improvement opportunities were found during the development Following are detailed the different alternatives developed a Basic firmware for servo management by generating a continuous PWM with different pulse width With this version the pair of main parameters of control were obtained the range value for the high level pulse width and the value for the PWM wave period b VHDL modification in order to use a single block which manages just one servo The described block was replicated as many times as the number of servos to be controlled This change allows a increase in the maintainability of the firmware due to any change on the controller is applied directly for all control channels by modifying just one single file c The position of each servo was stored in a table In this way each controller access into that table to know what pulse is required to be generated The table is stored in the internal logic of the FPGA therefore the maximum limits of FPGA resources was reached It was close to 100 42 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 d FPGA internal memory use n order to store the position of the servos With this change lots of logic resources were released within the FPGA e Modification of the table in order to get
21. new rules and its internal hardware can be reconfigured for specific applications even after the product has been installed in the field therefore its name is Field Programmable It can be used with the aim of implementing any logic function and it allows multitude of advantages for every application 41 G GFSK Gaussian Frequency Shift Keying GFSK radio bands it is a kind of modulation which transmits information by applying a Gaussian filter before the signal modulation The used modulation is identical to the modulation used by the FSK Frequency Shift Keying 5 I DC Inter Integrated Circuit IIC itis a serial communication bus The main feature of the I2C is that it uses a single data line for the information transmission and reception other line for the clock signal and the last one for the voltage reference 45 ISM Industrial Scientific and Medical ISM radio bands they are international reserved radio bands for the use of radio energy frequency RF in the Industrial Scientific and Medical areas 5 K Kondo KHR 1HV Humanoid Robot based on servos Originally it presents 19 freedom degrees but its control system is able to manage up to 24 servos 50 L LSB Least Significant Bit it is the position identifier for a number in binary format pointing that it is in the lowest position M MSB Most Significant Bit it is the position identifier for a number in binary format pointing that it is in the highes
22. text console a toolbar with buttons for common functions and several menus It is connected to the Hardware for loading programs and communicate with the connected devices 18 Figure 4 1 shows how the tool is BT BOARD Arduino 1 0 5 Z _ a 8 cema Archivo Editar Sketch Herramientas Ayuda char BluetoohByte 128 0 or 1 lata int i 0 void setup 1 pinMode 2 OUTPUT pinMode 3 OUTPUT Serial begin 115200 Open serial monitor at 9600 Serial println Master Bluetooth Serial1 begin 115200 Open serial monitor at 960 e ping result o see ping results void loop digitalWrite 2 HIGH digitalWrite 3 LOW i 0 if Serial available dot incomingByte i Serial read delay 10 while Serial available gt 0 if i D Serial1 print incomingByte Serial println gt Serial print Data sent to Bluetooth Slave Serial write inconingbyte Serial println dof incomingByte i 10 while i gt 0 i 0 if Seriall available dof BluetoohByte i Seriall read delay 10 while Seriall available gt 0 if i 0 Serial write BluetoohByte BT_BOARD m Figure 4 1 Arduino Development Environment 29 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 The most common used functions during t
23. the Figure 5 6 the bottom of the PCB 1434351444444447 44A AC MYRLI EEE 41491141 Ru ee ENE LATA G Figure 5 6 Kondo Servo Shield V2 with components Figure 5 7 shows the Kondo Servo Shield V2 integrated on the Kondo humanoid robot 49 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 Figure 5 7 Kondo Servo Shield V2 integrated on the Kondo 5 5 ROBOT INTEGRATION TESTS As long as this stage the programming cable ByteBlaster from Altera has been used in order to upload the design into the FPGA 22 In the beginning some test with a single servo were carried out in order to identify if the voltage level conversion circuit and the firmware were working as expected After checking that the voltage level conversion circuitry was correct the firmware evolution was started In first place a simple servo management was implemented After that the servo position storage method was evolved within the FPGA until an proper solution was found The next step was the modification of the commanded position to the servos received from the Bluetooth module For data transmission by using Bluetooth channel a Bluetooth Shield integrated on an Arduino MEGA board was used This is a simple tool but very useful along all the development The default Arduino serial port is the interface with the PC and the serial port enumerated as 1 is the p
24. 0K MCP3201 BI P R18 T19 se 10K i R19 ee 10K R26 T20 BC847 10K R20 Figure III 3 Kondo Servo Shield V2 Schematic part 2 70 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX IV FPGA SHIELD SCHEMATIC Date 7 October 2013 IV 4 KONDO SERVO SHIELD V2 BOM Quantity Value Device Package Component Description gt i LEDSMLO6 SML0603 LEDI LED2 i y voltage LED 03 indicator Green LED3 LED4 Bluetooth module LEDSML06 LED5 LED6 communication i 03 LOSOS LED indicator Red LED7 LED8 Debug LED LED9 indication Blue LEDSML06 p 6 03 SML0603 LEDIO LEDII LEDI2 1 i PINHD 1X14 P4 Connector for 1X14 FPGA connection PINHD JP1 JP2 JP3 Power supply n I 1X2 1402 JP4 connector PINHD BT_CTRL Bluetooth module 3 1X4 1X04 BT_DBG US and ultrasound connectors PINHD ACCEL dA Axis 1X5 ccelerometer connector PINHD P1 P2 P3 Connector for i i 2X14 FPGA connection C2 C4 Non polarized itors for th 2 100n C_1206 C1206 Pr V voltage regulators output Table IV 2 a Kondo Servo Shield V2 BOM 71 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX IV FPGA SHIELD SCHEMATIC Date 7 October 2013 R1 R2 R3 FPGA output port R4 R5 R6 resistors R7 R8 R9 R10 R11 R12 R13 24 10K R_1206 R1206 R14 R15 R16 R17 R18 R19 R20 R21 R22 R24
25. 17 Embedded Multipliers of 18 Bit x 18 Bit 13 PLLs 2 Maximum number of usable Input Output Pins 158 Differential Channels 58 Table 3 3 EP2C5 FPGA characteristics 3 3 INTERFACE SYSTEMS WITH THE PC The communication channel is the Bluetooth Due to this a device which implements the bridge functionalities between the FPGA and the PC is needed The PC has to communicate with a device as the Master of the Bluetooth communications Hence a device as the Slave of the Bluetooth communications have to be connected to the FPGA Figure 3 4 shows a related architecture blocks diagram of the Bluetooth communications Serial Port Terminal USB Communications EP2C5 EP2C8 MINI BOARD ARDUINO TTL Communications TTL Communications Bluetooth SLAVE Oo MASTER BLUETOOTH BLUETOOTH Figure 3 4 FPGA and PC communications diagram Currently there are lots of alternatives for this kind of boards in the market There is a wide range of prices too The main characteristic is the capability of reconfigure its 11 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 parameters Hence two different boards have been selected for implementing the Master Bluetooth communications role and the Slave Bluetooth communications role For the first role the device chosen is the Bluetooth Shield designed to be used with Arduino This board is obtained from ELECFreak
26. 18 R19 C1 C2 C3 Capacitor 8 10u CP 3216 C3216 T C4 C5 C6 C7 C8 T1 T2 T3 NPN Bipolar T4 T5 T6 Transistor T7 T8 T9 T10 T11 19 BC847 SOT23 T12 T13 T14 T15 T16 T17 T18 T19 IC1 IC2 5 V voltage regulator 4 MIC5202 SOT23 5 1C3 ICA 1 i PIN 3X1 PIN 3X1 CON3 3x1 pin strip Servo connector 1 PIN 3X10 PIN 3X10 CONI Servo connector CON2 Servo connector 2 PIN 3X4 PIN 3X4 CON4 Table IV 1 Kondo Servo Shield VI BOM 68 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX IV FPGA SHIELD SCHEMATIC Date 7 October 2013 IV 3 KONDO SERVO SHIELD V2 SCHEMATIC T2 BC847 10K R2 T3 10K BC847 R3 T4 BC847 JON R AIST 10K R5 16 BC847 10K R6 Figure IV 2 Kondo Servo Shield V2 Schematic part 1 69 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX IV FPGA SHIELD SCHEMATIC Date 7 October 2013 T21 BC847 10K Li R21 DBG MEM 330 koj R27 LEDI 330 A 111 R28 LEDZ Bona 10K ne LED R11 _ R29 LEDS 330 bo T12 e 2 R30 LED4 BC847 10K 5 330 vr R12 25AA1024 1 P e R31 LEDS DATA MEM a R T13 ii R32 GR 10K LEDS R13 B2_ R33 LED7 330 gt T14 R34 BC847 10K R34 1608 R14 u R35 LEDS 3309 XX T15 25AA1024 1 P R36 4 BC847 Ka R36 LED10 R15 Pa ADC R37 LEDM 330 T16 PAL Fair 10K R38 LED12 I R16 T17 BC847 10K R17 80847 1
27. 7805 voltage regulator due to the difficulty of soldering a component so small Due to the 7805 33 can provide more current the number of voltage regulators has been reduced too In addition the connections with all the used peripherals have been included e Bluetooth module for servo management e Bluetooth module for debugging 48 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 Data Memory Debug Memory ADC to get voltage values from the long range infrared sensor Short range infrared sensor Triple Axis Accelerometer module Green LEDs to monitor the power supply status at the output of the voltage regulators One LED by each regulator Two LEDs in total e Red LEDs to monitor the transmission lines between the FPGA and the Bluetooth modules Two LEDs by each module Four LEDs in total e Blue LEDs for debugging purposes Six LEDs in total The Kondo Servo Shield V2 PCB without any component is showed in the Figure 5 5 At the left the top of the PCB and at the right of the Figure 5 5 the bottom of the PCB 00000000000000 00000000000000 us o gt 9 0000 800009008 9 Le Loj o o o o o o o o 00000000000000 00000000000000 Figure 5 5 Kondo Servo Shield V2 without components The Kondo Servo Shield V2 with all components mounted is showed in the Figure 5 6 At the left the top of the PCB and at the right of
28. 8 18 2013 45 Byte Paradigm Which Introduction to PC and SPI protocols Website http www byteparadigm com applications introduction to i2c and spi 81 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino REFERENCES Date 7 October 2013 protocols article A A 00255 22 Introduction to SPI and IC protocols html Last visited on 08 16 2013 46 DFRobot robotics related product manufacturer and distributor Website http www dfrobot com Last visited on 08 16 2013 47 ELECFreaks robotics related product manufacturer and distributor Website http www elecfreaks com Last visited on 08 16 2013 48 GitHub Amuthelet Kondo library Website https github com amuthelet kondo Last visited on 08 16 2013 49 Go Lab Project Website http www go lab project eu Last visited on 09 01 2013 50 KONDO KAGAKU CO LTD manufacturer official website Website http kondo robot com Last visited on 08 16 2013 51 Techno Museum Website http www technomuseum org Last visited on01 09 2013 82
29. E Date 7 October 2013 e Measures obtained from the different sensors 1 2 CONTROL SYSTEM WITH FPGA The FPGA will carry out all the processing Hence a complete design of the implemented functionalities will be made to get the following objectives e Get the received commands from the Remote Laboratory server e Send status information to the Remote Laboratory server e Motion e Environment interaction being capable of detecting obstacles ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 2 RESEARCH STAGES Date 7 October 2013 2 RESEARCH STAGES Due to the complexity required by the proposed development it has proposed a strategy to accomplish with this project The original plan is showed along this chapter As it is showed in the next chapters the exposed plan is followed to a greater or lesser extent In the particular cases which it has not been possible due to the founded obstacles the plan had to have been modified A justification has been added where the required some modification The justification includes the detected issue and the adopted strategy re work in order to adapt the current work plan fixing the issue in the best way which was possible 2 1 ORIGINAL CONTROLLER USE In this stage the objective is becoming familiar with the Robot by managing it during simple motion tasks through the test environment or the laboratory Furthermore it was intended to get the serial communication proto
30. E Schematic Fil sss a aos 37 Figure 4 8 EAGLE PCB Fig hasene 37 Figure 4 9 AVS Video Editor Project Manager ccoo 38 5 RESEARCH DETAILED DEVELOPMENT srrnroenvorrnnvenresrervrnsnenvnnsnnvensssresvrnsnensnssnne 39 Figure 5 1 Level voltage adapter circuit schematic sur snnennnnennnensneenennnnen en 40 Figure 5 2 Voltage level adapter prototype CiIrcuit i 41 xi ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Autor Pedro Plaza Merino TABLES AND FIGURES INDEX Date 7 October 2013 Figure 5 3 Kondo Servo Shield VI without components in 47 Figure 5 4 Kondo Servo Shield VI with components nono nonnns 48 Figure 5 5 Kondo Servo Shield V2 without components n 49 Figure 5 6 Kondo Servo Shield V2 with components n 49 Figure 5 7 Kondo Servo Shield V2 integrated on the Kondo 50 Figure 5 8 Master Bluetooth Shield with Arduino MEGA board 51 Figure 5 9 Image of the two wheeled Tobot za ae 52 Figure 5 10 Image of the four wheeled robot nono nonnoo 53 APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR ARDUINO 61 Figure II 1 2 Wheeled Robot flow diagram persi inla ara oa 61 Figure II 2 4 Wheeled Robot flow diagram E a 62 Figure II 3 Bluetooth Master flow diagram ii 63
31. FTWARE ona agenda es da RS 29 4 1 ARDUINO V1 05 DEVELOPMENT ENVIRONMENT 29 4 2 QUARTUS I WEB EDITION 13 0SP1 aussen a e deo 31 4 3 MODELSIM ALTERA STARTER EDITION 13 0 1 232 34 4 4 EAGLE BAD load 36 4 5 AVS VIDEO EDITOR lele 37 5 RESEARCH DETAILED DEVELOPMENT lira 39 5 1 FIRST CONTACT illa 39 5 2 TEST PROTOTYPES MANUFACTURING sosa 40 5 3 FPGA FIRMWARE DESIGN ira 42 SL AC PETR se SN 44 552 IE AA A nase 44 333 DATA MEN TOP arene A ee 44 3 34 DBG BT TOP aa 45 YJ a DEG MEN TO Teo 45 53 60 ER SENSOR TOP spessiel 45 SL MAINS TOR NE 45 5 3 8 POSITION SELECTOR TOP ass 45 33 9 SERVOSCONTROLEER TOP ses 45 53 10 US SENSOR POP onu kE ata 45 5311 ACE DC PACKAGE sss pu ke asas 45 3312 SADC SPI PRAN 45 53213 MEMORY PACKAGE realta 46 5 3 14 POSITION SELECTOR PACKAGE rreereosveevssersvrsersennesnveneessnrensesseenserse 46 5 3 15 R5232 PACKAGE sss ARU VS a 46 54 FPGA SHIELD PCB DESIGN see 46 54 1 KONDO SERVO SHIELD VI sss A AS 47 542 KONDO SERVO SHIELD VI arrecare 48 5 5 ROBOT INTEGRATION TESTS sciita aiar 50 5 6 WHEELED ROBOT TESTS aS 51 5 61 2 WHEELED ROBOT nasse heile 51 5 62 WHEBLEDROBOT lele e oa 53 5 7 GO LAB INTEGRATION TESTS siii 53 5 7 1 ARDUINO MASTER BLUETOOTH ua aaa 54 5 72 GO LAB EMULATED AS A WEB SERVER WAMPSERVER 54 67 CONCEUSIONS ve 55 6 1 GLOBAL VISION sss ss iU NN ala 55 62POSITIVE ASPEG I a
32. ICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 4 4 EAGLE 6 4 0 EAGLE 23 is a powerful and flexible PCB design software This tool is composed by three main windows e Project Manager when EAGLE is started a control panel is showed In this control panel projects can be opened or saved Different program parameters can be also configured The tree structure allows a quick vision of the EAGLE libraries By double clicking on any library its components will be showed In the right side a brief description of the component is showed Figure 4 6 shows how the project manager looks Figure 4 6 EAGLE project manager e Schematic Editor needed components and their connections can be added by using this tool Furthermore all the generated data can be exported directly when the PCB is created from the Schematics Editor When the Schematic Editor and the PCB Editor are open at the same time all changes are directly applied in both Figure 4 7 shows how the Schematic Editor tool looks 36 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 E 1 schemate CAUsersVedro Documents eagle ando Servo Shield Kondo Servo Sted 2 sch EAGLE 640 Light E s for Ele Gar Qaw Mem Jet Library Qptons Mido Help im BUS SOSF su wo zeQa a s OH Ge ax cirio
33. II Logic Analyzer have been used All the implemented functionalities for each block are detailed in the following sub sections 5 3 1 ACC PC TOP This block is in charge of implementing the I2C communications protocol in order to communicate with the Triple Axis Accelerometer ADXL345 and get the inclination for the X Y and Z axis 5 3 2 CTL BT TOP This block is in charge of implementing the communications with the Bluetooth module in order to get the motion commands It implements an RS232 based communications and get the motion commands It has also to send the internal status data within the FPGA 5 3 3 DATA MEM TOP This block is in charge of implementing the communications with the external data memory It has to implement an SPI communications protocol in order to get all the stored data related to the motion With the acquired data the servos will be moved The frames Which will be sent to the Bluetooth module are stored in this memory too 44 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 5 3 4 DBG BT TOP This block is in charge of implementing the communications with the Bluetooth module in order to sent the debug data It implements an RS232 based communications and get the motion commands It has also to send the internal status data related to the debug purposes within the FPGA 5 3 5 DBG MEM TOP This block is in charge of implemen
34. KHR 1HV ODO Loose as 5 Figure 3 2 Coordinate axes for the Kondo KHR 1HV ii 7 Figure 3 3 EP2C5 EP2C8 MINI BOARD 10 Figure 3 4 FPGA and PC communications diagram nme 11 Figure 3 5 Bluetooth Shield for Ardime a nenne 12 Figure 3 6 BT BOARD v1 05 Bluetooth board i 15 Figure 3 7 HC SR04 Ultrasound Sensor cnt 16 Figure 3 8 HC SRO4 Ultrasound Sensor WaveformS i 17 Figure 3 9 10 cm edge detector infrared sensor 18 Figure 3 10 Sharp GP2YOA21 infrared sensor u ie 19 Figure 3 11 Triple Axis Accelerometer ADXL345 une ee 20 Figure 3 12 Logitech Webcam CO tt 21 Figure 3 13 Wifi webcam APM JP4045 WS i 22 Figure 3 14 Cable for the Wifi webcam APM JP4045 WS cic iiciicciiciinia 22 Figure 3 15 1300 mAh and 11 1 V LIPO battery una aa 24 Figure 3 16 1300 mAh and 7 4 V LIPO Balletto ee 25 Figure 3 17 LIPO battery charging SS 26 Figure 3 18 LIPO batteries monitoring devices u ea 27 4 USED SOFTWARE use 29 Figure 4 1 Arduino Development Environment i 29 Figure 4 2 Design flow diagram using QUARTUS I 32 Figure 4 3 QUARTUS II WEB EDITION 13 0SP1 esee esee sees seessneseeeee e 33 Figure 4 4 MODELSIM ALTERA STARTER EDITION 13 0 1 232 35 Figure 4 5 ModelSim simulation results aan en a 35 Figure 4 6 EAGLE project Manager ein 36 Figure 4 7 EAGL
35. Master Slave It allows the using of Arduino digital pins as software emulated serial port Furthermore the Arduino Hardware port can be used This board is composed by an HC 05 chip which is the SPP Bluetooth module Its use is very easy and it is designed to get a transparent wireless serial connection It can be configured in three different modes in Master mode in Slave mode or in Loop mode It will connect with other devices which allow SPP as configured protocol 30 Figure 3 6 shows an image of the Bluetooth to TTL interface board 14 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 3 USED HARDWARE Date 7 October 2013 aze ku i TT TIOJ rare s N JY MCI L se 0 ma _ INI 5 N LL I rx Dem le V TET R XI I eron r tyt P F 21 Figure 3 6 BT BOARD v1 05 Bluetooth board This board presents the showed characteristics in the Table 3 5 BI h v2 0 EDR Bluetooth Protocol i y ii Specifications Frequency ISM band at 2 4GHz GFSK Gaussian Modulation Frequency Shift Keying Emission Power lt 4dBm Class 2 Sensibility lt 84dBm fora BER of 0 1 Asynchronous Transmission rate DD Synchronous 1Mbps 1 Mbps Safety AuDEDu ICH y encryption Profiles Master Slave or Loop Power Supply 3 3 V SV Consumption 50 mA Working temperature from 20 C to 75 C Size 46x16x4 mm Author Pedro Plaza Merino Table 3 5 Bluetooth to TTL
36. NIC S A San Fernando de Henares Spain October 2009 to May 2013 Invensys Rail Dimetronic is the leading rail signalling company in Spain and Portugal with over 50 years of experience at the forefront applying the most advanced technology to integrated traffic safety and control for rail signalling R amp D Project Engineer e Design implementation and verification of industrial equipment e Client liaison regarding to technical assistance about company products e Collaborate in critical facility projects Microelectronic Design and Application Group Legan s Spain 2007 to 2010 The Microelectronics group is framed in the Department of Electronic Technology at the Carlos III University of Madrid and its scientific and technical activity has a strong applied so that its developments are driven by the needs of a market that moves very quickly It comprises industrial and telecommunications engineers and graduates in physical sciences and mathematics All have extensive training and experience in the industry qT ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX VI CV DEL AUTOR Date 7 October 2013 Scholarship holder e Fault injection test based on the emulation with FPGA of a Turbo Decoder made by Thales Alenia Aerospace Company e Build a Graphic User Interface to communicate via USB a personal computer and the Autonomous Emulator e Modify Autonomous Emulator to communicate via USB with per
37. PACKAGE This package contains all the constants needed for the implementation of the DC communications with the Triple Axis Accelerometer ADXL345 5 3 12 ADC SPI PACKAGE This package contains all the constants needed for the implementation of the I2C communications with the ADC 45 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 5 3 13 MEMORY PACKAGE This package contains all the constants needed for the implementation of the SPI communications with the EEPROM memories 5 3 14 POSITION SELECTOR PACKAGE This package contains all the constants needed in the conversion of the angle required for the servo and the pulse width to be applied 5 3 15 RS232_ PACKAGE This package contains all the constants needed for the implementation of the RS232 communications 5 4 FPGA SHIELD PCB DESIGN Due to the huge number of additional components needed in the board used to interface the FPGA the servos and the different peripherals used it has been decided the developing of a PCB which holds all of them Getting advantage of using a PCB mounting surface components SMD has been selected in order to reduce as much as possible the board size During this stage different version have been developed Hence all of them are mentioned and different sub sections have been included with the aim of showing their particularities As CAD PCB design tool different alte
38. TOP vhd 8 UnitControl TOP TB vhd 08 10 13 09 39 16 PM 08 14 13 10 01 28 AM 08 15 13 01 21 50 PM 10 08 04 13 10 06 32 PM 11 08 15 13 12 57 02PM 12 08 10 13 10 13 49 PM 13 08 08 13 07 38 29 PM 14 08 15 1301 22 53PM 15 08 13 13 10 18 47 PM P P P PIR KISIS SSS SS SSS Aea Be gt QQ QQ QQ QQ QQ 4 FA Transcript HX Project Unitcontrol lt No Design Loaded gt lt No Context gt 34 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 4 USED SOFTWARE Author Pedro Plaza Merino 7 October 2013 Date Figure 4 4 MODELSIM ALTERA STARTER EDITION 13 0 1 232 After a simulation process the tool will show the output waveforms obtained as the simulation result Figure 4 5 shows an example of simulation where resulting waveforms can be seen r gu Wave Eile Edit View Add Format Tools Bookmarks am Wave Default Window Help B SS KRG mi T ER 100 pod METTE LY FS tita Rugaj p LENELI F at Be Ed Search gt gt gt l Z mim dd A AAA AAA J 4 4 4 4 4 4 4 4 4 s 4 4 4 4 s 4 4 4 4 4 4 4 s 4 4 4 y 4 4 4 4 emo eve funitcontrol top tb CLK SOMHZ funitcontrol top tb nRESET funitcontrol_top_tb LED_2 funitcontrol_top_tb LED_4 funitcontrol_top_tb LED_5 funitcon
39. Table 3 2 Orientation and spin relationships for Kondo KHR 1HV servos 8 Table 3 EP2C5 FPGA characteristics antenne 11 Table 3 4 Bluetooth Shield for Arduino characteristics i 13 Table 3 5 Bluetooth to TTL interface board characteristics rennen 15 Table 3 6 HC SR04 sensor characteristics u 17 Table 3 7 Short distance infrared sensor specificationS i 19 Table 3 8 Sharp GP2Y0A21 specifications viii ir MAKS a ralas 20 Table 3 9 Triple Axis Accelerometer ADXL345 specifications i 21 Table 3 10 EEPROM 25AA1024 Memo ys aan 23 Table 3 11 MCP3001 ADC characteristics nn 23 Table 3 12 1300 mAh LIPO characteristics 24 Table 3 13 1300 mAh LIPO battery characteristics cia 25 5 RESEARCH DETAILED DEVELOPMENT rire 39 Table 5 1 Components power supply voltage level ii 40 APPENDIX IV FPGA SHIELD SCHEMA TIC une 67 Table IV 1 Kondo Servo Shield VI BOM u a nine 68 Table IV 2 a Kondo Servo Shield V2 BOM i 71 Table IV 2 b Kondo Servo Shield V2 BOM rrrrerrrrrerererererererererererererererererererevevereverer 72 Table IV 2 c Kondo Servo Shield V2 BOM i 73 ix ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Autor Pedro Plaza Merino TABLES AND FIGURES INDEX Date 7 October 2013 FIGURES 3 USED HARDWARE nn 5 Figure 3 1 Kondo
40. accelerometer This feature increase the advantages for this board because of the additional required Hardware is reduced according to the Master s Dissertation specifications As the first approach the first option has been chosen because of it is the most economic from the mentioned alternatives Figure 3 3 shows an image of the selected board for the development of this Master s Dissertation In the upper part of the Figure the top view of the board can be seen and in the lower part of the Figure the bottom of the board can be seen ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 SERRANO EP2C5 EP2C8 MINI et 2 Do 4 sus ne n ua si hs dp songs gt S E e un ewer AVO oO EE JE JE JETS 3 3 5 Figure 3 3 EP2C5 EP2C8 MINI BOARD The Cyclone series are the lower cost FPGAs in the industry Their power consumption are the lower too and they are perfect for great volume and cost sensible applications This class of FPGAs provides a wide range density memory and integrated multipliers The FPGA used is the EP2C5 with a 144 pin TQFP which presents the characteristics shown in the Table 3 3 10 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Logic Elements 4 608 RAM MAK Blocks 4 kbits 512 Parity Bits 26 Embedded Memory Kbits 1
41. ages have to be transmitted to the user It has been chosen an economic option which allows watching the robot and does not requires a high bandwidth minimizing the issues related to undesired delays Logitech Webcam C170 combines a small cost and an adequate quality from the evaluated devices Figure 3 12 shows an image of the Logitech Webcam CI70 Figure 3 12 Logitech Webcam C170 3 45 ROBOT LOCATED WEBCAM The other adopted option is providing with a first seeing vision to the robot Hence a Wifi webcam with a reduced size and weight has been included The device is the security webcam APM JP4045 WS from the manufacturer Apexis Figure 3 13 shows an image of the Wifi webcam APM JP4045 WS 21 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Figure 3 13 Wifi webcam APM JP4045 WS This webcam can be located in any place without any additional connection due to it is a Wifi webcam which can be powered by using an external battery The battery have to provide a 5 V voltage The batteries used during this Master s Dissertation provide 7 4 V and 11 1 V The solution adopted is using a 5 V regulator the LM7805 which has been integrated as part of the cable Figure 3 14 shows an image of the mentioned cable Figure 3 14 Cable for the Wifi webcam APM JP4045 WS 22 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 3 USED HARDWARE Author Pedro Plaza Meri
42. als A system which can be used as robotic and FPGA educational behaviour but with the enough flexibility to be used with other robots different than the humanoids The adaptation have to be simple The specifications are the following o It can be manage up to 24 servos o 8 input channels for analogue signals with a connector which holds sensors Signal Vcc and GND o 8 input channels for digital signals with a connector which holds sensors Signal Vcc and GND o One LED branch which can be used for debugging or showing status information o 2 ways of Bluetooth interface o 2 EEPROM memories e Modify the educational environment in order to be able of develop robotic experiments It has to be enough flexible with the servo management and allowing the student the motion modification executed by the robot controller e Modify the educational environment in order to be able of develop FPGA experiments It has to be enough flexible allowing the student modify the content of the FPGA firmware e Investigate about other platform different than Arduino which does not require a PC as host In this way the server of the remote laboratory does not need anything more than a power supply and an internet connection using a Wifi router The following options are presented as the basis of the server for the remote laboratory o Wifi Shield with Arduino 56 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 6 CONCLUSIONS
43. an easy transition from one motion stage to other one Each motion stage points to the next motion stage Furthermore a new column was added with the aim of indicating how much time the controller has to spend in that motion stage f Table adapted to be used with the new hardware for servo management Kondo Servo Shield V2 g Migration of the table into the EEPROM data memory Again the FPGA resources were released This change allow more flexibility when it is intended the using of debugging tools 3 Firmware for FPGA peripheral management Due to its simplicity this firmware has not been modified so much from its first version The only one modified aspect was the Triple Axis Accelerometer ADXL345 interface complexity found It was intended to develop by following the manufacture s specifications found in its datasheet but no one progress was get Hence this peripheral was managed by using an Arduino board and the communications were replicated within the FPGA in order to generate similar waveforms related to clock and data lines The whole basic functionalities are summarized in the following bullets e PWM modulation to manage the 21 servos of the robot e Read of the obtained sensor measures gt Ultrasound sensor gt Edge detector infrared sensor gt 10cm to 80 cm range infrared sensor gt Triple Axis Accelerometer e Bluetooth communications with Arduino board e Motion functionalities gt Moving a limb of the upper sid
44. artus II Block Editor Text Editor MegaWizard Plug In Manager and EDA design entry tools to create design files in a project An schematic or block designs can be created with the Block Editor or some Hardware Description Language designs with the Quartus II Text Editor The MegaWizard Plug In Manager helps to create design files with customized mega functions by using the Library Parameter Modules LPM or the Intellectual Property IP functions e Synthesis the analysis and synthesis module can be used in order to analyze the design files and creating a database of the project Quartus II integrated analysis and synthesis tool is used to synthesize the Verilog design files v and the VHDL design files vhd e Place amp Route the Quartus II Fitter tool implements the place and route commonly known as fitting After a database has been created by the Analysis and Synthesis stage the Fitter is focussed on fit with the resources limitation of the objective device During the fitting stage the best location for the described logic is performed as the place and route process The interconnection paths and pin assignments are selected too This stage is composed by the following sub stages o Power Analysis o Debugging o Engineering Change Management o Timing Closure e Timing Analysis the TimeQuest allows a timing analysis in order to detect synchronization issues This analyzer uses the industry standard Synopsys Design Constraint
45. at to the LSB Table 3 11 MCP3001 ADC characteristics 3 7 POWER SYSTEM Due to the wide range of voltages used by the different devices and the fact of the needed of an enough autonomy of the system a LIPO battery has been chosen as the 23 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 common power source This type of power system has been inherited from the Kondo power system This battery presents the characteristics showed in the Table 3 12 Capacity 1300 mAh Output Voltage 3S1P 3 Cells 11 1 V Weight 101 g Size 76x19x35 mm Table 3 12 1300 mAh LIPO characteristics In order to connect easily the output voltage connector has been replaced by a 3 5 mm Jack connector Furthermore a Velcro strip has been added as temporal or permanent fastening Figure 3 15 shows an image of the battery Figure 3 15 1300 mAh and 11 1 V LIPO battery During the development several issues were found with the 11 1 V voltage level at the FPGA side Hence a two cells LIPO battery was used Its characteristics are showed in the Table 3 13 24 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Capacity 1300 mAh Output Voltage 2S1P 2 Cells 7 4 V Weight 86 g Size 85x34x16 mm Table 3 13 1300 mAh LIPO battery characteristics As per the 11 1 V batter
46. battery This cable is built in a 5 V voltage regulator 5 6 WHEELED ROBOT TESTS In order to not damaging the humanoid robot during the communication test a wheeled robot has been built For this purpose an Arduino MEGA board has been used as the processor located in the robot 20 In a first approach it was intended the using of an Arduino UNO board 21 but more ports than the available were need and the first mentioned option was chosen During this programming stage the Arduino website 19 was used as language reference 5 6 1 2 WHEELED ROBOT A basic robot kit was used as basis It is completely extendable due to it includes two drilled boards at two levels integrated with the aim of adding components Two rubber wheels and a ball caster at the rear for easy steering are included too 51 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 An Arduino UNO board was used to manage this robot A Shield to control two motors was integrated in the board which provides up to 2 A The description of the 2A Motor Shield For Arduino is detailed in the following paragraph It is built in an L298P chip which allows the management of two motors with a voltage from 7 to 12 V and a current up to 2 A This Shield can be mounted directly either on the Duemilanove or the Arduino Mega boards The speed control is carried on conventional PWM which can be gotten from t
47. been carried out the next proposed step is becoming familiar with the humanoid robot For this purpose some motion tasks have to be implemented in the test environment or the laboratory Furthermore the serial communication protocol used by the original controller is intended to be obtained in order to apply the commands to the humanoid robot servos by using just three cables as the physical connection The use of the original controller has been tried taking as reference the documents 25 and 29 but the connection was not detected The tests were carried out with Windows XP and Windows 7 operative systems In order to get the serial communication protocol an open source alternative for the control of the servos has been used This option is the Kondo library developed by Amuthelet see 48 but due to the complexity of the source this alternative has been discarded too At this point the only one possible option is managing the servos by using the Pulse Width Modulation PWM According to the manufacturer this servos are capable to recognize PWM position commands in the same range used by the radio control servos e Minimum pulse width equal to 700 us e Maximum pulse width equal to 2 3 ms e Pulse frequency equal to 20 ms Other detected issue was the different power supply of some components Table 5 1 summarize the voltage level of the power supply needed for each component 39 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Auth
48. col used by the original controller to manage the servos of the robot The robot communication will be limited to the controller programming in order to accomplish the objectives of this stage 2 2 FPGA BOARD AS CONTROL SYSTEM USE In this stage the control system is replaced by the FPGA getting the same milestones presented in the previous stage The increase in the research is obtained by adding the following functionalities e Interaction with the environment with detection and stability sensors e Wireless communication inclusion by means of Bluetooth 2 3 INTEGRATION AS PART OFA REMOTE LABORATORY In the last research stage all implemented control systems are integrated with a remote laboratory in order to provide that this control system can be used as part of an educational environment Once this point is reached and the founded difficulty has been properly analyzed the motion requirements of the Robot will be adjust by increasing the Robot interaction capabilities with the remote laboratory and the environment in the case that it will be affordable ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 3 USED HARDWARE A wide range of devices have been used in order to achieve the suggested objectives In this chapter all of them are described as part of the complete development Furthermore several prototypes has been manufactured but they are detailed in the correspo
49. d sensor HC SRO4 is based on the sonar technology with the aim of detecting an object as bats and dolphins do that This sensor provides an excellent object detection without contact The data is gotten with an excellent precision and stable reads in a very easy format to be used Its range is from 2 cm to 400 cm When this device is used there is not issues about the colour of the object or the material of the object as it occurs when other sensor are used On the contrary the measures quality can be jeopardised in the particular case that other ultrasounds sensors are working in its field of action Figure 3 7 shows an image of the ultrasound sensor Figure 3 7 HC SRO4 Ultrasound Sensor 16 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 This sensor presents the showed characteristics in the Table 3 6 Input Voltage from 4 5 V to 5 5 V Average current consumption 15 mA Ultrasound frequency 40 KHz Effectiveness angle lt 15 Working range from 2 cm to 400 cm Resolution 0 3 cm Measurement angle 30 degrees Input trigger pulse width 10 us TTL signal Output echo signal according to the sample Size 29 5x13 0x13 5 mm Weight 15 g Table 3 6 HC SR04 sensor characteristics In order to get distance measures with this sensor a 10 us pulse is needed to be sent at TRIG terminal The HC SR04 sensor generates a pulse width accord
50. e gt Trunk rotation gt Walking on a selected direction e Obstacle detection This includes the avoiding of the obstacles when they are found in front of the selected path The architecture has been built in a maximum of three levels The higher level is the corresponding to the FPGA Input Output ports and the lower level is intended for the blocks which implement the most basic tasks Along this work the firmware has been evolving according to the external Hardware connected to the FPGA which was available during the different sub stages In the following list all the hierarchical levels of the firmware final version are shown e UnitControl_ TOP gt ACC_PC_Top gt CTL_BT_Top 43 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 1 CTL BT Main Control 2 CTL BT RX Machine 3 CTL BT TX Machine gt Data Mem Top gt DBG BT Top 1 DBG BT Main Control 2 DBG BT RX Machine 3 DBG BT TX Machine gt DBG Mem Top gt LIR Sensor Top Mam Top gt Position Selector Top 1 Position Selector ROM gt Servo Controller Top US Sensor Top e Packages ACC I2C Package ADC SPI Package Memory Package Position Selector Package RS232 Package vvvvv During the evolution of the firmware either the simulation tool mentioned in the previous chapter and the logic Analyzer provided by Altera Quartus II tool SignalTap
51. e http arduino cc en Guide Environment Last visited on19 08 2013 19 Arduino Language Reference Website http arduino cc en Reference HomePage Last visited on19 08 2013 20 Arduino Mega 2560 Reference Website http arduino cc en Main ArduinoBoardMega2560 Last visited on19 08 2013 21 Arduino Uno Reference Website http arduino cc en Main ArduinoBoardUno Last visited on19 08 2013 22 ByteBlaster II Download Cable User Guide Altera Corporation May 2013 23 EAGLE EASILY APPLICABLE GRAPHICAL LAYOUT EDITOR Manual Version 6 CadSoft Computer Ist Edition 2011 24 HC 03 05 Embedded Bluetooth Serial Communication Module AT command set Last revised April 2011 25 KHR 1 Hardware Manual KONDO KAGAKU CO LTD Sep 2004 26 Quartus II Handbook Version 13 0 0 Volume 1 Design and Synthesis Altera Corporation May 2013 80 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino REFERENCES Date 7 October 2013 27 Quartus II Handbook Version 13 0 0 Volume 2 Design Implementation and Optimization Altera Corporation May 2013 28 Quartus II Handbook Version 13 0 0 Volume 3 Verification Altera Corporation May 2013 29 RCB 1 Software Manual KONDO KAGAKU CO LTD Sep 2004 30 Roving Networks BluetoothTM Product User Manual Advanced User Manual rn bluetooth um Version 4 77 11 21 2009 31 Using ModelSim to Simulate Logic Circuits for Altera FPGA Devices Altera Corporation
52. emonstrate that great investments are not required to reach it From the above it is extracted the scope of this research which is composed by the following objectives e Making a system which is able to be used with educational purposes as part of the Go Lab Project 49 e Designing a robotic system which main control component is an FPGA For this it will be necessary the settling on the robotic system and the required hardware to be used by the FPGA The control system to be used as reference is the one based on a commercial humanoid robot based on servos 1 1 EDUCATIONAL ENVIRONMENT The educational environment which will be implement should be formed mainly by an interface with the aim of the students are able to interact with the robot by using simple commands in order to the robot performs different functionalities such as e Joint movement e Movement it should be able to detect and avoid obstacles which can be in its way e Communicate with a PC the PC will send commands and the system will send status information to the PC e The system should be watched by using a webcam connected to the PC e Optionally a camera could be included as part of the robot This feature adds a realistic first person view point to the students Furthermore the system will send the following status information e Commanded angle for each servo ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 1 RESEARCH SCOP
53. er Slave or Loop Power Supply 33V 5V Consumption 50 mA Working temperature from 20 C to 75 C Size 56x46x20 mm Table 3 4 Bluetooth Shield for Arduino characteristics The default settings of this Shield are Slave mode and transmission rate of 38400 bauds To be used the configuration parameters have to be modified to Master mode and transmission rate of 115200 bauds For this operation the AT mode have to be used This mode allows the reconfiguration of the HC 05 chip parameters as per device s name serial port transmission rate Bluetooth communications role and much more parameters which are out of the scope of this Master s Dissertation Only the transmission rate and the role will be modified The following steps are required to get into the AT mode Paso 1 Set the input port PIN34 at low level This is made by moving the switch to the L position and the jumper in the SW position Paso 2 Power on the board Paso 3 Set the PIN 34 at high level Note that the serial port transmission rate is the same that the transmission rate configured for the communications in this case 38400 bauds The following steps are required to configure the parameters Paso 1 Set the PIN 34 at high level Paso 2 Power on the board The module enters in the working mode command response Paso 3 Configure the PC terminal with the following parameters 13 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza
54. er to connect the FPGA and the servos Furthermore during the stage which this prototype was made the number of servos was not correct This prototype is able to manage just 19 servos instead of the real number of servos which compose the robot the humanoid robot is composed by 21 servos 5 3 FPGA FIRMWARE DESIGN The FPGA firmware has been described by using the Hardware Description Language VHDL 3 Along the firmware design stage the Altera recommendations have been used either for the design and synthesis 26 and during the implementation optimization 27 and the verification 28 s it was mentioned along this document the unit control of the system is the FPGA In order to develop all required functionalities it was needed the implementation of some kind of firmware which has to be able to manage the peripherals and the robot During the development the firmware has been evolved depending on the occurred events in order to adapt the required aspects and the new proposed strategies It should be noted the following main groupings 1 Firmware for Bluetooth communications this firmware is in charge of communicate all the logic within the FPGA with the Bluetooth module connected to it In first iterations a simple solution was adopted which presents a basic functionality In future stages the functionality was modifying according to the found needs Finally a more complex firmware was developed which fits with the final required
55. es Logic components and interconnections now presents delays during the signal propagation through them when any stimuli is applied In addition to check the logic working the signal propagation is included This type o simulation is more realistic than the previously mentioned simulation Nevertheless the computational cost is greater than the one required by the functional simulation Figure 4 3 shows how Modelsim looks IM ModelSim ALTERA STARTER EDITION 10 1d Custom Altera Version iii 2 r ko Ek File Edit View Compile Simulate Add Project Tools Layout Bookmarks Window Help a suse inos jo arm SHAR a tita t A aaea pn Columntayout a11Columna H Project C JUsers Pedro Documents Master UNE G name StatugType _ On 3 Modified _ 08 13 13 10 05 05 PM O 08 15 1307 30 37PM 1 08 14 13 09 50 26 AM 2 08 11 13 12 56 51 AM 3 08 10 13 08 57 02 PM 4 08 10 13 09 33 09 PM 5 08 10 13 08 56 31 PM 6 08 10 1309 30 53 PM 7 8 9 Layout NoDesign UnitControl TOP TE do 8 Position Selector Package vhd Y 8 12C_Package vhd 8 RS232 Package vhd 8 CTL_BT_RX_Machine vhd 9 CIL BT TX Machine vhd 8 DEG BT RX Machine vhd 8 DEG BT TX Machine vhd 8 CL 87 Main Contral vhd 8 DEG ET Main Control vhd 9 Position Selector Top vhd 8 Servo Controller Top vhd 8 12 Top vhd 8 DEG BT Top vhd le CN ET Top vhd 9 UnitControl
56. he Arduino PWM output ports 5 and 6 The Arduino output ports 4 and 7 are used to enabling disabling the motor control The Shield can be powered directly from the Arduino board or by using an external power supply device It is highly recommended the using of an external power supply in order to provide the power to the Motor Shield The communication channel is Bluetooth Using this channel the device can be easily controlled from any place and from any device such as an Smartphone a PC with a Bluetooth communication port or other Arduino board which includes a Bluetooth board attached to it In this project the attached board is the JY MCU Bluetooth Wireless Serial Port Module for Arduino Works with Official Arduino Boards this Bluetooth board presents four terminals to be connected to any device which works with TTL voltage levels All the system has been powered with a 7 4 V LIPO battery which presents the characteristics summarized in the chapter 3 Figure 5 9 shows an image of the two wheeled robot Figure 5 9 Image of the two wheeled robot 52 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 In the first approach a simple Arduino project was implemented The implemented functionality was listening the Bluetooth channel an accept any command When some command is received the robot will move straight In this way when a command is sent from an S
57. he development were the following e Inthe Tool menu o Serial Monitor it shows the sent data through the serial port to the Arduino board USB or serial board In order to send data to the board the text has to be written and the Sent bottom has to be clicked or by pressing Enter key The transmission frequency can be selected in order to match with the frequency configured in the board serial port Serial begin in the Sketch o Board it is used to select which board is being used o Serial Port this menu contains all the serial devices real or virtual connected to the PC e Quick Access Buttons o Verify it checks the absence of errors in the code o Load 0 it compiles the code and it loads the result into the Arduino board 30 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 4 USED SOFTWARE Date 7 October 2013 4 2 QUARTUS II WEB EDITION 13 0SP1 This design software from Altera Inc provides a complete FPGA development environment multiplatform which adapts easily to the design specific needs It includes solutions for all the design stages for FPGA and CPLD 26 27 y 28 The design stages are showed in the Figure 4 2 and they are summarized in the following bullets e Design Entry a Quartus project includes all the design files firmware files and all the other related files which are needed in order to implement a design in a logic programmable device It can be used the Qu
58. ing to the distance of the detected object through the ECHO terminal after all internal actions have been made e Between 150 us and 25 ms Distance in centimetres is equal to the time of the pulse divided by 58 e 38 ms when any obstacle is not detected Figure 3 8 shows an application example Between 150 us and 25 ms 38 ms when there i1Qus lis not any object Ei a I TRIG ECHO Internal TANN Figure 3 8 HC SRO4 Ultrasound Sensor waveforms 3 42 INFRARED SENSORS The first sensor used is a board which is composed by a edge detector sensor manufactured by DFRobot 46 Figure 3 9 shows an image of the short distance infrared sensor 17 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Figure 3 9 10 cm edge detector infrared sensor Its specifications are listed in the Table 3 7 18 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 3 USED HARDWARE Author Pedro Plaza Merino Date 7 October 2013 Input Voltage from 2 7 V to 6 2 V Average current consumption lt 10 mA Working range from 1 cm to 10 cm Output type Digital Voltage Signal voltage level Vcc 0 6 V high level y 0 6 V low level Size 35x10x15 mm Weight lt 5g Table 3 7 Short distance infrared sensor specifications The other used infrared sensor is the Sharp GP2Y0A21 37 The working range of this sens
59. interface board characteristics The default settings of this Shield are Slave mode and transmission rate of 9600 bauds To be used the configuration parameters have to be modified to a transmission rate of 115200 bauds For this operation the AT mode have to be used 15 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 The following steps are required to configure the parameters Paso 1 Power on the board The module enters in the working mode command response Paso 2 Configure the PC terminal with the following parameters a Transmission rate 38400 bauds b Data bits 8 bits c Stop bits I bit d Parity no parity a Flux Control without Flux Control Paso 2 Check that all is configured and connected properly For this purpose AT is sent and the expected response from the device is OK r n Paso 3 Send the characters AT BAUD8 and the expected response from the device is OK115200 r n Once all the above steps have been fulfilled and both devices are powered on the Master and the Slave are able to exchange data 3 4 INTERFACE AND OBJECT DETECTION SYSTEMS In order to interact with the behaviour a sensorial device is needed It has been chosen different object detection sensors such as two infrared sensors and a ultrasound sensor During this section the different particularities for all of them are detailed 3 4 1 ULTRASOUND SENSOR The ultrasoun
60. intervals ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 It is important that the pulse have to be sent continuously when it is needed that the servo keeps its position for a time In this way if any load is forcing the servo to leave its position when the servo is commanded continuously it remains in its current position When the pulses are not sent to the servo or the interval between two pulses is longer than the maximum then the servo does not apply any strength to keep its position and any external load can modify the servo position 3 2 CONTROL BOARD WITH FPGA There are three alternatives to be used as the control board e EP2C5 EP2C8 MINI BOARD with an Cyclone II Altera FPGA e MOJO V2 Board with an Spartan 6 LX9 Xilinx FPGA e DE O Nano Board from Terasic with an Cyclone IV Altera FPGA The first option is the most economic but that board requires more additional Hardware too Due to it does not include any Analog to Digital converter the other boards include the ADC Other disadvantage is the one which can be presented during the Master s Dissertation and it is the limitation of memory resources This problem will be hard to occur if the Mojo Board or the DE 0 Nano Board is used instead of the EP2C5 EP2C8 MINI BOARD One advantage of the DE 0 Nano board is that this board includes an SRAM as part of the board In addition the DE 0 Nano Board includes an 3 axis
61. ion technology Telecommunications and information exchange between systems Local and metropolitan area networks Specific requirements Part 15 1 Wireless Medium Access Control MAC and Physical Layer PHY Specifications for Wireless Personal Area Networks WPANSs D ARTICLES 6 ARTICLE 1 Terms and Definitions life itu ch HTML International Telecommunication Union 19 October 2009 1 15 industrial scientific and medical ISM applications of radio frequency energy Operation of equipment or appliances designed to generate and use locally radio frequency energy for industrial scientific medical domestic or similar purposes excluding applications in the field of telecommunications 7 C A A Calderon R E Mohan and Changjiu Zhou Recognition and generation of motion primitives with humanoid robots IEEE ASME International Conference on Advanced Intelligent Mechatronics 2009 8 G Breed Bit Error Rate Fundamental Concepts and Measurement Issues High Frequency Design pages 46 48 January 2003 9 H Kitano and M Asada Robocup humanoid challenge that s one small step for a robot one giant leap for mankind IEEE RSJ Inter Conf on Intelligent Robots and Systems pages 419 424 1998 79 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino REFERENCES Date 7 October 2013 10 M Al Mouhamed and U F Siddiqi Performance evaluation of auctions wlan for robocup mu
62. it is only valid for the used humanoid robot and the servos used as reference The presented solution is 55 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 6 CONCLUSIONS Date 7 October 2013 strongly focused on these particular elements If the humanoid robot is changed for other alternative the adaptation can be complex due to the position of all servos have to be re calibrated to get the correct motion e Furthermore the increase of the servos is not allowed while the PCB and firmware is not modified e Same issue is found if any new sensor is intended to be included or more sensors are intended to be included e The regulator of the FPGA board was an important issue which does not allow a voltage over the 5 V e The small size of some Surface Mounting Components was very problematic during the manufacturing of the board Issue which was solved by changing the size of that components 6 4 APPROCHES FOR FUTURE WORK After a detailed analysis of the negative aspects and having into account the learned lessons the following research lines are proposed e Make an evolution in the firmware with the aim of including new movements with the current commands and using new one commands e Add the calibration option for different servos and different humanoid robots e Include interaction options within the laboratory environment e Develop a new board which includes the FPGA the servo interface and the peripher
63. l includes a modular compiler This compiler includes the following modules modules marked with an asterisk are optional during the compilation process depending on the configuration Analysis amp Synthesis Partition Merge Fitter Assembler TimeQuest Timing Analyzer Design Assistant EDA Netlist Writer HardCopy Netlist Writer Figure 4 3 shows how Quartus II looks 32 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 4 USED SOFTWARE Quartus I 64 Bit C Us C Users Pedro Documents Master_UNED FP Ele Edit View Project Assignments Processing Tools Window Help amp DU saa e UnitControl Wr reye Orv UU Project Navigator FAX Entity di Cydone II EP2C5T144C8 gt amp bd UnitControl TOP ta El ries Designunits p 20x Compilation T Customize Task 4 Compile Design Analysis amp Synthesis D Fitter Place amp Route P TimeQuest Timing Analysis P EDA Netlist Writer Y Y Y y Y Y Program Device Open Programmer Assembler Generate programming files 0q m og od Q Compilation Report UnitControl a 3 5 Flow Summary Table of Contents Flow Status Quartus II 64 Bit Version Revision Name Top level Entity Name Family Device Timing Models Total logic elements Total combinational functions Dedicated logic registers Total registe
64. lti robot cooperation The 7th ACS IEEE International Conference on Computer Systems and Applications AICCSA 2009 page 610 615 2006 11 N Sugiura and M Takahashi Development of a humanoid robot simulator and walking motion analysis Inter Conf on Simulation Modelling and Programming for Autonomous Robots Workshop Proceedings of SIMPAR pages 151 158 2008 12 G Rostky July 2 2002 Remembering the PROM knights of Intel EE Times 13 S Behnke Online trajectory generation for omnidirectional biped walking Proceedings of the 2006 IEEE International Conference on Robotics and Automation ICRA 06 pages 1597 1603 2006 14 S Kajita et al Biped walking pattern generation by using preview control of zero moment point Proceedings of the 2003 IEEE International Conference on Robotics and Automation 2003 15 S Ogura S Ando H O Lim and A Takanishi Sensory based walking motion instruction for biped humanoid robot Inter Journal on Robotics and Autonomous Systems 48 4 223 130 2004 16 D Sweeney An introduction to bluetooth a standard for short range wireless networking Proceedings 15th Annual IEEE International ASIC SOC Conference Rochester NY USA 25 28 Sept 2002 pp 474 475 2002 17 G Tong Z Shao and X Chen A HiFi 3D simulator for humanoid robot soccer IEEE International Conference on Information and Automation pages 804 808 2008 E MANUALS 18 Arduino Development Environment Websit
65. martphone the robot will move In the second iteration more motion options were added go straight go back and spin in both directions With this program the command recognition was reached 5 62 4 WHEELED ROBOT With the aim of including the infrared sensors and the Wifi webcam the robot mentioned above was discarder in order to get other platform which can hold more weight An extra space was an additional reason to migrate the research to the 4 wheeled robot Two additional motor have to be managed Due to this an extra Motor Shield was included The Shields were stuck one above the other Figure 5 9 shows an image of the four wheeled robot Figure 5 10 Image of the four wheeled robot 5 7 GO LAB INTEGRATION TESTS During this stage an environment was developed in order to emulate the remote laboratory In the first approach the communications were carried out by using a PC serial port and after that the last stage the commands were sent by using a web browser 53 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 5 7 1 ARDUINO MASTER BLUETOOTH At this point the Arduino MEGA board is used with a Bluetooth Shield configured in Master mode and paired with other Bluetooth board which is connected to the FPGA In this way the commands are sent from a serial terminal in the PC The data is driven by the Arduino board and the data is driven
66. mic acceleration resulting from motion or shock Its high resolution 4 mg LSB enables measurement of inclination changes less than 1 0 34 Furthermore several special functionalities are included such as activity or inactivity detection in order to detect the presence or absence of movement It can also be configured to detect accelerations over a threshold defined by the user in any of the axes The free fall function can be configured too when is important to know if the device is falling All of the above functionalities can be driven by one of the two interrupt pins There is a 32 level FIFO buffer with the aim of storing data With the use of the FIFO the interaction with the processor can be minimized Low power mode allows the using of this sensor reducing the power consumption Figure 3 11 shows an image of the Triple Axis Accelerometer ADXL345 Figure 3 11 Triple Axis Accelerometer ADXL345 Its specifications are listed in the Table 3 8 20 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 3 USED HARDWARE Author Pedro Plaza Merino Date 7 October 2013 Input Voltage from 3 V to 5 V Resolution 13 bits 4 mg LSB Working range 16g Communication SPI IIC Output Data Format L complement format Table 3 9 Triple Axis Accelerometer ADXL345 specifications 3 4 4 WEBCAM CONNECTED TO THE PC BY USB With the aim of watching the robot remotely a camera is needed The obtained im
67. nao a arie 55 6 3 NEGATIVE ASPEC Siria 55 6 4 APPROCHES FOR FUTURE WORK nereorsoseverersvvrevrsersennessvsserssnsevsessessennsuserense 56 APPENDIX I ATTACHED DVD CONTENT een 59 Mu Arduino ORO eee 59 12 POA dv 59 il L3 Multimedia Material onai ati tele Nerd Qi 59 LA EAGLE Projects in Bl 60 APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR ARDUINO 61 11 1 2 WHEELED ROBOT FLOW DIAGRAM 61 II 2 4 WHEELED ROBOT FLOW DIAGRAM i 62 11 3 BLUETOOTH MASTER FLOW DIAGRAM iii 63 II 4 GO LAB INTEGRATION FLOW DIAGRAM ie 64 APPENDIX III HIGH LEVEL LOGIC DIAGRAM FOR FPGA n 65 APPENDIX IV FPGA SHIELD SCHEMATIC 2er caes sn 67 IV 1 KONDO SERVO SHIELD VI SCHEMATIC e 67 IV 2 KONDO SERVO SHIELD V1 BOM eisiservnsvovrsvrsenrennesseessarsnrsersenssensensessersnssensers 68 IV 3 KONDO SERVO SHIELD V2 SCHEMATIC iii 69 IV 4 KONDO SERVO SHIELD V2 BOM i 71 APPENDIX Vi FPGA SHIELD POB LESS 75 V 1 KONDO SERVO SHIELD VI PCB i passen sea en 75 V2 KONDOSERVOSHELDV2 PCB ass 76 APPENDIX VE AUTHOR SEV msgstr A GSE TT REFERENCES ss o o A SR SOS 79 A DOCTORAL THESIS asus di dae 79 B BOOKS sne SEE 79 CSTANDARDS incallito a uso Go Pj 79 DAR FIELES ae 79 E MANUALS ssp pN a a a 80 E DATASHEETS an seen 81 G WEBSITES Le 81 iii iv GLOSSARY A A D Analog to Digital Converter it is a
68. nding chapter 3 1 KONDO KHR 1HV ROBOT The Kondo humanoid robot used is based on the original although some modifications have been made The Figure 3 1 shows an image with the identifier of each servo H6 mM N H7 O w O sE LO O L ce CH16 CH17 CH18 CH19 Figure 3 1 Kondo KHR 1HV Robot ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 3 USED HARDWARE Author Pedro Plaza Merino Date 7 October 2013 The Kondo Robot is composed by 21 servos Each servo adds a freedom degree for the emulated joint Table 3 1 shows a brief description about each servo Servo Description Servo Description identifier identifier CH First freedom degree for the CH 12 Tu freedom degree for the left shoulder left hip CH 3 Second freedom degree for the CH 13 Freedom degree for the left left shoulder knee CHA First feedom degree for the CH 14 First freedom degree for the left left wrist ankle CHS Second freedom degree for the CH 15 Second freedom degree for the left wrist left ankle CH6 First freedom degree for the CH 16 PE degree for the right shoulder right hip CHI Second freedom degree for the CH 17 Second freedom degree for the right shoulder right hip CH8 Farst ke dm degree for the CH 18 Third degree for the right wrist right hip CHO Second PR degree for the CH 19 Freedom degree for the right right wrist knee CH 10 First peer degree
69. no Date 7 October 2013 3 5 DATA STORAGE The FPGA includes memory elements which can be more than necessary Even so two Microchip s EEPROM memories have been included in order to increase the memory capacity of the system This memory increase allows a higher size of the motion database Furthermore status data can be stored in order to facilitate maintenance actions or a more detailed analysis of the detected failures during the operation of the system 32 The chosen EEPROM memories are the 25AA1024 with the specifications showed in the Table 3 10 Input Voltage from 1 8 V to 5 5 V Page Size 256 Bytes Memory size 131 072 bytes Clock Frequency 20 MHz Communication type SPI 8 bits from the MSB Output Data Format to the LSB Table 3 10 EEPROM 25AA1024 memory 3 6 ANALOG TO DIGITAL CONVERSION Because of the Sharp GP2Y0A21 sensor provides the distance detected using an analogue voltage signal and the FPGA does not provide any analogue input port an ADC is needed To solve this issue an 10 bits A D converter with an SPI interface is used The MC3001 39 from the manufacturer Microchip accomplish with the requirements The A D converter presents the characteristics showed in the Table 3 11 Input Voltage de 2 7 V a 5 5 V Sampling rate er 75 ksps at 2 7 V Resolution 10 bits Current consumption 500 uA as maximum Communication type SPI 8 bits from the MSB Output Data Form
70. ntation and spin relationships have been defined when an angle is commanded to the corresponding servo A movement is considered as positive when the command for the spin is changing from a lower value to a greater value For example when a servo is commanded from an angle of 30 until an angle equal to 120 Table 3 2 shows that relationships ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Servo Axe Spin Servo Axe Spin identifier spin direction identifier spin direction CH2 Y Positive B CH 12 Y Positive B CH 3 X Positive A CH 13 Y Positive B CH 4 X Positive A CH 14 Y Positive B CH5 Z Positive C CH 15 X Positive A CH 6 Y Negative B CH 16 Z Positive C CH7 X Negative B CH 17 X Negative A CH 8 X Negative A CH 18 Y Negative B CH 9 Z Positive C CH 19 Y Negative B CH 10 Z Positive C CH 20 Y Negative B CH 11 X Positive A CH21 X Negative A CH 24 Z Positive C Table 3 2 Orientation and spin relationships for Kondo KHR 1HV servos There are two ways in order to manage the servos by using the pulse width modulation PWM and through serial communication on a bidirectional channel The first option has been chosen because the second one requires reverse engineering over the original controller or other open source alternatives which have been found see 48 The Pulse Width Modulation is the mo
71. oltage level of each cell of the battery and the total voltage of the battery When long tests have been carried out other device has been used The other used device monitors the voltage of the cells and shows the status of the battery by using LEDs Furthermore when the battery voltage is below a threshold an acoustic alarm is auctioned When the acoustic alarm is detected some action can be carried out in order to avoid an irreversible damage of the battery 26 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Figure 3 18 shows an image of the above mentioned devices Figure 3 18 LIPO batteries monitoring devices 27 28 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES 4 USED SOFTWARE 4 USED SOFTWARE Author Pedro Plaza Merino Date 7 October 2013 Different Software tools have been needed in order to perform the complete development In first place the Arduino board requires a tool when the programs have to be uploaded in it When all the internal components of the FPGA have to be inter connected the Firmware needs to be translated Due to saving development time some simulations have been carried out for the implemented designs And finally an adequate tool has been used during the PCB development 4 1 ARDUINO V1 05 DEVELOPMENT ENVIRONMENT The Arduino Development Environment is composed by a text editor in order to write the code an messages area a
72. on would have been discarded and one of the other alternatives would have replaced it But after several tests this issue was discarded 5 2 TEST PROTOTYPES MANUFACTURING With the aim of validating the chosen option in the above section a prototype has been implemented The prototype is a simple version of the needed interface In a drilled 40 Author Pedro Plaza Merino ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Date 7 October 2013 5 RESEARCH DETAILED DEVELOPMENT board the transistors the resistors the power supply connectors and the 5 V regulator have been mounted Thus the prototype is composed by the following components A 7805 regulator with an output of 5 V 33 19 BC547 transistors 35 19 10 KO resistors Male headers After the soldering the result is the showed by the Figure 5 2 2 y E o 2 Figure 5 2 Voltage level adapter prototype circuit This prototype has been very useful either during the validation of the voltage level circuit adapter and for all the following stages related to the firmware tests while the PCB was being developed The prototype was used until a functional version of the PCB was obtained 41 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 One of the disadvantages of the prototype is its size Other disadvantage is that too much wired interconnections are required in ord
73. or Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 Voltage Component level Ni FPGA Input Output ports 3 3 DYS S0120 servos power supply 6 KONDO KRS788 HV servos power supply 10 8 Servos control signal both types 5 Bluetooth modules Master Slave 3 3 5 Ultrasound sensor 5 Infrared sensor both 5 EEPROM memory 3 3 5 Table 5 1 Components power supply voltage level Due to the FPGA has to generate the control signal for the servos with a voltage level of 5 V some alternatives were investigated e Use of a common emitter configuration transistor which collector is connected to a Pull Up resistor and that resistor to the required voltage of 5 V e Use of an opto coupler which input voltage is 3 3 V in the FPGA side and 5 V in the servo side 40 e Isolator barrier with a voltage level connection equal to the mentioned above The first option was chosen after all the alternatives have been analyzed The reasons to select this option are the following e The simplicity of the circuit to be implemented e The small size of the components which will be added e The component cost is lower than the other alternatives Figure 5 1 shows a simple application for a single channel 10K sv BCS47 FPGA GND SERVO Figure 5 1 Level voltage adapter circuit schematic In the particular case of getting noise issues from the servos to the FPGA the selection opti
74. or is from the maximum working range of the above infrared sensor to 80 cm The Sharp distance sensors are a popular choice for many projects that require accurate distance measurements This IR sensor is more economical than sonar rangefinders yet it provides much better performance than other IR alternatives Interfacing to most microcontrollers is straightforward the single analogue output can be connected to an analog to digital converter for taking distance measurements or the output can be connected to a comparator for threshold detection It has been connected to an analog to digital converter in order to use its sampled data by the FPGA Figure 3 10 shows an image of the Sharp GP2Y0A21 infrared sensor Figure 3 10 Sharp GP2Y0A21 infrared sensor Its specifications are listed in the Table 3 8 19 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Input Voltage from 4 5 V to 5 5 V Average current consumption 30 mA typical Working range from 10 cm to 80 cm Output type Analogue Voltage Differential Output Voltage referenced to working 19V Gypieal range Response time 38 10 ms Size 29 5x13 0x13 5 mm Weight 3 5 g Table 3 8 Sharp GP2Y0A21 specifications 3 4 3 STABILITY SYSTEM The ADXL345 Triple Axis Accelerometer is well suited to measures the static acceleration of gravity in tilt sensing applications as well as dyna
75. ort connected to the Bluetooth Shield Hence any data sent from the PC to the Arduino board is sent directly b Bluetooth In the same way when a data is received by the Bluetooth Shield this data is redirected by the Arduino board into the PC With this simple system a clean and effective communication 1s obtained between any devices based on Bluetooth Both Bluetooth boards have to be paired in this case the Master Bluetooth Shield and the PC which is being used Figure 5 8 shows he mentioned mounting 50 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 Figure 5 8 Master Bluetooth Shield with Arduino MEGA board Once the above was achieved the position storage method was evolved again in order to get a continuous transitions which is translated into smooth motion movements in order to work in the motion management Throughout the robot integration tests some issues related to the way of working of the servos In a first approach it seems to be related to noise introduced by the motors into the control lines But the source of the issue was found and it was not related to that It was generated when the FPGA board was powered with a voltage over 5 V With a voltage over 5 V the voltage regulator located in the FPGA board turned into unstable after short time period This issue was temporary solved by adding a power supply cable between the FPGA board and the
76. rnatives have been taking into account e ExpressPCB an quick and easy tool which allows a low tolerance for the nets spacing It was very hard to find components libraries It is a free tool e Design Spark same as the above related to its using This tool presents a good advantage it allows rendering the PCB in a 3D model It can be used for free e Expedition Enterprise the main disadvantage of this tool is its high cost It allows configuring lots of parameters for the PCB but it increases its using difficulty and the needed of knowledge about their use e EAGLE this tool is free when is intended to be used for educational purposes There are lots of library component groupings available There are lots of information and documentation related to its use and examples in the web The complexity and needed knowledge is increased as long as very specific results are obtained Hence the chosen option is the EAGLE tool which fits perfectly with the needed of use within this project context As PCB manufacturer the only one analyzed option was DFROBOT 46 due to it offers the PCB manufacturing with detailed instructions for the generation of the GERBER files from the EAGLE tool The manufacturing costs are low and the delivery time very reasonable 46 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 5 4 1 KONDO SERVO SHIELD V1 For this first iteration
77. rs Total pins Total virtual pins Total memory bits Embedded Multiplier 9 bit elements Total PLLs EE Flow Summary EEE Flow Settings EEE Flow Non Default Global Settings EEE Flow Elapsed Time E Flow OS Summary amp Flow Log 3 Analysis amp Synthesis Gi Fitter E Assembler 4 TimeQuest Timing Analyzer M Design Assistant M EDA Netiist Writer D Flow Messages D Flow Suppressed Messages Author Pedro Plaza Merino Date 7 October 2013 Search altera com R QV 4097 Successful Mon Aug 19 10 16 05 2013 13 0 1 Build 232 06 12 2013 SP 1 SJ Web E UnitControl UnitControl TOP Cydone II EP2C5T 14408 Final 1 247 4 608 27 1 222 4 608 27 434 4 608 9 434 73 89 82 0 21 504 119 808 18 0 26 0 0 2 0 me g P lt lt Search gt gt Type ID Message gt 332111 Found 1 clocks b D 169124 Fitter converted 3 user pins into dedicated programming pins Y 176045 Design uses memory blocks Violating setup or hold times of memory block address registers for either gt A 169085 No exact pin location assignment s for 3 pins of 73 total pins D 332104 Reading SDC File UnitControl out sdc D 332129 Detected timing requirements optimizing circuit to achieve only the specified requirements b wD 176353 Automatically promoted node CLK 50MHZ placed in PIN 17 CLKO LVDSCLKOp Input wD 176233 Starting register packing
78. rted to the phone YouTube etc 44 Figure 4 7 shows how it looks Seleccione fuente para su proyecto gt SILA Importar media Cres proyecto vac we Proyecto actual GoLabKondo Vuelta a Casa Video Modifica Figure 4 9 AVS Video Editor Project Manager 38 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 5 RESEARCH DETAILED DEVELOPMENT Date 7 October 2013 5 RESEARCH DETAILED DEVELOPMENT Along this section all the obtained results during the different stages are showed Furthermore the evolution of the research has been described The description includes the found issues and the adopted solutions in each situation The whole process has been split into different sub sections due to the complexity Each sub section highlight all actions which have been carried out but the order is not completely chronology because some activities have been stopped another have been included as new and other activities have been progressed 5 1 FIRST CONTACT In the first stage of the development all components have been analyzed individually This has been done in order to identify some issues during the integration of the whole system The obtained information is summarized in the chapter 3 Furthermore several documents with a similar thematic have been examined in order to get ideas or improvements 1 2 7 8 9 10 11 13 14 15 y 17 Once the mentioned above has
79. s 47 manufacturer and distributor The second role is carried out by the BT BOARD v1 05 board 3 3 1 ARDUINO BLUETOOTH SHIELD The Bluetooth Shield for Arduino is a board which implements a serial port to Bluetooth conversion Master Slave It allows the using of Arduino digital pins as software emulated serial port Furthermore the Arduino Hardware port can be used This board is composed by an HC 05 chip which is the SPP Bluetooth module Its use is very easy and it is designed to get a transparent wireless serial connection It can be configured in three different modes in Master mode in Slave mode or in Loop mode It will connect with other devices which allow SPP as configured protocol 24 Figure 3 5 shows an image of the Bluetooth Shield 1228 AN 7 PELL es LAJ LA LI TE poi 90 ne Blue Tooth Smeld VLA Figure 3 5 Bluetooth Shield for Arduino This board presents the showed characteristics in the Table 3 4 12 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 Bluetooth Protocol Bu VANER Specifications Frequency ISM band at 2 4GHz GFSK Gaussian Modulation Frequency Shift Keying Emission Power lt 4dBm Class 2 lt 84dBm for a BER Sensibility of 0 1 Asynchronous Transmission rate A AOPA ONES Synchronous 1Mbps 1Mbps Safety URON y encryption Profiles Mast
80. sonal computer instead of serial communication EDUCATION Master Degree in Electrical Electronic and Industrial Control Engineering Research National University of Distance Education 2013 BE Electrical Electronic and Automation Engineering Carlos III University 2010 Degree Industrial Electronic Engineering Carlos III University 2007 SKILLS Operation of specialized equipment Multimeters Oscilloscopes Function generators Programmable AC DC power source Computer e Programming Languages C and C e Hardware Design Language VHDL CPLDs and FPGAs e Software and Applications Matlab Modelsim Aldec Active HDL Altera Quartus II and Xilinx ISE e Operating Systems DOS UNIX LINUX and WINDOWS Languages e Fluent Spanish e Fluent English 78 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino REFERENCES Date 7 October 2013 REFERENCES A DOCTORAL THESIS 1 D KAYNOV 2008 Open motion control architecture for humanoid robots B BOOKS 2 A BARRIENTOS L F PENIN C BALAGUER y A ARACIL 2 EDICION 2009 Fundamentos de Rob tica ISBN 978 84 481 5636 7 3 S BROWN y Z VRANESIC 1998 Fundamentos de l gica digital con dise o VHDL Segunda edici n Mc Graw Hill 4 B P LATHI 1998 Modern Digital and Analog Communication Systems 3rd edition Oxford University Press C STANDARDS 5 IEEE Std 802 15 1 2002 IEEE Standard for Informat
81. st common used alternative for servo controlling This method is performed by the generation of an square wave where the active high part is modified as the control parameter and the period of the wave is kept with the same value Hence the servo will move depending on the received active high pulse width When the PWM modulation is used the control system of one servo is limited to indicate what position is intended to be reached This is carried out by a pulses sequence where the pulse duration is the spin angle for the motor The Kondo servos operates with width pulses from 700 us and 2 3 ms These values move the motor in both limits 0 and 180 The value equal to 1 5 ms indicates the central or neutral position 90 meanwhile the other pulse values are used to reach intermediate positions When the servo motion limits are exceeded the servo will start to make a buzz This buzz indicates that the pulse width have to be modified as soon as possible because the servo can be damaged The period between two consecutive pulse OFF period is not critical and it can be different from one pulse and the next one It is usually used a value of approximately 20 ms between 10 ms and 30 ms When the OFF period is lower than the minimum it can interfere with the servo internal synchronization When the OFF period is greater than the maximum value between pulses the servo will change to a rest state This situation leads to a movement with small
82. t position P PCB Printed Circuit Board it is a surface composed by conductive tracks pads and other features etched from copper sheets laminated onto a non conductive substrate with the aim of connecting different electronic components 43 S SPI Serial Peripheral Interface it is a communications standard for exchanging data between different peripherals These peripherals are electronic devices that can share the same communication lines and they are identified as slaves in the communication scope The master device has to manage which device and in what moment is accessing into the bus in write mode 45 vi V VHDL This acronym represents the combination of VHSIC y HDL where VHSIC is the acronym of Very High Speed Integrated Circuit and HDL is the acronym of Hardware Description Language This language was defined by the IEEE Institute of Electrical and Electronics Engineers ANSI IEEE 1076 1993 and it is used by engineers for describing digital circuits Other ways of designing circuits are schematics capture with CAD tools and the block diagrams but these are not practical for complex designs Other languages with the same purpose are Verilog and ABEL 3 vii ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Autor Pedro Plaza Merino TABLES AND FIGURES INDEX Date 7 October 2013 TABLES AND FIGURES INDEX TABLES 3 USED HARDWARE cani en 5 Table 3 1 Servo description for the Kondo KHR 1HV een 6
83. ted video o Moviendo Robot 2 Ruedas Arduino Bluetooth Movil MOV e Videos Kondo this folder holds the Kondo Robot related videos o Go Lab Kondo avi o Kondo Bluetooth Maestro Esclavo avi o Moviendo un brazo Arduino MOV o Moviendo un brazo FPGA Bluetooth Movil 1 MOV o Moviendo un brazo FPGA Bluetooth Movil 2 avi e Videos Robot 4 Ruedas this folder holds the 4 wheeled robot related videos o Moviendo Robot 4 Ruedas Arduino Bluetooth Movil fiv o Moviendo Robot 4 Ruedas integrado en GoLab mp4 o Moviendo Robot 4 Ruedas por casa 1 avi o Moviendo Robot 4 Ruedas por casa 2 avi 59 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX I ATTACHED DVD CONTENT Date 7 October 2013 e Videos Servo this folder holds the servo and FPGA related video o Moviendo servo FPGA Bluetooth Movil 1 MOV o Moviendo servo FPGA Bluetooth Movil 2 MOV 1 4 EAGLE Projects The following PCB related files have been included inside the folder Proyectos EAGLE e Kondo Servo Shield VI EAGLE generated project files for the PCB Kondo Servo Shield V1 have been included schematic PCB and GERBER files for the manufacturing e Kondo Servo Shield V2 EAGLE generated project files for the PCB Kondo Servo Shield V2 have been included schematic PCB and GERBER files for the manufacturing 60 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino APPENDIX II HIGH LEVEL LOGIC DIAGRAMS FOR
84. the service of the humanity In November 2011 a group of engineering and professors decided to go for the disclosure and use of technology Its aim is the integration of practical training developed in the laboratories with open social platforms and web technologies This applied to the context of primary and secondary education The state of the art of the robotics has contributions either by private companies and by individuals as well as FPGA based systems In robotics there are very different fields industrial healthcare educational and even hobby Data which is common in the FPGA based systems since in recent years more and more sectors including such devices in their products To date it is very often to find control systems based on microcontrollers because of its easy accessibility and its simplicity which does not require great knowledge Meanwhile the electronic design using FPGA requires knowledge about these devices knowledge of languages used for programming and the use of specific tools developed by its manufacturers Hence it has proposed a control system based on FPGA which manages a humanoid robot with servos This system exchanges information with a PC interface acting between the user and the control system Bluetooth interface is used contributing with more movement freedom because the robot is released of physical wired connections ACKNOWLEDGES To my parents who make me what I am why I am indebted to they To
85. ting the communications with the external debug memory It has to implement an SPI communications protocol in order to store all the internal status data related to debugging The frames which will be sent to the Bluetooth module are stored in this memory too 5 3 6 LIR SENSOR TOP This block is in charge of implementing the communications with the long range infrared sensor It has to implement an SPI communications protocol in order to get the voltage value measured by the ADC The sampled voltage level has to be converted to distance units 5 3 7 MAIN TOP This block is in charge of managing all the information acquired from the other blocks It has to indicate which angle has to be applied on which servo in order to apply the required motion movement of the robot related o the received command as long as the perception of the robot environment 5 3 8 POSITION SELECTOR TOP This block is in charge of selecting the angle to command the corresponding servo depending on the position stored in the data memory by using the command asserted by the Main Top block 5 3 9 SERVO CONTROLLER TOP This block is in charge of generating the control signal to drive the servos according to the received angle command 5 3 10 US SENSOR TOP This block is in charge of communicating to the ultrasound sensor It has to generate the trigger signal needed by the sensor It has also to convert the received PWM pulse into a distance value 5 3 11 ACC I2C
86. trol top tb DEG BT RXD funitcontrol top tb DBG BT TXD funitcontrol top tb CTL BT RXD funitcontrol top tb CTL BT TXD funitcontrol top tb ACC I2C SCL funitcontrol top tb ACC I2C SDA funitcontrol top tb DBG MEM nCS funitcontrol top tb DBG MEM SI funitcontrol top tb DBG MEM nWP Junitcontrol top tb DATA MEM nCS Junitcontrol top tb DATA MEM SI funitcontrol top tb DATA MEM nWP Junitcontrol top tb DATA MEM SCK Junitcontrol top tb DATA MEM SO funitcontrol top tb BRD STATUS LED 1 Junitcontrol top tb BRD STATUS LED 2 Junitcontrol top tb BRD STATUS LED 3 Junitcontrol top tb BRD STATUS LED 4 Junitcontrol top tb BRD STATUS LED 5 funitcontrol top tb BRD STATUS LED 6 Junitcontrol top b US ECHO Junitcontrol top tb US TRIG funitcontrol top tb IR S DET funitcontrol top tb IR M ADC nCS Junitcontrol top tb IR M ADC CLK funitcontrol top tb IR M ADC DOUT Junitcontrol_top_tb SERVO_1 Junitcontrol_top_tb SERVO_2 Junitcontrol_top_tb SERVO_3 Junitcontrol_top_tb SERVO_4 Junitcontrol_top_tb SERVO_5 Junitcontrol_top_tb SERVO_6 Junitcontrol_top_tb SERVO_7 Junitcontrol_top_tb SERVO_8 Junitcontrol_top_tb SERVO_9 funitcontrol top tb SERVO 10 Now Daa pop np np nn p nm oO NNONONNNNNNNNNONNNNOoONWM err On n coors 630 ns Cursor 1 743ns vad 7 6000000000 18000000000 24000000000 0 ps to 26189656500 ps l Figure 4 5 ModelSim simulation results 35 ROBOT
87. y some modifications have been made in the 7 4 V LIPO battery such as the connector and the Velcro strip Figure 3 16 shows an image of the battery Figure 3 16 1300 mAh and 7 4 V LIPO battery The batteries mentioned above require an special charging system in order to manage the of voltage of each cell The battery charger chosen is the IMAX B6 which is able to charge batteries balance the cells voltage and additionally it is able to discharge the batteries too The charger does not include a power supply Because of this a alternate 25 ROBOTICS BASED ON FPGA FOR EDUCATIONAL PURPOSES Author Pedro Plaza Merino 3 USED HARDWARE Date 7 October 2013 current to direct current converter has been acquired which is able to provide up to 7 A at its output Figure 3 17 shows an image of the battery charger on the top and the power supply on the bottom HPKOIB AANCEIE Nangen Professional Intelligent Digital Balance Charger Coe e e mere x Figure 3 17 LIPO battery charging system This type of batteries also need an special care either during its charge process and a control of its voltage level during its use If the cell voltage is reduced more than the nominal use the battery will be damaged permanently When these batteries are damaged they can burn or explode In order to avoid any unnecessary damage some battery monitors have been used to control the cell voltage In first place a device which samples and shows the v
Download Pdf Manuals
Related Search
Related Contents
User Manual 8880 Series Fault Finding & Locating Kit Taurus S2 Benutzerhandbuch Cirrus - MyAmbient Téléchargement iogear GMFPSU22W6 print server here - Gleim Publications FICHE D`IDENTIFICATION ULM DE CLASSE 1 Copyright © All rights reserved.
Failed to retrieve file