BB's File Cabinet
Misc

 

 

 

Robotics - Robobricks - WireHost (Rev. C)

 

                     

1.0  Introduction

This module provides a two-way communications interface between a host laptop (or desktop) computer and any of the RoboBricks2 modules connected to the CAN Bus.  The WireHost module is a tremendously useful debugging tool since the user can exercise direct control of any connected module from his laptop computer.  Simple keyboard commands typed on the host computer can be sent to any connected RoboBrick2 module. Replies, if any, from the module are displayed on the host computer. Since the WireHost uses a J11 cable for communication and the Laptop uses a serial cable,  a DB9RJ11 module or an equivalent device is necessary to provide a physical interface between the  cable types.  The DBRJ11 serves no other purpose but to accommodate this physical interface.

2.0  Connecting the WireHost Module

Connect the WireHost module to the CAN Bus and use the DB9RJ11 to interface the RJ11 cable from the WireHost with the DB9 cable coming from the serial port of the laptop computer.  The microcontroller chip should be removed from the Controller28 module (same is true for other Controller modules) otherwise the microcontroller chip will be sending commands at that will interfere with the WireHost commands being sent from the laptop.

[picture 1  module alone;       picture 2, module connected to laptop and CAN bus.]

3.0  WireHost Communications

Some of the more useful commands used by the host computer are:

  - Interrogates the CAN bus and lists all connected modules.

For instance, assume that an IO8, MiniMotor2 and an LCD32 module are connected to the CAN bus and host computer has established a communication with the CAN bus using a communication program such as Windows Hyperlink.  At the prompt, typing the command "Z" will result in the following information being printed to the host computer screen:

03:10 00 03 01 03 0C:"MidiMotor2-B" 07:"Gramson"
08:10 00 08 01 03 05:"IO8-B" 07:"Gramson"
20:10 00 20 01 03 07:"LCD32-A" 07:"Gramson"

The first two numbers shown for each module are that module's address given in hex notation.  For example 0x03 is the address for the MiniMotor2 module and 0x20 is the address for the LCD32 module.  The letter following the modules name identifies the module's revision number and the number (07) is the length of the next string (in this case "Gramson").

 Sxx - Selects Module xx for two way communication where xx is the module's Hex Address as shown in the chart below.  

A module must first be addressed before any communication between it and the host computer can take place.  The chart below lists each module's address number.  The hex addresses are show in red and are to be used with the Select Address  command S.   For instance, to establish communication with the LCD32 module, the command "S20" would be sent from the host computer.  and establish communication with the Shaft2 module, the command "S5" would be sent.  Communication can only take place with one module at a time so every time you switch from one module to another, you must send the appropriate address information first.

RoboBricks2 Module Types & Addresses

Module Name

Description

Address

Dec Hex
 

Function RoboBricks2

   
 Camera1 Interfaces to a General-Vision Cognisight MTVS camera 12  0x0c
 Compass8 Uses the Dinsmore  1490 digital compass (45 degree accuracy). 7  0x07
 Controller24 Master Module for the Basic Stamp 24  0x18
 Controller28 Master Module for 28 pin PIC or Atmel Microcontroller  28  0x1c
 Controller168 Special Mike Thompson design  168  0xa8
 Ether1 Interface for a 10baseT Ethernet  13  0x0d
 Flame1 Interface to a Hamamatsu® R2868 UV TRON flame detector tube 14 0x0e
 IMU1 Interface for angular and linear acceleration modules 15 0x0f
 IO8 8 ports independently configurable as  a digital input, digital output or analog input 8 0x08
 IRDistance2 read distances from up to two Sharp® GP2D12 sensors  4 0x04
 Laser1 A laser reflectometer sensor detects laser beam reflections 1 0x01
 LCD32 Module outputs to a 2×16 character LCD  32 0x20
 MidiMotor2 H-Bridge / PMW motor controller max current of 3.5 Amps/motor 3 0x03
 MiniMotor2 H-Bridge / PMW motor controller max current of 1.2 Amps/motor 2 0x02
 Orient5 5 channels = 3 axes of acceleration and 2 axes of magneitc bearing 6 0x06
 Servo4 Controls for 4 SonarSR modules 11 0x0b
 Shaft2 Counts clicks on two quadrature rotation sensors. 5 0x05
 Sonar2 Being replace by Sonar6 9 0x09
 Sonar6 Accomodates 6 Ping, SRF04, SRF05, or EZSonar ultrasonic sensors 16 0x10
 Voice1 Voice record and playback using ISD4003 chip 10 0x0a
 Wireless1 Wireless connection via a ZigBee® 18 0x12
 

Utility RoboBricks2

   
 DB9RJ11 Intefaces an "RJ11" connector to a "DB9" connector used with a WireHost Module n/a n/a
 WireHost Connects computer to CAN Bus via an RS-232 serial port n/a  n/a
 USB1 Used to connect to a USB port. 17 0x11
 Splice Spice CAN Bus cables together n/a n/a
 Terminate CAN Bus terminator n/a n/a
 Terminate2 Configurable as either a Splice or Terminator n/a n/a

X cc - Executes the individual commands found in the Programming Table of each module expressed in Hex notation. 

A module's commands are listed in binary notation in its own unique Programming Table .  However when using the X command with the Wirehost, the host computer command bytes must be converted from binary to  hex notation. For example, the IO8 Programming Table shows the Analog_Mask_Set command is 0000:0101.  To execute this command from the host computer, send "X05."

 

 

 

 

© 2010 All Rights Reserved