Global Specialties RP6v2 CONTROL M256 WiFi Instruction Manual

Global Specialties RP6v2 CONTROL M256 WiFi Instruction Manual

Hide thumbs Also See for RP6v2 CONTROL M256 WiFi:

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RP6v2 CONTROL M256 WiFi and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Global Specialties RP6v2 CONTROL M256 WiFi

  • Page 1 RP6v2 CONTROL M256 WiFi Expansion Module globalspecialties.com 1-800-572-1028 22820 Savi Ranch Parkway Yorba Linda, CA 92887 ©2012 Global Specialties...
  • Page 2 Paying no attention to this manual will cause a loss of warranty! Addi- tionally, Global Specialties cannot be made responsible for any dam- ages caused by neglecting the manual's instructions! Please pay special attention to the chapter “Safety instructions” in the...
  • Page 3 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 the form of a sales receipt.
  • Page 4: Table Of Contents

    Contents 1. The RP6v2 M256 WIFI Expansion Module .......... 5 1.1. Safety Instructions ..............8 1.2. Technical Support ..............9 1.3. Scope of Delivery ..............9 1.4. Features and Specifications ............ 10 2. Installation of the Expansion Module ..........13 3.
  • Page 5: The Rp6V2 M256 Wifi Expansion Module

    RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module 1. The RP6v2 M256 WIFI Expansion Module The RP6v2 Control M256 WIFI expansion module (Part # RP6v2-M256-WIFI or in short RP6-M256) allows you to integrate one or more RP6 and RP6v2 robots in a wire- less computer network, to control them remotely and to transfer telemetry data.
  • Page 6 RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module The clock frequency of the ATMEGA2560 is twice as fast (16MHz) as the controller of the RP6 main board. At the same time there is more free calculation time on the RP6- M256 because the controller is not busy with motor regulation, ACS, IRCOMM, etc.
  • Page 7 RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module The RP6-M256 module offers more than 60 free 5V I/O pins (+6 on the XBUS con - nectors and +2 on the UART connector, i.e. up to a total of 68) on easy to use 2.54mm grid connectors.
  • Page 8: Safety Instructions

    RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module 1.1. Safety Instructions Before you start with the RP6-M256, you should familiarize yourself with the robot itself and try all its example programs WITHOUT the installed RP6-M256 expansion module! This manual is a small addition to the big RP6 manual. Please read it thor- oughly before you do anything with the RP6-M256! The safety instructions in the RP6 manual apply in addition to these, especially the instructions about ESD and the risk of injuries due to sharp pins on the PCB.
  • Page 9: Technical Support

    All software updates, new versions of this manual and further informations will be 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 ●...
  • Page 10: Features And Specifications

    RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module 1.4. Features and Specifications This chapter gives you an idea of what the RP6 CONTROL M256 offers and is at the same time an introduction to some terms and description of components of the mod- ule.
  • Page 11 RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module ● More than 60 free 5V I/O ports on easy to use 2.54mm grid connectors, with fol- lowing alternative functions: ◊ 16x 10 bit A/D converter channels ◊ 12x 16 bit hardware PWM channels ◊...
  • Page 12 RP6 ROBOT SYSTEM - 1. The RP6v2 M256 WIFI Expansion Module ● LC-Display port ◊ Suitable for connecting a 16x2 character LCD. The port also accepts other LCDs such as 16x4, however these must be fastened via two spacer bolts and would protrude on one side...
  • Page 13: Installation Of The Expansion Module

    RP6 ROBOT SYSTEM - 2. Installation of the Expansion Module 2. Installation of the Expansion Module The way you can install the module on the robot depends on the other expansion modules that you might have already mounted on the robot. The mounting hardware shown in the picture as well as antenna and connection cable should be included in the package: As you can see in the picture, the an-...
  • Page 14 RP6 ROBOT SYSTEM - 2. Installation of the Expansion Module Before you can mount the module on the robot, you need to loosen the four screws on the main board. Eventually you can also carefully loosen the small connector of the bumper PCB so that you can completely lift up the main board.
  • Page 15 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-...
  • Page 16 RP6 ROBOT SYSTEM - 2. Installation of the Expansion Module When it is mounted, the display could look like on the picture on the right. The expansion connectors with the free I/O ports can simply be connected via small 10- or 14-pin flat ribbon cables to one or more RP6-EXP expansion modules.
  • Page 17: Robotloader 2

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 3. RobotLoader 2 The new RobotLoader version 2.x (up to version 1.4 called RP6Loader) offers some new functions, especially support for network connections via the WLAN module. The new features will be briefly explained in this section. 3.1.
  • Page 18: New Terminals

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 Acceptable: Bad: The transmission range of the WLAN is strongly dependent on the environ- ment. Any kind of obstacle will more or less reduce the range (especially wa- ter and metal). Nearby WLAN networks, 2.4GHz video transmitters and mi- crowave ovens can also interfere with the own WLAN.
  • Page 19: Wlan Settings

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 3.3. WLAN Settings The WLAN module can be set up via a configuration dialog. To this end, the USB serial interface must be connected to the RP6-M256 module. The settings are automatically stored in the WLAN module and remain there even when the module has been switched off.
  • Page 20: Configure Access Point

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 3.3.1. Configure Access Point The configuration of the WLAN access points varies from one model to another. We recommend to read the accompanying documentation. If possible you should use fixed IP addresses (DHCP deactivated) which makes it easier to address the WLAN module.
  • Page 21: Pc Configuration

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 3.3.2. PC configuration The computer on which you use RobotLoader must be configured according to the ac- cess point / router settings. It is recommended to use static IP addresses. Configure subnet masks and eventually the gateway accordingly (router IP; this must not neces- sarily be the access point but may also be a second separate router for the internet connection).
  • Page 22 RP6 ROBOT SYSTEM - 3. RobotLoader 2 Prior to that, switch to the WIFI Loader tab in the main window of Robot- Loader and make sure that the checkbox Use USB Reset is enabled. This is important as the WLAN module can't reset the AVR microcontroller if the USB interface is connected.
  • Page 23: Microsd Card

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 3.3.5. MicroSD Card You need a microSD card to finish the self-test completely. The SD card must be formatted with FAT32. NTFS or Linux ext3 are not supported. If you don't have a mi - croSD card, you can skip this step.
  • Page 24: Wlan Command-Line Interface

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 connection. You should also see outputs on the LCD (if one is connected). Please fol- low the instructions of the program. First of all, press the two buttons SW1 and SW2. Just afterwards the red LEDs will be tested –...
  • Page 25 RP6 ROBOT SYSTEM - 3. RobotLoader 2 Display the firmware version. show rssi Display the current signal strength. scan Scan for access points show status Display current status show net Display current network status get everything Display all settings get wlan Display WLAN settings get ip Display IP settings...
  • Page 26: Find Out The Wlan Ip Address

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 Please don't change the I/O port parameters without a good reason because they have been set to allow resetting of the microcontroller via the WLAN module which is absolutely necessary for the bootloader. The Passthrough mode can also be activated via the two push-buttons on the module.
  • Page 27: Solving Wlan Connection Problems

    RP6 ROBOT SYSTEM - 3. RobotLoader 2 3.6. Solving WLAN Connection Problems If you experience problems with the connection to the WLAN module, this can have various reasons. Some of these are briefly discussed here. The most important thing: The WLAN access point must be correctly configured! If the WLAN doesn't work with other devices, it will probably not work with the RP6-M256 as well.
  • Page 28: Rp6 Control M256 Wifi Library

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4. RP6 CONTROL M256 WIFI Library As for the robot itself, there is a comprehensive function library for the RP6-M256 with many useful features that make life easier for beginners. The name of the library is RP6 CONTROL M256 WIFI Library or a bit shorter: RP6M256Lib.
  • Page 29: Status Leds

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.2. Status LEDs The LEDs are controlled like the ones on the main board, however only four LEDs are available. This function is called the same as on the main board: void setLEDs(uint8_t leds) Example: setLEDs(0b0000);...
  • Page 30: Lc-Display

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.4. LC-Display The LCD is ideal to display simple sensor values and status messages while the robot is not connected to the PC. The output on the LCD works in a similar way as with a serial interface –...
  • Page 31 RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library void writeStringLCD(char *string) Like the relevant function for the serial interface, writeStringLCD sends a character string terminated by zero from the SRAM to the LCD. So you should use this function only if the text is dynamic and really located in the SRAM and is not plain static text.
  • Page 32: Spi Bus

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.5. SPI Bus The SPI functions should NOT be used if a microSD card is inserted. They have just been ported from the RP6-M32 library and are not really necessary. Basically, you can connect further SPI peripherals to the ISP connector.
  • Page 33: I/O Ports

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.7. I/O Ports As the RP6 CONTROL M256 features in total 60 free I/O ports, we will describe here how I/O ports of an AVR can be accessed in general. We will NOT describe hardware modules like timer capture, output modulator and others in detail.
  • Page 34 RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library CAUTION: The individual I/O pins are designed for a maximum current of 20mA. In total an 8 bit port should not be loaded with more than 100mA. The total load for all I/O ports must not exceed 400mA. If you want to switch bigger loads you have to do this via external transistors.
  • Page 35: Internal Eeprom

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.8. Internal EEPROM You can use the 4096 byte EEPROM that is integrated in the microcontroller, via two small helper functions. The EEPROM allows to store information in a permanent man- ner, the information will be kept even after power off.
  • Page 36: Microsd Card

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.9. MicroSD card The microSD card can be controlled via an additional library that can be found in the RP6M256Lib directory. This library offers many functions to access partition and FAT16/32 file systems.
  • Page 37: Wifi Library

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.10. WIFI Library The WIFI Library offers a few helper functions to communicate with the WLAN module. 4.1.10.1. Data Communication Basically sending data works almost exactly as with a normal UART, except that the functions have a _WIFI extension at the end: void writeChar_WIFI(char ch) void writeString_WIFI(char *string)
  • Page 38: Command Mode

    RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library 4.1.10.2. Command Mode The following functions are not necessary for the data communication with the PC. Once the module has been properly set up via RobotLoader, it becomes almost trans- parent for transmissions and can be used like a serial interface for the microcontroller.
  • Page 39 RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library If you want to wait for an answer of the WLAN module, you can use one of the two following functions. int8_t waitCharResponse_WIFI(char response, uint32_t timeout) will wait for a single character (char response). And int8_t waitResponse_WIFI(char * response, uint32_t timeout) will wait for a complete string.
  • Page 40 RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library In order to make the processing of text replies from the WLAN module easier, the fol- lowing function allows to recognize and analyze individual lines: uint8_t parseLine_WIFI(uint8_t data) It must be called in a loop and every individual character must be passed to it. The re- turn values of the function show if a complete line has been read.
  • Page 41 RP6 ROBOT SYSTEM - 4. RP6 CONTROL M256 WIFI Library Tip: These few simple to use functions are already sufficient for working with the WLAN module. Basically all special functions are driven by text commands and corres- ponding reactions of the WLAN module. The indicated functions allow to do that and therefore nothing else has been added to the central library up to now.
  • Page 42: Example Programs

    RP6 ROBOT SYSTEM - 5. Example Programs 5. Example Programs On the CD / website, you will find some very detailed example programs. They illus- trate the basic functions of the RP6 CONTROL M256 WIFI. Just as for the robot, they may not always be the optimal solution.
  • Page 43 RP6 ROBOT SYSTEM - 5. Example Programs Example 1: “Hello World”-Program with LED text output and LED running light Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_01_LCD\ File: RP6M256_LCD.c The program generates outputs on the serial interface AND sends outputs via the WLAN connection! So you should connect the robot to a PC and watch the outputs on the terminal of RobotLoader! As an option, you can connect the LCD! The robot does NOT move in this example –...
  • Page 44 RP6 ROBOT SYSTEM - 5. Example Programs The text message transmits all I/O port statuses, all measurement values of the ADC channels and all stopwatch counter values. In addition to that a few 16 bit counter values in decimal and binary format (i.e. 16 ASCII characters are displayed – although 2 bytes would be sufficient –...
  • Page 45 RP6 ROBOT SYSTEM - 5. Example Programs Example 6: I²C Bus Interface – Master mode Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_06_I2CMaster\ File: RP6M256_06_I2CMaster.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)! This program shows how to control the microcontroller on the main board in slave mode.
  • Page 46 RP6 ROBOT SYSTEM - 5. Example Programs At the beginning of the program, the transmit power of the ACS is set via the I²C bus. In addition to the ACS, the program also reacts on the bumpers and on eventual RC5 transmissions from a IR remote control or from other robots.
  • Page 47 RP6 ROBOT SYSTEM - 5. Example Programs Example 9: I²C Bus Interface – Motion functions Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_09_Move\ File: RP6M256_09_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 robot moves in this example program! Now we will test some of the move functions already known from the RP6Lib, that are...
  • Page 48 RP6 ROBOT SYSTEM - 5. Example Programs Example 11: WLAN remote control 1 Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_11_WIFI_REMOTE_1\ File: RP6M256_11_WIFI_REMOTE_1.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)! Moreover the robot is remote-controlled via the WLAN connection (text commands) CAUTION: The robot moves in this example program!
  • Page 49 RP6 ROBOT SYSTEM - 5. Example Programs Example 12: WLAN remote control 2 Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_12_WIFI_REMOTE_2\ File: RP6M256_12_WIFI_REMOTE_2.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)! Moreover the robot is remote-controlled via the WLAN connection (text commands) CAUTION: The robot moves in this example program!
  • Page 50 RP6 ROBOT SYSTEM - 5. Example Programs a corresponding number of * are displayed. Only one connection at a time is possible. Therefore the page shouldn't be updated too quickly nor should 2 browsers access it simultaneously. The web server always reacts with the same reply to the GET query. It is unable to deliver other files such as pictures.
  • Page 51: Appendix

    RP6 ROBOT SYSTEM - APPENDIX APPENDIX A – Pin Assignments This section contains the pin assignments of the main connectors with the I/O ports. The connector of the serial interface has exactly the same pin assignment as on the main board. Of course this also applies to the two XBUS connectors. I/O Ports: All 10-pin I/O port connectors (and the 10-pin ADC port, see next page) are mostly pin compatible.
  • Page 52 RP6 ROBOT SYSTEM - APPENDIX ADC Channels: Out of the 16 ADC channels (that can also be used as I/O pins) 8 are available on an 14-pin and 5 on a 10-pin connector, along with the 5 V operating voltage. The re - maining 3 channels are spread on the other 10-pin connectors (see previous page).
  • Page 53 RP6 ROBOT SYSTEM - APPENDIX Other Connectors: PC0/A8 and PC1/A9 are available on a small 3-pin connector. The remaining address pins of the XMEM interface are used for other purposes. On another 3-pin connector you will find the 5V supply rail to connect more external devices e.g.
  • Page 54: B - Tips For The Wlan Module

    RP6 ROBOT SYSTEM - APPENDIX B - Tips for the WLAN Module 1. WiFi Module Passthrough Mode As explained in chapter 3.4, the passthrough mode can be activated via the menu item Options → WiFi SERIAL Config → Enable Passthrough Mode To do this, the USB interface must be connected and the correct port selected in the serial flash loader.
  • Page 55 RP6 ROBOT SYSTEM - APPENDIX It makes sense to first scan for access points with the command scan It lists all access points within range and displays some of the configuration paramet- ers. If your own access point is not in the list, it might be too far away or the recep - tion is disturbed by something (check the antenna!).
  • Page 56 RP6 ROBOT SYSTEM - APPENDIX After the reboot, it is recommended to restore the default settings and re-do all set- tings completely – that can be done very conveniently with the RobotLoader GUI. First of all, click on Run Factory RESET! in the tab Configure Scripts.
  • Page 57 RP6 ROBOT SYSTEM - APPENDIX 3. Usage of GPIO for Command Mode Firmware Version 2.32 or newer allow to use a GPIO to switch into command mode. This is much faster than waiting for 250ms, sending $$$, waiting again 250ms and checking if the command mode has been activated.
  • Page 58 RP6 ROBOT SYSTEM - APPENDIX interface. To connect to the module via ADHOC mode is not as simple as with normal infrastructure mode – the setup procedure is highly dependent on the installed WLAN software and operating system. Therefore this is not described any further in this sec- tion.
  • Page 59: C - Solving Configuration Problems

    RP6 ROBOT SYSTEM - APPENDIX C – Solving Configuration Problems WLAN networks offer many different configuration options. Therefore it might happen that some settings create problems with the configuration of the WLAN module. The following list contains a series of proposals to solve problems with the WLAN con- nection of the RP6v2-M256-WIFI module –...
  • Page 60 RP6 ROBOT SYSTEM - APPENDIX 6. With AVM routers, the option: “The listed WLAN devices are allowed to communicate among each oth- er” must be activated. If this option has been changed, it may take some time until the connection works. If necessary, turn the router and the WLAN module off and on again (the router might need up to two minutes for the reboot).
  • Page 61 RP6 ROBOT SYSTEM - APPENDIX Copy the whole output and send it per mail to the customer support! In case of problems with marking text in the terminal: double-click inside the terminal, keep pressed at the second click, then drag, STRG+C, STRG+V...) Alternatively send the complete log file of RobotLoader (see below) 13.
  • Page 62 RP6 ROBOT SYSTEM - APPENDIX 22. If nothing helped so far, THEN (and only then) try a factory reset of the WLAN module. Go into the configuration dialog in tab "Config Scripts" and click in se - quence on the buttons: 1.
  • Page 63 RP6 ROBOT SYSTEM - APPENDIX General Information about Support Requests: If problems occur that are not described in the manual or if the pro- posed solutions don't work, please contact the customer support with an accurate and detailed description of what has been done and how it has been done.
  • Page 64: D - Recycling And Safety Instructions

    RP6 ROBOT SYSTEM - APPENDIX D – Recycling and Safety Instructions Recycling Do not throw the RP6 or any expansion modules into normal household waste! Like all electrical devices, these components must be brought to a recycling depot or any oth- er collection point for used electrical devices! If you have any questions, please contact your dealer.

This manual is also suitable for:

Rp6v2-m256-wifiRp6-m256

Table of Contents