1 of 42

Robot Challenge:�Troubleshooting and Debugging

Coach Series

A random collection of tips.

Disclaimer: This private training is provided by the North Texas Region and is not affiliated or operated by the LEGO® Group or by FIRST ®. The LEGO Group® and FIRST® are not responsible for any of its activities.

1

Robot Design: Troubleshooting 101 – Coach Series

2 of 42

Learning Objectives

  • Ability to define troubleshooting.
  • Familiarization with fundamental robotics troubleshooting and debugging methods and best practices.

2

Robot Design: Troubleshooting 101 – Coach Series

3 of 42

Introduction

  • Computers are simple logic machines; they repeat what they have been told - that is it.
  • Outside the normal accuracy limitation of the machine, something has had to change for the machine to be doing something different.
  • Your robot does only what you told to do. This is not always the same as what you want it to do.

3

Robot Design: Troubleshooting 101 – Coach Series

4 of 42

Troubleshooting, there is no avoiding it.

  • Troubleshooting is something all coaches and mentors will need to do at some point.
  • The good news is that the more you do it, the more you learn, and the better you become at solving problems.
  • At the highest-level troubleshooting steps are similar no matter what the system or problem you encounter.
  • Troubleshooting starts with observation and asking questions.

4

Robot Design: Troubleshooting 101 – Coach Series

5 of 42

What is troubleshooting?

Troubleshooting is a systematic approach to problem solving to isolate and correct issues with machines, electronics, computers and software systems.

5

Robot Design: Troubleshooting 101 – Coach Series

6 of 42

