Arexx JM3-AXT3 User guide

JM3-AXT3
Asuro xTend
Asuro xTend Board
©2014 AREXX Engineering and JM3 Engineering
www.arexx.com
For latest updates check www.jm3-engineering.com!
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 1
Impressum
©2012-2014 AREXX Engineering
Nervistraat 16 8013 RS Zwolle The Netherlands
Tel.: +31 (0) 38 454 2028 Fax.: +31 (0) 38 452 4482
This manual is protected by the laws of Copyright. It is forbidden to copy all or part of the contents without prior written authorization!
Product specifications and delivery contents are subject to changes. The manual is subject to changes without prior notice.
You can find free updates of this manual on
http://www.arexx.com/
Asurolicensed by DLR and “AREXX” are registered trademarks from AREXX Engineering. All other trademark are the property of their owners. We are not responsible for the contents of external web pages that are mentioned in this manual!
Information about limited warranty and responsibility
The warranty granted by AREXX Engineering is limited to the replacement or repair of the Module and its accessories within the legal warranty period if the default has arisen from production errors such as mechanical damage or missing or wrong assembly of electronic components except for all components that are connected via plugs/sockets. The warranty does not apply directly or indirectly to damages due to the use of the robot. This excludes claims that fall under the legal prescription of product responsibility.
The warranty does not apply in case of irreversible changes (such as soldering of other components, drilling of holes, etc.) of the module or its accessories or if the module is damaged due to the disrespect of this manual!
It cannot be guaranteed that the supplied software will satisfy individual expectations or will run completely error-free and without any interruption. Moreover the software can be freely changed and is loaded into the unit by the user. Therefore the user carries the full risk regarding the quality and performance of the unit including all software. AREXX Engineering guarantees the functionality of the supplied application examples provided the respect of the conditions specified in the data sheet. If the SAM-04-LAN or the PC software turns out to be faulty or insufficient, the customer carries all costs for service, repair or correction. Please note the relevant license agreements on the CD-ROM!
The exclamation mark attracts the attention of the user to important instructions that must be adhered to. If you make a mistake in this part, it can lead eventually to the destruction of the robot or its accessories and even endanger your health or that of your environment!
The "Information" symbol draws the attention to useful tips and tricks or background information. It is not always essential to understand everything but it is often very useful.
Symbols
The manual uses following symbols:
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 2
Safety recommendations
IMPORTANT:
Prior to using this robot arm for the first time, please read this manual thoroughly up to the end! They explain the correct use and inform you about potential dangers! Moreover they
contain important information that might not be obvious for all users.
- Check the polarity of the batteries or power supply.
- Keep all products dry, when the product gets wet remove the power directly.
- Remove the batteries or power when you are not using the product for a longer period.
- Before taking the module into operation, always check it and its cables for damage.
- If you have reason to believe that the device can no longer be operated safely,
disconnect it immediately and make sure it is not unintentionally operated.
- Do not operate the module in rooms or under unfavourable conditions.
- This module is equipped with highly sensitive components. Electronic components are very sensitive to static electricity discharge. Only touch the module by the edges and avoid direct contact with the components on the circuit board.
Normal use
This module is developed to use with robots, which allows you to determine basic behaviour patterns and reactions of the robot to external influences yourself.
The module was developed as an experimental platform for all electronic technicians with interest in robotics. In practical tests, it visualises the influence and effects of software parameters as well as physical parameters via the corresponding sensor technology. Any use other than that described above is not permitted.
The product is not a toy and should be kept out of reach of children under 14 years of age! It may only be used in closed, dry indoor rooms. The product must not get damp or wet. Use other than that described above can lead to damage to the product and may involve additional risks such as short circuits, fire, electrical shocks etc.
Content
1. Impressum ................................................................................... 2
2. Safety recommendations ............................................................... 3
3. Introduction ................................................................................... 5
4. Manual ........................................................................................... 6
5. Asuro Setup ................................................................................... 8
6. C++ Software ............................................................................... 11
7. JM3 Robot Tool ............................................................................. 14
8. Connector / Technical Data ............................................................. 15
9. Schematic ..................................................................................... 16
10. PCB Layout ................................................................................. 18
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 3
Asuro Robot with Sensor Module
Asuro xTend board and Compass / Gyro module & Display
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 4
Introduction
The new Asuro xTend board provides multiple extension possibilities. The core is the very powerful ATXMega micro-controller with 32KB Flash & 4KB SRAM running at 16MHz Clock with low power consumption and several interrupt inputs.
The Asuro Robot has got new features with the Asuro xTend extension as following: extended interfaces to the Asuro Robot, the improved Asuro Ext. BUS, a separate sensor extension header, the LC-Display (2x8 Char) inclusive illumination control, 3 buttons, 4 status LEDs, analogue inputs for SHARP distance sensors with power saving circuit, 2nd UART, and 2 ADC or GPIO inputs are rounding up the package.
Simple and fast upload of the program code via USB interface – the slow IR Interface is history (it will be necessary just one more time to update the Asuro)!
Einfaches und schnelles Programmieren des xTend Bords über USB – das langsame IR Interface ist Geschichte (es wird nur noch einmal benötigt!
To preserve already make investments in existing add-ons, e.g. the Snake Vision ARX-SNK20, Ultra-sonic ARX-ULT-10, Bluetooth Kit ARX-BT3, Wireless Kit ARX-WRL03, the interface signal to the Asuro are kept and expanded. Software porting is simple due to the fact that the ATXMega belongs to the same micro controller family from ATMEL.
From the Display ARX-DSP30 Kit you can use the display itself which will be connected to the Asuro xTend board. The display interfaces directly to the micro-controller Atxmega32C4 and the buttons and the trimmer for the display contrast are on the xTend board.
Sensor Module Extension:
- Asuro Compass-Gyro Module Indoor Navigation supported by the new module. The 3D Magnetometer/Accelerometer enables you to compute the heading (3D compass software is included)
Yaw rate of the 3D Gyro tells you how fast you are turning/drifting into a direction in
deg./sec. or detect if the Robot is blocked by obstacles.
- Asuro Baro-Temp-Humidity Module With this extension the Robot knows barometric pressure / altitude (20cm sensor accuracy) and the relative humidity and temperature.
- Asuro Real-Time-Clock Module With this extension the Asuro knows time and date and can be woken up on a programmed time.
There are many, many new options you can develop for your Asuro with the XTend Board – be creative!
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 5
Manual
Distance sensor option Sharp (Left & Right)
Sensor Module header
2 Ch. Power switch for SHARP sensor
ATXmega32C4
Display contrast adjustment
3.3V regulator
USB Programming IF Connector
Display IF (EA DIPS082)
Debug IF (PDI, optional)
3 Button & 4 LED ADC / GPIO header
Ext. UART header
1.1. Hardware configuration and setup
The Asuro xTend Board is designed to support a master / slave configuration together with the Asuro, but it is not limited to.
This description provides guidance for the setup and the functional behavior as mater/slave configuration. The Asuro Robot works as a MASTER I2C device ‘pulling’ the new direction/speed information from the Asuro xTend Board (SLAVE). It computes the drive relevant algorithms (speed detection/regulation) and delivers the battery voltage, speed and switch information. In addition, the power and interface signals are provided to the Asuro xTend board.
The Asuro xTend board collects the sensor signals from the various sources, e.g. Gyro, Compass, Sharp-Sensors and so on.
HINT: It is highly recommended to use a display. The compass must be calibrated by a build in function and procedure.
On the Asuro Extension Bus you have all signals from the Asuro, but with a second I2C Bus working independent from the Asuro Main Board with the other extension seamless together.
The Display can show status messages or other system status information. The menu can be controlled via the 3 buttons – 4 LEDs are additional ‘indicators’.
1.2. Board overview
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 6
S1 S2 S3 LED1 - LED4
The Asuro xTend board provides multiple new possibilities: Features
- ATXmega controller with 32+4KB Flash, 4KB SRAM, 2KB EEPROM
- 2nd independent IC2 Master IF for other extensions
- display interface with trimmer for contrast and display illumination control
- 2 x Sharp Sensor ports with power ON/OFF capability with mounting holes
- 3 Buttons
- 4 LEDs (2 red, 1 yellow and 1 green)
- Line Follower Sensor on Asuro board (automatic switching of signals)
- PDI debug IF (optional)
- PRG-UART via build in USB
- Extension-UART
- 2 ADC/GPIOs
- Connector to Asuro Main
- Connector Asuro Extension
With optional modules:
Compass / Gyro Module Extension
- 3D Digital Gyro (I2C)
- 3D Magnetometer/Accelerometer for 3D compass function (I2C)
Barometer Module Extension
- air pressure, temperature and humidity function (I2C)
RTC Module Extension
- time, date, month year etc. (I2C)
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 7
2.2. Asuro – Setup
Step 1
Solder the extension board connectors into the Asuro. If you had used the Line-Follower (T9, T10 and D11) before, than remove them carefully (de-soldering tool or de-soldering braid!) and re-fit them after the assembly of the connectors. For a better line follower performance you should replace the D11 with an IR 950ns spectrum like TSUS5400 (Vishay).
Step 2
Dis-assemble the motors and mount them top down (contacts to the bottom). Fix the motors mechanically using a wire straps and hot glue.
HINT: Step 2 and Step 3 are only required if you want to reduce EMI influence of the
motors.
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 8
Step 3
Modify the motor wiring on the Asuro board. Use one of the holes to bring the wires down to the bottom side of the PCB and solder them to the motor driver output from the bottom. Take care of the polarity of the wires – it may case wrong turn direction of the motors.
Step 4
Solder the connectors to the Asuro base into the Asuro xTend board. Watch out they are right-angled in both axis.
Hint: Tilted contacts may cause problems contacting the Asuro XTend board to the Asuro Robot.
Step 5
Assemble the screw and the distance pole as shown. Plug in the pre-assembled Asuro xTend board into the contacts on Robot and lock them with a nut.
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 9
Step 6
Plug in the Asuro Compass / Gyro Module and calibrate the sensor (north, east, south west)
HINT: This step is only applicable if you own the Compass module as well.
Step 7
Load the Asuro demo software (hex-file) for the base using the IR transmitter and then load the Asuro XTend demo software via USB IF with the new JM3 Robot-Tool (refer to chapter 4 for more details).
Step 8
Calibration of the 3D Compass:
1. Switch on the Asuro and press button S1 and go to the Heading screen (HD).
2. Use a normal compass to determine the direction to north, east, south and west. Remember the points.
The figure shows the virtual axis relative to the Asuro. The x-axis is red, the y-axis is green and the z-axis is blue. The inclination vector is marked yellow. The angle of this vector is not precisely known and varies with the location on the earth. If the inclination vector and the x-axis vector are in line we can expect the maximum of the measured signal, which is important for a good calibration.
3. Press S3 until the red LED (LED4) illuminates to start the calibration. Point to north and tilt the Asuro plus 90° and minus 90°. Then tilt to the left and right side of the Asuro. Repeat this procedure for east, south and west.
4. After this process press S3 short to finalize the calibration. The calibration data are stored in the EEPROM.
Hint: It is recommended to use a display! Tilt the Asuro not too fast during calibration – this will negatively influence the accuracy of the heading.
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 10
2.3. Display modification to control illumination
In case of you are using the backlit LCD you have to make the changes as shown. Use the
component R5 or R6 (0 ohm resistor) to put it on the position of R7.
The change is not required – you just can control the illumination.
1. Remove R5 / R6 2. Place R7
Hint: The changes requiring average soldering skills with SMT components! Do some soldering test before, if you doesn’t feel well enough with such changes. It is important to use a soldering iron with a slim tip.
3.0 C++ Language software package for Asuro xTend
The C++ language is a superset of the C language or vice versa the C++ language is an extension of the C-language, but more powerful and structured – more rigid in the compiler checks.
All in all it gives a better readable code and better protection against side effects of your software design (e.g. enums and the use of name space definitions for the modules instead of tons of #defines) - and of course with C++ you can combine C-code and Assembler-code if required. Special advantages, will be given if you have multiple instances of e.g. a device driver like a UART which saves memory. The developed code is also easier to port to a new system.
The used Extended Embedded C++ excluded by purpose the following C++ features, which doesn’t make sense on an embedded system:
- RTTI
- Exceptions
Refer also to: http://www.iar.com/Products/IAR-Embedded-Workbench/Technology/Language­standards/
The make file to support your existing C- code and the code Libs from the Asuro board and the C++ code from the Sensor & IO board with examples are included.
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 11
The software can be complied with the GNU AVR and the source code can be edited with Notepad+ or Visual Studio Express (free download at Microsoft) – the makefile is included.
The GCC Tool chain is included – see avr-gcc-4.8.1.zip. Extract to C:\GCC and run addpath.exe to make the correct settings automatically. More detail how to install the Tool Chain please refer to avr-gcc-vs.pdf.
3.1 Asuro xTend
The Asuro xTend Board is used to control all sensor data, buttons, LEDs, the display and give commands to the Asuro or read data from the Asuro.
The provided base SW should be used for all applications and tasks you will program and of course a complete hardware driver library (display, ADC, timer, I2C, UART, LED, key drivers are included.
Programming of the new application s/w will be performed via the new programming tool – the JM3 Robot Tool or the command line based version – the JM3 MultiLoader (which can be used a plug-in for Visual Studio) and the Micro USB port. The self-programming interface is very fast and changes only modified flash blocks!
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 12
3.2 Asuro
Sensor
Address
Asuro xTend (Slave)
0x20
LSM9DS0 Accelerometer, Magnetometer
0x3A
LSM9DS0 Gyro MLSM9DS0 Gyro MS5607-02BA03 Barometer & Temp HTU21D – Rel. Humidity & Temp sensor DS1339U Real-Time Clock
0xD6 0xEE 0xD6 0x80 0xD0
The Asuro itself will be used as the ‘motor controller’. The JM3 Asuro Base SW is provided in the package and must be only one time programmed into the Asuro (assuming you don’t want to change the drive control algorithm or something else on the low level drivers). All application changes will be programmed on the ASRUO xTend Board which provides much better performance and capabilities. Programming of the new software will be performed via the known IR-Interface (slow) which works with the JM3 Robot Tool using the Type ASURO_BASE.
3.3 Asuro Sensor Modules
The software library includes the h/w driver for the gyro, accelerometer and magnetometer, barometer and Real Time Clock. For details of the possibilities please read the descriptions of the manuals and the datasheets of the integrated circuits!
3.4 Asuro Base SW
The JM3 Asuro Base S/W provides an implementation to control the Asuro Robot and communicate to the xTend board – e.g. I2C Driver, PID motor driver, switch and battery measurement.
3.5 I2C Bus Addresses
3.6 Datasheets
ATXMEGA32C4 Microcontroller Manual LCD-Module 2x8 Graphic display LSM9DS0 Magnetometer, Accelerometer and Gyro MS5607-02BA03 Barometer Temperature sensor
HTU21D Humidity and Temperature sensor
DS1339U Real Time Clock
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 13
4. JM3 Robot-Tool
4.1. Programming the Asuro xTend
To program the demo code into the xTend Board you have to install the JM3 Robot Tool
and perform the following steps:
1. Copy the JM3 Robot Tool in a folder and start the program (exe –file).
2. Click on the ‘Add Robot’ icon – enter a name, set the Hostname e.g. COM5 and
3. Select the type to AsuroExt. The right COM number you can look up in the Device Manager – the number depends on your PC configuration!
4. Click OK
5. Click on ‘Add File’ to select the hex file you want to load. Click on Path find the directory of the hex file to upload. Select the robot type – e.g. AsuroExt.
6. Click OK.
7. Click on the Robot Name and the File Name from the list to select them for programming (still light gray and a bit hard to read at the moment) and press the Upload Icon.
8. To store the settings click on Save icon.
Example how the screen could look like.
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 14
5. Connector PIN-OUT
5.1. Connectors to Board
K5: (Asuro Connector Main)
PIN 1 = VCC PIN 2 = GND PIN 3 = AIN0 PIN 4 = RGND PIN 5 = OC
5.2. Connectors on Board
K1: (SHARP_R)
PIN 1 = ADC4 PIN 2 = VCC PIN 3 = GND (switched)
K2: (SHARP_L)
PIN 1 = ADC3 PIN 2 = VCC PIN 3 = GND (switched)
K3: Asuro Extension (sensor module)
PIN 1 = VDD_3.3 PIN 2 = DENG PIN 3 = INTG PIN 4 = INT2 PIN 5 = INT1
PIN 6 = n/c PIN 7 = SCA PIN 8 = SCL PIN 9 = DRDY PIN 10 = GND
K4: PRG_UART
Micro USB A/B connector
K6: (Asuro Connector Ext)
PIN 1 = VCC PIN 2 = GND PIN 3 = AIN0 PIN 4 = GND PIN 5 = OC PIN 6 = V+2 PIN 7 = SDA PIN 8 = V+1 PIN 9 = SCL PIN 10 = INT0
PIN 6 = V+2 PIN 7 = SDA_M PIN 8 = V+1 PIN 9 = SCL_M PIN 10 = INT0
K7: UART1
PIN 1 = RxD PIN 2 = GND PIN 3 = TxD
K8: ADC
PIN 1 = ADC1 (PA1) PIN 2 = GND PIN 3 = ADC0 (PA0)
K9: Display Socket
PIN 1 = GND PIN 2 = VDD PIN 3 = CONTRAST PIN 4 = RS PIN 5 = RW PIN 6 = EN
PIN 7 = DIS_IL PIN 8 = n/c PIN 9 = n/c PIN 10 = n/c
PIN 11 = D0 PIN 12 = D1 PIN 13 = D2 PIN 14 = D3
K10: PDI
PIN 1 = PDI
PIN 2 = VDD33
PIN 3 = PDI_EN
PIN 4 = VDD33
PIN 5 = RESET
PIN 6 = GND
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 15
6. Technical data
6.1. Supply voltage / current consumption (bus not active, no other connections rather than supply voltage and GND).
VCC = 5,0 V ± 2% ICC = 20 mA ± 5,0mA (w/o display and additional sensors)
6.2. Power switches: Iout max = 0.5 A / continuous each channel / peak 1,0A
(2 channels are active at the same time)
6.3. I2C Bus speed (MASTER & SLAVE): 400kHz max.
6.4. All other data according to IC data sheets (see chap. 3.6)
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 16
7. Schematic
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 17
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 18
8. PCB
AREXX Engineering & JM3 Engineering Version: 1.43 Nov 9th, 2014 page: 19
Loading...