background image

RP6 ROBOT SYSTEM -  2. Installation of the Expansion Module

If you also have the 16x2 characters LCD, you should connect and mount it to the ex-

pansion module PRIOR to installing it on the robot. 
The 14-pin ribbon cable of the display is very flexible and can be easily folded. In or-

der   to   fit   well   under   the   display,   you 
should   fold   it   for   the   RP6-M256   module 

like shown on the picture (may vary ac-
cording to the display model!). 
Now you can fasten the display e.g. with 
20mm   or   25mm   spacer   bolts,   suitable 

nuts and screws on the expansion mod-
ule. 
You can also use any other text LCD with 
HD44780  compatible  controller.  You  just 

need to solder a suitable cable to the dis-
play.  

Please   pay   particular   attention   to  

the proper pin assignment! Note: The initialization carried out by the bootloader is set  
for a 16x2 characters display. The status messages can appear on larger displays as  

well but maybe in other places than expected.

 

 

You don't need 4 spacer bolts as shown on the picture. 2 pieces (both on the front 

or 

on the rear) are sufficient to fasten the display. 

CAUTION: During installation of the 

display, please make sure that the 
thin   antenna   cable   is   not   clamped 

under the spacer bolt! This can hap-
pen easily, so push the cable care-

fully   aside   when   you   fasten   the 
spacer bolt! 

Tip:

 

The RP6-M256 is supplied with two small PCB pieces with two M3 drill  
holes. These are OPTIONAL (i.e. they are normally not necessary) and  

can   be   used   as   adapters   for   LCDs   where   the   mounting   holes   don't  
match exactly to the drill holes on the PCB. You just might need to fit  

the height of the spacer bolts with nuts or rings. 
The PCB pieces can also be used for other mounting purposes, e.g. to  

install the antenna mount at another location (with slightly inappropri-
ate drill holes). You eventually only need two additional M3 screws and  

nuts.

- 15 -

Summary of Contents for RP6-M256

Page 1: ...globalspecialties com 1 800 572 1028 22820 Savi Ranch Parkway Yorba Linda CA 92887 2012 Global Specialties RP6v2 CONTROL M256 WiFi Expansion Module...

Page 2: ...rate the devices properly and how to avoid dangerous situations Furthermore the manuals provide important details which may be unknown to average users The RP6 CONTROL M256 manual is only supplementar...

Page 3: ...rom date of purchase Global Specialties will without charge repair or replace at its option defective product or component parts Returned products must be accompanied by proof of the purchase date in...

Page 4: ...WLAN Module 21 3 3 5 MicroSD Card 23 3 4 WLAN Command Line Interface 24 3 5 Find out the WLAN IP Address 26 3 6 Solving WLAN Connection Problems 27 4 RP6 CONTROL M256 WIFI Library 28 4 1 1 Initializat...

Page 5: ...tware library is compatible with the other AVR processors of the RP6 such that is not necessary to start learning everything again A specialty of the module is the highly energy efficient 802 11b g WL...

Page 6: ...flash ROM and SRAM memory together with bus connection to the peripherals Around it there are the numerous 8 bit I O ports 6 timers 4 USARTs serial interfaces or two dual SPI UART ports SPI I C Bus TW...

Page 7: ...rent status and sensor values The numerous I O ports allow to add lots of user interface elements like additional buttons A 10cm tall 2 4GHz antenna with 2dBi gain 15cm u FL to RP SMA pigtail cable an...

Page 8: ...d E g if an I O pin is normally used as an input but the program for the wrong controller configures it as an output it could get overloaded because of the connected circuit Normally nothing serious w...

Page 9: ...published on this site 1 3 Scope of Delivery You should find the following items in the carton of the RP6v2 CONTROL M256 WIFI Completely assembled RP6 M256 module 1 x 10cm 2 4GHz WLAN antenna 1 x 15cm...

Page 10: ...er 10cm long 2 4GHz antenna with 15cm pigtail cable Distance max 100m line of sight free of obstacles depends on interference level Data rate via serial interface 500kbit s identical to the bit rate w...

Page 11: ...rigger and 9V maximum voltage recommended are 5V max like for the other A D converters These can be read independently from the microcontroller and also be used to wake up the WLAN module Voltage divi...

Page 12: ...ase of this module the on board WLAN module can also be used to upload new programs This frees up the serial interface for other applications however during booting the bootloader generates outputs wi...

Page 13: ...rough the PCB like on the picture If this is not the case you can correct it by yourself The RP SMA connector should be firmly mounted on the antenna mount If not you can fasten it carefully via 2x pl...

