28
2015 2015 Beta Control System Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 FRC team 358 team358.org team358.org

2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Embed Size (px)

Citation preview

Page 1: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

20152015Beta Control System Beta Control System

Hauppauge Robotics Conference

November 22, 2014

FRC team 358FRC team 358team358.orgteam358.org

Page 2: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

AgendaAgenda

New ComponentsNew Components NetworkingNetworking ProgrammingProgramming Support ToolsSupport Tools Breaking ItBreaking It

Presentation is located at: http://team358.org/files/workshops/

Page 3: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Parts is PartsParts is Parts

2015 Acronyms: roboRIO w/ MyRIO Expansion Port

(MXP) Pneumatics Control Module (PCM) Power Distribution Panel (PDP) Voltage Regulator Module (VRM) Victor SP Talon SRX

AndyMarkhttp://www.andymark.com/Controls-s/262.htm

Page 4: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

New vs OldNew vs Old

Overall 1/3 smaller footprint, 1/3 vertical clearance, 2lb weight savings

roboRIO– Old: cRIO/modules/Digital Sidecar(DSC)/Analog

Breakout PCM

– Old: Solenoid Breakout & DSC Compressor relay/pressure DIO

PDP– Old: Power Distribution Board (PDB)

VRM– Old: PDB 12v output + 12v/5v converter– Old: 5v power for camera

Victor SP– Old: Victor 888/Talon SR/Jaguar(PWM)

Talon SRX– Old: Jaguar (CAN)

Page 5: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

New vs Old - CostNew vs Old - Cost

roboRIO ($435) Pneumatic Control Module

($90) Power Distribution Panel

($200) Voltage Regulation Module

($46)

New ($771)

Plus Victor SP ($60) Talon SRX ($80)

cRIO w/3 modules ($525) Digital Sidecar ($174) Analog Breakout ($152) Solenoid Breakout ($152) Power Distribution Board

($189) 12v/5v Converter ($12.50)

Old ($1204)

Plus Victor 888 ($70) Jaguar ($80)

Page 6: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

LayoutLayout

Page 7: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

roboRIOroboRIO

Specs: https://decibel.ni.com/content/servlet/JiveServlet/download/30419-56-79765/roboRIO+Overview.pdf

PWM (10) + up to (10) on MXP DIO (10) + up to (16) on MXP (4) Relay Analog Input (4) + (4) on MXP (2) Analog Output on MXP Communications

– (2) SPI ports 1x4 & 1x1– (2) I2C ports– UART (1) RS-232 + (1) TTL– (2) USB host ports– (1) USB device port for tethering– (1) Ethernet for Dlink Rev B– (1) CAN for PCM/PDP/CAN speed controllers

Power pins for 6v(2.2a), 5v(1a), 3.3v(1.5a)

– Note 6v measures low if not loaded DIO/I2C/SPI are native 3.3v but handle 5vDIO/I2C/SPI are native 3.3v but handle 5v Short circuit protection

Page 8: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

PDPPDPPower Distribution Power Distribution PanelPanel

Direct replacement of old PDB Minuses: (4) fewer 20/30a Wago connections (net loss of 1)

– But old cRIO required (3) of those for control system No warning LEDs for blown or missing breakers

Pluses: Software Monitoring

– 25ms update rate, 1/8 amp resolution– Per channel current & short circuit (sticky fault)– Input battery under 6.5v (sticky fault)– Does not monitor special roboRIO/PCM/VRM power

outputs– Via CAN communications

Other Notes: Battery power lugs must fit within protective cover (.44” wide) Special roboRIO/PCM/VRM outputs aren’t special. If more PCM/VRM devices are needed just use regular wago power (2015 rules allowing).

Page 9: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

PCMPCMPneumatics Control Pneumatics Control ModuleModule

Replaces old Solenoid Breakout, Compressor Relay, Pressure Switch DIO

Automatic control of compressor operation- no direct user code involvement Supports either 12v or 24v solenoids, pick one w/ jumper The 24v for solenoids is fixed. The 12v just follows battery voltage (brownout

danger). (8) solenoid outputs - that’s (8) single or (4) double or a mixture Additional PCMs can be powered directly from a PDP Wago connection CAN communication Smart monitoring for faults

– Compressor/solenoid over voltage or short circuit– Compressor current– Solenoid on/off– Solenoid jumper setting 12v or 24v– 25ms update rate

