SCRC:Indoor Robot-Magellan: System Interactions

From SCRC
Jump to: navigation, search

2017 Update: This document is not accurate and needs revision. - Rob

Required I/O by Sub-System

NOTE: The I/O currently described here is very imprecise. Please step up and fill in the details! This is currently written from the perspective of the low-level hardware devices. We need to describe how we will translate that into high-level I/O that can interact with the Software system. See what's defined in Hardware Interfaces.

Navigation:

Navigation is handled by the main system programming on the on-board laptop. Sensors report by serial (via Serial to USB adapter) to the laptop to handle all navigational processing and decisions. The contest rules don't allow (WIFI) communication. We need to verify that a laptop with wifi turned off is allowed.

  1. Sensors : HC-SR-4 ultra sonic distance sensor. The arm's gripper with needs a sensor to detect that it is over the coffee table. The arm has limit switch sensors at the ends of its travel. The gripper needs a sensor to see where the pop can is and to detect that the can is between the gripper fingers (and the gripper can close on the can).
  2. Distance Sensor Protocol
    1. The Distance Sensor Protocol is a string that is transmitted with updated sensor data to the laptop. As the sensors need a trigger pulse to tell them to take a measurement and send back a pulse on how long it takes to receive the first ultrasonic echo back, a robot controller is needed and will send the data on the laptop. The protocol is 32 bytes long with a header that starts with ASCII "A" twice. If the header isn't 32 bits it's considered invalid.
    2. Sample String AA 000 001 002 003 004 005 0006 0007 0008
    3. Baud Rate is 115200, Transmitted by 8 bits No Parity and 1 Stop bit at TTL levels over usb and appear on the laptop as a COM (serial) port.
Protocol Map
Data Name Length Description
0x41, 0X41 Header 0xFFFF Header Data ASCII AA
0x000 Distance Sensor 1 0xFFF Port Bow, Distance 0x00-0x3FF >> in what units? cm? << 4 byte binary integer, most sign byte first
0x001 Distance Sensor 2 0xFFF Port Aft
0x002 Distance Sensor 3 0xFFF Starboard Bow
0x003 Distance Sensor 4 0xFFF Starboard Aft
0x004 Distance Sensor 5 0xFFF Bow
0x005 Distance Sensor 6 0xFFF Aft
0x0006 Compass 0xFFFF Compass Data 0-360 (0x00 - 0x0168) >> in what units? degrees? (whats the resolution on the compass?)<<
0x0007 Spare 0xFFFF TBD
0x0008 Spare 0xFFFF TBD

Propulsion:

  1. The base (platform) is moved by EMG30 gearmotors with encoders and has wheels about 4" in diameter. [1] The motor has a rated current of 530 milli Amps at 12v and a stall current of 2.5A.
  2. A MD25 motor driver controls the gearmotors and counts the quad encoder signal. It can be controller by 5v TTL serial or 3.3V I2C from the robot controller. [2] Documentation is here- [3] It can drives motors with up to 12v and 2.8A per motor. The MD25 is powered by a 12v 7 Amp-hour battery, also provides enough weight to overcome the magnetic seal of the fridge door (overwise the wheels would spin).

Manipulation:

  1. in: Arm up/down (positive/negative current flow) 12V @ 1/2 Amps
  2. in: Gripper open/close (positive/negative current flow) 12V @ 1/2 Amps (Stall current may reach 5A and damage motor windings)
  3. out: Arm encoder ticks (form TBD) ticks, not mm? We have a web page somewhere saying we're using cm.
  4. out: Gripper motor current spike or encoder ticks (TBD) or limit switch. Can indicate fully open or closed (possibly on an object). The VEX gripper is spring loaded to close and the springs can hold a full can of pop.

Platform:

  1. N/A (This is the physical fabrication of all other systems.)

Laptop:

  1. A small windows based laptop that the programming team will programming to give commands to 1 to 3 robot controller boards. Uses 1-3 USB port (via port expander) to control 1-3 robot controllers.

Robot Controller:

1 to 3 robot controller boards than talk to the distance sensors, base motors, and arm motors. As these boards are not multi tasking (every thing has to be done with interrupts), so initially there maybe separate boards for the base motors, distance sensors, and arm motors and limit sensors. These will be combine if possible after the programmers have a working base to begin programming on. Each board talks to the laptop using its USB port using Serial at 19200?? bps, 8 bits, no parity,...

The robot controller boards are Arduino Due boards running at 48Mhz, with 54 I/O pins (including analog input pins). It allows interrupt on any and all pins (instead of just 2-6 pins of other Arduino boards). It supports 12 PWM outputs (to control motor speed on the TB6612 motor controller). Each PWM is given its % pulse duty cycle and no additional code is needed to time the pulses as they occur.

  1. distance sensor controller - 6 HC-SR04 ultrasonic distance sensors[4] - each needs 5v power, trigger signal, and output pulse length that is how long to receive the (first) echo back. 6 digital outputs and 6 digital inputs needed. May need more distance sensors due to holes in coverage between (say) the front and side sensors. Sends distance once per second to the laptop. (can laptop use the info that frequently?). Maybe have whisker sensors (micro switches) to detect the sneaker in the way and other options that are not tall enough for the ultrasonic distance sensors.
  1. base motors controller - talk to the MD25 motor controller using TTL serial at 5v (or I2C at 3.3v) convert the MD25 protocol to laptop protocol. 2 serial pins TX & RX, 12v is supplied to the motors via the MD25. Receives travel direction, speed, distance to travel, turn instructions from the laptop. Sends distance traveled once a second to the laptop (from the motor encoders).
  1. Arm controller - has TB6612 dual motor controller drivers[5] to controller the arm motors, read the encoders pulses on the motors and the limit switches are the ends of travel. Up/down motor, extend/retract horizontal arm, rotate horizontal arm to vertical position to fix in 2 foot by 2 foot starting/ending position. Each motor encoder needs 3.3 to 5v power and outputs 2 quad encoder signals. There may be a need to turn the robot arm left or right to align with the pop can, but we will initially use the robot base motors to turn the arm (by turning the base). The Sharp IR distance sensor requires 5v and outputs a analog signal that is non-linear distance to the object. The arm motors are powered by 12 V. Each motor has needs a pwm signal, 2 direction signals, and outputs 2 encoder signals. Each TB6612 controls 2 motors and requires a standby signal. 17 signals for 3 motors, 22 signals for 4 motors. The TB6612 motor driver breakout boards are made by at least 2 companies - but they differ in spacing between the 2 rows of pins and the order of the signal pins. The TB6612's direction pins allow for CW, CCW, coasting, and braking to be done.

Power:

  1. in: 12v DC 7 Amp-hour, rules require an emergency stop button (correct?), "Go!" Switch to start movement of robot.
  2. in: 5v from laptop for robot controller board(s) and sensors.
  3. out: 3.3V or 5V, activates power via relay for all moving parts. >> do we need this? <<

Software:

  1. in: (TBD) power for computing platform running overall control program. The programming team plans to use C##.
  2. We need to define interface layers to all other systems (other than Power) that translate high-level software I/O into hardware I/O. This is defined under Hardware_Interfaces.