Page 14: ...ting holes on the main board as shown on the picture On the picture above all 8 spacer bolts are fastened also those of a second expansion module After that you put the expansion module on top of the...

Page 15: ...racters display The status messages can appear on larger displays as well but maybe in other places than expected You don t need 4 spacer bolts as shown on the picture 2 pieces both on the front or on...

Page 16: ...a second level A combination with the RP6 M32 module would also be possible A combination with the RP6 M128 does not make so much sense as unfortunately the C Control soft ware doesn t support the I2C...

Page 17: ...rmat e g 192 168 10 171 2000 The standard communication port is 2000 This can however be changed in the settings of the WLAN module Basically you just have to select the desired address select the hex...

Page 18: ...can be used simultaneously for outputs of the program which can be very useful during the development stage of new soft ware for the RP6 e g display at the same time outputs from the controller on th...

Page 19: ...the dialog At the end just click on Configure WIFI Module prior to that select the appropriate port in the serial loader tab Then the RobotLoader switches automatically to the Log view and displays t...

Page 20: ...e other settings according to your network You can try out various WLAN channels if some are strongly disturbed by neighbor networks or other sources of in terference Channel 1 6 or 11 are not overlap...

Page 21: ...interface on the PC to the PROG UART connector on the RP6 M256 via the 10 pin ribbon cable and start the RobotLoader Turn the robot on If you have an LCD a text message should be displayed The status...

Page 22: ...slowly This means that the WLAN module has set up a connection Detach the network terminal via the menu View Detach Network Terminal and place it next to the RobotLoader window This eases the operatio...

Page 23: ...ains some ASCII text that is read by the program and sent to the PC via the WLAN connection A test string at the beginning of the file will be checked and only if the text has been read properly the t...

Page 24: ...way is via the serial interface USB interface For this purpose the microcon troller switches into a Passthrough mode where it transfers everything from the PC to the WLAN module and the other way roun...

Page 25: ...n auth 4 Use WPA2 access points with automatic connection to the next access point set wlan passphrase PASS Set WPA passphrase set wlan hide 1 Hide WPA passphrase for get command set wlan linkmon 5 Se...

Page 26: ...the module You can also enter command mode via the network connection It works quite similar via the input of The commands are identical but please note that the connection is closed when you change t...

Page 27: ...oft firewall At the first start of the new RobotLoader a security control dialog might appear as the RobotLoader wants to listen on UDP port 55555 im mediately after starting That should be allowed Of...

Page 28: ...far from being perfect You can improve it and add many additional things Here you have to use your own programming skills New versions of the library will be published online This applies also to the...

Page 29: ...uint8_t led void setLED4 uint8_t led setLED1 1 LED1 on setLED2 0 LED2 off 4 1 3 Buttons The two buttons on the board can be queried via the following routines uint8_t getPressedKeyNumber void This fun...

Page 30: ...rix displays for performance reasons This function sets also the Enable signal so that the LCD accepts the data void writeLCDCommand uint8_t cmd This function calls setLCDD but sets the RS line to low...

Page 31: ...fied length on the LCD The paramet ers are identical to those of the same function of the serial interface showScreenLCD LINE1 LINE2 To make text outputs on an LCD easier this function allows to write...

Page 32: ...ble via the SPI bus whereas the high byte is sent first void writeBufferSPI uint8_t buffer uint8_t length Transfers up to 255 bytes via the SPI bus from an array of sufficient size The number of bytes...

Page 33: ...PORTL IO_PL5_OC5C High PORTL IO_PL5_OC5C Low If a bit in the DDRx register is set to 0 the relevant pin is an input Example DDRD IO_PD7_T2 PD7 is now an input PINx register shows the status of the pin...

Page 34: ...uch as LED search lights and motors definitely need an external driver circuit They can NOT be connected directly to the I O ports a power driver and posi tion control is already built in model servo...

Page 35: ...rea is secured per checksum i e the bootloader re cognizes wrong data and overwrites it with standard values Additional hint The EEPROM has a typical life time of several million write cycles This is...

Page 36: ...empty card Tip It might happen that the file system partition table on the card gets damaged when a program error occurs or power off reset happens while data is written to the card It might be neces...

Page 37: ...use this function It supports data flow control and might there fore block if the WLAN module takes more time to send a packet via the network You must take this into account in your own programs For...

Page 38: ...configuration data that RobotLoad er stores in EEPROM Therefore you can simply activate the use of the GPIO14 pin in the WLAN configuration dialog in RobotLoader With void leave_cmd_mode_WIFI void yo...

Page 39: ...uld use them with care If a com mand fails e g because the WLAN module was just busy with something else long delays might occur For more complex programs you might need non blocking variants In this...