5 Fundamental troubleshooting steps

  1. Identify and Verify the Problem. If you don't know what is wrong - what is “really” wrong, you can't fix it (Observation).
  2. Rule Out the Obvious. Are all the cables plugged in? Is the battery charged? Are you running the right program. (Seriously, you'll be amazed at how many “mysterious” problems are caused by obvious things.)

You can observe a lot by just watching. - Yogi Berra

6

Robot Design: Troubleshooting 101 – Coach Series

7 of 42

5 Fundamental troubleshooting steps

  1. Start with the Simple Solutions. Reboot. Charge or change the battery. Replace parts with a known good part.
  2. Use Isolation Troubleshooting Techniques. Optimally, every single step you take in troubleshooting a problem should eliminate half of the possible things that could be wrong.
  3. None of Us Are as Smart as All of Us. You cannot possibly know everything. Don't try. Don't pretend. Know when to ask for help. (You probably already figured this out because you’re reading!)

7

Robot Design: Troubleshooting 101 – Coach Series

8 of 42

Essential Troubleshooting Questions

  • Ask “What has change since it was working correctly”?
  • Ask “What if…”? (What if I tried this or maybe that?)

Research online, you are most likely not the first to encounter the problem.

8

Robot Design: Troubleshooting 101 – Coach Series

9 of 42

General Troubleshooting

  • Check the robot thoroughly for loose or missing part.
  • Carefully watch the robot while it is running.
  • Change perspectives, watch from a different angle.
  • Use video to record and watch it again and again.

“The best thing about LEGOs is they come apart.

The worst thing about LEGOs is they come apart.”

-unknown

9

Robot Design: Troubleshooting 101 – Coach Series

10 of 42

General Troubleshooting

  • Reboot the SPIKE™ Prime or EV3 brick (Power down and power up).
  • If you cannot power down, do a manual reset of the EV3 brick (See Manual Reset).
  • If steps 1 and 2 fail, remove and reinstall the battery.

Note: Always check backwards compatibility of firmware before updating.

  • Check for firmware and application updates.
  • Reload the program.

10

Robot Design: Troubleshooting 101 – Coach Series

11 of 42

Opps!

When something goes wrong, wouldn’t it be nice to have an undo button?

Hardware Undo

  • Take photographs of the robot periodically.
    • Not only does this help you return to a previous builds but can be used in your robot design presentation.
    • Since most schools have no cell phone policies, a simple USB camera can be used. (The type used for video conferences.)

Software Undo

  • Make daily backups of programs.
    • Use a filename dating system, for example: 2022.03.11filename
      • Keeping on a shared drive or cloud application allows access by all team members.

11

Robot Design: Troubleshooting 101 – Coach Series

12 of 42

Common Problems and Fixes

12

Robot Design: Troubleshooting 101 – Coach Series

13 of 42

Motor or sensor is not working

Connect the SPIKE™ Prime or EV3 to a computer by Bluetooth or USB cable.

For SPIKE™ Prime, launch LEGO® Education SPIKE™ Prime application and use Hub Connection to verify the SPIKE™ Prime Hub is communicating with the motor or sensor.

For EV3, launch Mindstorms EV3 Classroom application and use Hub Connection to verify that the EV3 brick is communicating with the motor or sensor correctly.

For EV3, launch Mindstorms EV3 (LabView) application and use Port View to verify that the EV3 brick is communicating with the motor or sensor correctly.

13

Robot Design: Troubleshooting 101 – Coach Series

14 of 42

Motor or sensor is not working

For EV3 using the Classroom Application, with the robot connected to the computer, check on the Hub Connections that motor or sensor is connected.

  • Check which port the motor or sensor is plugged in to.
  • Ensure the cable is connected at both ends by removing and inserting it until you hear the click.
  • Change cable with another cable.
  • Change the motor or sensor.
    • You do not need to rebuild the robot, simply plug in the other motor or sensor and if it works, then you replace it on the robot.

14

Robot Design: Troubleshooting 101 – Coach Series

15 of 42

Motor or sensor is not working

For EV3, with the robot connected to the computer, check the port settings in your program.

  • If you see an exclamation mark in a yellow circle above a block in your program, it identifies that the motor or sensor and the selected port in the program block do not match.
  • Check which port the motor or sensor is plugged in to.
  • Ensure the cable is connected at both ends by removing and inserting it until you hear the click.
  • Change cable with another cable.
  • Change the motor or sensor.
    • You do not need to rebuild the robot, simply plug in the other motor or sensor and if it works, then you replace it on the robot.

15

Robot Design: Troubleshooting 101 – Coach Series

16 of 42

Robot not moving straight

  • If a robot is turning to one side, the drive wheels are traveling at different speeds.
    • If the robot is turning right, the right wheel is moving slower than the left wheel. Check the right wheel for friction causing it to move slower.
    • If the robot is turning left, the left wheel is moving slower than the right wheel. Check the left wheel for friction causing it to move slower.
  • Verify that both wheels are the same size� and mounted in the same direction.
    • LEGO® rims are sometimes offset. The center is closer�to one side of the wheel.
  • Verify both tires are completely mounted on the rims.

16

Robot Design: Troubleshooting 101 – Coach Series

17 of 42

Jumping or erratic robot movement

  • Does the robot have a caster and ball?
  • Caster balls can become dirty over time. Remove the caster ball and clean caster and ball with soap and water or isopropyl alcohol. Dry the ball before putting back in.
  • To remove the ball, push a LEGO® axle through the hole in the top of the coupler apply pressure until the ball pops out.

FLL-C® rules do not permit the use of lubricants.

CASTER INCLUED WITH SPIKE PRIME KIT

CASTER INCLUED WITH EV3 KIT

17

Robot Design: Troubleshooting 101 – Coach Series

18 of 42

Battery charge may impact performance (EV3)

  • The Mindstorms® and SPIKE™ Prime motors are DC motors. Motor performance will vary depending on battery charge.
  • For example, the EV3 large motor running battery charge of 9 volts (full charge*) is estimated at 52 RPMs and at 7 volts is 39 RPMs.

* The EV3 rechargeable battery may show over 9 volts at full charge.

  • Keeping the battery at consistent charge will help consistent robot performance.

EV3 LARGE MOTOR

18

Robot Design: Troubleshooting 101 – Coach Series

19 of 42

EV3 brick charge indicator green, but no power

Problem:

The EV3 brick or SPIKE™ Prime charge indicator displays green (Red and green indicate charging), but the brick does not power on.

Troubleshooting:

  • Check the battery springs (contacts) to make sure they are not bent, missing, or corroded.
    • If bent, carefully bend back into place.
    • If corroded, clean.
    • If missing, replace brick.
  • Try another battery if available.

19

Robot Design: Troubleshooting 101 – Coach Series

20 of 42

EV3 flashes red briefly then stops

Problem:

EV3 indicator lights flash red briefly like it is starting but stops and lights go out.

Troubleshooting:

  • Check charge level of battery.
  • Try another battery if available.
  • Reinstall firmware.

20

Robot Design: Troubleshooting 101 – Coach Series

21 of 42

Use EV3 Port View

  • Port view allows you to view what motors and sensors are connected and the data they are sending back to the EV3 brick.
  • Open the EV3 Mindstorms software.
  • With the EV3 brick powered on, connect the EV3 to the computer by Bluetooth or USB cable.
  • In the lower right corner of the computer screen, select Port View.

21

Robot Design: Troubleshooting 101 – Coach Series

22 of 42

Using Wait blocks

  • When trying to isolate a problem in a program, Wait blocks can be used to “pause” the program.
  • This breaks the program into smaller sections to allow diagnosing what is happening in sections.
    • Insert a wait until block.
    • In the block input, insert a [Hub] is [left/right] button [pressed/released]? setting

Setting to released reduces the chance of interfering with the robot’s movement

22

Robot Design: Troubleshooting 101 – Coach Series

23 of 42

Using Wait blocks (continued)

    • Insert a Wait block at the point in the program you want to pause.
    • Set the Wait block to Brick Buttons – Compare.
    • Set the Set of Brick buttons IDs: to [2].
    • Set the State to 0.
    • Download and run the program. The program will execute to the point of the Wait block and pause until the EV3 center button is pressed and released.

23

Robot Design: Troubleshooting 101 – Coach Series

24 of 42

Watching program execute on screen

When the EV3 brick is connect by Bluetooth the Mindstorms EV3 (LabView) application indicates which block is current running by the colored bar scrolling.

This can help you isolate where the program is failing.

This block is currently running

24

Robot Design: Troubleshooting 101 – Coach Series

25 of 42

EV3 brick displays “Starting”

Problem:

The EV3 brick’s display “starting” but does not finish powering on.

Troubleshooting:

  • Reload the firmware.
  • Remove the battery and then reinsert it.
  • Hold down the Center and Right buttons until the display says “Updating…”
  • On the computer, open the EV3 Software.
  • Connect the EV3 brick to the computer with the USB cable.
  • From the Tools drop-down menu, select Firmware Update.

25

Robot Design: Troubleshooting 101 – Coach Series

26 of 42

EV3 firmware update fails

26

Robot Design: Troubleshooting 101 – Coach Series

27 of 42

EV3 brick hangs during firmware update

Problem: The EV3 brick hangs during a firmware update.

Troubleshooting: Manually update the firmware.

  • Open the EV3 Software on computer and connect your EV3 to the computer with the USB cable.
  • Hold down the Back, Center, and Right buttons on the EV3 Brick.
  • When the EV3 brick restarts, release the Back button.
  • When the screen says “Updating,” release Center and Right buttons.
  • On the computer, select the Download button in the Firmware Update tool. The firmware will be downloaded to your EV3 Brick, which will restart itself.
  • If the manual firmware update does resolve the problem the first time, repeat the manual update process.

27

Robot Design: Troubleshooting 101 – Coach Series

28 of 42

EV3 Manual Reset

Problem: The EV3 brick stops working and will not turn off.

Troubleshooting: Perform a manual reset.

  • Hold down the Back, Center, and Left buttons on the EV3 brick.
  • When the screen goes blank, release the Back button.
  • When the screen says “Starting,” release the Center and Left buttons.

EV3 User’s Guide: Resetting the EV3 brick does not delete existing files and projects from previous sessions in the EV3 brick memory. Files and projects from the existing session will be lost.

28

Robot Design: Troubleshooting 101 – Coach Series

29 of 42

SPIKE™ Prime Hub Reset

To reset your Hub to factory settings:

  • Select the Hub Connection Icon on the Programming Canvas
  • Select the More Button (···) in the Dashboard tab and select Reset Settings.
  • Select OK to confirm the reset or Cancel to keep the current settings.

Be careful - resetting your Hub will delete all your programs, and they can’t be recovered!

29

Robot Design: Troubleshooting 101 – Coach Series

30 of 42

SPIKE™ Prime – Robot moves backwards

Problem: Motors are configured incorrectly.

Fix:

  • From an opened program in the SPIKE™ Prime Application, insert a set movement motors to block.
  • Double click the motors selection input. The motor settings dialog displays.
  • Configure motor ports by selecting the left motor then the right motor.
    • This sets motor on right to rotate clockwise and the motor on the left to counterclockwise.

30

Robot Design: Troubleshooting 101 – Coach Series

31 of 42

SPIKE™ Prime does not move the correct distance

  • Problem: The robot does not move the entered number of centimeters.

Fix: Set the circumference of the wheel.

  • From an opened program in the SPIKE™ Prime Application, insert a set 1 motor rotation to block.
  • Select the input, and enter the circumference of the wheel on the robot:
    • SPIKE™ Prime small wheel is 17.5 cm.
    • SPIKE™ Prime large wheel is 27.6 cm.

31

Robot Design: Troubleshooting 101 – Coach Series

32 of 42

SPIKE™ Prime Hub's color-coded error messages

  • Center Button is flashing red
    • There was an error on your Hub or with the program it was trying to run. This can likely be solved by fixing errors in your program and running it.
    • In some cases, you might have to restart the Hub by holding down the Center Button for approximately 3 seconds.
  • Center Button is flashing orange
    • The Hub's battery is running low. Connect the Hub via the USB cable to begin charging the battery.

32

Robot Design: Troubleshooting 101 – Coach Series

33 of 42

SPIKE™ Prime Hub's color-coded error messages

  • Connection Button is flashing violet/green/blue
    • Your Hub Operating System (OS) has been recently updated, and your Hub needs to be restarted.
    • Restart your Hub by holding down the Center Button for approximately 20 second.

33

Robot Design: Troubleshooting 101 – Coach Series

34 of 42

The SPIKE™ Prime Heart Program

The SPIKE™ Prime Heart Program is a great resource for quickly testing sensors, controlling motors, or controlling a motor with a sensor.

  • To run the Heart Program, start the hub, wait for the heart to display, and press the center button.
  • When a sensor is connected, the LEDs in the row next to the port illuminate in series from the sensor to the other side representing input from the sensor. This confirms the sensor is recognized by the Hub and that port is working.

When both sensors and motors are connected, the motors can power on.

34

Robot Design: Troubleshooting 101 – Coach Series

35 of 42

The SPIKE™ Prime Heart Program (continued)

  • Connect one or more motors while the Heart Program is running and then press the left or right arrow buttons to change the speed of the motors.
  • The direction in which the motors turn depends on which button is pressed and the side of the hub that each motor is connected to.
  • If you want two motors to move in opposite directions (e.g. for a driving base), then attach them to opposite sides of the hub.

35

Robot Design: Troubleshooting 101 – Coach Series

36 of 42

The SPIKE™ Prime Heart Program (continued)

  • When a sensor and motor are connected to ports across from each other, the sensor controls the motor.
    • Example: the force sensor when pressed will power the motor on, the more force applied the faster the motor will run.
    • This verifies the Hub ports, sensor and�motor is functioning.

For addition information:

https://community.legoeducation.com/blogs/31/77

https://youtu.be/xUYNxi3gEzs

36

Robot Design: Troubleshooting 101 – Coach Series

37 of 42

Preserving the SPIKE™ Prime Hub’s battery life?

If the SPIKE™ Prime Hub isn’t going to be used for an extended period, it is recommended to fully-charging the battery before storing it.

You can also extend the battery life by removing the battery from your Hub before storing it.

Storing the Hub with a completely drained battery is not recommended.

37

Robot Design: Troubleshooting 101 – Coach Series

38 of 42

Heads up! Error Message Workaround

  • The dreaded message of “Heads up! Could not open project” is not a complete lost. But will still require reentering the code.
  • The following method shows you how to get an image of your entire code so that you can copy from it.

38

Robot Design: Troubleshooting 101 – Coach Series

39 of 42

Heads up! Error Message Workaround - Steps

  1. Make a copy of the corrupted file.
  2. Change the file extension from .llsp (.llsp3) to .zip.
  3. Select yes on the dialog that warns about changing the name.
  4. Open the zipped folder (you can extract the files, but it isn’t necessary).
  5. Open the .svg file in a browser (Google Chrome, Firefox, Microsoft Edge, or photo editor ).
  6. Open a new SPIKE™ Prime project and reenter the program based the image.

Can also be used for images to use in Robot Design presentation

39

Robot Design: Troubleshooting 101 – Coach Series

40 of 42

Project Download to Hub Fails after Copying

Symptom: After copying and pasting a section of code from a project to a new project, the new project will not download to the hub displaying Something went wrong message.

Check 1: Does the code copied contains a My Block?

Check 2: Was the My Block code copied to the new program in addition to the My Block input block?

    • If the My Block was not copied to the new project.
    • In the original project, click on the top red block of the My Block.
    • While holding the [CTRL] and press the [c] key.

40

Robot Design: Troubleshooting 101 – Coach Series

41 of 42

Project Download to Hub Fails after Copying

    • Navigate to the new program.
    • While holding the [CTRL] and press the [v] key.

Tip: You may need to fit canvas to window to see the My Block on the new project canvas.

    • From the bottom toolbar select the Zoom to fit button.
    • Select and hold the top red block of My Block and drag to the desired location on the project canvas.
    • Select the Zoom to fit button.

41

Robot Design: Troubleshooting 101 – Coach Series

42 of 42

Everything is awesome!

-Emmet Joseph Brickowski

42

Robot Design: Troubleshooting 101 – Coach Series