Robots on tour!

Introduction
Public summary: 

Learn to programme LEGO Mindstorms and learn about IF statements and LOOPs.

Challenges that can be done with robots in a relativley short time period.
Useful information
Kit List: 

Lego Mindstorms EV3 Robot kit (There are four robots in two cases)
18 x AA Batteries (Currently there are 16 rechargeable and 2 non rechargeable)
2 x Recharge stations
1 x Green fabric with blue fabric "pond" sewn on

Packing Away: 

Close the mindstorms program and turn off the computer and robots.
Remove the cables that connect the EV3 Brick from the motors and the sensor and place them in the yellow box.
Disconnect the EV3 Brick from the rest of the robot. This should be simple to do as the base has been designed so that this can be done without difficulty
Take the batteries out of the EV3 Brick and put them into the yellow box. Ensure all batteries, especially those which are charging are placed in the box too.
Take the sensor off the robot. This and the EV3 Brick should be placed in the yellow box
The base which should still include the motors should be wrapped in the bubble wrap it came in.
The bubble wrapped frame and mat go into the same carrier bag.
The laptop and its charger should be put back into its bag.

Frequency of use: 
1
Explanation
Explanation: 

Set up:

For the computer:
Turn on the CHaOS laptop (currently 2,3 and 4 have the software installed but it is free to download from the lego website)
To login the password is CHaOS (capitalised correctly)
Start the lego mindstorms program
Go to file -> new project. If you want to be able to find programs you have created more easily I recommend you go file -> save as.
It is also possible to double click on the program name to rename it. At public events I like to ask children their names and name it that so which program is theirs can be easily seen.

For the robot:
If you aren't sure of the level of charge immediately start charging its batteries
If you are confident the batteries are suitably charged, put the batteries into the EV3 Brick.
If the robot is damaged, fix it (I need to take pictures so everybody knows what it looked like).
The Ev3 Brick should be put onto the robots base.
Connect the colour sensor to port 3, and the motors to ports B and C. The motor wires should cross due to way the steering works

The programming
Ideally you should experiment with the robot before you start demonstrating. All programs consist of series of blocks that contain instructions which the robot will follow in order.
There are four blocks that I use more than the others:
Green Tab, 3 along. This is "Move Steering" with this you can control which direction the robot turns and how tightly, which direction it will travel and how fast and how long it will do so for. Alternatives to this would be the "Move Tank" and "Large motor" Blocks which I feel are less intuitive
Green Tab, 7 along. This is "Brick Status Light". It can be set to three different colours and be on continuously or flash. It is useful for identifying sensor inputs easily. An alternative to this would be the "Sound" block which I find is too quiet too be heard in a room full of children. The "Display" block can also be used too.
Orange Tab, 3 along. This is the "Loop" Block. Loops are an important concept in programming and quite simple. It works especially well in combination with the next block.
Orange Tab, 4 along. This is the "Switch" block and is the most interesting block I frequently use as it allows the robot to make decisions based on inputs. I use the colour sensor but if you wanted to make modifications there is potential for other sensors to be used. If you want to follow the edge of a colour I would recommend using compare colour. If you wanted to stay with in a coloured area separated by two different colours you would use measure colour. Compare is more reliable as it can tell whether or not something is a certain colour quite well, but with measure it can be hard to determine what the robot will decide it is e.g. purple when you are asking it to choose between red and blue. The two 'paths' of the switch should have the robot turning different directions or travelling in different directions in order for something interesting to be observed.

There's full support for variables (but that doesn't mean you want to use them and it's easier if you don't however for advanced groups) you drop a variable box to create a variable ad it's name is in the upper right and it's data type in the lower left. Operations performed using maths boxes and the lower left box sets the operation and the next two boxes the arguments, these can be variables connected via a data wire. The output can be saved as a variable using a data wire and setting data type as write number.

