Presentation is loading. Please wait.

Presentation is loading. Please wait.

Become a Control System Detective

Similar presentations


Presentation on theme: "Become a Control System Detective"— Presentation transcript:

1 Become a Control System Detective
Troubleshooting at the Boundary Between Electronics and Programming 10th year mentor CSA at Sacramento & SVR, 2013 CSA at ALL Regionals!! They are there to help. WRRF Workshop August 2013 Laura Rhodes, mentor, FRC Team 100

2 FRC Control System (on Robot)
All teams use same electronics. Benchtop systems such as this invaluable for S/W development.

3 Driver Station (Windows PC)
Windows PC (works on other PC’s, not just FIRST supplied Classmates). Joysticks are HID devices connected to PC by USB cables. Runs Driver Station software to communicate with robot. Ethernet or WiFI to talk to robot

4 Here’s what you’re supposed to do: Enable/disable Mode Operating Mode
Hey Robot- Here’s what you’re supposed to do: Enable/disable Mode Operating Mode Joystick commands OK Driver Station-I’m ALIVE!! Here’s my battery voltage and other data Every 20 ms Basic idea of robot/Driver Station communication. Loss of comm. Link => robot motors disabled.

5 Tethered (Ethernet Cable)
In the pits, tether by plugging into free port on radio. On the boards we have here, no radio is installed so can plug directly into cRIO. Tethered (Ethernet Cable)

6 Only can do WiFi at your own shop. Must tether in the pits.
Wireless (WiFi)

7 Field Management System
FMS AP Competition mode. Extra delays compared with tethered in the pits – WiFi traffic Field problems difficult to debug, both because FMS is a “Black Box”. Demand and 2012 Einstein field problems forced FIRST to provide better diagnostic tools in 2013. Due to 2012 problems, FIRST imposed WiFi bandwidth restriction on robot communications (7Mb/sec). Field Management System (Wired to FMS to WiFi)

8 Made by National Instruments. PowerPC married with Xilinx FPGA.
Write robot code in LabVIEW, C++, or Java on a PC. Cross-compile for the PowerPC and download application to flash memory on cRIO. FPGA custom image provided by FIRST, defines H/W. Watchdog timer for disabling motors. High Speed counters (e.g. for encoders), analog sensing and accumulation (e.g. for gyros) VxWorks operation system, WPILib libraries, NI libraries, and of course Team code run on PowerPC. cRIO (Robot Brain)

9 Power Distribution Board
Battery connection and custom regulated power for cRIO and other devices. Note LED’s along sides that light up if circuit with load is tripped. Power Distribution Board (PDB)

10 I/O connection points for all signals to/from cRIO Digital I/O card.
37-pin connector to cRIO. Ribbon cables provided in 2012 were problematic. Understand difference between PWM outputs, Digital I/O, Relay outputs. Some sophisticated sensors use I2C port. Digital Sidecar

11 (control voltage to motors)
Speed Controllers (control voltage to motors) All speed controllers do the same thing – provide a regulated voltage to the Brushed DC motors based upon “throttle” command. Both forward and reverse operation allowed. Another name is H-Bridge Think of them as Voltage controllers, not speed controllers. Two ways to send signals PWM – hobbyist servo signaling (pseudo analog, pulse width defines speed and direction) – Jaguar, Victor, Talon – one way communication, no feedback CANbus – Jaguar only – two way communication, status feedback

12 The 2 different ways Pulse Width Modulation is used
PWM vs. PWM The 2 different ways Pulse Width Modulation is used SIGNALLING – telling the speed controller what to do POWER – controlling voltage and motor direction H-Bridge None – Motor free runs S1 and S4 – Motor moves CW S2 and S3 – Motor moves CCW S2 and S4 – Motor brakes Changing the duty cycle of switches controls the average VOLTAGE to the motors. We casually toss around the term PWM – Pulse Width Modulation. But actually this term refers to two completely separate concepts related to the Speed controllers. The first is signalling the controller what to do. The white signal line on a “PWM Cable” is pulsed every 5 to 20 ms. The width of that pulse encodes what the speed controller is to do. (Pseudo-analog technique). The second is how the switches are controlled on the H-Bridge. The switches are cycled at a high rate of speed (~20KHz on the Jags) and the duty cycle affects the average voltage to the motor. If on all the time, 12V. If half the time the switches are closed and half the time they’re open, it’s 6V.