No Relay Spike for the compressor Short circuit protection

Page 10: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

VRMVRMVoltage Regulation Voltage Regulation ModuleModule

Replaces 12v protected supply from the old PDB and the 12v/5v converter

Good down to 3.5v (long after everything else blacks out)

Short circuit protection 12v rail and 5v rail are separate, but each 12v rail and 5v rail are separate, but each

rail’s outputs are jointrail’s outputs are joint– All outputs on a rail share overall constraintsAll outputs on a rail share overall constraints– 1.5a1.5a totaltotal continuous current across all rail continuous current across all rail

outputsoutputs– 500ma current limited outputs piggy-back off 500ma current limited outputs piggy-back off

the 2a Max outputs the 2a Max outputs – 2a 2a Max momentaryMax momentary current current

matches the combined peak for a Dlink & AXIS matches the combined peak for a Dlink & AXIS camera (725ma+1.3a=2.025a). camera (725ma+1.3a=2.025a).

Normal continuous current draw for these two is Normal continuous current draw for these two is about 600ma @ 5vabout 600ma @ 5v

Additional VRMs can be powered directly Additional VRMs can be powered directly from PDP Wago outputsfrom PDP Wago outputs

Page 11: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Victor SP/Talon SRXVictor SP/Talon SRX

Victor SP– PWM only– Sealed enclosure– 60a continuous/100a surge– Much smaller footprint (2.5" x 1.125" x 0.875"tall)– Much lighter weight (.2 lbs)– LED indicators blink proportionately to output speed and in various colors (yellow

blink=Disabled, green=forward, red=backwards)

Talon SRXTalon SRX– (2) CAN/PWM connectors-2nd is for CAN chain(2) CAN/PWM connectors-2nd is for CAN chain

Auto-detect CAN vs PWM useAuto-detect CAN vs PWM use– (1) Quad Encoder connection(1) Quad Encoder connection– (2) Limit Switch connections-forward/reverse(2) Limit Switch connections-forward/reverse– (1) Analog Input (for 3.3v)(1) Analog Input (for 3.3v)– 3.3v/5v available3.3v/5v available– Slightly larger than Victor SPSlightly larger than Victor SP– Modes include:Modes include:

slave to another Talon, quad encoder, pot, %voltageslave to another Talon, quad encoder, pot, %voltage

Page 12: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

NetworkingNetworking

DLink Rev B still being used PC talks to roboRIO over USB or Ethernet connection

– roboRIO-358.local (or USB-only 172.22.11.2)– roboRIO does not bridge between USB & Ethernet ports– Multicast Domain Name System (mDNS)

E.g., roboRIO-358.local Static IP vs DHCP

– Static 10.TE.AM.1 for robot DLink/default gateway– .2-.19 set aside for the user to assign, e.g., IP cameras, secondary

processors– .20-.199 assigned via DHCP (Field Router or DLink at home)

roboRIO (roboRIO-358.local ) Driver Station IP camera (axis-camera.local) Development laptops

Page 13: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

CANCANController Area Controller Area NetworkNetwork

Standard in vehicles CAN for roboRIO/PCM/PDP/speed controller communications Use two-wire 18-24 awg twisted pair green/white wire Bus starts at the roboRIO

– roboRIO has a built-in terminator for one end of the CAN bus– The other end also need a 120ohm terminator

PDP has an optional terminator for the other end, or you can make your own

– Other devices (PCM/Talon SRX/Jaguar) each have two CAN connectors to extend a chain of devices

CAN IDs are segregated by device type– The default is PDP id=0 and PCM id=0– The full CAN address of type+ID is hidden

Bandwidth– 17 devices (15 Jags using %v+PCM+PDP) takes up 20% of bus bandwidth– Utilization goes up with a large volume of too rapid status queries, keep it under 90%– Dangerous to increase update rates from the default too high or for too many devices

PDP & PCM should be left at the default 0 address.– Additional modules can have other addresses– Default address 0 is assumed by the system for default logging

Page 14: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Considerations/Considerations/DifferencesDifferences

Self-protect Brownout Cutoff @ 7v – We might see more frequent but less damaging brownouts during matches, of

shorter duration (drive stutter)– @7v PWM/CAN output set to neutral & PCM disabled- motors stop/start jitter– @6.5v the 6v rail shuts down– @6.2v the 3.3v/5v rails shut down - awkward for 5v devices such as encoders– @5v PDP looses CAN– @3.8v roboRIO shuts down– @3.4v VRM drops out

PWM plugs, snug but potential for rattling loose Metal frag showers & pinout cups Weimuller connections

– Wire whiskers bunch up– Wire size 16-18 (smaller gauge is easier to insert, big insulation doesn’t work)

Dual purpose MXP pins– Any Digital Output pins shareable with PWM will be Disabled with the robot

Windows 7/8 to run Driver Station & if using LabVIEW environment

Page 15: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

ProgrammingProgramming

Mostly the same programming API’s as last year for all three languages

Some class/function name changes roboRIO will automatically run whichever language program was loaded last New

– Power API’s Battery voltage, PDP current monitoring, Over current/short circuit faults PCM & PDP, Sticky faults

– Indexing starts at 0 rather than 1 Joysticks, PWM, DIO, Analog I/O, Relay

– Compressor no longer under user code control other than stop/start– Potentiometer class/vi– Built-in 3-axis accelerometer (MMA8452Q) w/selectable sensitivity of +/-2,4,or 8g

Missing– No Cypress board support by the Driver Station (discontinued)– No Driver Station user message display– No Kinect support on Driver Station

Windows, Linux, OSX for Java, C++ development Eclipse for Java (JRE 8 SE Embedded-standard Java release) & C++ (gcc version 4.9.1) Put files in the home directory of the account the program is run from "home/lvuser"

Page 16: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

ProgrammingProgrammingBackward Backward CompatibilityCompatibility

Option 1: LabVIEW & Java Can Use Existing Setups to program cRIOs– Java teams can continue using Netbeans with the old libraries– LabVIEW license from last season never expires (just this edition)

Option 2: C++ WindRiver Expires, so Use a Different Setup– C++ teams can use the project located on FIRSTForge here:

http://firstforge.wpi.edu/sf/projects/c--11_toochain

Option 3: LabVIEW-Only New Software Will Work on cRIO II– Backward compatibility for LabVIEW w/ 4-slot cRIO only

Page 17: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Joystick HandlingJoystick Handling

POV as degrees

xBox Trigger Buttons are now on separate axes

Indexing starts at 0

Rumble Outputs are supported on xBox controllers (must use xInput)

Page 18: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

LabVIEWLabVIEW

Minor Palette Rearrangement Joystick functions revised

– Legacy vi’s, e.g., Joystick Get, will partially work - removed from palette– Joystick Get Values replacement uses a generalized indexing scheme

Modified Behavior– Compressor Open not required, a Solenoid Open will activate the compressor– Index from 0, e.g., USB 0, Button 0, Axis 0, PWM 0

Power palette– roboRIO

Input voltage, current, brownout 3.3v/5v/6v rail faults 6v rail voltage & current Disable 3.3v/5v/6v rails

– PCM Compressor current Compressor & Solenoid see & clear faults Input voltage Solenoid voltage

– PDP Battery input voltage (16) Wago channel currents PDP Energy & Power usage

– Outputs Enabled (DS Disabled, comms loss, overvoltage or brownout Disables) Potentiometer & Limit Switch palettes Read User Button

Page 19: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Update RatesUpdate Rates

PWM Talon, Victor SP, Jaguar, Talon SRX = 5ms PWM Victor = 10ms PWM Servo = 20ms CAN Talon SRX = 10ms CAN Jaguar = 20ms PCM C++/Java= 20ms, LabVIEW=75ms (may

change to 20ms) PDP = 25ms Internal PID on Jaguar & Talon SRX = 1ms

Page 20: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

MiscellanyMiscellany

USB thumb drives work on roboRIO (mount as U & V on root directory)

Use IP or USB Cameras– Axis IP camera can use mDNS (axis-camera.local) or a static IP address– USB cameras are processed by user code on the roboRIO and the user can

forward video/images to the Driver station All user programs run under lvuser account on roboRIO

– Java/C++ are started via the LabVIEW startup mechanism– Can ssh onto roboRIO as lvuser or admin (both blank passwords)

roboRIO clock– Initial date/time when roboRIO is booted seems to be 2/17/1970, 12:40am. When