Page 40: ...1 if a line delimiter has been recognized and 2 if the buffer was too small everything that fitted in the buffer can still be read Standard is 254 characters The buffer is defined as char receiveBuff...

Page 41: ...in the example programs but of course by far not all possible functions Small example To change the IP address netmask and gateway just proceed as follows enter_cmd_mode_WIFI issueCMD_WIFI set ip add...

Page 42: ...enough for highly complex programs and even for small real time operating systems and simple web servers Moreover you can store very large amounts of data on the SD card You can of course exchange yo...

Page 43: ...xample 2 Buttons and LC Display Directory RP6Examples RP6_M256_WIFI_EXAMPLES Example_02_Buttons File RP6M256_Buttons c The program generates outputs on the serial interface the WLAN connection and on...

Page 44: ..._TESTFILE txt from the example directory onto a suitable microSD card You can then insert the microSD card in the card slot of the RP6 M256 The robot must be turned off when you do that Then turn the...

Page 45: ...via the I C bus as every bus access costs quite some time The ACS on the robot mainboard is a good example The sensor status changes only quite seldom and it would not be very efficient to keep pollin...

Page 46: ...can be used almost exactly as the normal RP6Lib for the controller on the main board Many functions and variables have the same name as in the RP6Lib This makes it easier to use parts of the programs...

Page 47: ...P6M256_10_Move c This program shows the use of the I2C bus master mode The controller on the main board of the robot must have loaded the I2C slave example program RP6 Base_I2CSlave hex CAUTION The ro...

Page 48: ...tive behavior A little instruction manual of the program is displayed right at the start per WLAN First you type in cmd in order to activate the interpreter Activate means activa tion of the robot con...

Page 49: ...as last step because once this is activated the robot just drives forward without checking for obstacles Even if Cruise is deactivated the robot still reacts on obstacles just try to move your hand in...

Page 50: ...tten into a text file on the card Among oth ers a few standard C functions for the processing of the strings will be used Additionally the small web server from the previous example has been integrate...

Page 51: ...PI UART ports are on the same pins Most of the PWM and timer capture channels are also on the same pins however the timers them selves are different note OC0B and OC2A B are 8 bit timers the others ar...

Page 52: ...uilding your own cable for the LCD Unlike the RP6 M32 and RP6 M128 module the display can be controlled in 8 bit mode and no ex ternal SPI shift register is used for the data bits Thus the pins can al...

Page 53: ...ge for different applications and can be read by the WLAN module independently from the microcontroller The WLAN module can be woken up from standby and the measurement values can be requested via net...

Page 54: ...set WIFI Enable Passthrough This triggers a hardware reset of the WLAN module and the complete boot output is displayed The output in the serial terminal should look approximately like this if the mod...

Page 55: ...en possible with the RobotLoader as it contains a small FTP server for the test routine that is activated during a very short period during the test This function should become generally usable in fut...

Page 56: ...don t forget to set the WPA pass phrase If the new version causes problems you can reactivate an old image with boot image XX XX stands for the number that the ls command displays in column FL in fron...

Page 57: ...oon as the unit is connected to a power supply and deactivate the LCD Additionally the baudrate of the WLAN module and the microcontroller UART that is connected to it can be configured This setting i...

Page 58: ...bridged it often enough After that the initial configuration can be done in RobotLoader 5 List of Tested Routers Access Points The following routers access points series have been tested with the WLAN...

Page 59: ...E g all com puters in subnet 192 168 10 x with subnet mask 255 255 255 0 4 Does the WLAN and network connection work with other devices If the WLAN connection doesn t work with a notebook or similar...

Page 60: ...the settings of all involved firewalls 9 Port 2000 TCP and UDP must be allowed In addition port 55555 UDP should be allowed for Broadcast and Auto Discover function 10 Please try and deactivate the f...

Page 61: ...devices Notebook Smart phone or similar 18 Try with a notebook or equivalent to connect to the WLAN module The note book should be connected PER WLAN to the same access point not per LAN cable If thi...

Page 62: ...the normal boot process 5 Immediately afterwards bridge and open the contact with a screwdriver or a jumper e g the jumper of the ISP BOOT 5x in sequence with pauses of one second not shorter 6 The L...

Page 63: ...nate RobotLoader and send the full log file RobotLoader logfiles robotloader_logfile log as attachment to your request to the customer support Warning The file is overwritten on every new start of Rob...

Page 64: ...ct with skin Use in this case appropriate protection gloves to handle the battery Do NOT short circuit batteries and do not throw them into fire Do not recharge normal batteries They might explode Rec...

Reviews: