Home

POB-Bot User`s Manual

image

Contents

1. parse the list of the form and print result on the Pob Terminal for i 0 lt Nb_Identify i for each patterns we grab its id switch ListOfForm i id Display results in POB Terminal corresponding to the id case IDP O0 CROSS PrintTextOnPobTerminal Cross d d ListOfForm i x ListOfForm i y break case IDP_1 BIGA PrintTextOnPob Terminal A Big A d d ListOfFormfi x ListOfFormli y break case IDP_2_KING PrintTextOnPobTerminal The King d d ListOfForm i x ListODfForm i y break case IDP 3 TOWER PrintTextOnPobTerminal Tower d d ListOfForm i x ListOfFormli y break case IDP 4 TREFLE PrintTextOnPobTerminal Trefle d ad ListOfForm i x ListOfForm i y break Pob Technology Document All Right Reserved Page 76 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp case IDP 5 TRIANGLE PrintTextOnPobTerminal Triangle d d ListOfForm i x ListOfForm i y break case IDP 6 CIRCLE PrintTextOnPobTerminal Circle d d ListOfForm Ii x ListOfForm i y break default break return 0 Pob Technology Document All Right Reserved Page 77 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY Display images on POB LCD128 This example can be found in the folder example2 To open project in POB TOOLS choose to o
2. Robot Maker For Innovative Leisure and For Education POB Bot User s Manual POD POb EE LCD 128 DE Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Table of contents 1 INTRODUCTION ww cece eae we cc cnc ed nao oe cece end rates 5 2 POBEYE MODULE sosina cb inesee a Sa AEE EEES 7 2 1 Hardware description of the POB Eye 8 22 PONS ee ee 9 2 PO APS CIO ee cia cee cinco 10 24 Seal POM UARD viciado sand nce sa dnen sain sense einc sai use ends 11 20 FERC CONCE PR rl rtaoe E E 12 ROBE A R eee 14 2 7 Using POB Eye s bus from an extension board ccccocnccccnccccnccccnconcnnonononnnncnnnncnnnncnncnonnnos 16 2 8 Sensor CMOS connector oocccooccnccnnncnnccnncnncnnncnnnnnncnnnonnnnnnnnnnnnnnnnnrnronnnrnrnnnnrnnrnnnrnnrnnnrnnnnnanoss 22 29 DIMENSIONS O MES MOQUE acta aaa 22 2 10 Connecting POBEYE to a computer ss 23 lt POB PROTO een eee eee Ne eer ee ee 25 3 1 Board elements CE SCI OT ON rete SES taceecgcuiceeatua cence ts 26 32 PORIA PORIC and FORT D COMMOUIATION 2 e E EEE 36 3 3 Assembly examples with POB PROTO Si iisnre 37 3 4 Mechanical information oooccconccnonccnncncononcnnoncononennnnnnnrnnonrnnonrnnnnrnrnnrnrnnrnrrnrnrrnrnronrnrenenconess 40 4 POBLCD A PP P ee 42 4 1 Hardware description iii 42 4 2 Connecting POB LCD128 with POB EYE nn 43 Pob Technology Document All Right Reserved Page 2 85 4 3 5 5 1 5 2 5 3 5 4 5 5
3. Ulnts const Bitmap 1626 3 bY BL 7 42454 57 4254 67 25d 0 0 0 0 0 166 0 166 lt 54 5 MN A wan 3 Manage image pe al re JN Edit Emp Remove Bmp To add edit or remove an image press the Add Bmp or Edit Bmp or Remove Bmp button To move image in the list use the blue arrows Remark The images put in the library must respect the following format Bitmap 256 colors maximum size of 256 per 256 pixels POB Bitmap uses 3 colors to draw the graphic resources Black black pixel is drawing on the LCD White white pixel is drawing on the LCD Green Red 0 green 255 Blue 0 transparency color allow stack images Pob Technology Document All Right Reserved Page 61 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 4 Edit the resources name To locate the graphic resources in the array POB TOOLS use define You can edit this define with the Edit define button Uaine IDB_TRIANGLE Bitmap Property Edit Define D Remark The graphic functions of the library are using define To find the define name simply open the resources h file 5 File resources creation To create the file h click on the create the h button Pob Technology Document All Right Reserved Page 62 85 Robot Maker For Innovative Leisure and For Educat
4. image 3 is drawn To draw a line use the command DrawLine with the following parameters Start coordinates Final coordinates and pointer on graphic buffer DrawLine 10 10 25 30 amp ScreenBuftfer Drawing a point is done by PlotAPoint PlotAPoint 20 10 amp ScreenBuffer Finally we can display the graphic buffer on the LCD screen using the function DrawLCD with Pointer on graphic buffer as a parameter DrawLCD amp ScreenBuffer Display on screen return 0 Pob Technology Document All Right Reserved Page 80 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Real Time display on POB LCD This program is using the POB EYE module and the LCD screen This example can be found in folder example3 To open project select example3 pob in POB TOOLS Pob Technology Document All Right Reserved Page 81 85 i Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Program algorithm POB EYE and LCD screen initialization Grab image from camera Draw image in graphic buffer Plot graphic buffer on LCD screen Program source code To use POB EYE s and POB LCD s function the following folder has to be included include lt pob eye h gt Program beginning int main void Int76 i 0 j 0 k 0 To display an image on the LCD screen you nee
5. 1 Naming your application Click on this button Mi a dialog A COC a non negarder Oars Example a box will be displayed This dialog box allows setting the name of your application extension hex lf the file already exists you only have to select it Mom du fichier hex Fichiers de type hez File hex Annuler E Pob Technology Document All Right Reserved Page 53 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 2 Adding the files to be compiled You have to choose the list of source files that will be compiled To add a file click on the Add File button A dialog box appears and allows you to choose the file that you want to add lf you want to delete a file on the list use the Remove File button To improve the readability you can move your files by using the blue arrows List of files 0 POBLCD128E3 c Nom du fichier Fichiers de type Text File c Annuler Ez List of files Add File ie a Remove File 4 Pob Technology Document All Right Reserved Page 54 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 3 Compilation Click on the Compile button to launch the compilation of your application During the compilation you will see traces being displayed in the win
6. For Innovative Leisure and For Education POB Bot User s Manuel TE CH N O L O G Y 4 POB LCD POB LCD128 is an extension card for the POBEYE module POB LCD128 allows the POB EYE to display various images These two modules POB EYE and POB LCD128 work with each other In fact POB LCD128 can display in real time the images from POB EYE thus helping the user in developing his own applications To simplify the drawing on the screen POB Technology created the software that will help in integrating images to the application This software POB Bitmap is further explained in section POB TOOLS 4 1 Hardware description Technically le POB LCD128 is composed of 2 parts A LCD of 128 by 64 pixels Pob Technology Document All Right Reserved Page 42 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE CH N O L G Y The electronic interface allows POB LCD128 to work on POB EYE s bus It uses the addresses 0 and 1 so that other interface can work on the same bus 4 2 Connecting POB LCD128 with POB EYE You need to connect the cable supplied by POB Technology to the POB LCD128 Pob Technology Document All Right Reserved Page 43 85 i Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 4 3 Drawing with POB LCD128 The POB LCD128 is programmed with the library supplied with the module Functioning of the g
7. it is sufficient to open the created h file 5 Dictionary creation To create the file click on the Create Pattern button Console ss oo SS lt _ o Pob Technology Document All Right Reserved Page 68 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 8 POB Terminal POB Terminal interface allows you to play the message of the POB EYE module via the serial port and to display the images captured by the POB EYE camera The aim of the POB Terminal is to facilitate the development of your application POB TOOLS POB TOOLS POB Compiler POB Loader POB Bitmap POB Pattem POB Terminal Graphic Terminal is deconnected click to connect TEEHHOLOCG PB Terminal can display messages from POB EYE through the serial port as well as images grabbed by the camera POB Terminal was design to help you create your applications 1 Connecting POB Terminal The on button allows you to connect POB Terminal to the POB EYE module When POB Terminal is connected you can disconnect it with the off button Pob Technology Document All Right Reserved Page 69 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHN O La E Y 2 Clearing messages You can clear the POB Terminal messages with the clear text button Gea le
8. 5 6 5 7 5 8 6 7 TE amp HN OL Oo amp Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel DAWNO ANE OCR E E EE E E le oO TES POB TOOLS TAS Tala OM encina ca prin FOB TOOES CON IU e Manage OO ADI TO niete te aerieteneseteuenieneciesene danas eaeoeniesscwae POB GOMP IUCN 2 e a a a a a e a ya oo AMA E o PR e FOBB ID neonatos A OBS XP A RI PP O OO o A LIBRARY HELP FILES omessi na nanoa SAMPLE APPLICA HON siressa aE EAEAN Pob Technology Document All Right Reserved Page 3 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel O TE amp HN OL Oo amp Document management POB Technology US doc 14 10 2005 Pierre S guin POB Technology contacts POB TECHNOLOGY 4 rue nic phore ni pce 69 680 CHASSIEU FRANCE contact pob technology com 83 0 4 72 43 02 36 83 0 4 78 58 04 92 Pob Technology Document All Right Reserved Page 4 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 1 Introduction The POB Bot is a mobile programmable robot It has been designed to allow you to build your own robot The POB Bot includes a POB Eye the intelligent color camera a POB Proto the Input Output management board and a POB LCD128 the graphical screen The POB Eye is the eyes the heart and the head of your robot Develop with C
9. 8 milliseconds _ Value 255 equal to a pulse of 2 2 milliseconds 2 2 MS Warning If the servomotors require too much current you might shut down the whole system To avoid such a problem you need to program the servos movement slowly For example to move from position 10 to position 200 create a loop incrementing the position 1 per 1 Pob Technology Document All Right Reserved Page 31 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Servomotor supply connector Because it need too much energy using CC motors and servomotors can generate noises For example your system can reboot To fix the problem POB PROTO board has a connector to add a second alimentation source 20000000009 2890020808 Common supply 20000000000 lf you want to use the general alimentation you have to connect a jumper as shown on the left The common supply is the default 200000000049 Second supply 30000000000 20000000006 However if you want to use a second alimentation source then disconnect the default jumper and add the source as shown on the left picture With it your perturbations disappear Cautious Be careful to respect the schematic else you should burn your board or create a shortcut which can be make some damages Pob Technology Document All Right Reserved Page 32 85 Robot Maker For Innovative Leisure and For Educa
10. Document Al Right Reserved Page 13 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel T EG HN OL ODO G T 2 6 POB EYE bus POB Technology uses the input output on the HE10 connector as an address and data bus The pins GO to G7 are the data bus The pins G11 to G14 are the address bus This system makes it possible to have 16 addressable cards on the POBEYE bus G0 G7 This means it is possible to have on the same bus cards for direct current motors card for servomotors management or others such as distance measurements sensors G11 G14 Adresse To complete the bus there are 3 other signals G8 pin RW signal indicates a read write to the peripheral If G8 is in low state POBEYE writes data to the extension board If G8 is in up state POBEYE reads data from the peripheral co Enable G9 pin ENABLE signal allows signals validation on the bus G10 pin ACK signal allows to know peripheral states the peripheral is ready to communicate Pob Technology Document All Right Reserved Page 14 85 D Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Next table outlines the role of each pin G1 DATA 1 Input Output 15 DATA 7 Input Output 9 G8 R W Output 8 G10 Address 0 Address 1 Address 2 Address 3 Figure 7 Bus POBEYE The peripheral on the POBEYE bus hav
11. Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp To display a binary image on the POB LCD fill the array with pixel values from one Camera component Note that this image is a binary image All the RGB components are the same therefore you can use either one of them to fill up the array for k 0 1 64 1 1 for 0 j lt 120 j k LCD_Screen buffer k FrameFromCam redli j 88 k 8 Then display the results on LCD screen DrawLCD amp LCD_Screen return 0 Pob Technology Document All Right Reserved Page 84 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp POB Technology contacts POB TECHNOLOGY 4 rue nicephore ni pce 69 680 CHASSIEU FRANCE Web www pob technology com Mail contact pob technology com Phone 33 0 4 72 43 02 36 Fax 33 0 4 72 66 18 99 Pob Technology Document All Right Reserved Page 85 85
12. LCD128 POB LCD allows for example real time visualization of what the camera sees or to act as a user interface POB Bitmap generates a file to include in your code by the command include name of file h The file h contains an array of images This file contains 3 areas fitndet BITMAP H i Area wi protect the array during fdetine A include POB EYE h compl ation Pie nee ti Area 2 shows all the data containing all tE const Bitaap 1626 j 6 7 6 7 264 67 264 87 254 the bitmaps In this example the array s 0 0 0 0 0 166 0 166 254 5 f ao 0000 00 0 0 000 name is image which is re used by roo 6 0 0 0 0 0 0 0 0 6 2 the function DrawBitmap 225 121 60 226 121 0 229 0 246 6 57 0 0 0 198 6 57 1 a e Rt Area 3 has all the declared images fdefine IDB CROSS 0 fdefine IDB DISK 1 fdefine IDB_TRIANGLE 2 3 fdefine IDB_TREFLE 3 Fdetine IDB TONER 4 Ming eet fendif Pob Technology Document Al Right Reserved Page 58 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY The graphics resources can be displayed using the library supplied with the POB Compiler tools The graphic functions allow you to manage the transparency of the images and to carry out the superposition of images on the LCD screen Images are displayed using the DrawBitmap function Images array LCD screen DreawbBlimaag X Y 7 Table
13. Libraries 9 5 MB ARM THUMB Interworking 9 5 MB Floating Point Unit 29 0 MB V FPU Libraries 9 7 MB Y At least 62 9 MB of free disk space is required Curent selection requires at least 218 9 MB of disk space Figure 12 Install repertory and software options leave everything ticked Pob Technology Document All Right Reserved Page 48 85 D Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY is Setup GNUARM BEIE Select Stat Menu Folder Where should Setup place the program s shortcuts ie Setup GNUARM Select Additional Tasks Which additional tasks should be performed Select the additional tasks you would like Setup to perform while installing GNUARM Setup will create the programs shortcuts in the following Start Menu folder then click Ned To continue click Next If you would like to select a different folder click Browse GNUARM Additional icons _ Create a desktop icon Cygwin options Install Cygwin DLLs Figure 13 Start Menu and options Deselect Create a desktop icon and leave Install Cygwin DLLs 16 Setup GNUARM fe Setup GNUARM Installing Ready to Install D Setup is now ready to begin installing GNUARM on your computer Please wall while Setup installs GNUARM on your computer Click Install to continue with the installation or click Back if you want to review or Extracting files change any settings C
14. OL Oo amp Wait for Configure Set Wait for Set Configure Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel The card sends data Valid address ADDR OK set to 0 The board must be enabled ENABLE BOARD set to 1 POB EYE set to writing mode READ_AND_WRITE set to 0 No one using ACK ACK set to 0 ACK set to output PORTB for sending data ACK set to 0 ENABLE DATA set to 0 Data sent to PORTB ACK set to 1 Board enabled ENABLE BOARD set to 0 ENABLE DATA set to 1 ACK set to 0 Little tip to save up time if ACK becomes an input the PULL DOWN resistor placed on ACK will act as if ACK was set to O Set Pob Technology Document All Right Reserved ACK set to 0 Warning do not forget this step otherwise the cards can be damaged Page 19 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel D TE amp HN OL Oo amp Signals Configuration when adding a daughter board Input D Input Becomes an output during communication Input Input NO Input A Remarks When a new program is loaded in the POB EYE and daughter board is added it is necessary to unplug and re plug the whole system for synchronous matter When you add daughter board to your POB EYE before switching on the supply you must verify using a multimeter in diode verification position that the connection is clearly realized
15. Setup GNUARM Wizard Please read the following important information before continuing D Welcome to the GNUARM Setup License Agreement This will install GNUARM 3 4 1 on your computer lt is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup Please read the following License Agreement You must accept the terms of this agreement before continuing with the installation GNU GENERAL PUBLIC LICENSE Version 2 June 1991 Copyright C ue 1991 Free Software Foundation 59 Temple Place Suite 330 Boston MA 02111 1307 USA Everyone is permitted to copy and distibute verbatim copies of this license document but changing it is not allowed Preamble The licenses for most software are designed to take away your 5 accept the agreement I do not accept the agreement Ce Setup GNUARM fe Setup GNUARM Select Destination Location Select Components Fi Where should GNUARM be installed a BEEE eee e O Setup will install GNUARM into the following folder Select the components you want to install clearthe components you do not want to install Click Next when you are ready to continue To continue click Next f you would like to select a different folder click Browse Full installation y C Program Fles GNUARM Z Litle Endan 770MB a LE Libraries 97MB No Fast Multiplier 9 8 MB ARM THUMB Interworking 9 8 MB THUMB 18 9 MB THUMB
16. Simply place one probe to the POB EYE s GND and the other one to your board s GND If you have an existing contact your daughter board is correctly added N Lum Ui QS Pob Technology Document All Right Reserved Page 20 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLO G Y Examples of applications using the POB EYE bus In this example the POB EYE has 2 daughter boards 19 POB LCD128 POB LCD128 creates a perfect HMI Human Machine Interface 23 the second daughter board based on figure 10 Gears 4 DC motors 2 for head movements and 2 for traction grabs the position of 4 variable resistor 2 control of the head and 2 for the joystick detects if the pushbutton is pressed A video is available on our website Pob Technology Document All Right Reserved Page 21 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 2 8 Sensor CMOS connector This connector makes its possible to connect the CMOS OV6620 to the POBEYE module OV6620 connector Figure 9 CMOS connector Warning The CMOS sensor connects on the left of the connector To configure the OV6622 register use the function SendToCam 2 9 Dimensions of the module TE om T e 5 00 e Cte 3 TE a SN CUA ee SRE a 64 28 tda OO Figure 10 Dimension of the POBEYE Pob Technology Document All Right Reserve
17. Source Editor and look for the executable file Cancel 5 3 Manage a project application POB TOOLS are used to manage a project application for the POB EYE module POB Project SAprojecMEXEMPLEStexampleHexample3 pob SAWE AVE AS The new button allows the creation of a new project You must type the name of the new project or select an existing project extension pob Warning if you select an existing file the content of this file will be overwritten The open button allows an existing project to be opened The save button allows to save your current work The save as button allows to save your work in a new project file Pob Technology Document All Right Reserved Page 52 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 4 POB Compiler POB EYE module is programmed in the C language The POB Compiler allows you to create an application written in C for the POB EYE module To create an application follow the 3 following steps please dont use any space in the path The compilation is launched please wait feyqdrvefciqnuanmn bin Aibigecfarm elf 3 4 3 1 ff fam etiipinid DocfPOBLCO128E3 0 main waming inte feyodrvefaignuanvbind Aibfgecarm elf S 4 3 fj farm elfbinid first occurrence eyqdnvefoi DOCUME 1 E SApropechExXEM PLES examplesiout hex is successfully created Ill
18. Yes k O1 64 28 49 50 mm 88 120 pixels Yes 1 byte per component 32Koctets 6V to 9V 2A maximum 3 3V 5 Volt tolerant 10mA maximum Pob Technology Document All Right Reserved Page 7 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel D TE HN O LOGY 2 1 Hardware description of the POB Eye Supply connector On Off Programming Execution Serial port Figure 1 POB EYE module supply face Connector 0V6620 BUS POB Figure 2 POB EYE module CMOS connector face Pob Technology Document All Right Reserved Page 8 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY 2 2 Power supply The power supply must be between 6V and 12V There are two ways of supplying the module Dedicated connector Supply connector On Off Figure 3 POBEYE power supply To switch on the module the power cable must be connected and the on off switch and set to on position The power cable is supplied with the POBEYE module HE10 connector By using pin 2 Power and 20 GND of the input output bus the user can supply POBEYE module with a daughterboard through HE10 connector The on off switch from the POB EYE board is no longer used in this configuration the user can therefore use the supply switch form his own board Remark Once the POBEYE module is switched on the green led comes on Wa
19. Analog value acquisition This diagram shows how to rely an adjustable resistor to PORTA Pob Technology Document All Right Reserved Page 38 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Servomotors Management Only RCO RC1 RC2 RC3 RC6 and RC7 from PORTC can be used to manage servomotors The following diagram shows how to plug a servomotor to the POB PROTO board Alim V_Engine 5V RCO RC3 V_Engine V Engine RC1 RC2 V_Engine V_Engine r re Caution To avoid current picks when using the servos it is advised to use a dedicated regulator to supply the servos Remark The user can configure RCO RC1 RC2 and RC3 to manage the servos and use RC6 and RC7 as digital Inputs or outputs Pob Technology Document All Right Reserved Page 39 85 Robot Maker For Innovative Leisure and For Education POb TECHNOLOGY POB Bot User s Manuel 3 4 Mechanical information Pob Technology Document All Right Reserved Page 40 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY DOD ms LCD 128 HS Graphical Screen Module Watch in real time what is coming from the Pob Eye Develop a Graphical User Interface Pob Technology Document All Right Reserved Page 41 85 Robot Maker
20. BFrame amp FrameFromCam Get the pointer of the red green and blue video buffer while 1 Main loop Pob Technology Document All Right Reserved Page 75 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp First of all the function GrabFrameRGB will grab an image from the camera and then will save the image in the dedicated place pointed by FrameFromCam GrabFrameRGB grab the RGB components For pattern recognition the image has to be binarized In the end the 3 RGB components will be the same a 0 for the white and a 1 for the black BinaryRGBFrame amp FrameFromCam binary the three RGB Buffer The function dentifyForm can identify patterns within an image The parameters needed are a pointer on the binarized image an empty array ListOfForm and the pattern dictionary This function will fill up the array with the patterns and then send the number of the recognized patterns Please note that the dictionary patterns Pattern was created using POB PATTERN Nb_Identify ldentifyForm amp FrameFromCam ListOfForm Pattern try to identity the forms and make a list of it Finally the information saved in the array ListOfForm are extracted and then prompt on POB Terminal The function PrintTextOnPobTerminal gt can print text in POB Terminal This function is similar to printf used in C library
21. Java or Basic using the appropriate POB Tools you can also develop with the POB Builder the graphical development tools from POB Libraries are available to easily program native form recognition moves and servomotors Other boards are connected to the POB Eye via the POB Bus But an I2C Bus is available to connect other robot parts The POB Prot is managed by the POB Eye With a few code you act on the DC motors servomotors You check incoming values from sensors and you manage the joystick for a graphical user interface The POB LCD128 is the screen You can watch in real time which is coming from the camera or use it for a graphical user interface Pob Technology Document All Right Reserved Page 5 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Color Camera Module Programmable with the Pob Tools en C Java or Basic or the Pob Builder Pob Technology Document All Right Reserved Page 6 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE CH N O L O G Y 2 POBEYE Module The POB EYE is a camera device used for real time pattern recognition Due to its 15 I O its serial port and its I2C bus POB EYE was designed to be the center application for your project The POB EYE is delivered with the necessary tools for a fast and simple development Analog to digital converter 128Koctets 64Koctets Yes
22. L Oo amp D Sample Applications Recognize a form and send it to the POB Terminal Print pictures ont the POB LCD See in real time what is coming from the POB Eye Visit our blog DEVZone for more examples et documents www pob technology com blog Pob Technology Document All Right Reserved Page 72 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 7 Sample application Pattern recognition and POB Terminal display This example is given in folder example To open the project in POB TOOLS select the file example1 pob POB TOOLS S POB_TOOLS examples example1 examplel pob POB TOOLS POB Compiler POB Loader POB Bitmap POB Pattern POB Terminal Graphic Terminal a 0 CRN lz connected click to disconnect TBCHHOLOCH Text Terminal Clear Text The idea of this program is to identify the patterns showed to the POB EYE and to display the name and coordinates in POB Terminal This program was implemented in C language and uses functions of POB TOOLS and POB EYE Pob Technology Document All Right Reserved Page 73 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Program algorithm POB EYE initialization Grab an image Patiern recognition Display results in POB Terminal D Remark A 32Kbyte was dedicate for the RGB components 88 pix
23. Program Files GNUARM bin tcl84 dil Destination location C Program Files GNUARM ARM THUMB Interworking THUMB THUMB Libraries Figure 14 Summary of the components that will be installed and install begin fe Setup GNUARM Completing the GNUARM Setup D Wizard Setup has finished installing GNUARM on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup Add the executables directory to the PATH variable Pob Technology Document All Right Reserved Page 49 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Installation of POB TOOLS To install the POB TOOLS click on the file INSTALL POBTOOLS exe in the CD and follow the instructions f Installation POB TOOLS ioj x Installation POB TOOLS ioj x Bi Ane j Start Installation en cours he Ene n 5 ans assistan Veuillez patienter pendant que l assistant installe POB TOOLS sur votre ordinateur d installation de POB TOOLS Cet assistant va vous guider dans l installation de POB TOOLS Extraction des fichiers sur votre ordinateur C POBTOOLSMtoolsimake exe ll est recommand de fermer toutes les applications actives avant de continuer Appuyez sur Suivant pour continuer ou sur Annuler pour abandonner l installation E Annuler Once installed you will have the following files folders 3 Do
24. au images This function uses a number to display the desired image For more clarity in your code POB Bitmap generates in h a series of define from the images name The call to DrawBitmap can be becomes if the name of the file is cross bmp DrawBitmap X Y 1 Tableau gt DrawBitmap X Y IDB_CROSS Tableau Pob Technology Document All Right Reserved Page 59 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Graphic resources generation There are 5 steps to create the file POB TODLS xj all eT hema eae prosa EXE MPLESA JM eae SAproeciExEMPLES esampleioimantdek beng Sproe ENEMPLE S iecsmple Stan loro bmp 1 Naming the resource file Click on FE to create your resources file extension h or choose an existing file 21 xl Enregistrer dans CD example3 e 0 a Mom du fichier bitmap h Type h FH Annuler 2 Pob Technology Document All Right Reserved Page 60 85 Robot Maker For Innovative Leisure and For Education O i POB Bot User s Manuel T EG H N O LOG Y Warning If you choose an existing file the file content will be lost 2 Naming the resources array The graphic resources are in a C array You can rename this array or simply leave the default name Target Output Filename 15 project EXEMPLES example bitmap h sie name E
25. ble is supplied with the POBEYE module Pob Technology Document All Right Reserved Page 11 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 2 5 HE10 Connector In addition to the OV and supply voltage the I2C bus and the 15 input output are on the HE10 connector E 5Y SCL SDA Go Gl G2 GF G4 G5 GE G7 Ge Go Gio Gi Giz G13 Gi4 Alim HE10 POB EYE Figure 6 I2C bus and input output The HE10 connector allows the user to connect an extension board to the POBEYE module This connector gives access to the I2C bus which has already its pull up resistance In addition to the I O there is the 5V the Ground and the POBEYE power supply Warning The POBEYE module can directly be supplied by an extension board that provides the Power Otherwise an extension board can use the 5V from the POB EYE for its own power supply Warning The output voltage of the input output is of 3 3V Despite a 5 volt tolerance a current of more than 10 mA is not possible Pob Technology Document All Right Reserved Page 12 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Information concerning the HE10 connector is defined as following Input Output Input Output Input Output Input Output Input Output SDA Input Output 17 GND 20 Figure 6 HE10 connector Pob Technology
26. c examples header tools E Documentation LIBPOB html MOR POB_TOOLS exe Doc folder with all the help files in html Examples Has some examples for using the POB EYE and the POB LCD128 Header folder with all the h files and the entire library functions ibpob tools folder with all the POB TOOLS POB TOOLS EXE execute the program POB TOOLS Pob Technology Document All Right Reserved Page 50 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 2 POB TOOLS configuration all j When POB TOOLS run for the first time you have to configure the tools correctly Pi aE PC Commis FOR lamis POR bis POS Pr POE Tera OD TECHNOLOGY Path to use the GNUARM compiler You must click on the bin directory of xl GNUARM If you have installed it using the default settings the default path is MES C Program Files GNUARMbin CAGNUARM bin 7 Cancel Serial port i Choose the port number on which POBEYE is TN ES connected to your computer Cancel Page 51 85 Pob Technology Document All Right Reserved Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Source code editor xi In POB COMPILER you can choose the program you want to edit your source code To declare the path gt NOOWS wstenaz nctenad ex _ click on
27. crocontroller Using this could help you in creating your own extensions This schema and source code for communication functions are available on the CD Rom provided with the POB EYE module The source code available is only designed for communication functions between the POB EYE and the extension card using a PIC16F77 microcontroller Pob Technology Document All Right Reserved Page 16 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp The electronic circuit is composed of 3 ICs 74HC138 This IC is used to decode the address from the address bus When the address Is valid the signal ADDR_OK is at lower state otherwise when none valid ADDR_OK is at high state In this example the 74HC138 is configured to work with the Ox02 address which is reserved for POB Technology for any further information refer to Figure 10 74HC245 This IC allows transfer data between POB EYE and a daughter device It can be active or not and in this case of OFF state all the data pins will be put to high impedance The circuit is active when pin 19 ENABLE is at lower state PIC16F877 This IC is the center of the daughter board Because of its analog inputs and other I O the PIC16F877 can add other functionalities to your system Moreover the PIC16F877 is a low cost chip and its development tools are free and easy to access The names of these signals can be seen on the electric sc
28. d Second supply POB LCD connector connector serial port for E i ul PIC16F al TH bers Supply 1 connector IEEE RES i TETTETETT DC motor connector Potentiometer Es oe a Es PORTA PORTC Servomotors PORTD connectors Pob Technology Document All Right Reserved Page 25 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY 3 1 Board elements description Board supply There is a supply connector on the board make sure to use the right polarity This connector can then nis ee e y o supply the whole system through the POB bus on pin 2 Warning Make sure you are not using both POB EYE supply connector and POB PROTO supply connector Do not supply both POB PROTO Supply is only on POB PROTO and POB EYE You will find a power switch on POB PROTO that will shut down the whole system Pob Technology Document All Right Reserved Page 26 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE CH N O L O G Y Supply through the P T H square pad The board has its own P T H square pad for supplying other components Connection for POB EYE and POB PROTO The HE10 connector is used to link the POB EYE to the POB PROTO Warning If you decide to create your own cable you must do the following The connectors must be crimped with the head facing the same d
29. d For any further details on how to display information on POB Terminal please refer to the first example given in section 7 Pob Technology Document All Right Reserved Page 70 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 6 Library help files To get the help on how to use the POB EYE s libraries refer to the file documentation LIBPOB html Li TOOIS Documentation LIBPOB html PAR Your web explorer will then display the help page Data Structures File List Data Fields Globals POB Library Documentation 1 0 Generated by doxygen 144 a This is a documentation from All nights reserved From this page you have access to all the function s definitions used in LibPOB library Functions void SetlOWay Ulnt32 Value Ulnti6 Getinput void void SetOutput Ulnt32 Value void ClrOutput Ulnt32 Value void WriteByte Ulnt16 Addr Ulnt Data Unt ReadByte Ulnt16 Addr Detailed Description VO Functions Function to Manage the VO and bus for POB EYE Author Pierre SEGUIN POB Technology Function Documentation void ClrOutput Ulnt32 Value Clear the output Parameters Value use 1 to clear an output O has no effect on the output Pob Technology Document All Right Reserved Page 71 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel ID E Y E a TE amp HN O
30. d Page 22 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE CH N O L O G Y 2 10 Connecting POBEYE to a computer Serial port lt is necessary to connect the supplied cable to POBEYE Power supply to POBEYE Connect the power cable to POBEYE module Pob Technology Document Al Right Reserved Page 23 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp LOD 5 POB PROTO Input Output Board Manage your sensors with the digital and analog I O Bus Pob and 12 Pob Technology Document All Right Reserved Page 24 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY 3 POB PROTO POB PROTO was designed for the POB EYE in order to build a robot very easily You will find the following 6 connectors to manage servomotors Futaba 1 analog joystick and its pushbutton An H bridge to gear 2 DC On the CD in POB PROTO folder you will find examples on how to use the POB PROTO with all the source code needed POB PROTO description Programming P T H square pad Joystick jumper PIC16F supply PORTA na A a te ak m sie FE E Le e b gt ETTI SH0000 000000000000 Le E Dii dr 20000007 00000000000008 E j Es OOOO SC CO CIO ES SC 06 6 6 EN iO 10000 7 00000 00000000500000 230005 00000000000 00 0 Oo POB EYE an
31. d two variables an array to store the pixels and a structure in order to display the graph buffer In this application to avoid lag problems we have to work with 1 Byte per pixel see chapter on POB LCD128 Ulnt8 LCD Buffer CD_WIDTH LCD_HEIGHT BYTES where the pixels will be stored GraphicBuffer LCD_Screen buffer screen RGBFrame FrameFromCam frame of camera Pob Technology Document All Right Reserved Page 82 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp IntPOB EYE init POB EYE module IntLCD LCD screen ini The graph buffer has to be initialized with the screen dimensions and the storage array init the Graphic buffer with 128 per 64 one pixel per bit and LCD Buffer InitGraphicBuffer amp LCD_Screen _LCD_WIDTH LCD_HEIGHT EIGHT_BITS LCD_ Buffer ClearGraphicBuffer LCD_ Screen clear the graphic buffer Then the address of the RGB components must be initialized GetPointerOnRGBFrame amp FrameFromCam get the pointer of the red green and blue video buffer Main program loop while 1 Grab an image from the camera GrabFrameRGB grab the RGB components The LCD screen is in black and white that s why the image from the camera must be binarized BinaryRGBFrame amp FrameFromCam Binarise RGB components Pob Technology Document All Right Reserved Page 83 85 Robot Maker For
32. dow called Console These traces correspond to those of the GNUARM compiler Thus some warning or error messages may appear Console The compilation is launched please wait SAPOB TOOL S gt echo off foygdrive ciG N UAR Mbini Miblgccfarm elt S SI farnr elffoinvid feyqdrivefo DOCUME 1 Bab LOCALS 1 foyqdrive cfG NUAR Mbini Mb armes 4 of ff farmr elffpin ld first occurrence feyqdrivefc DOCUME gt S project EXE M PLE Siexample stout hex is successtully created lil af The last line that you will see appearing in the console will tell you if the application was compiled successfully If the message is successfully created appears your application is ready to be used in the POBEYE module lf the compilation process failed the message Is not created appears You will then need to correct your application in relation to the message of the compiler Remark The two lines starting with cygdrive are not significant and do not affect the success of the compilation Pob Technology Document All Right Reserved Page 55 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 5 POB Loader POB Loader module allows you to load a program create in the previous module Pob compiler in the POBEYE memory A TOOLS Mestage Contole Upload Progress Bis ox 100 Two steps are necessary t
33. e this address AA ee POBLCD128 1 POBLCD128 POB PROTO reserved reserved reserved reserved reserved reserved reserved reserved reserved For the user 13 For the user 14 For the user The reserved addresses are the ones POB Technology is using for its peripheral Nevertheless they can be used if necessary Pob Technology Document All Right Reserved Page 15 85 D Robot Maker For Innovative Leisure and For Education a POB Bot User s Manuel TIE CH N O LO amp Y 2 7 Using POB Eye s bus from an extension board To understand how to use a peripheral on the POB EYE bus we will use the following electric circuit i ECY E MO interface with a PIC from Microchip se 1 68 RW i 5Y D7 D0 4 gt C2 Enable Data D6 m1 40 Go DS 24H Gi D4 3401 G2 5 i D4 45715 es SDA SCL D5 bh d G4 Gi Go x 1 an G3 G2 ADDR_OK gt H D7 45 L9 G6 G ENABLE BOARD Js 5v 67 Si G8 RW gt C10 G7 G6 5 74HC245 G9 G8 1pF te GH Gio hi G13 G12 Gil 5Y siz Alim Git G13 18pF PAN Enable Data cu 13 7 ADDR_OK pareve ACK 1 G10 5Y PIC16F877 gt 74HC13 To change the Interface s address read the documentation of the 74HC138 In this case TECHNOLO the current address is 0x02 BY Copyright 2005 All right reserved Figure 8 Electronic assemblies for daughter board This schema helps to understand how the POB EYE module communicates with an external mi
34. ed for a correct use Pob Technology Document All Right Reserved Page 79 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp InitPOB EYE POB EYE initialization InitLCD LCD initialization Finally the graphic buffer is declared using InitGraphicBuffer with the following data screen size Number of bit or byte per pixel and location of the storage array LCD_Buffer InitGraphicBuffer amp ScreenBuffer LCD _WIDTH LCD_HEIGHT ONE_BIT LCD_ Buffer init the Graphic buffer with 128 per 64 one pixel per bit and LCD_Buffer For the number of bit per pixel you would like to use you need the following definitions ONE_BIT for 1 bit per pixel or EIGHT_BITS for 1 byte per pixel Remark For the graphic buffer we are using the command BITS or BYTES And concerning the function InitGraphicBuffer we are using ONE_BIT or EIGHT_BITS ClearGraphicBuffer amp ScreenBuffer clear the graphic buffer All the image drawing is done by DrawBitmap The parameters needed are The X Y coordinates the number of the image and a pointer towards the graphic buffer Please note that the number and the array Bitmap are created by POB Tools DrawBitmap 30 10 DB_1 Bitmap amp ScreenBuffer image 1 is drawn Draw Bitmap 45 10 DB_2 Bitmap amp ScreenBuftfer image 2 is drawn DrawBitmap 65 10 DB_3 Bitmap amp ScreenBuffer
35. els by 120 pixels 10560 byte per component All the operations on video will be done in the memory space 32 Koctets Free Pob Technology Document All Right Reserved Page 74 85 i Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Program source code One file is needed to use all the POB EYE s camera UART debug on POB Terminal include lt pob eye h gt add file for using the POB EYE The second file is the pattern This file is created with POB TOOLS in the POB Pattern tab include pattern h dictionnary of patterns Program s start int main void Ulnt8 i 0 Ulnt8 Nb_Identify 0 Variable corresponding to the number of patterns Form ListOfForm MAX_OF_FORM list of forms RGBFrame FrameFromCam struct of three pointers on the RGB components The POB EYE is initialized using the function IntPOEYE as well as initializing the camera l UART and the bus I2C You have to call this function if you want your module to work properly InittPOB EYE system initialization There is a particular way of working with the camera This function RGBFrame contains all the addresses of the RGB components and has to be initialized by the following function GetPointerOnRGBFrame The address in memory for the RGB components will always stay the same that s why this function is only called once GetPointerOnRG
36. ff a pixel Nevertheless such a technique will take 8 times more memory than the previous one Pob Technology Document All Right Reserved Page 44 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 128 64 pixels 8129 pixels 1 bit per pixel buffer is equal to 1Kbytes 1 byte per pixel buffer is equal to 8Kbytes Conclusion Using 1 byte per pixel allows speeding up the processing of the graphic functions Using 1 bit per pixel allows saving the POB EYE memory In order to give a free access to the POB LCD128 a library is given This library will generate a buffer of 1 bit per pixel or a buffer of 1 byte per pixel Screen sharing Moreover the library given can either use the whole screen for display or slip the screen in two The screen sharing will be of 64 by 64 pixels as shown in the following figure On one side we have the video in real time and on the other side the user s interface To understand the functions given in the library you can report to the source code of example 4 Pob Technology Document All Right Reserved Page 45 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel ID ms TOOLS Dy TE amp HN OL Oo amp D Software to program the Pob Bot Project managment Compilers Upload the programme onto the robot Manage pictures to screen Manage forms to recognize Windows Te
37. he Add Bmp or Edit Bmp or Remove Bmp button b E dit File Remove To move image in the list use the blue arrows Remark Image must respect the following format Bitmap 256 colors size of 100 per 100 pixels The forms must be drawn in black with a red background Pob Technology Document Al Right Reserved Page 66 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp To obtain the best possible result during the creation of the dictionary certain conditions should be observed The drawn image must take the maximum of space within the framework of 100 per 100 pixels Drawing not wide enough The space totally used lt is necessary to avoid the small details on the image Too small detail Large enough detail The form should not have any empty space The form is empty Part without empty spaces Pob Technology Document Al Right Reserved Page 67 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY 4 Naming the forms To locate the forms in the dictionary the library supplied with POB TOOLS uses ii rer IDP_CROSS You can edit this define with the Edit define button Edit Define Remark define is used by the recognition function in your application to identify the recognized form To find the name of the define
38. hema ADDR_OK PORTEO Input 8 Indicates that the address is valid ENABLE BOARD PORTE 1 o a Allows POB EYE to validate the board Read And Write PORTE 2 Input 10 Indicates if POB EYE is in Read or Write mode PORTC 4 Input Output Indicates to POB EYE that the board is ready ENABLE_DATA PORTC 5 Output Validates the data of the 74H245 Zo PORTB Input Output 33 40 Data transit Pob Technology Document Al Right Reserved Page 17 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Using POB Eye s All the digital read write protocols between the POB EYE and the PIC16F877 are the following The card receives data Wait for Valid address ADDR OK set to 0 Board enables ENABLE BOARD set to 1 POB EYE in WRITING mode READ AND WRITE set to 0 No one using ACK ACK set to 0 Configure ACK in output PORTB to receive data from the POB EYE Set ACK set to 0 ENABLE_DATA set to 0 Record Data from PORTB Set ENABLE_DATA set to 1 ACK set to 1 Wait for Board Enable ENABLE BOARD set to 0 by the POB EYE Configure ACK set to 0 Little tip to save up time if ACK becomes an input PULL DOWN resistor placed on ACK will act as if ACK was set to O Set ACK set to 0 Warning do not forget this step otherwise the cards can be damaged Pob Technology Document All Right Reserved Page 18 85 TE amp HN
39. ion POB Bot User s Manuel T EG HN OL ODO G T About transparency Definition of transparency color This color allows a pixel the possibility of not taking shape Thus by this means one keeps what is already drawn For example take s 2 images lf you draw the triangle on the circle without the management of the color transparency here is what happens The triangle frame erases the circle With the transparency management the superposition of images is possible Here is the result Transparency management allows the part of the circle under the triangle to be shown Pob Technology Document All Right Reserved Page 63 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 7 POB Pattern POB Pattern allows you to create a dictionary of forms This dictionary allows you to find forms starting from the images of the POB EYE camera POB Pattern generates a file to include in your code using the command include name_file_h This h file contains the table of the forms recognized by the POB EYE module The pattern recognition is the carried out using the functions of the library supplied with POB TOOLS tools The pattern recognition is carried out using the dentifyForm function Camera frame Pattern dictionary identityForm Frame Array of forms Pattern This function uses the image of the camera and the table of f
40. irection otherwise you might damage your card Pob Technology Document All Right Reserved Page 27 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHNOLOGY Programming PIC16F877 POB PROTO is supplied with a program connector for the microcontroller Programming will be done through the ICD2 of the microchip The user needs to withdraw the jumpers then plug the cable on the lower pins GND PGD PGC MCLEAR and VCO Once the PIC is programmed plug back the jumpers Note that your ICD2 needs its own supply POB PROTO is supplied with the necessary site to integrate other components to use the di 6 PIC16f877 serial port 40009000 3 4 DLL 614906950 i fi E a E j Ch The board has a site for a DB9 connector To convert the signal level on the serial connection POB PROTO has the site for a MAX232 and its capacitors Pob Technology Document All Right Reserved Page 28 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel PO TE amp HN OL Oo amp POB EYE s 12C Bus On the top right of the POB PROTO board a layout was designed for the POB EYE s 12C bus The signals SDA SCL GND and 5V are available PULL UP resistors are already set The Joystick Jumper connections For example you can use the joystick to control the cursor on the LCD screen It s working due to its two potentiometer lin
41. ked to PORTA RAO and RA Moreover a pushbutton is available on the joystick and linked to RA4 lf the user wants to use PORTA for another application it is possible by removing the jumpers lf using the joystick you have to use RA3 RA3 and RAS as analog inputs see PORTA configuration Pob Technology Document All Right Reserved Page 29 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp H Bridge Connector block Test points Potentiometer The H bridge is linked to PORTD RDO RD1 RD2 and RD3 It gears the 2 DC motors link to the connector block To adjust the voltage on the motors use the potentiometer and if needed you can use a multimeter on the test points Caution The H bridge current cannot exceed 600mA The PORTD pin can be configured independently and pins RD4 RD5 RD6 RD7 used for generic usage Caution If you don t need the H bridge simply unplug the L293D from board Pob Technology Document All Right Reserved Page 30 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Servomotors connectors The connectors are plugged to pin RCO RC1 RC2 RC3 RC6 and RC7 of PORTC Because nothing is plugged to these connectors you can use it for general purpose The value to gear servomotors is between 0 and 255 Value 0 equal to a pulse of 0
42. nt8 RCx UInt8 Pos Set servomotors position which is connected to RCx void SwitchOffAllServo void Stop all servomotors control in order to save energy void SwitchOnAllServo void Start all servomotors control void SwitchOffOneServo Ulnt8 Servo Stop one particular servomotor s control void SwitchOnOneServo UInt8 Servo Start one particular servomotor s control Pob Technology Document All Right Reserved Page 34 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp PORTD SOS y O00 OO PORTD is an I O port every single pin can be configured separately XN a CE AD O Functions to use the PORTD Ulnt8 GetPortD void Remove value from PORTD void SetPortD Ulnt8 data Set PORTD pins to output void SendToSapien UInt8 order Send a move order to Robot Sapien Pob Technology Document All Right Reserved Page 35 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE HN OL OO G T 3 2 PORTA PORTC and PORTD configuration The PIC16F877 program for PORT management is delivered with POB PROTO PobProto Proto Proto porta A LL PORTA 45 AWA Proto portc RC7_AS DI ROB AS DI RC3_AS DI RC2 AS DI RC1_AS DI RCO_AS SERVO Proto portd RD _aAsS DI RD6_AS DI EDS AS DI RD4 AS DI RDS_ 4S DO RD AS DO RD1_AS DO RDO_AS DO SetPobProtof amp Protoa In this example PORTA is set
43. o load a program 1 Selecting an application Click on to choose the application eh Bl Regarder dans gt examples 5 Nom du fichier out hex Fichiers de type hes File hex Annuler A Pob Technology Document All Right Reserved Page 56 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TECHN O La E Y 2 Program uploads Remark Before loading a program POBEYE module must be on in programming mode and link to your computer by the serial cable Preparing POBEYE module POBEYE module must be link to your computer see chapter 1 9 POBEYE module must be in programming mode see chapter 1 3 To load a program click on the Upload button If the loading proceeds correctly you should see the progress bar changing lf this does not work an error message will appear You will have to follow the instructions to solve the problem If the problem persists do not hesitate to contact the POB Technology support support pob technology com Remark If the modules are already on simply switch to programming mode the switch programming execution and press the reset button Pob Technology Document All Right Reserved Page 57 85 i Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 6 POB Bitmap POB Bitmap generates graphic resources for the POB
44. orms to recognize an image As output the function fills an array with the various forms recognized in the image For more clarity in your code you can use the define of the h file instead of numbers to identify the recognized forms In the previous example form 3 becomes IDP_TRIANGLE Pob Technology Document All Right Reserved Page 64 85 D Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Follow the 3 steps to build your pattern file 1 Naming the dictionary Click on to create your pattern file extension h or choose an existing file Ax Enregistrer sous Enregistrer dans example3 e 0 ce En Mom du fichier pattem h Type h h Annuler de Pob Technology Document All Right Reserved Page 63 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Warning if you choose an existing file the file content will be lost 2 Naming the pattern array Target Output The forms of the dictionary are in an array You can rename this array or leave the default array s name SG proect EXEMPLES ezample pattern h Filename Ulnts const Pattern AY rU 216 U 102 203 444 202 4 4 0 166 0 169 0 172 0 172 137 130 17 2 133 12 136 172 0 14 3 Manage images For add edit or remove an image press t
45. pen the following file example2 pob This program will display images on the LCD and uses all the graphical functions such a draw line draw point Pob Technology Document All Right Reserved Page 78 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Program algorithm POBEYE initialization Graphic buffer and LCD Initialization Draw line draw point Display graphic buffer on LCD Program source code To use POB EYE s functions and the LCD module include the following functions include lt pob eye h gt Then include the image file include Bitmap h include bitmap list int main void In order to speed up the display on the LCD a graphic buffer was used All the operations are done on the buffer and only then the buffer is displayed on the screen TO do so you have to declare an array LCD_Buffer in order to stock the pixels In this application an array of 128 by 64 and 1 bit per pixel was used Caution it is require indicating the unit in this case we are using bit B TS are used when working with 1 bit per pixel and BYTES when using 1 byte per pixel Ulnt8 LCD Buffer CD_WIDTH LCD_HEIGHT BITS where the pixels will be stored In addition the buffer another function is used to store the information on the screens size GraphicBuffer ScreenBuffer buffer screen Make sure POB EYE and POB LCD are declar
46. raphic buffer The POB EYE allows a graphic RAM buffer All the drawing operations use this buffer and when finished the buffer is transferred to the POB LCD128 memory This allows efficient processing of the display and it avoids displaying the pixels one by one on screen in case of processor intensive calculations on POB EYE Graphic buffer tin RAM With this method any computation will be done directly in POB EYE s RAM memory Once the computation is 3 finished the buffer is sent from RAM memory to the LCD screen About pixels A black and white LCD screen uses one bit to color a pixel With a byte the screen displays 8 pixels The buffer uses 8192 bits the POB LCD screen is 128 pixels by 64 pixels of memory on POB EYE module 128 64 pixels 8129 bits 1Kbytes The challenge of this buffer is to have a ratio of 1 bit 1 pixel The operations on bits are processor intensive The advantage of this 1 bit 1 pixel ratio is that it does not use much memory In fact to change a bit value in memory you need to apply a mask And this mask will be different whether the bit is set to O or to 1 This computation can be relatively time consuming because it must be done 8129 times That s why using the technique 1 bit 1 pixel will need less memory space Another way of drawing a pixel on the screen is to consider that 1 byte draws 1 pixel In that case they will be no delay or mask when switching on or o
47. rminal POB LOADER FRE Pop POB BITMAP POB PATTERN POB TERMINAL Pob Technology Document All Right Reserved Page 46 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 POB TOOLS POB TOOLS are a set of tools for programming loading and controlling the POBEYE module This tool is made up of 6 modules POB TOOLS luli POB TOOLS POB Compiler POE Loader POB Bitmap POB Pattem POB Terminal TE GH_HXSRANA O La Y POB Project r Settings GNUSAM PORT COM POB TOOLS Allows managing an application project POB Compiler Enables one click source file compilation POB Loader Upload an application to the POBEYE module POB Bitmap Produce a library of pictures for the POB LCD128 POB Pattern Create a dictionary of pattern POB Terminal Help debug your application with the serial port Pob Technology Document All Right Reserved Page 47 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 5 1 POB TOOLS installation On the CD supplied with POBEYE module you will find two files Installation of the GNUARM compiler The file bu 2 15 gcc 3 4 1 c c java_nl 1 12 0 gi 6 0 exe is the GNUARM compiler POB TOOLS use this compiler to create your application To install the GNUARM compiler click on this file fe Setup GNUARM fe
48. rning If you choose to supply your POB EYE through the POB BUS make sure not to use the supply connector of the POB EYE otherwise you might damage the board Pob Technology Document All Right Reserved Page 9 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 2 3 Programming and execution Module programming To load a new program in flash memory you need to set the programming execution switch to the programming position and switch on the module Figure 4 POBEYE programming Remark If the module is already on simply switch on the programming position and press the reset button Program execution To run a program set the Programming execution switch to the execution position and then switch on the module Remark If the module is already on simply switch on the execution position then press the reset button Nevertheless if you are using other daughter boards than the POB LCD128 you might have to switch off the whole system and then switch it back on Pob Technology Document All Right Reserved Page 10 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE HN O LOGY 2 4 Serial port UART The serial port is used for module programming and external communication while the program is running Figure 5 Serial port Remark To connect POBEYE to a computer you need a standard cable This ca
49. tion POB Bot User s Manuel TE amp HN OL Oo amp PORTA PORTC and PORTD All these ports are already used connectors H bridge by POB PROTO Nevertheless it is possible to unplug the existing material and use the port as wanted PORTA PORTA can work in 2 modes Analog input except for RA4 which is a digital input of O or 255 Digital I O each pin can be configured independently lf you are using PORTA for analog inputs use the function GetPortAnalog with RA4 as a parameter Note that RA4 is only a digital input taking either the value 0 or 255 In output configuration RA4 works in open drain and if needed add a resistor and 5V on RA4 Functions to use PORTA Ulnt8 GetPortA void Return PORTA value void SetPortA Ulnt8 data Set PORTA pins to output Ulnt8 GetPortAnalog Ulnt8 RAx Return analog value from RAx pin Pob Technology Document All Right Reserved Page 33 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel PO TE amp HN OL Oo amp PORTC Each PORTC pin can be configure separately You can use RCO RC1 RC2 RC3 RC6 and RC7 to manage 6 servomotors Remarks If the user wants to reprogram the PIC 16F877 he will then be able to use the serial port on PORTE by adding a MAX232 Functions to use PORTC Uint8 GetPortC void Return PORTC value void SetPortC Ulnt8 data Set PORTC to output void SetServoMotor Ul
50. to analog input RC7 RC6 RC3 RC2 RC1 are configure as inputs and RCO is configure to manage a servomotor PORTD RD7 RD6 RD5 and RD4 are set to digital inputs and RD3 RD2 RD1 RDO are set to digital outputs Pob Technology Document All Right Reserved Page 36 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp 3 3 Assembly examples with POB PROTO Usually for movements any robots are using 2 DC motors link to a free wheel Motors control requires power electronics The assembly needed to POB PROTO to control DC motors is the following 1604 V_Engine This assembly was done with a L293D double H bridge Each motor is managed by 2 microcontroller pins Pins DO D1 D2 and D3 of PORTD are used to control the motors and set to output in your program The LM317T is a voltage regulator and with the adjustable resistor it is possible to set the voltage to the wanted value Pob Technology Document All Right Reserved Page 37 85 Robot Maker For Innovative Leisure and For Education POB Bot User s Manuel TE amp HN OL Oo amp Push button management To create your own HMI you need a navigation system control by pushbutton for example The following assembly shows how to add a pushbutton to the POB PROTO DO pi 10k The user needs to configure DO as an input and read PORTD with the adequate masks to get the correct DO value

Download Pdf Manuals

image

Related Search

Related Contents

Intel SIU520 SS7 User's Manual  Spaltfix K-440 - POSCH Leibnitz  Operating Instructions - Firmware Center  Spektrum DX7  Bedienungsanleitung  Samsung WB150F Vartotojo vadovas    

Copyright © All rights reserved.
Failed to retrieve file