video

Lesson video

In progress...

Loading...

Hello, I'm Mr Donnelly and this is the third lesson in a unit of four all about technology of the future and the big question that I have for you today is can you cope without microcontrollers in your life? Now you may think, of course I can cope without a microcontroller in my life, and if you think that, maybe it's because you are slightly unaware of what one is and you will have heard of a microprocessor, no doubt, lots of people talk about those when discussing computers, but microcontrollers are something slightly different, very exciting, but you'll find out all about them in the lesson and I hope that you think you can get through a day without one.

There are three things in this lesson that I'd like you to be able to do.

The first one is understand what a microcontroller is.

The second is to be able to spot the type of electronic products that might contain them.

Then the last one, I'd like to do this as we run through the lesson, I'd like you to be able to consider what life might be like without them.

As always, you're going to need some paper and a pen or pencil to write with.

If you've not got those things, pause the video, go and get them, then hurry back and we'll crack on.

This lesson contains really subjects specific terminology and it's important to understand from the start.

So I've said that the lesson is about microcontrollers, yet the first word I'm going to flag up is microprocessor.

It's important to know the difference.

A microprocessor is one of the main parts on a computer that alters it's performance.

It's brilliant but it needs other things to go with it, such as memory and a hard drive and things like a graphics card also.

So if you're building a computer, you need to buy all these parts to make your computer work, then a computer can perform multi tasks at the same time.

Microcontroller, this one here, this is a BBC micro:bit, you might have seen them at school, that's a little mini computer and it's got a processor and memory all on board and you can even connect to different inputs and outputs and you can programme them to do simple individual tasks.

The last term is RAM and ROM.

So RAM is Random Access Memory, that's like the computers short term memory and it allows it to switch between applications at high speed.

So the more RAM you have, the faster you can have your computer running and it will appear like a higher performance machine.

So if you want to upgrade the speed of your computer to buy a stick of RAM, that's the term, you buy a stick of RAM and you may replace it within the motherboard of your computer.

ROM, stands for Read Only Memory and this is what's used to contain the information for your operating system, so when your computer starts up, it's using Read Only Memory.

It's important now that we just get a clear picture of what a microprocessor is and I'll show you one here and this is on the motherboard of a computer.

So microprocessors can perform multi tasks at the same time.

You need to buy memory, that's the next picture where it's got two images at the front and back of a memory stick and a hard drive and computers, tablets and phones all contain these parts and they're super fast now.

Phones have got more processing power than computers had a while ago.

Real high tech pieces of equipment.

So if you pause the video now and just try to think for a minute all the different applications that you sometimes run on even your phone, tablet or computer, you would not be able to do any of those things if you were using a microcontroller.

The next term, microcontroller.

Now, the BBC micro:bit that I showed you a minute ago, these are fantastic.

You can programme them to do all sorts of really cool things and I'll talk about what you can do towards the end of the lesson.

But they contain their own CPU, so Central Processing Unit, they've got memory and along the bottom, I'm going to try and show you here, these little holes may be a little bit blurred for the camera, but you can connect inputs and outputs, so switches, buzzers, lights, motors to the micro:bit and you could even have a fan come on if it was too hot.

So the micro:bit has got a built in thermometer and it will allow the temperature to be checked all the time and a fan could turn on if it reached a certain temperature.

Now you would programme the micro:bit, the microcontroller, just to do that one function.

It wouldn't do anything else, it would just be a little computer to turn on a fan when a certain temperature was reached.

So they're amazing for doing simple tasks, but they're not for multi tasking like a computer with a microprocessor.

So, we're going to pause the video now and I will run through exactly what the task is.

Next time your washing machine starts, I'd like you to be there when the start button is pressed and you try to work out for the first and last five minutes, what things you think might be controlled by a microcontroller.

Now you know that things within the washing machine, there will be microcontrollers, it's not multi tasking.

It's not also a microwave, it's not also a toaster, it is a washing machine and there are certain things that will be controlled by a microcontroller.

So I'd like you to make a list of what happens in the first five minutes, what happens in the last five minutes and you try to come up with a good list of what you think a microcontroller is responsible for.

So, how did you get on with the task? I hope that it's worked out and that some washing was being done during the lesson, or even better, if you could have gathered some washing and help out at home to go do the washing yourself in the middle of my lesson, that would be awesome.

But in all seriousness, the things I actually hope that you've managed to spot is as soon as you start the washing machine, I've got a few bullet points here that I'll run through of some key things that happen.