13 Wireless Bridge (Robot Radio) New version (rev. B) required for 2013
NOTE THE 5V regulator. This was missed by many teams (and many inspectors!). Helps prevent radio dropout. Mount away from motors, outside frame, vertical orientation. At home switch set up as “AP”, at competition, set up as “BRIDGE”.

14 Motors Brushed DC motors, hobbyist servos

15 Passing Inspection Point out page of hints in handout
Follow Robot Rules Preinspect using FIRST provided checklist Main breaker easily accessible One motor per speed controller One Wire per Wago connector Lights that are supposed to be visible – make visible. RSL proper operation Robot frame isolated – cRIO and Camera are likely culprits if not. Most up-to-date firmware, Driver’s station application, programming tools

16 Power Distribution Robot Rules – Wire sizes and colors
Schematic provided USE IT

17 Data Connectivity

18 Document your I/O I have a handout for this Do yourself a favor –
well documented I/O list color coded connectors and/or tapes on wires labels on both ends of every wire Labels on motors and speed controllers

19 RobotBuilder New tool for 2013.
Very useful in design discussions when initially configuring robot actuators and sensors. For example, to make sure design fits on a single digital sidecar. Can be used to automatically generate C++ and Java code. Can be used in design iterations but care must be taken.

20 The drive train controls were responding correctly.
Then I tried raising the arm. After that the arm controls responded but the drive train no longer responded to joystick commands. I dunno- everything stopped working When something goes wrong on the field, gather all clues Try to reproduce problem in the pits, watch lights, dashboard & DS displays Problems can be in software, electronics or mechanics: Broken key or loose shaft collar set screw Burned out motor or speed controller Have known good test software ready for loading Drive Team Feedback

21 Troubleshooting on the Robot
Lights, lights, lights Dangling or connectors Metal Shavings in Electronics(  !!!) Troubleshooting guide in handouts – 5 pages (and there could have been more!)

22 Multi-Meter Know How to Use One
Ω – Ohms –Resistance (measure with battery disconnected) V DC - Volts

23 Know your Lights “Lights are your friends” page in handouts.

24 Robot Signal Light Fast Blink = cRIO not communicating with Driver Station Slow Blink = disabled Short on/long-off Blink = either low battery or no code & disabled Long on/short off blink = Teleop mode Solid on = Autonomous mode

25 Jaguar Speed Controller
Solid Yellow = Neutral (zero speed) Fast Flashing Green = Forward Fast Flashing Red = Reverse Solid Green = Full speed forward Solid Red = Full speed reverse Slow Flashing Yellow = Loss of CAN or servo link or Disabled Slow Flashing Red = Fault No light = no power (check power connection)

26 Victor Speed Controller
Solid Green = Full forward Solid Orange = Neutral/Brake Solid Red = Full Reverse Flashing Orange = No PWM signal Flashing Red = Failed Calibration No light = no power OR partial throttle

27 Talon Speed Controller
Solid Green = Full Forward Flashing Green = Forward Solid Red = Full Reverse Flashing Red = Reverse Solid Orange = Enabled within deadband Flashing Orange = No PWM signal or robot is disabled.

28

29 Troubleshooting on the PC
Hey programmers, look at the robot, TOO.

30 Driver Station Operation Diagnostics Setup
Will demonstrate these tabs later in demonstration Setup

31 Driver Station (cont.) I/O Charts

32 Practice Mode & Test Mode
Practice mode very helpful. Can be used to make sure robot properly transitions from autonomous mode to teleop. Test mode new for Works in conjunction with changes to programming environment. Used to verify that hardware hookup is as expected.

33 IP Configuration Everything needs to be perfectly configured. Subnet Mask , IP address for DS computer 10.xx.yy.06 (xx.yy is team number), cRIO is 10.xx.yy.2, radio is 10.xx.yy.1, camera is 10.xx.yy.11.

34 ping cRIO – Are you there?? ping 10.xx.yy.02
If you can’t PING, you’ll never communicate using DS.

35 Dashboard LabVIEW Dashboard (default) SmartDashboard (C++ and Java)
LabVIEW dashboard entirely redesigned for I don’t have much experience with it. However very useful for setting camera resolution and viewing bandwidth. (LabVIEW teams only) Smart Dashboard much improved in 2013 for both Java and C++. New “test mode” functionality, well tied to the Command-Based Paradigm.

36 Driver Station Log Viewer
Be especially on lookout for problems caused by camera – vision processing, data rate (FPS and resolution) Demo this live – using data from 2013 competition. Normal match. Errors. Use with practice mode to verify the controller doesn’t get stuck in Autonomous and properly transitions to teleop. C:\Program Files\FRC Driver Station\ Driver Station Log File Viewer.exe

37 cRIO Imaging Tool Use to load new image. Reload application after reimaging. Will show if module is in wrong slot.

38 Programming Environment
LabVIEW C++ (Wind River) Choose a language and know how to use it before competition. If no mentor available, I suggest either LabVIEW or Java. C++ has too many gotcha’s for the novice. Know difference between deploying (permanent) and debugging (temporary). Java (NetBeans)

39 Axis Camera Configuration
Can also be done manually using camera’s internal webserver. See instructions from FIRST about configuring you IP address on the PC.

40 Measuring Bandwidth Usage
Keep wireless network traffic within 7Mb/s limit perfmon.exe - Perfomance Monitor (Win 7 only) Wireshark – 3rd party Ethernet packet sniffer See ScreenSteps documentation for how to do this. There are new bandwidth limitations. You can make sure you’re in compliance by using the Performance Monitor or Wireshark. (also on LabVIEW dashboard)

41 FRC Bridge Configuration Utility
DO NOT USE THIS UTILITY WHILE AT COMPETITION. When you get home from competition, the wireless bridge will not operate properly for you until you reset it and then reprogram it. This is because special security modes were set up for the bridge to work with the FMS. At competition – BRIDGE MODE At home – AP MODE.

42 Recommended Reading

43 KOP Website http://www.usfirst.org/roboticsprograms/frc/kit-of-parts
Central source of all the documentation – go here first. Links to other documentation, software updates, etc. See main tabs at top: KOP HOME GET HELP TECHNICAL RESOURCES CONTROL SYSTEM DRIVER STATION PROGRAMMING Check often during season for new information and software updates.

44 KOP Website – Control System
Getting Started with the 2013 Control System Robot Power Distribution Robot Data Connectivity Diagram These are the documents to look at first.

45 ScreenSteps Live http://wpilib.screenstepslive.com/s/3120
NEW FOR 2013. Extensive online documentation – can download as PDF. Many levels – mine it deep!

46 RobotBuilder Demos - YouTube
Robot Builder is New for 2013. Brad Miller (WPI) put together a set of excellent training videos on You Tube.

47 Einstein Field 2012 Report WiFi Tampering Loose Wiring Faulty breaker
Unregulated Radio power Bad Ethernet cables Bug in C++SmartDashboard Infinite software loop initializing sensor Custom Electronics flooding communications channel, filling buffer NetTables bug WiFi tampering probably not malicious Unregulated radio power -> radio reboots in match

48 Let’s try it out on real hardware!
Real simple robot – no sensors, no autonomous, two joystick tank drive control, speed controllers on 1 and 2 Visual sweep before powering up, visual sweep of lights after power up. Startup checklist in Handout Start up Driver Station. Point out: Communications light Robot Code light Battery Voltage Team number Enable/Disable E-stop is “Enter key” Space Bar disables robot Charts – CPU usage, memory, packet losses

49


Download ppt "Become a Control System Detective"

Similar presentations


Ads by Google