the Driver Station connects the time on the roboRIO gets sync'ed to the DS. So timestamps may vary accordingly if files are written/created before/after the DS

connects after a roboRIO boot.

Page 21: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Support Apps, Tools, & Support Apps, Tools, & UtilitiesUtilities

No automatic shortcuts on desktop or Start menu (user has to add if wanted)

Driver Station Dashboard WebDASH roboRIO Imaging Tool 2015 Setup AXIS Camera Tool Bridge Configuration Utility BCD Comm (new Jaguar firmware) 3rd Party Tools

– ssh (PuTTY or similar)– ftp

LV cRIO Backward Compatibility– cRIO Imaging Tool 2015– Net Console for cRIO

Page 22: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Driver StationDriver Station

Option to switch back to 2014 FMS protocols. Allows FMS support for teams going to Week 0 events running FMS Offseason software.

Keyboard Shortcuts to Enable/Disable Driver Station –Enable - ' [ ] \ ' key combination.–Disable - Enter key

Page 23: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

WebDASWebDASHH

View and Modify roboRIO settings– Versions– Update firmware– Force Safe Mode– Disable RT Startup App– System Resources Available/Used– Set Static/DHCP IP

CAN Bus DevicesCAN Bus Devices– Set CAN Ids for PCM, PDP, speed Set CAN Ids for PCM, PDP, speed

controllerscontrollers– See PDP & PCM monitoring/clear sticky See PDP & PCM monitoring/clear sticky

faultsfaults

Page 24: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Beta TestingBeta Testing

Some system behavior is due to the more generic use of the baseline MyRIO– WebDASH changes, for instance, are controlled by a different NI WebDASH changes, for instance, are controlled by a different NI

commercial group and could not be made for this yearcommercial group and could not be made for this year

Page 25: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Breaking It: What Didn’tBreaking It: What Didn’t VRM

– Handles short circuits on all outputs– Handles reversed power input

PCMPCM– Handles short circuits on all outputs– Handles reversed power input

PDPPDP– Overloading the PCM/VRM power outputsOverloading the PCM/VRM power outputs

roboRIOroboRIO– Handles short circuits on all outputs– Handles reversed power input

Page 26: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Breaking It: What DidBreaking It: What Did

VRM -Bad– Over current (>1.5a) on the 12v rail– Heating up from repeated over current cycles on 5v rail might

eventually cause damage (we tried) PCM - BadPCM - Bad

– Compressor that pulls >17a constantlyCompressor that pulls >17a constantly PDP - BadPDP - Bad

– 20a fuse: Max load on VRM (2.125a) + high current compressor (>17a 20a fuse: Max load on VRM (2.125a) + high current compressor (>17a continuous)continuous)

– Wire battery terminals backwardsWire battery terminals backwards– Attach motor (inductive load) directly to Wagos w/o a speed controllerAttach motor (inductive load) directly to Wagos w/o a speed controller– Wiring power to CAN busWiring power to CAN bus

roboRIOroboRIO– Can still overload the CPU, use WebDASH to disable user codeCan still overload the CPU, use WebDASH to disable user code

Page 27: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

Beta Testing Still To DoBeta Testing Still To Do

Benchmarking roboRIO vs cRIO Performance Update LabVIEW examples to 2015 style and test

FIRST is still making adjustments– Minor circuit changes to CTRE hardware (roboRIO is in production)Minor circuit changes to CTRE hardware (roboRIO is in production)

E.g., removing a PCM internal fuse that does nothingE.g., removing a PCM internal fuse that does nothing– Firmware fine tuningFirmware fine tuning

E.g., PCM overcurrent timing profileE.g., PCM overcurrent timing profile

Page 28: 2015 Beta Control System Hauppauge Robotics Conference November 22, 2014 FRC team 358 team358.org

LinksLinks

NI Specs– https://decibel.ni.com/content/docs/DOC-30419

Team 358 Beta– http://team358.org/files/programming/ControlSystem2015-2019/

BetaResults.php– http://team358.org/files/programming/ControlSystem2015-2019

Other Beta Teams– Team 11: https://www.facebook.com/FRCBetaTest– Team 1718:

http://www.fightingpi.org/Resources/Controls/Beta/2015.shtml

– Team 111: http://wildstang.org/blog/?p=108 ChiefDelphi Community:

– http://www.chiefdelphi.com/forums/showthread.php?threadid=130303