So, you'll hear a click and that's normally the door locking.

The next is water would be allowed into the drum via the cleaning solution drawer, the wash cycle will then start.

After that, the water is drained out because that water will contain the dirty water from washing your clothes and the cleaning detergent.

Clean water then needs to come back in and then a spinning cycle will happen.

So for each step of those, there will be some control by a microcontroller.

Valves will be opened and closed to let the water flow.

So when the water comes in from the main supply, a valve will have had to open to allow the water to flood in and then it will shut.

Once the washing machine is spinning, then a valve will open to drain the water and another one will open for more clean water to enter as well.

The washing machine door will not open during a cycle, so all of these sensors are within the washing machine that are letting the microcontroller know where the cycle is up to and which input and output is being activated, or needs to be activated to allow something to happen.

Also water is heated along the way, depending on what type of wash it is that you've decided on and then also a different spin cycle can happen as well.

So really, a washing machine is quite a simple application, but the way that it works is just by a microcontroller and it will follow a pattern of whatever needs to happen based upon the settings that you select.

So the dial on the front, that let's the microcontroller know which cycle to run with so if you were picking a cycle to wash a shirt, such as this, you want might want to wash at 60 degrees and the washing machine will know that through the dial that you turn.

If you want to wash at 30 degrees, you put another setting and the microcontroller will know only to heat the water to 30 degrees and there will be a thermostat, or thermometer within the washing machine that let's the microcontroller know that the water's at the correct temperature.

So if you pause the video for a second and just have a think through of how amazing the washing machine is, but then also how simple it is really when you think about the programme that would run on a microcontroller.

Another application for microcontrollers are with heating systems in a house.

So now, a lot of people will have things such as Hive technology, you could have a phone where you can even turn your heating on from away from the home.

So if you know that you're out and you think, oh it's cold and the heating's not on, you can actually activate your heating via the phone.

How do you think that happens? So how do you think it's possible to turn your heating on from your phone? How do you think you can set the temperature with your phone when you're not even in the house? How do you think your house knows how hot it is and how do you think that the unit on the wall communicates with the boiler? There's lots and lots that you could find out, but microcontrollers are at the heart of all of the decisions that are made for whether the boiler comes on or not based upon a programme which is written for the microcontroller to follow.

So if you pause the video now, you can have a quick little look on the internet to try to find some of these answers.

How do you think it all works? The pre-task information which I've got here is all about making a drink.

So I'm sure all of you have been through a vending machine at some point and selected a hot drink.

My guess would be, it's hot chocolate.

So, if you wanted to make a perfect drink or design a machine to make a drink for you, if you just think for a minute about all the things that are necessary.

The first thing is, we're going to need some water.

The water would need to come to a certain temperature.

If it was a cup of tea, it my need to brew for a certain amount of time.

Some people add milk and sugar to their drink to make it perfect for them and then some drinks, they've even got hot milk that's frothed and put in a fancy pattern on top.

So how do you think a microcontroller could work to make sure that all those steps happen at the right time and for the right length of time.

So the water needs to be heated until it's boiled.

A teabag might need to be in place for a certain length of time.

It sounds really simple, but it could be quite complicated to design.

So pause the video now and you just have a think about all the things that a microcontroller would have to do for the drinks maker that you're doing to design in a minute.

So the task, to explain this simply.

If you think back to the washing machine task, I want you to list the steps that your drinks machine would need to perform, some of them I've mentioned already.

You can rewind the video to mention the things that I said about making a drink and then once you've done that, if you make sure you go over the list again and pretend to be a little bit robotic.

So think to yourself, has the water come in to the system is the right amount of water in.

How much water do I need? How hot does it need to be? What happens next to the water? How does it get from one place to another? It all sounds simple, making a cup of tea, but if you were programming a robot to do all the things that are necessary using a microcontroller and a simple flow diagram of what needs to happen and for what length of time, it can get quite complicated.

So just simply write out a list of bullet points, all the things that the microcontroller drinks maker would need to do and then we'll see where we are in a minute.

You might have heard of the term flow chart before.

If ever you buy an electronic product and it stops working, quite often at the back there is a flow chart and a flow chart will give you a series of logical steps that you follow and if you follow them you should be able to get your device working again.

So the first thing might be switch on the device.

Is there an LED lit? Are there batteries in? Are the batteries charged? All simple things that you would ask to try to work out a logical sequence to get to the route of what the issue is with the thing that you've bought.

What we're going to do with a flow chart is develop a way of giving instruction to a microcontroller to make our drinks maker.

So, most flow charts all start with that oval shaped box and that lets you know that the system, the flow chart is starting, so you have one at the beginning and one at the end.

The next box, which is a rectangle, you write down what the process is, so what's happening in that box.

A decision box might say something like, are there batteries in? And if there are no batteries in the device that you're checking then you would pop batteries in and if the answer to that was yes, you would progress down through that diamond box to the next part of the flow chart.

If there are no batteries in, you'd go back in a loop to put batteries in the device and then follow down after that.

The next shape represents different inputs and outputs, so is an input on or off? And is an output visible or something that you could hear.

So if we had a switch, I might say is the input on or off and if we had an LED, is that lit or not? So inputs and outputs are things that you can normally see or hear.

A decision is has something happened.

A process is something that you need to do.

Then the start and stop or end, that lets you know when the flow chart finishes.

So those symbols you become familiar with those, you'll find it quite logical to write out a set of instructions.

What I've done here is I've gone to list the simple way of brushing your teeth.

So, we've got the start, I've decided to use an input, output box for wet the brush and put the toothpaste on.

After that, put is the brush wet with toothpaste? So if it's not, then you go back round and that would need to be done again and then the flow chart follows round to say brush all parts of the mouth for two minutes and then rinse the brush and start.

You can actually elaborate and add a little bit more to that as well, but I've tried to keep it simple just to make it clear.

The next slide now, you're going to design a flow chart just for one stage in the programme of your drinks maker.

So making a hot drink, like a hot chocolate, it can be quite complex, so you might decide just to focus on, I'm going to make sure that the water comes from the main supply and is heated.

And that might just be the one bit that you focus on.

Some people might focus on, well I want to get to have the drink.

So I'm going to work out what needs to happen in my system from the hot water coming into a cup to me being able to take the cup out.

So a microcontroller can be programmed with a flow chart.

Write a short flow chart for one stage of your drink making process and one stage, such as adding a teabag could take a few flow chart boxes.

So it sounds really simple, but if you look back a slide to the boxes I used for brushing my teeth, you should be able to apply the same strategy for one part of your drinks maker.

I've talked about a mirco:bit before and if you look closely at the larger picture, that shows the front of the micro:bit and if you can explore this further, maybe when you get back to school, ask your teacher if they've got a micro:bit and if you can have a go at programming it.

They're really straight forward and they can work on a flow chart system as well and you can even programme one online without owning a micro:bit yourself.

So it will do an online simulation and the front of it here, if you read carefully, it will show you some of the key features.

So it's got a microphone, it's got a speaker, an accelerometer, that measures the speed.

So you can actually throw a micro:bit and then it will tell you how fast it's travelled.

It's got a compass that you can shake them about and it will act as an input for the LED pattern which is on the back.

The little holes along the bottom, I tried to show you these earlier in the video, different inputs and outputs can be added to those so you could actually connect one micro:bit to another or you could add LED's or a fan and other devices.

So a mirco:bit is a computer in it's own right with it's own processor and memory on board.

You programme it on screen, plug it in to a computer and you download the programme and then you can unplug it from the computer and use it for controlling many different things.

You could even devise your own alarm or temperature control system for in a bedroom and have a fan come on when it reached a certain temperature so they're amazing, you can do lots with them and it'll just be something to leave you with, to be able to think, go and have a play and see if you can investigate what you can do with a micro:bit yourself if that's the sort of thing that interests you, as it does me.

We've come to the end now, where we'll just go over some of the key words just to make sure you fully understand.

So the first one was microprocessor.

This was the part of a computer responsible for the thinking, like the brain of a computer and you know that you need many other parts to go with it and a microprocessor can multi task.

A microcontroller follows a set of instructions that you programmed.

It will question decisions, so it's an output, on or off and it can control simple procedures, such as is it hot, I'll turn on a fan.

Is it cold, I'll turn off the fan.

The next two terms was RAM and ROM.

So RAM is Read Only Memory and RAM is the thing that you can buy to upgrade your computer and it acts as short term memory for your system and ROM is a read only memory and that's what opens up the operating system on your computer.

So I hope you've been as excited for this lesson as I have.

Definitely try to look into getting a micro:bit or having a go with one when you get back to school and I will see you in the next lesson.

Thank you very much.