Demonstrating:
I start off by asking them their names so that we have an easily identifiable program (In schools the groups will likely be too large for this. I then ask them, what do robots do? You will get a range of different responses, sometimes close to the answer of "they follow instructions". I then introduce the program to them and tell them that the blocks are just instructions for the robot.

Depending on the age of the children you can ask them what they want it to do e.g. "Do you want it to turn left or right?" and program it yourself or tell them "this slider controls how it will turn" and let them do it. After they have made their block they need to download the program to the robot.

Connect the cable to the computers USB port and the pc port on the output side of the robot. Press the download arrow in the bottom right of the screen. It may be grayed out if you have just connected the robot. After you have pressed download the robot will make a noise. This means it has downloaded. You will now need to look for your program on the robot. Go to the file tab, pick the correct project, then scroll down to the correct name. Get the child to verify that that is their name on the program that is about to be run. Place the robot in a suitable space and let them press the middle grey button.

You can then move on to making the program more complex, normally by making lights flash and a second movement block. If you think they are mature enough move on to using the sensor. Delete the previous program and put the loop and switch in place. Let them chose what they want in each option but give hints so that it ends up doing something interesting.

If they really want to do more let them, but I normally end by discussing in which jobs are robots most useful. The boring ones (painting cars), and the dangerous ones (missions to mars).

To get ready for the next child create a new program and keep the old ones as some may do interesting things which take time to program. However keeping too many programs can resulting in downloading taking more time.

Advice for demonstrating in Schools:
- It is more important that you don't keep the children for too long, this experiment can easily take 20 minutes if you try to get them to do the line following even with significant prompting.
- Try to ensure that all students make an input to the program, this becomes more difficult with larger groups
- For primary school students it is probably fine to ignore the sensor completely and just let them play around making a basic program with flashing lights, sounds and movement.
- For older secondary age (Y9+) students you should try to get them to do line following.
- For children in Y7&Y8 ask them whether they want a challenge (line following) or just to play around.

Big Kids/PLUS/whatever we are calling it now
The line following works well for this age as most have not done significant amounts of programming so it will still be a challenge. For students who complete that quickly you can push them further. Instruct them to start far from the blue and travel in a straight line until they hit the pond then follow it around, stopping when they get to a red piece of card.

You should not let yourself be restricted by these instructions if you have other ideas of how to run this. There is a huge potential of things that could be done.

The below sections are not part of a demonstration but are retained as they could be used in future designs

Maze

A simple maze can be created with the wooden blocks or cardboard. The challenge is to program the robot so that it can navigate its way through the maze without any outside influence once it has started. This can be be done in several ways that progressively advance in difficulty:
1. Dead reckoning: the robot is programmed to move forward a certain angle, turn, move forward another certain amount and so on. This requires no sensor use and the robot is likely to generate errors in its positioning as it moves further. The robot could potentially fitted with a missile to try and hit targets once it has been through the maze.
2. Sensors with knowledge of the maze: The robot is equipped with touch/light sensors on its front and detects when it hits an obstacle. With knowledge of the maze, it will be possible for children to have set the correct direction for the robot to turn. The robot should be able to progress through the maze with smaller errors.
3. Sensors and a generic maze: The robot will be programmed to turn whenever it hits an obstacle and if that turn leads to another obstacle it will turn the other way. Through use of counters it could even find its own way back through the maze with little crashing. Sensors on the sides could be used to correct its course if it has a glancing impact with the wall.
4. Maze with coloured tiles. Using the ability of the robots to detect colours we can tell them to perform certain actions when they see a certain colour.
This compares well with the simple Turtle Robots which are often used like this and you can read the RA for that to find information about programming them in this style.

Robot Writer

The A3 sheet will be placed under the wooden blocks used for the maze so that it does not slide. The robot will be equipped with a pen holder arm that will be raised or lowered as necessary. This arm could be stationary relative to the robot or could move, allowing more effective writing to be used. The movements are likely to be by dead reckoning.
Children could be instructed to program the robot to make letters of the alphabet and write words. A simple task could be for them to write the word CHAOS. They would create a sub-program for the letter "H" and then add it to to subprograms created by the demonstrator that write the other letters.
Potential inputs could be morse code claps to be picked up by a microphone and subsequently written down by the robot. This bit is likely to be too advanced for the time we have but could be used in less time sensitive places such as public events.

Risk Assessment
Date risk assesment last checked: 
Tue, 06/02/2018
Risk assesment checked by: 
jaredjeya
Date risk assesment double checked: 
Tue, 06/02/2018
Risk assesment double-checked by: 
J_Tumelty
Risk Assessment: 
Description Laptops with NXT programming software installed:
Hazard Risk Likelihood Severity Overall Mitigation Likelihood Severity Overall
Power cables Trip hazard. Likelihood score Severity score Overall Ensure wires are either taped securely to surfaces, or are placed behind tables, so no one walking past will catch themselves on the wires.
In case of an accident, turn off power at the mains, do not touch any other components, such as the laptop or its battery. Call first aider.
Likelihood again Severity again New overall (hopefully better than the first)
Electrical components See electrical hazard RA. Likelihood score Severity score Overall All laptop chargers will be PAT checked for safety and will be kept out of reach of children.
See electrical parts RA.
Likelihood again Severity again New overall (hopefully better than the first)
Description Lego Mindstorms NXT Kit
Kit consists of control brick, with enclosed batteries, associated cables to connect the brick to peripherals, and Lego pieces to construct robots with. Motors and sensors are also provided:
Hazard Risk Likelihood Severity Overall Mitigation Likelihood Severity Overall
Small Lego parts Swallowing hazard for small Lego components Likelihood score Severity score Overall All visitors will be monitored regularly by demonstrators to ensure they do not swallow any lego. The robots are largely pre-built, minimising visitors' use of individual parts, and any modifications will be supervised by a demonstrator. Particularly young children will be supervised closely, though it is unlikely that very young children who may swallow parts will be present as the workshop is targeted at older children.
Call a first aider if Lego is swallowed.
Likelihood again Severity again New overall (hopefully better than the first)
Motors Short circuits in motors. Likelihood score Severity score Overall Motors are sealed in a robust manner, so any short circuits will result in a simple failure, with no risk to users. In the very unlikely event of an exposed short, voltages and currents used are very low (powered by 4 AA batteries), so present no significant risk to users.
If short circuit occurs, power down the robot and do not use the kit further. Call a first aider if required, though risk here is minimal.
Likelihood again Severity again New overall (hopefully better than the first)
Motors Objects wrapping around motors i.e. hair. Likelihood score Severity score Overall Motors are sealed, so hair is unlikely to be caught, though it may be caught by gearing systems. All visitors will be made aware of the risk and asked to ensure any dangling objects on their person are kept out of the way. They will also be made aware of the emergency stop, which will shut off all motors instantaneously.
Immediately stop robot if anything is caught in motors. Call a first aider if required, though risk here is minimal.
Likelihood again Severity again New overall (hopefully better than the first)
Robots Robots falling off tables and hitting small children/sitting children. Likelihood score Severity score Overall Robots should be used on the floor unless they are immobile or all children present are standing and have their heads above the edge of the table
a first aider if required.
Likelihood again Severity again New overall (hopefully better than the first)
This experiment contains mains electrical parts, see separate risk assessment.
0
Images